[Gnucash-changes] Collapse the gnome2 branch back into HEAD.

David Hampton hampton at cvs.gnucash.org
Tue Nov 1 22:33:07 EST 2005


Log Message:
-----------
Collapse the gnome2 branch back into HEAD.

Modified Files:
--------------
    gnucash:
        .cvsignore
        AUTHORS
        ChangeLog
        HACKING
        Makefile.TAGS
        Makefile.am
        README
        TODO
        autogen.sh
        configure.in
        ltmain.sh
        make-gnucash-potfiles.in
    gnucash/doc:
        .cvsignore
        Makefile.am
    gnucash/lib:
        Makefile.am
    gnucash/lib/libc:
        Makefile.am
    gnucash/m4:
        ChangeLog
    gnucash/macros:
        .cvsignore
        aqbanking.m4
        autogen.sh
        gnome-guile-checks.m4
    gnucash/po:
        POTFILES.in
    gnucash/rpm:
        .cvsignore
    gnucash/src:
        .cvsignore
        Makefile.am
        gnc-ui.h
        guile-mappings.h
        valgrind-gnucash.supp
    gnucash/src/app-utils:
        Makefile.am
        app-utils.scm
        config-var.scm
        date-utilities.scm
        file-utils.c
        gfec.c
        gnc-component-manager.c
        gnc-component-manager.h
        gnc-euro.c
        gnc-exp-parser.c
        gnc-gettext-util.c
        gnc-helpers.c
        gnc-helpers.h
        gnc-ui-util.c
        gnc-ui-util.h
        gncmod-app-utils.c
        guile-util.c
        gw-app-utils-spec.scm
        hooks.scm
        option-util.c
        option-util.h
        options.scm
        prefs.scm
    gnucash/src/app-utils/test:
        Makefile.am
        test-exp-parser.c
        test-print-queries.c
        test-scm-query-string.c
    gnucash/src/backend:
        .cvsignore
        Makefile.am
        gnc-backend-api.h
    gnucash/src/backend/file:
        Makefile.am
        gnc-account-xml-v2.c
        gnc-backend-file.c
        gnc-backend-file.h
        gnc-book-xml-v2.c
        gnc-commodity-xml-v2.c
        gnc-freqspec-xml-v2.c
        gnc-lot-xml-v2.c
        gnc-pricedb-xml-v2.c
        gnc-schedxaction-xml-v2.c
        gnc-transaction-xml-v2.c
        gnc-xml-helper.h
        gnc-xml.h
        io-example-account.c
        io-gncbin-r.c
        io-gncbin.h
        io-gncxml-v1.c
        io-gncxml-v2.c
        io-gncxml-v2.h
        io-gncxml.h
        io-utils.c
        sixtp-dom-generators.c
        sixtp-dom-generators.h
        sixtp-dom-parsers.c
        sixtp-dom-parsers.h
        sixtp-stack.c
        sixtp-to-dom-parser.c
        sixtp-utils.c
        sixtp.c
        sixtp.h
    gnucash/src/backend/file/test:
        .cvsignore
        Makefile.am
        test-dom-converters1.c
        test-file-stuff.c
        test-load-example-account.c
        test-load-xml2.c
        test-save-in-lang.c
        test-string-converters.c
        test-xml-account.c
        test-xml-commodity.c
        test-xml-pricedb.c
        test-xml-transaction.c
    gnucash/src/backend/file/test/test-files/xml2:
        Money95bank_fr.gml2
        Money95invst.gml2
        Money95mutual.gml2
        Money95stocks.gml2
        abc.gml2
        abcall.gml2
        carols-data-file.gml2
        cbb-export.gml2
        conrads-file.gml2
        every.gml2
        goonies-file.gml2
        hierachical-data-file.gml2
        ms-money.gml2
        pricedb1.gml2
    gnucash/src/backend/net:
        NetIO.c
    gnucash/src/backend/postgres:
        Makefile.am
        PostgresBackend.c
        PostgresBackend.h
        account.c
        book.c
        builder.c
        checkpoint.c
        escape.c
        events.c
        gncquery.c
        kvp-sql.c
        price.c
        putil.c
        putil.h
        table.m4
        txn.c
        txnmass.c
        upgrade.c
    gnucash/src/backend/postgres/test:
        .cvsignore
        Makefile.am
        test-db.c
        test-period.c
    gnucash/src/backend/rpc:
        RpcUtils.c
    gnucash/src/bin:
        .cvsignore
        Makefile.am
        generate-gnc-script
    gnucash/src/bin/overrides:
        gnucash-valgrind
    gnucash/src/bin/test:
        test-version
    gnucash/src/business:
        .cvsignore
    gnucash/src/business/business-core:
        .cvsignore
        Makefile.am
        businessmod-core.c
        gncAddress.c
        gncAddress.h
        gncAddressP.h
        gncBillTerm.c
        gncBillTerm.h
        gncBillTermP.h
        gncBusPeriod.c
        gncCustomer.c
        gncCustomer.h
        gncCustomerP.h
        gncEmployee.c
        gncEmployee.h
        gncEmployeeP.h
        gncEntry.c
        gncEntry.h
        gncEntryP.h
        gncInvoice.c
        gncInvoice.h
        gncInvoiceP.h
        gncJob.c
        gncJob.h
        gncJobP.h
        gncOrder.c
        gncOrder.h
        gncOrderP.h
        gncOwner.c
        gncOwner.h
        gncOwnerP.h
        gncTaxTable.c
        gncTaxTable.h
        gncTaxTableP.h
        gncVendor.c
        gncVendor.h
        gncVendorP.h
    gnucash/src/business/business-core/file:
        .cvsignore
        Makefile.am
        gnc-address-xml-v2.c
        gnc-address-xml-v2.h
        gnc-bill-term-xml-v2.c
        gnc-customer-xml-v2.c
        gnc-employee-xml-v2.c
        gnc-entry-xml-v2.c
        gnc-invoice-xml-v2.c
        gnc-job-xml-v2.c
        gnc-order-xml-v2.c
        gnc-owner-xml-v2.c
        gnc-owner-xml-v2.h
        gnc-tax-table-xml-v2.c
        gnc-vendor-xml-v2.c
        gncmod-business-backend-file.c
    gnucash/src/business/business-core/test:
        Makefile.am
        test-address.c
        test-business.c
        test-customer.c
        test-employee.c
        test-job.c
        test-vendor.c
    gnucash/src/business/business-gnome:
        .cvsignore
        Makefile.am
        business-gnome-utils.c
        business-gnome-utils.h
        business-gnome.scm
        business-options-gnome.c
        businessmod-gnome.c
        dialog-billterms.c
        dialog-customer.c
        dialog-date-close.c
        dialog-employee.c
        dialog-invoice.c
        dialog-invoice.h
        dialog-job.c
        dialog-order.c
        dialog-payment.c
        dialog-vendor.c
        gw-business-gnome-spec.scm
        search-owner.c
    gnucash/src/business/business-gnome/glade:
        .cvsignore
        Makefile.am
        billterms.glade
        customer.glade
        date-close.glade
        employee.glade
        invoice.glade
        job.glade
        order.glade
        payment.glade
        vendor.glade
    gnucash/src/business/business-ledger:
        Makefile.am
        gncEntryLedger.c
        gncEntryLedger.h
        gncEntryLedgerControl.c
        gncEntryLedgerLoad.c
        gncEntryLedgerModel.c
        gncEntryLedgerP.h
    gnucash/src/business/business-utils:
        .cvsignore
        Makefile.am
        business-options.scm
        business-prefs.scm
    gnucash/src/business/dialog-tax-table:
        .cvsignore
        Makefile.am
        dialog-tax-table.c
        tax-tables.glade
    gnucash/src/calculation:
        Makefile.am
        expression_parser.c
    gnucash/src/calculation/test:
        Makefile.am
    gnucash/src/core-utils:
        Makefile.am
        gw-core-utils-spec.scm
    gnucash/src/doc:
        .cvsignore
        Makefile.am
        backend-api.txt
        backend-errors.txt
        backup.txt
        books.txt
        budget.txt
        business.txt
        constraints.txt
        currencies.txt
        doxygen.cfg.in
        doxygen_main_page.c
        engine.txt
        generic-druid-framework.txt
        guid.txt
        loans.txt
        lots.txt
        multicurrency-discussion.txt
        netlogin.txt
        plugin.txt
        prices.txt
        qif.txt
        tax.txt
        user-prefs-howto.txt
    gnucash/src/doc/design:
        .cvsignore
        component-manager.texinfo
        engine.texinfo
    gnucash/src/doc/xml:
        .cvsignore
    gnucash/src/engine:
        .cvsignore
        Account.c
        Account.h
        AccountP.h
        FreqSpec.c
        FreqSpec.h
        FreqSpecP.h
        Group.c
        Group.h
        GroupP.h
        Makefile.am
        Period.c
        Query.c
        Query.h
        SX-book.c
        SX-book.h
        SX-ttinfo.h
        SchedXaction.c
        SchedXaction.h
        SchedXactionP.h
        Scrub.c
        Scrub2.c
        Scrub3.c
        TransLog.c
        TransLog.h
        Transaction.c
        Transaction.h
        TransactionP.h
        cap-gains.c
        design.txt
        engine-helpers.c
        engine-helpers.h
        extensions.txt
        glib-helpers.c
        glib-helpers.h
        gnc-associate-account.c
        gnc-commodity.c
        gnc-commodity.h
        gnc-date.c
        gnc-date.h
        gnc-engine-util.c
        gnc-engine-util.h
        gnc-engine.c
        gnc-engine.h
        gnc-event-p.h
        gnc-event.c
        gnc-event.h
        gnc-filepath-utils.c
        gnc-filepath-utils.h
        gnc-lot-p.h
        gnc-lot.c
        gnc-lot.h
        gnc-numeric.c
        gnc-numeric.h
        gnc-pricedb-p.h
        gnc-pricedb.c
        gnc-pricedb.h
        gnc-session-scm.h
        gnc-trace.c
        gnc-trace.h
        gncmod-engine.c
        guid.c
        guid.h
        gw-engine-spec.scm
        iso-currencies-to-c
        kvp-scm.c
        kvp-util-p.h
        kvp-util.h
        kvp_doc.txt
        kvp_frame.c
        kvp_frame.h
        policy-p.h
        policy.c
        qof-be-utils.h
        qof.h
        qof_book_merge.c
        qof_book_merge.h
        qofbackend-p.h
        qofbackend.c
        qofbackend.h
        qofbook-p.h
        qofbook.c
        qofbook.h
        qofclass.c
        qofclass.h
        qofgobj.c
        qofgobj.h
        qofid.c
        qofid.h
        qofinstance.c
        qofinstance.h
        qofmath128.c
        qofobject.c
        qofobject.h
        qofquery-deserial.c
        qofquery-deserial.h
        qofquery-serialize.c
        qofquery-serialize.h
        qofquery.c
        qofquery.h
        qofquerycore-p.h
        qofquerycore.c
        qofquerycore.h
        qofsession-p.h
        qofsession.c
        qofsession.h
        qofsql.c
        qofsql.h
    gnucash/src/engine/test:
        .cvsignore
        Makefile.am
        test-book-merge.c
        test-commodities.c
        test-freq-spec.c
        test-group-vs-book.c
        test-guid.c
        test-load-engine.c
        test-lots.c
        test-numeric.c
        test-object.c
        test-period.c
        test-query.c
        test-querynew.c
        test-resolve-file-path.c
        test-scm-query.c
        test-split-vs-account.c
        test-transaction-reversal.c
        test-transaction-voiding.c
    gnucash/src/engine/test-core:
        Makefile.am
        test-engine-stuff.c
        test-engine-stuff.h
    gnucash/src/experimental/cgi-bin:
        gnc-server.c
    gnucash/src/gnc-module:
        Makefile.am
        gnc-module.c
        gnc-module.h
    gnucash/src/gnc-module/test/misc-mods:
        Makefile.am
    gnucash/src/gnc-module/test/mod-bar:
        Makefile.am
        gnc-mod-bar.c
    gnucash/src/gnc-module/test/mod-baz:
        Makefile.am
        gnc-mod-baz.c
    gnucash/src/gnc-module/test/mod-foo:
        Makefile.am
        gnc-mod-foo.c
    gnucash/src/gnome:
        .cvsignore
        Makefile.am
        dialog-commodities.c
        dialog-fincalc.c
        dialog-find-transactions.c
        dialog-new-user.c
        dialog-price-edit-db.c
        dialog-price-editor.c
        dialog-print-check.c
        dialog-print-check.h
        dialog-scheduledxaction.c
        dialog-scheduledxaction.h
        dialog-sx-from-trans.c
        dialog-sxsincelast.c
        dialog-sxsincelast.h
        dialog-tax-info.c
        dialog-totd.c
        dialog-totd.h
        dialog-userpass.c
        druid-acct-period.c
        druid-hierarchy.c
        druid-hierarchy.h
        druid-loan.c
        druid-merge.c
        druid-merge.h
        druid-stock-split.c
        druid-stock-split.h
        gnc-split-reg.c
        gnc-split-reg.h
        gnucash.desktop.in
        gw-gnc-spec.scm
        lot-viewer.c
        reconcile-list.c
        reconcile-list.h
        top-level.c
        top-level.h
        window-main-summarybar.c
        window-reconcile.c
    gnucash/src/gnome/glade:
        .cvsignore
        Makefile.am
        account.glade
        acctperiod.glade
        commodities.glade
        fincalc.glade
        lots.glade
        merge.glade
        newuser.glade
        price.glade
        print.glade
        progress.glade
        register.glade
        sched-xact.glade
        stocks.glade
        tax.glade
        userpass.glade
    gnucash/src/gnome-search:
        .cvsignore
        Makefile.am
        dialog-search.c
        dialog-search.h
        gnc-general-search.c
        gnc-general-search.h
        gncmod-gnome-search.c
        search-account.c
        search-boolean.c
        search-core-type.c
        search-core-type.h
        search-date.c
        search-double.c
        search-int64.c
        search-numeric.c
        search-reconciled.c
        search-string.c
        search.glade
    gnucash/src/gnome-utils:
        .cvsignore
        Makefile.am
        QuickFill.c
        QuickFill.h
        account-quickfill.c
        account-quickfill.h
        argv-list-converters.c
        commodity.glade
        cursors.c
        dialog-account.c
        dialog-account.h
        dialog-commodity.c
        dialog-commodity.h
        dialog-options.c
        dialog-options.h
        dialog-query-list.c
        dialog-query-list.glade
        dialog-transfer.c
        dialog-transfer.h
        dialog-utils.c
        dialog-utils.h
        druid-utils.c
        druid-utils.h
        exchange-dialog.glade
        gnc-account-sel.c
        gnc-account-sel.h
        gnc-amount-edit.c
        gnc-amount-edit.h
        gnc-currency-edit.c
        gnc-currency-edit.h
        gnc-date-delta.c
        gnc-date-delta.h
        gnc-date-edit.c
        gnc-date-edit.h
        gnc-date-format.c
        gnc-date-format.glade
        gnc-date-format.h
        gnc-dense-cal.c
        gnc-dense-cal.h
        gnc-dir.h.in
        gnc-frequency.c
        gnc-frequency.h
        gnc-general-select.c
        gnc-general-select.h
        gnc-gnome-utils.c
        gnc-gnome-utils.h
        gnc-gui-query.c
        gnc-html-history.c
        gnc-html.c
        gnc-html.h
        gnc-menu-extensions.c
        gnc-menu-extensions.h
        gnc-menu-extensions.scm
        gnc-query-list.c
        gnc-splash.c
        gncmod-gnome-utils.c
        gnome-utils.scm
        gw-gnome-utils-spec.scm
        misc-gnome-utils.c
        misc-gnome-utils.h
        print-session.c
        print-session.h
        search-param.c
        search-param.h
        transfer.glade
    gnucash/src/gnome-utils/test:
        .cvsignore
        Makefile.am
    gnucash/src/import-export:
        .cvsignore
        Makefile.am
        generic-import.glade
        gncmod-generic-import.c
        import-account-matcher.c
        import-backend.c
        import-commodity-matcher.c
        import-format-dialog.c
        import-main-matcher.c
        import-main-matcher.h
        import-match-map.c
        import-match-picker.c
        import-parse.c
        import-parse.h
        import-settings.c
        import-settings.h
    gnucash/src/import-export/binary-import:
        .cvsignore
        Makefile.am
        binary-import.glade
        druid-commodity.c
        druid-commodity.h
        gncmod-binary-import.c
    gnucash/src/import-export/hbci:
        .cvsignore
        Makefile.am
        dialog-daterange.c
        dialog-hbcitrans.c
        dialog-hbcitrans.h
        dialog-pass.c
        druid-hbci-initial.c
        druid-hbci-initial.h
        druid-hbci-utils.c
        gnc-hbci-gettrans.c
        gnc-hbci-transfer.c
        gnc-hbci-utils.c
        gncmod-hbci.c
        hbci-interaction.c
        hbci-interaction.h
    gnucash/src/import-export/hbci/glade:
        .cvsignore
        Makefile.am
        hbci.glade
        hbcipass.glade
    gnucash/src/import-export/log-replay:
        Makefile.am
        gnc-log-replay.c
        gnc-log-replay.h
        gncmod-log-replay.c
    gnucash/src/import-export/mt940:
        Makefile.am
        gnc-mt940-import.c
        gnc-mt940-import.h
        gncmod-mt940-import.c
    gnucash/src/import-export/ofx:
        Makefile.am
        gnc-ofx-import.c
        gnc-ofx-import.h
        gncmod-ofx-import.c
    gnucash/src/import-export/qif:
        Makefile.am
        qif-file.c
        qif-objects.c
        qif-parse.c
    gnucash/src/import-export/qif/test:
        Makefile.am
    gnucash/src/import-export/qif-import:
        .cvsignore
        Makefile.am
        dialog-account-picker.c
        druid-qif-import.c
        druid-qif-import.h
        gncmod-qif-import.c
        qif-dialog-utils.scm
        qif-parse.scm
        qif.glade
    gnucash/src/import-export/qif-import/test:
        Makefile.am
    gnucash/src/import-export/qif-io-core:
        Makefile.am
    gnucash/src/import-export/qif-io-core/test:
        Makefile.am
        test-import-phase-1.scm
    gnucash/src/import-export/test:
        Makefile.am
    gnucash/src/network-utils:
        Makefile.am
        gnc-http.c
    gnucash/src/network-utils/test:
        Makefile.am
    gnucash/src/optional/swig:
        Makefile.am
    gnucash/src/pixmaps:
        Makefile.am
    gnucash/src/register/ledger-core:
        Makefile.am
        dialog-dup-trans.c
        gnc-ledger-display.c
        split-register-control.c
        split-register-layout.c
        split-register-layout.h
        split-register-load.c
        split-register-model-save.c
        split-register-model.c
        split-register-model.h
        split-register-util.c
        split-register.c
        split-register.h
    gnucash/src/register/register-core:
        Makefile.am
        basiccell.c
        basiccell.h
        cell-factory.c
        checkboxcell.c
        combocell.h
        formulacell.c
        formulacell.h
        gncmod-register-core.c
        numcell.c
        pricecell.c
        quickfillcell.c
        quickfillcell.h
        recncell.c
        table-allgui.c
        table-allgui.h
    gnucash/src/register/register-core/test:
        Makefile.am
    gnucash/src/register/register-gnome:
        Makefile.am
        combocell-gnome.c
        datecell-gnome.c
        formulacell-gnome.c
        gnucash-color.c
        gnucash-cursor.c
        gnucash-cursor.h
        gnucash-date-picker.c
        gnucash-grid.c
        gnucash-grid.h
        gnucash-header.c
        gnucash-header.h
        gnucash-item-edit.c
        gnucash-item-edit.h
        gnucash-item-list.c
        gnucash-item-list.h
        gnucash-scrolled-window.c
        gnucash-scrolled-window.h
        gnucash-sheet.c
        gnucash-sheet.h
        gnucash-style.c
        gnucash-style.h
        pricecell-gnome.c
        quickfillcell-gnome.c
        table-gnome.c
    gnucash/src/register/register-gnome/test:
        Makefile.am
    gnucash/src/report:
        Makefile.am
    gnucash/src/report/locale-specific/us:
        Makefile.am
        gncmod-locale-reports-us.c
    gnucash/src/report/locale-specific/us/test:
        Makefile.am
    gnucash/src/report/report-gnome:
        .cvsignore
        Makefile.am
        dialog-column-view.c
        dialog-style-sheet.c
        gncmod-report-gnome.c
        gw-report-gnome-spec.scm
        report-gnome.scm
        report.glade
        window-report.c
        window-report.h
    gnucash/src/report/report-gnome/test:
        Makefile.am
    gnucash/src/report/report-system:
        Makefile.am
        commodity-utilities.scm
        gnc-report.c
        gnc-report.h
        gncmod-report-system.c
        html-acct-table.scm
        html-barchart.scm
        html-document.scm
        html-piechart.scm
        html-scatter.scm
        html-style-sheet.scm
        html-table.scm
        html-utilities.scm
        report-system.scm
        report-utilities.scm
        report.scm
    gnucash/src/report/standard-reports:
        Makefile.am
        equity-statement.scm
        gncmod-standard-reports.c
        income-statement.scm
        register.scm
        standard-reports.scm
        transaction.scm
    gnucash/src/report/stylesheets:
        Makefile.am
        gncmod-stylesheets.c
    gnucash/src/report/utility-reports:
        Makefile.am
        gncmod-utility-reports.c
        utility-reports.scm
    gnucash/src/scm:
        Makefile.am
        main-window.scm
        main.scm
        path.scm
        startup-design.txt
    gnucash/src/scm/printing:
        print-check.scm
    gnucash/src/tax/us:
        Makefile.am
        gncmod-tax-us.c
    gnucash/src/test-core:
        Makefile.am

Added Files:
-----------
    gnucash:
        GNOME2_STATUS
        README.dependencies
    gnucash/doc:
        What_is_Euro_support
        gtkrc-2.0.gnucash
        tip_of_the_day.list.in
    gnucash/lib/egg:
        .cvsignore
    gnucash/lib/glib26:
        .cvsignore
        Makefile.am
        dummy.c
        gkeyfile.c
        gkeyfile.h
        gutils26.c
        gutils26.h
    gnucash/lib/goffice:
        .cvsignore
        ChangeLog
        Makefile.am
        goffice-config.h
        goffice-plugins.mk
        goffice.c
        goffice.h
        goffice.mk
        paths.h.in
        split.c
        split.h
        symbols.py
    gnucash/lib/goffice/app:
        .cvsignore
        Makefile.am
        go-app.h
        go-cmd-context-impl.h
        go-cmd-context.c
        go-cmd-context.h
        go-doc-control-impl.h
        go-doc-control.c
        go-doc-control.h
        go-doc-impl.h
        go-doc.c
        go-doc.h
        go-error-stack.h
        go-object.c
        go-object.h
        go-plugin.h
        go-service-impl.h
        go-service.c
        go-service.h
        goffice-app.h
    gnucash/lib/goffice/cut-n-paste:
        .cvsignore
        Makefile.am
    gnucash/lib/goffice/cut-n-paste/egg-recent-files:
        .cvsignore
        Makefile.am
        egg-recent-item.c
        egg-recent-item.h
        egg-recent-model.c
        egg-recent-model.h
        egg-recent-util.c
        egg-recent-util.h
        egg-recent-view-gtk.c
        egg-recent-view-gtk.h
        egg-recent-view.c
        egg-recent-view.h
        egg-recent.h
    gnucash/lib/goffice/cut-n-paste/pcre:
        .cvsignore
        Makefile.am
        get.c
        internal.h
        maketables.c
        pcre.c
        pcre.h
        pcreposix.c
        pcreposix.h
        printint.c
        study.c
    gnucash/lib/goffice/drawing:
        .cvsignore
        Makefile.am
        god-anchor.c
        god-anchor.h
        god-default-attributes.c
        god-default-attributes.h
        god-drawing-group.c
        god-drawing-group.h
        god-drawing-renderer-gdk.c
        god-drawing-renderer-gdk.h
        god-drawing-view.c
        god-drawing-view.h
        god-drawing.c
        god-drawing.h
        god-image-store.c
        god-image-store.h
        god-image.c
        god-image.h
        god-paragraph-attributes.c
        god-paragraph-attributes.h
        god-property-table.c
        god-property-table.h
        god-shape.c
        god-shape.h
        god-text-model.c
        god-text-model.h
    gnucash/lib/goffice/graph:
        .cvsignore
        Makefile.am
        README
        go-data-impl.h
        go-data-simple.c
        go-data-simple.h
        go-data.c
        go-data.h
        goffice-graph.h
        gog-axis-prefs.glade
        gog-axis.c
        gog-axis.h
        gog-chart-impl.h
        gog-chart.c
        gog-chart.h
        gog-control-foocanvas.c
        gog-control-foocanvas.h
        gog-data-allocator.c
        gog-data-allocator.h
        gog-data-set.c
        gog-data-set.h
        gog-error-bar-prefs.glade
        gog-error-bar.c
        gog-error-bar.h
        gog-graph-impl.h
        gog-graph.c
        gog-graph.h
        gog-grid-line.c
        gog-grid-line.h
        gog-grid.c
        gog-grid.h
        gog-guru-type-selector.glade
        gog-guru.c
        gog-guru.glade
        gog-guru.h
        gog-label.c
        gog-label.h
        gog-legend.c
        gog-legend.h
        gog-object-xml.c
        gog-object-xml.h
        gog-object.c
        gog-object.h
        gog-outlined-object.c
        gog-outlined-object.h
        gog-plot-engine.c
        gog-plot-engine.h
        gog-plot-impl.h
        gog-plot.c
        gog-plot.h
        gog-renderer-gnome-print.c
        gog-renderer-gnome-print.h
        gog-renderer-impl.h
        gog-renderer-pixbuf.c
        gog-renderer-pixbuf.h
        gog-renderer-svg.c
        gog-renderer-svg.h
        gog-renderer.c
        gog-renderer.h
        gog-series-impl.h
        gog-series.c
        gog-series.h
        gog-style-prefs.glade
        gog-style.c
        gog-style.h
        gog-styled-object.c
        gog-styled-object.h
        gog-theme.c
        gog-theme.h
        gog-view.c
        gog-view.h
    gnucash/lib/goffice/graph/plugins:
        .cvsignore
        Makefile.am
    gnucash/lib/goffice/graph/plugins/plot_barcol:
        .cvsignore
        Makefile.am
        gog-1.5d.c
        gog-1.5d.h
        gog-barcol-prefs.c
        gog-barcol-prefs.glade
        gog-barcol.c
        gog-barcol.h
        gog-line.c
        gog-line.h
        plot-types.xml.in
        plugin.xml.in
    gnucash/lib/goffice/graph/plugins/plot_pie:
        .cvsignore
        Makefile.am
        gog-pie-prefs.c
        gog-pie-prefs.glade
        gog-pie-series.glade
        gog-pie.c
        gog-pie.h
        gog-ring-prefs.glade
        plot-types.xml.in
        plugin.xml.in
    gnucash/lib/goffice/graph/plugins/plot_radar:
        .cvsignore
        Makefile.am
        gog-radar.c
        gog-radar.h
        plot-types.xml.in
        plugin.xml.in
    gnucash/lib/goffice/graph/plugins/plot_surface:
        .cvsignore
        Makefile.am
        gog-contour-prefs.c
        gog-contour-prefs.glade
        gog-surface.c
        gog-surface.h
        plot-types.xml.in
        plugin.xml.in
    gnucash/lib/goffice/graph/plugins/plot_xy:
        .cvsignore
        Makefile.am
        gog-bubble-prefs.c
        gog-bubble-prefs.glade
        gog-xy.c
        gog-xy.h
        plot-types.xml.in
        plugin.xml.in
    gnucash/lib/goffice/gui-utils:
        .cvsignore
        Makefile.am
        go-action-combo-color.c
        go-action-combo-color.h
        go-action-combo-pixmaps.c
        go-action-combo-pixmaps.h
        go-action-combo-stack.c
        go-action-combo-stack.h
        go-action-combo-text.c
        go-action-combo-text.h
        go-color-group.c
        go-color-group.h
        go-color-palette.c
        go-color-palette.h
        go-combo-box.c
        go-combo-box.h
        go-combo-color.c
        go-combo-color.h
        go-combo-pixmaps.c
        go-combo-pixmaps.h
        go-combo-text.c
        go-combo-text.h
        go-dock-band.c
        go-dock-band.h
        go-dock-item-grip.c
        go-dock-item-grip.h
        go-dock-item.c
        go-dock-item.h
        go-dock-layout.c
        go-dock-layout.h
        go-dock.c
        go-dock.h
        go-font-sel.c
        go-font-sel.glade
        go-font-sel.h
        go-gui-utils.c
        go-gui-utils.h
        go-marshalers.list
    gnucash/lib/goffice/pixmaps:
        .cvsignore
        Makefile.am
        area.xpm
        bar-hboth.png
        bar-hminus.png
        bar-hplus.png
        bar-none.png
        bar-vboth.png
        bar-vminus.png
        bar-vplus.png
        bar.xpm
        bubble.xpm
        chart-pie-2d.svg
        chart-rings-2d.svg
        chart_area_1_1.png
        chart_area_1_1.svg
        chart_area_1_2.png
        chart_area_1_2.svg
        chart_area_1_3.png
        chart_area_1_3.svg
        chart_bar_1_1.png
        chart_bar_1_1.svg
        chart_bar_1_2.png
        chart_bar_1_2.svg
        chart_bar_1_3.png
        chart_bar_1_3.svg
        chart_bar_2_1.png
        chart_bar_2_2.png
        chart_bar_2_3.png
        chart_bubble_1_1.png
        chart_bubble_1_1.svg
        chart_bubble_1_2.png
        chart_bubble_1_2.svg
        chart_column_1_1.png
        chart_column_1_1.svg
        chart_column_1_2.png
        chart_column_1_2.svg
        chart_column_1_3.png
        chart_column_1_3.svg
        chart_column_2_1.png
        chart_column_2_2.png
        chart_column_2_3.png
        chart_column_3_1.png
        chart_cone_1_1.png
        chart_cone_1_2.png
        chart_cone_1_3.png
        chart_cone_2_1.png
        chart_cone_2_2.png
        chart_cone_2_3.png
        chart_cone_3_1.png
        chart_cylinder_1_1.png
        chart_cylinder_1_2.png
        chart_cylinder_1_3.png
        chart_cylinder_2_1.png
        chart_cylinder_2_2.png
        chart_cylinder_2_3.png
        chart_cylinder_3_1.png
        chart_line_1_1.png
        chart_line_1_1.svg
        chart_line_1_2.png
        chart_line_1_2.svg
        chart_line_1_3.png
        chart_line_1_3.svg
        chart_line_2_1.png
        chart_line_2_1.svg
        chart_line_2_2.png
        chart_line_2_2.svg
        chart_line_2_3.png
        chart_line_2_3.svg
        chart_line_3_1.png
        chart_pie_1_1.png
        chart_pie_1_1.svg
        chart_pie_1_2.png
        chart_pie_1_3.png
        chart_pie_2_1.png
        chart_pie_2_1.svg
        chart_pie_2_2.png
        chart_pie_2_3.png
        chart_pyramid_1_1.png
        chart_pyramid_1_2.png
        chart_pyramid_1_3.png
        chart_pyramid_2_1.png
        chart_pyramid_2_2.png
        chart_pyramid_2_3.png
        chart_pyramid_3_1.png
        chart_radar_1_1.png
        chart_radar_1_1.svg
        chart_radar_1_2.png
        chart_radar_1_2.svg
        chart_radar_1_3.png
        chart_radar_1_3.svg
        chart_ring_1_1.png
        chart_ring_1_1.svg
        chart_ring_1_2.png
        chart_ring_1_2.svg
        chart_scatter_1_1.png
        chart_scatter_1_1.svg
        chart_scatter_2_1.png
        chart_scatter_2_2.png
        chart_scatter_3_1.png
        chart_scatter_3_1.svg
        chart_scatter_3_2.png
        chart_scatter_3_2.svg
        chart_stock_1_1.png
        chart_stock_1_2.png
        chart_stock_2_1.png
        chart_stock_2_2.png
        column.xpm
        doughnut.xpm
        linegraph.xpm
        pie.xpm
        radar.xpm
        scatter.xpm
        stock.xpm
        surface.xpm
    gnucash/lib/goffice/split:
        .cvsignore
        Makefile.am
        application.h
        command-context-priv.h
        command-context-stderr.c
        command-context-stderr.h
        command-context.c
        command-context.h
        dates.c
        dates.h
        datetime.c
        datetime.h
        dependent.h
        error-info.c
        error-info.h
        file.h
        format.c
        format.h
        formats.c
        func.h
        global-gnome-font.c
        global-gnome-font.h
        gnumeric-gconf-priv.h
        gnumeric-gconf.c
        gnumeric-gconf.h
        gnumeric.h
        gui-file.h
        gui-gnumeric.h
        gui-util.c
        gui-util.h
        gutils.c
        gutils.h
        io-context-priv.h
        io-context.c
        io-context.h
        mathfunc.c
        mathfunc.h
        module-plugin-defs.h
        mstyle.c
        mstyle.h
        number-match.c
        number-match.h
        numbers.h
        plugin-loader-module.c
        plugin-loader-module.h
        plugin-loader.c
        plugin-loader.h
        plugin-service-impl.h
        plugin-service.c
        plugin-service.h
        plugin-util.c
        plugin-util.h
        plugin.c
        plugin.h
        position.h
        ranges.h
        regutf8.c
        regutf8.h
        str.c
        str.h
        style-border.c
        style-border.h
        style-color.c
        style-color.h
        style.c
        style.h
        validation.c
        validation.h
        value.c
        value.h
        workbook-control-gui.h
        xml-io-version.h
        xml-io.h
    gnucash/lib/goffice/split/widgets:
        .cvsignore
        Makefile.am
        widget-font-selector.h
        widget-format-selector.c
        widget-format-selector.h
    gnucash/lib/goffice/utils:
        .cvsignore
        Makefile.am
        go-color.c
        go-color.h
        go-file.c
        go-file.h
        go-font.c
        go-font.h
        go-format.c
        go-format.h
        go-gradient.c
        go-gradient.h
        go-line.c
        go-line.h
        go-locale.c
        go-locale.h
        go-marker.c
        go-marker.h
        go-math.c
        go-math.h
        go-pattern.c
        go-pattern.h
        go-units.h
        goffice-utils.h
    gnucash/lib/libc:
        setenv.c
        setenv.h
    gnucash/macros:
        legacy_macros.m4
    gnucash/src:
        valgrind-gdk.supp
        valgrind-x11.supp
    gnucash/src/app-utils:
        gnc-accounting-period.c
        gnc-accounting-period.h
        gnc-basic-gobject.h
        gnc-druid-cb.c
        gnc-druid-cb.h
        gnc-druid-provider-desc-edge.c
        gnc-druid-provider-desc-edge.h
        gnc-druid-provider-desc-file.c
        gnc-druid-provider-desc-file.h
        gnc-druid-provider-desc-multifile.c
        gnc-druid-provider-desc-multifile.h
        gnc-druid-provider-desc.c
        gnc-druid-provider-desc.h
        gnc-druid-provider-file-cb.c
        gnc-druid-provider-file-cb.h
        gnc-druid-provider.c
        gnc-druid-provider.h
        gnc-druid.c
        gnc-druid.h
    gnucash/src/backend/file:
        gnc-budget-xml-v2.c
        gnc-recurrence-xml-v2.c
    gnucash/src/backend/file/test:
        test-load-backend.c
    gnucash/src/backend/postgres/test:
        test-load-backend.c
    gnucash/src/backend/qsf:
        .cvsignore
        Makefile.am
        pilot-qsf-GnuCashInvoice.xml
        qof-backend-qsf.h
        qsf-backend.c
        qsf-dir.h.in
        qsf-map.xsd.xml
        qsf-object.xsd.xml
        qsf-xml-map.c
        qsf-xml.c
        qsf-xml.h
    gnucash/src/bin:
        update-gnucash-gconf.in
    gnucash/src/business/business-gnome:
        gnc-plugin-business.c
        gnc-plugin-business.h
        gnc-plugin-page-invoice.c
        gnc-plugin-page-invoice.h
    gnucash/src/business/business-gnome/glade:
        businessprefs.glade
    gnucash/src/business/business-gnome/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_dialog_business_common.schemas
    gnucash/src/business/business-gnome/ui:
        .cvsignore
        Makefile.am
        gnc-plugin-business-ui.xml
        gnc-plugin-page-invoice-ui.xml
    gnucash/src/core-utils:
        gnc-gconf-utils.c
        gnc-gconf-utils.h
        gnc-gdate-utils.c
        gnc-gdate-utils.h
        gnc-gkeyfile-utils.c
        gnc-gkeyfile-utils.h
        gnc-gobject-utils.c
        gnc-gobject-utils.h
    gnucash/src/doc:
        g2-architecture.txt
    gnucash/src/engine:
        Recurrence.c
        Recurrence.h
        cashobjects.c
        cashobjects.h
        gnc-budget.c
        gnc-budget.h
        gnc-hooks-scm.h
        gnc-hooks.c
        gnc-hooks.h
        gncla-dir.h.in
        qofchoice.c
        qofchoice.h
        qofla-dir.h.in
    gnucash/src/engine/test:
        test-recurrence.c
    gnucash/src/gnome:
        dialog-chart-export.c
        dialog-chart-export.h
        gnc-plugin-account-tree.c
        gnc-plugin-account-tree.h
        gnc-plugin-basic-commands.c
        gnc-plugin-basic-commands.h
        gnc-plugin-budget.c
        gnc-plugin-budget.h
        gnc-plugin-page-account-tree.c
        gnc-plugin-page-account-tree.h
        gnc-plugin-page-budget.c
        gnc-plugin-page-budget.h
        gnc-plugin-page-register.c
        gnc-plugin-page-register.h
        gnc-plugin-register.c
        gnc-plugin-register.h
        gncmod-budget.c
    gnucash/src/gnome/glade:
        budget.glade
        chart-export.glade
        reconcile.glade
        totd.glade
    gnucash/src/gnome/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_dialog_commodities.schemas
        apps_gnucash_dialog_common.schemas
        apps_gnucash_dialog_prices.schemas
        apps_gnucash_dialog_reconcile.schemas
        apps_gnucash_dialog_scheduled_transctions.schemas
        apps_gnucash_dialog_totd.schemas
        apps_gnucash_general.schemas
        apps_gnucash_warnings.schemas
        apps_gnucash_window_pages_account_tree.schemas
        apps_gnucash_window_pages_register.schemas
    gnucash/src/gnome/ui:
        .cvsignore
        Makefile.am
        gnc-plugin-account-tree-ui.xml
        gnc-plugin-basic-commands-ui.xml
        gnc-plugin-budget-ui.xml
        gnc-plugin-file-history-ui.xml
        gnc-plugin-page-account-tree-ui.xml
        gnc-plugin-page-budget-ui.xml
        gnc-plugin-page-register-ui.xml
        gnc-plugin-page-sxregister-ui.xml
        gnc-plugin-register-ui.xml
        gnc-sxed-to-create-window-ui.xml
        gnc-sxed-window-ui.xml
    gnucash/src/gnome-utils:
        dialog-preferences.c
        dialog-preferences.h
        dialog-reset-warnings.c
        dialog-reset-warnings.glade
        dialog-reset-warnings.h
        druid-gconf-setup.c
        druid-gconf-setup.glade
        druid-gconf-setup.h
        druid-provider-multifile.glade
        gnc-dialog.c
        gnc-dialog.h
        gnc-druid-gnome-ui.h
        gnc-druid-gnome.c
        gnc-druid-gnome.h
        gnc-druid-provider-edge-gnome.c
        gnc-druid-provider-edge-gnome.h
        gnc-druid-provider-file-gnome.c
        gnc-druid-provider-file-gnome.h
        gnc-druid-provider-multifile-gnome.c
        gnc-druid-provider-multifile-gnome.h
        gnc-embedded-window.c
        gnc-embedded-window.h
        gnc-file.c
        gnc-file.h
        gnc-gui-query.glade
        gnc-html-graph-gog.c
        gnc-html-graph-gog.h
        gnc-icons.c
        gnc-icons.h
        gnc-main-window.c
        gnc-main-window.h
        gnc-period-select.c
        gnc-period-select.h
        gnc-plugin-file-history.c
        gnc-plugin-file-history.h
        gnc-plugin-manager.c
        gnc-plugin-manager.h
        gnc-plugin-menu-additions.c
        gnc-plugin-menu-additions.h
        gnc-plugin-page.c
        gnc-plugin-page.h
        gnc-plugin.c
        gnc-plugin.h
        gnc-recurrence.c
        gnc-recurrence.h
        gnc-tree-model-account-types.c
        gnc-tree-model-account-types.h
        gnc-tree-model-account.c
        gnc-tree-model-account.h
        gnc-tree-model-budget.c
        gnc-tree-model-budget.h
        gnc-tree-model-commodity.c
        gnc-tree-model-commodity.h
        gnc-tree-model-example-account.c
        gnc-tree-model-example-account.h
        gnc-tree-model-price.c
        gnc-tree-model-price.h
        gnc-tree-model-selection.c
        gnc-tree-model-selection.h
        gnc-tree-model.c
        gnc-tree-model.h
        gnc-tree-view-account.c
        gnc-tree-view-account.h
        gnc-tree-view-commodity.c
        gnc-tree-view-commodity.h
        gnc-tree-view-price.c
        gnc-tree-view-price.h
        gnc-tree-view.c
        gnc-tree-view.h
        gnc-window.c
        gnc-window.h
        preferences.glade
    gnucash/src/gnome-utils/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_history.schemas
    gnucash/src/gnome-utils/test:
        test-gnc-dialog.c
        test-gnc-recurrence.c
    gnucash/src/gnome-utils/ui:
        .cvsignore
        Makefile.am
        gnc-main-window-ui.xml
    gnucash/src/import-export:
        gnc-import-desc-format.c
        gnc-import-desc-format.h
        gnc-import-format-cb.c
        gnc-import-format-cb.h
        gnc-import-format-gnome.c
        gnc-import-format-gnome.h
        import-provider-format.glade
    gnucash/src/import-export/hbci:
        gnc-plugin-hbci-ui.xml
        gnc-plugin-hbci.c
        gnc-plugin-hbci.h
    gnucash/src/import-export/hbci/glade:
        hbciprefs.glade
    gnucash/src/import-export/hbci/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_dialog_hbci.schemas
    gnucash/src/import-export/log-replay:
        gnc-plugin-log-replay-ui.xml
        gnc-plugin-log-replay.c
        gnc-plugin-log-replay.h
    gnucash/src/import-export/mt940:
        gnc-plugin-mt940-ui.xml
        gnc-plugin-mt940.c
        gnc-plugin-mt940.h
    gnucash/src/import-export/ofx:
        gnc-plugin-ofx-ui.xml
        gnc-plugin-ofx.c
        gnc-plugin-ofx.h
    gnucash/src/import-export/qif-import:
        gnc-druid-test.c
        gnc-druid-test.h
        gnc-plugin-qif-import-ui.xml
        gnc-plugin-qif-import.c
        gnc-plugin-qif-import.h
    gnucash/src/import-export/schemas:
        .cvsignore
        Makefile.am
        apps_gnucash_import_generic_matcher.schemas
    gnucash/src/pixmaps:
        account-16.png
        account.png
        appicon.png
        delete-account-16.png
        delete-account.png
        edit-account-16.png
        edit-account.png
        new-account-16.png
        new-account.png
        open-account-16.png
        open-account.png
    gnucash/src/report/report-gnome:
        gnc-plugin-page-report-ui.xml
        gnc-plugin-page-report.c
        gnc-plugin-page-report.h
    gnucash/src/report/standard-reports:
        budget.scm
    gnucash/src/report/stylesheets:
        gnc-plugin-stylesheets-ui.xml
        gnc-plugin-stylesheets.c
        gnc-plugin-stylesheets.h
    gnucash/src/report/utility-reports:
        test-graphing.scm

Removed Files:
-------------
    gnucash:
        acconfig.h
        acinclude.m4
    gnucash/intl:
        .cvsignore
    gnucash/macros:
        Makefile.am
        README
        aclocal-include.m4
        acx_pthread.m4
        curses.m4
        gnome-bonobo-check.m4
        gnome-common.m4
        gnome-cxx-check.m4
        gnome-fileutils.m4
        gnome-gdk-pixbuf.m4
        gnome-gettext.m4
        gnome-ghttp-check.m4
        gnome-gnorba-check.m4
        gnome-libgtop-check.m4
        gnome-objc-checks.m4
        gnome-orbit-check.m4
        gnome-pilot.m4
        gnome-print-check.m4
        gnome-pthread-check.m4
        gnome-support.m4
        gnome-undelfs.m4
        gnome-vfs.m4
        gnome-x-checks.m4
        gnome-xml-check.m4
        gnome.m4
        gperf-check.m4
        linger.m4
        need-declaration.m4
    gnucash/src/app-file:
        .cvsignore
        Makefile.am
        gnc-file-dialog.h
        gnc-file-history.h
        gnc-file-p.h
        gnc-file.c
        gnc-file.h
        gncmod-app-file.c
        gw-app-file-spec.scm
    gnucash/src/app-file/gnome:
        .cvsignore
        Makefile.am
        gnc-file-dialog.c
        gnc-file-history-gnome.h
        gnc-file-history.c
    gnucash/src/app-file/test:
        .cvsignore
        Makefile.am
        test-link.c
        test-load-module
    gnucash/src/app-utils:
        global-options.c
        global-options.h
    gnucash/src/backend/file/test:
        test-load-module
    gnucash/src/backend/postgres:
        gncmod-backend-postgres.c
    gnucash/src/backend/postgres/test:
        test-load-module
    gnucash/src/core-utils:
        core-utils.c
        core-utils.h
    gnucash/src/doc:
        gnc-commodity.txt
    gnucash/src/gnome:
        gnc-network.c
        gnc-network.h
        mainwindow-account-tree.c
        mainwindow-account-tree.h
        tip-of-the-day.c
        tip-of-the-day.h
        window-acct-tree.c
        window-acct-tree.h
        window-main.c
        window-main.h
        window-register.c
        window-register.h
    gnucash/src/gnome/glade:
        help.glade
    gnucash/src/gnome-search:
        gnome-search.scm
        gw-gnome-search-spec.scm
    gnucash/src/gnome-utils:
        gnc-account-tree.c
        gnc-account-tree.h
        gnc-mdi-utils.c
        gnc-mdi-utils.h
        gtkselect.c
        gtkselect.h
        window-help.c
        window-help.h
    gnucash/src/import-export:
        generic-import.scm
    gnucash/src/import-export/binary-import:
        binary-import.scm
        gw-binary-import-spec.scm
    gnucash/src/import-export/hbci:
        gnc-hbci-cb.c
        gnc-hbci-cb.h
        hbci.scm
    gnucash/src/import-export/log-replay:
        log-replay.scm
    gnucash/src/import-export/mt940:
        mt940-import.scm
    gnucash/src/import-export/ofx:
        ofx-import.scm
    gnucash/src/scm:
        tip-list.scm
        tip-of-the-day.scm

Revision Data
-------------
Index: dialog-column-view.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/dialog-column-view.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/report/report-gnome/dialog-column-view.c -Lsrc/report/report-gnome/dialog-column-view.c -u -r1.6 -r1.7
--- src/report/report-gnome/dialog-column-view.c
+++ src/report/report-gnome/dialog-column-view.c
@@ -123,10 +123,8 @@
     for(i = 0; !SCM_NULLP(names); names = SCM_CDR(names), i++) {
       if (SCM_EQUALP (SCM_CAR(names), selection))
         row = i;
-      name[0] = gh_scm2newstr(scm_call_1(template_menu_name, SCM_CAR(names)),
-			      NULL);
+      name[0] = SCM_STRING_CHARS(scm_call_1(template_menu_name, SCM_CAR(names)));
       gtk_clist_append(view->available, name);
-      free(name[0]);
     }
   }
   gtk_clist_select_row(view->available, row, 0);
@@ -158,13 +156,13 @@
       this_report = scm_call_1(find_report, SCM_CAAR(contents));
       /* this_name = scm_call_1(report_name, this_report); */
       this_name = scm_call_1(report_menu_name, this_report);
-      name[0] = gh_scm2newstr(this_name, NULL);
+      name[0] = g_strdup(SCM_STRING_CHARS(this_name));
       name[1] = g_strdup_printf("%d", scm_num2int(SCM_CADR(SCM_CAR(contents)),
 						  SCM_ARG1, __FUNCTION__));
       name[2] = g_strdup_printf("%d", scm_num2int(SCM_CADDR(SCM_CAR(contents)),
 						  SCM_ARG1, __FUNCTION__));
       gtk_clist_append(view->contents, name);
-      free(name[0]);
+      g_free(name[0]);
       g_free(name[1]);
       g_free(name[2]);
     }
@@ -231,7 +229,7 @@
     gnc_column_view_edit * r = g_new0(gnc_column_view_edit, 1);
     GladeXML *xml;
 
-    r->optwin = gnc_options_dialog_new(TRUE, NULL);
+    r->optwin = gnc_options_dialog_new(NULL);
 
     xml = gnc_glade_xml_new ("report.glade", "view_contents_hbox");
 
@@ -278,10 +276,10 @@
     scm_gc_protect_object(r->available_list);
     scm_gc_protect_object(r->contents_list);
 
-    gtk_signal_connect(GTK_OBJECT(r->available), "select_row", 
-                       gnc_column_view_select_avail_cb, (gpointer)r);
-    gtk_signal_connect(GTK_OBJECT(r->contents), "select_row", 
-                       gnc_column_view_select_contents_cb, (gpointer)r);
+    g_signal_connect(G_OBJECT(r->available), "select_row", 
+                     G_CALLBACK (gnc_column_view_select_avail_cb), (gpointer)r);
+    g_signal_connect(G_OBJECT(r->contents), "select_row", 
+                     G_CALLBACK (gnc_column_view_select_contents_cb), (gpointer)r);
 
     update_display_lists(r);
 
Index: report.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/report.glade,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-gnome/report.glade -Lsrc/report/report-gnome/report.glade -u -r1.1 -r1.2
--- src/report/report-gnome/report.glade
+++ src/report/report-gnome/report.glade
@@ -1,851 +1,1196 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>New Style Sheet Dialog</name>
-  <title>New Style Sheet</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox15</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area15</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button73</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button75</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
+
+<widget class="GtkDialog" id="New Style Sheet Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Style Sheet</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox15">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area15">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame40</name>
-      <border_width>2</border_width>
-      <label>New style sheet info</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox82</name>
-	<border_width>4</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>4</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox93</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847669</name>
-	    <label>Name:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847670</name>
-	    <label>Style sheet template:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox94</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>name_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkCombo</class>
-	    <name>template_combo</name>
-	    <value_in_list>False</value_in_list>
-	    <ok_if_empty>True</ok_if_empty>
-	    <case_sensitive>False</case_sensitive>
-	    <use_arrows>True</use_arrows>
-	    <use_arrows_always>False</use_arrows_always>
-	    <items></items>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <child_name>GtkCombo:entry</child_name>
-	      <name>template_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
+	<widget class="GtkFrame" id="frame40">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox82">
+	      <property name="border_width">4</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">4</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox93">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847669">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Name:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847670">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Style sheet template:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox94">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkEntry" id="name_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="has_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCombo" id="template_combo">
+		      <property name="visible">True</property>
+		      <property name="value_in_list">False</property>
+		      <property name="allow_empty">True</property>
+		      <property name="case_sensitive">False</property>
+		      <property name="enable_arrow_keys">True</property>
+		      <property name="enable_arrows_always">False</property>
+
+		      <child internal-child="entry">
+			<widget class="GtkEntry" id="template_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+		      </child>
+
+		      <child internal-child="list">
+			<widget class="GtkList" id="convertwidget1">
+			  <property name="visible">True</property>
+			  <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+			  <child>
+			    <widget class="GtkListItem" id="convertwidget2">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkLabel" id="convertwidget3">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes"></property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">New style sheet info</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>HTML Style Sheet Dialog</name>
-  <title>HTML Style Sheets</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkHBox</class>
-    <name>hbox96</name>
-    <border_width>5</border_width>
-    <homogeneous>False</homogeneous>
-    <spacing>2</spacing>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame39</name>
-      <label>Style sheets</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+<widget class="GtkWindow" id="Edit Column View Page">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkHBox" id="view_contents_hbox">
+      <property name="border_width">3</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">5</property>
+
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox92</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow17</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>style_sheet_list</name>
-	    <can_focus>True</can_focus>
-	    <columns>1</columns>
-	    <column_widths>80</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>False</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847668</name>
-	      <label>label847668</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox81</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>new_button</name>
-	    <can_focus>True</can_focus>
-	    <label>New...</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>delete_button</name>
-	    <can_focus>True</can_focus>
-	    <label>Delete</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
+	<widget class="GtkScrolledWindow" id="scrolledwindow26">
+	  <property name="visible">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkCList" id="available_list">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="n_columns">1</property>
+	      <property name="column_widths">80</property>
+	      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+	      <property name="show_titles">True</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847720">
+		  <property name="label" translatable="yes">Available reports</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>style_sheet_options</name>
-      <label>Style sheet options</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	<widget class="GtkVBox" id="vbox109">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847721">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">                       </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button85">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Add  &gt;&gt;</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="gnc_column_view_edit_add_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button86">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">&lt;&lt; Remove</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="gnc_column_view_edit_remove_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847722">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button87">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Move up</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="gnc_edit_column_view_move_up_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button88">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Move down</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="gnc_edit_column_view_move_down_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847723">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button89">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Size...</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="gnc_column_view_edit_size_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847728">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>Placeholder</class>
-      </widget>
+      <child>
+	<widget class="GtkScrolledWindow" id="scrolledwindow27">
+	  <property name="visible">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	  <property name="shadow_type">GTK_SHADOW_IN</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkCList" id="contents_list">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="n_columns">3</property>
+	      <property name="column_widths">150,34,25</property>
+	      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+	      <property name="show_titles">True</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847725">
+		  <property name="label" translatable="yes">Report</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847726">
+		  <property name="label" translatable="yes">Cols</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847727">
+		  <property name="label" translatable="yes">Rows</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>Edit Column View Page</name>
-  <title></title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkHBox</class>
-    <name>view_contents_hbox</name>
-    <border_width>3</border_width>
-    <homogeneous>False</homogeneous>
-    <spacing>5</spacing>
-
-    <widget>
-      <class>GtkScrolledWindow</class>
-      <name>scrolledwindow26</name>
-      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkCList</class>
-	<name>available_list</name>
-	<can_focus>True</can_focus>
-	<columns>1</columns>
-	<column_widths>80</column_widths>
-	<selection_mode>GTK_SELECTION_BROWSE</selection_mode>
-	<show_titles>True</show_titles>
-	<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>CList:title</child_name>
-	  <name>label847720</name>
-	  <label>Available reports</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
+<widget class="GtkDialog" id="Edit Report Size">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Report Size</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox17">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area17">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox109</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847721</name>
-	<label>                       </label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button85</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_column_view_edit_add_cb</handler>
-	  <data>Edit_Column_View_Page</data>
-	  <last_modification_time>Fri, 23 Mar 2001 21:37:59 GMT</last_modification_time>
-	</signal>
-	<label>Add  &gt;&gt;</label>
-	<relief>GTK_RELIEF_NORMAL</relief>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button86</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_column_view_edit_remove_cb</handler>
-	  <data>Edit_Column_View_Page</data>
-	  <last_modification_time>Fri, 23 Mar 2001 21:38:06 GMT</last_modification_time>
-	</signal>
-	<label>&lt;&lt; Remove</label>
-	<relief>GTK_RELIEF_NORMAL</relief>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847722</name>
-	<label></label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button87</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_edit_column_view_move_up_cb</handler>
-	  <data>Edit_Column_View_Page</data>
-	  <last_modification_time>Fri, 23 Mar 2001 21:38:13 GMT</last_modification_time>
-	</signal>
-	<label>Move up</label>
-	<relief>GTK_RELIEF_NORMAL</relief>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button88</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_edit_column_view_move_down_cb</handler>
-	  <data>Edit_Column_View_Page</data>
-	  <last_modification_time>Fri, 23 Mar 2001 21:38:19 GMT</last_modification_time>
-	</signal>
-	<label>Move down</label>
-	<relief>GTK_RELIEF_NORMAL</relief>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847723</name>
-	<label></label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button89</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_column_view_edit_size_cb</handler>
-	  <data>Edit_Column_View_Page</data>
-	  <last_modification_time>Sat, 24 Mar 2001 17:51:58 GMT</last_modification_time>
-	</signal>
-	<label>Size...</label>
-	<relief>GTK_RELIEF_NORMAL</relief>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847728</name>
-	<label></label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-      </widget>
-    </widget>
+	<widget class="GtkFrame" id="frame48">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-    <widget>
-      <class>GtkScrolledWindow</class>
-      <name>scrolledwindow27</name>
-      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkCList</class>
-	<name>contents_list</name>
-	<can_focus>True</can_focus>
-	<columns>3</columns>
-	<column_widths>150,34,25</column_widths>
-	<selection_mode>GTK_SELECTION_BROWSE</selection_mode>
-	<show_titles>True</show_titles>
-	<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>CList:title</child_name>
-	  <name>label847725</name>
-	  <label>Report</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>CList:title</child_name>
-	  <name>label847726</name>
-	  <label>Cols</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>CList:title</child_name>
-	  <name>label847727</name>
-	  <label>Rows</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkHBox" id="hbox97">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">4</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox111">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847729">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Row span:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847730">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Column span:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox112">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="row_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="col_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847729">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Enter report row/column span</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Edit Report Size</name>
-  <title>Report Size</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox17</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area17</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
+<widget class="GtkDialog" id="HTML Style Sheet Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">HTML Style Sheets</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="gnc_options_dialog_response_cb" last_modification_time="Sun, 17 Aug 2003 21:50:36 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox18">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area18">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="closebutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-7</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button90</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button92</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
+	<widget class="GtkHBox" id="hbox96">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">2</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame39">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox92">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow17">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="style_sheet_list">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">1</property>
+			  <property name="column_widths">80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">False</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847668">
+			      <property name="label" translatable="yes">label847668</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHButtonBox" id="hbox81">
+		      <property name="visible">True</property>
+		      <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<widget class="GtkButton" id="new_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-new</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="delete_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-delete</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847671">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Style sheets</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVSeparator" id="vseparator1">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="style_sheet_options">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847672">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Style sheet options</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="Select Style Sheet Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select HTML Style Sheet</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">300</property>
+  <property name="default_height">200</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox19">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area19">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="edit_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">3</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox98">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-preferences</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847734">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Edit</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="delete_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-delete</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-7</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame48</name>
-      <label>Enter report row/column span</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox97</name>
-	<homogeneous>False</homogeneous>
-	<spacing>4</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox111</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847729</name>
-	    <label>Row span:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847730</name>
-	    <label>Column span:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847731</name>
-	    <label></label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox112</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>row_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>col_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847732</name>
-	    <label></label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+	<widget class="GtkScrolledWindow" id="scrolledwindow28">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+	  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+	  <property name="shadow_type">GTK_SHADOW_NONE</property>
+	  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	  <child>
+	    <widget class="GtkTreeView" id="style_sheet_list_view">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="headers_visible">False</property>
+	      <property name="rules_hint">False</property>
+	      <property name="reorderable">False</property>
+	      <property name="enable_search">False</property>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: dialog-style-sheet.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/dialog-style-sheet.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/report-gnome/dialog-style-sheet.c -Lsrc/report/report-gnome/dialog-style-sheet.c -u -r1.5 -r1.6
--- src/report/report-gnome/dialog-style-sheet.c
+++ src/report/report-gnome/dialog-style-sheet.c
@@ -28,28 +28,42 @@
 #include "dialog-style-sheet.h"
 #include "dialog-options.h"
 #include "dialog-utils.h"
+#include "gnc-ui.h"
 #include "messages.h"
 
 StyleSheetDialog * gnc_style_sheet_dialog = NULL;
 
 struct _stylesheetdialog {
   GtkWidget  * toplevel;
-  GtkWidget  * list;
+  GtkTreeView   * list_view;
+  GtkListStore  * list_store;
   GtkWidget  * options_frame;
-  struct ss_info * selection;
 };
 
-struct ss_info {
+typedef struct ss_info {
   GNCOptionWin  * odialog;
   GNCOptionDB   * odb;
   SCM           stylesheet;
+  GtkTreeRowReference *row_ref;
+} ss_info;
+
+enum {
+  COLUMN_NAME,
+  COLUMN_STYLESHEET,
+  COLUMN_DIALOG,
+  N_COLUMNS
 };
 
 
+/************************************************************
+ *     Style Sheet Edit Dialog (I.E. an options dialog)     *
+ ************************************************************/
+
 static void
 gnc_style_sheet_options_apply_cb(GNCOptionWin * propertybox,
-                                 gpointer user_data) {
-  struct ss_info * ssi = (struct ss_info *)user_data;
+                                 gpointer user_data)
+{
+  ss_info * ssi = (ss_info *)user_data;
   SCM    apply_changes = scm_c_eval_string("gnc:html-style-sheet-apply-changes");
   gnc_option_db_commit(ssi->odb);
   scm_call_1(apply_changes, ssi->stylesheet);
@@ -58,63 +72,50 @@
 
 static void
 gnc_style_sheet_options_close_cb(GNCOptionWin * propertybox,
-                                 gpointer user_data) {
-  StyleSheetDialog * ss = user_data;
-  gtk_widget_hide(GTK_WIDGET(ss->toplevel));
-}
-
-
-static void
-gnc_style_sheet_dialog_select_cb(GtkCList * list, gint row, gint col,
-                                 GdkEvent * ev, gpointer user_data) {
-  StyleSheetDialog * ssd = (StyleSheetDialog *)user_data;
-  struct ss_info   * ssinfo = gtk_clist_get_row_data(list, row);
-  GList * children = gtk_container_children(GTK_CONTAINER(ssd->options_frame));
-  
-  if(children) {
-    gtk_container_remove(GTK_CONTAINER(ssd->options_frame), 
-                         GTK_WIDGET(children->data));
+                                 gpointer user_data)
+{
+  ss_info * ssi = user_data;
+  GtkTreeIter iter;
+
+  if (gtk_tree_row_reference_valid (ssi->row_ref)) {
+    StyleSheetDialog * ss = gnc_style_sheet_dialog;
+    gtk_tree_model_get_iter (GTK_TREE_MODEL(ss->list_store), &iter,
+			     gtk_tree_row_reference_get_path (ssi->row_ref));
+    gtk_list_store_set (ss->list_store, &iter,
+			COLUMN_DIALOG, NULL,
+			-1);
+    
   }
-  gtk_container_add(GTK_CONTAINER(ssd->options_frame), 
-                    gnc_options_dialog_widget(ssinfo->odialog));
-  gtk_widget_show(gnc_options_dialog_widget(ssinfo->odialog));
-  gtk_widget_show(ssd->options_frame);
-  ssd->selection = ssinfo;
+  gtk_tree_row_reference_free (ssi->row_ref);
+  gnc_option_db_destroy(ssi->odb);
+  gnc_options_dialog_destroy(ssi->odialog);
+  scm_gc_unprotect_object(ssi->stylesheet);
+  g_free(ssi);
 }
 
-static void
-row_data_destroy_cb(gpointer data) {
-  struct ss_info * ss = data;
-  gnc_option_db_destroy(ss->odb);
-  gnc_options_dialog_destroy(ss->odialog);
-  scm_gc_unprotect_object(ss->stylesheet);
-  g_free(ss);
-}
 
-
-static void
-gnc_style_sheet_dialog_fill(StyleSheetDialog * ss, SCM selected) {
-  SCM stylesheets = scm_c_eval_string("(gnc:get-html-style-sheets)");
+static ss_info *
+gnc_style_sheet_dialog_create(StyleSheetDialog * ss,
+			      gchar *name,
+			      SCM sheet_info,
+			      GtkTreeRowReference *row_ref)
+{
   SCM get_options = scm_c_eval_string("gnc:html-style-sheet-options");
-  SCM get_name    = scm_c_eval_string("gnc:html-style-sheet-name");
-  int sel_row = 0;
 
-  /* pack it full of content */
-  for(; !SCM_NULLP(stylesheets); stylesheets=SCM_CDR(stylesheets)) {
-    SCM            scm_name = scm_call_1(get_name, SCM_CAR(stylesheets));
-    SCM            scm_options = scm_call_1(get_options, SCM_CAR(stylesheets));
-    struct ss_info * ssinfo = g_new0(struct ss_info, 1);
-    int            this_row;
-    char           * c_names[1];
-    char           * c_name;
+    SCM            scm_options = scm_call_1(get_options, sheet_info);
+    ss_info        * ssinfo = g_new0(ss_info, 1);
+    GtkWidget      * window;
+    gchar          * title;
 
-    /* make the options DB and dialog, but don't parent it yet */ 
-    ssinfo->odialog = gnc_options_dialog_new(FALSE, NULL);
+    title = g_strdup_printf("HTML Style Sheet Properties: %s", name);
+    ssinfo->odialog = gnc_options_dialog_new(title);
     ssinfo->odb     = gnc_option_db_new(scm_options);
-    ssinfo->stylesheet = SCM_CAR(stylesheets);
+    ssinfo->stylesheet = sheet_info;
+    ssinfo->row_ref    = row_ref;
+    g_free(title);
 
     scm_gc_protect_object(ssinfo->stylesheet);
-    gtk_widget_ref(gnc_options_dialog_widget(ssinfo->odialog));
+    g_object_ref(gnc_options_dialog_widget(ssinfo->odialog));
 
     gnc_build_options_dialog_contents(ssinfo->odialog, 
                                       ssinfo->odb);
@@ -123,43 +124,28 @@
                                     ssinfo);    
     gnc_options_dialog_set_close_cb(ssinfo->odialog, 
                                     gnc_style_sheet_options_close_cb,
-                                    ss);
-
-    /* add the column name */
-    c_name = gh_scm2newstr(scm_name, NULL);
-    if (!c_name)
-      continue;
-
-    c_names[0] = _(c_name);
-    this_row   = gtk_clist_append(GTK_CLIST(ss->list), c_names);
-    free (c_name);
-
-    gtk_clist_set_row_data_full(GTK_CLIST(ss->list), this_row, 
-                                (gpointer)ssinfo, 
-                                row_data_destroy_cb);
-    if(SCM_EQ_P(selected, SCM_CAR(stylesheets))) {
-      sel_row = this_row;
-    }
-  }
+                                    ssinfo);
+    window = gnc_options_dialog_widget(ssinfo->odialog);
+    gtk_window_present(GTK_WINDOW(window));
 
-  gtk_clist_select_row(GTK_CLIST(ss->list), sel_row, 0);
+    return(ssinfo);
 }
 
 
-static void
-gnc_style_sheet_new_cb(GtkWidget * w, gpointer user_data) {
-  StyleSheetDialog * ssd = user_data;
+static SCM
+gnc_style_sheet_new (StyleSheetDialog * ssd)
+{
   SCM              make_ss   = scm_c_eval_string("gnc:make-html-style-sheet");
   SCM              templates = scm_c_eval_string("(gnc:get-html-templates)");
   SCM              t_name = scm_c_eval_string("gnc:html-style-sheet-template-name");
+  SCM              new_ss = SCM_BOOL_F;
   GtkWidget        * template_entry;
   GtkWidget        * name_entry;
   GtkWidget        * template_combo;
   GList            * strings=NULL;
-  GList            * lptr;
   gint             dialog_retval;
-  char             * template_str = NULL;
-  char             * name_str = NULL;
+  const char       * template_str = NULL;
+  const char       * name_str = NULL;
 
   /* get the new name for the style sheet */
   GladeXML *xml = gnc_glade_xml_new ("report.glade",
@@ -172,101 +158,212 @@
   /* put in the list of style sheet type names */
   for(; !SCM_NULLP(templates); templates=SCM_CDR(templates)) {
     SCM t = SCM_CAR(templates);
-    strings = g_list_append(strings, gh_scm2newstr(scm_call_1(t_name, t), 
-                                                   NULL));
+    strings = g_list_append(strings, SCM_STRING_CHARS(scm_call_1(t_name, t)));
   }
   
   gtk_combo_set_popdown_strings(GTK_COMBO(template_combo), strings);
   
-  /* free the strings list */
-  for(lptr = strings; lptr; lptr = lptr->next) {
-    free(lptr->data);
-  }
+  /* The strings on the list are const.  Just free the list. */
   g_list_free(strings);
 
   /* get the name */
-  dialog_retval = gnome_dialog_run(GNOME_DIALOG(dlg));
+  gtk_window_set_transient_for (GTK_WINDOW(dlg), GTK_WINDOW(ssd->toplevel));
+  dialog_retval = gtk_dialog_run(GTK_DIALOG(dlg));
 
-  if(dialog_retval == 0) {
+  if(dialog_retval == GTK_RESPONSE_OK) {
     template_str = gtk_entry_get_text(GTK_ENTRY(template_entry));
     name_str     = gtk_entry_get_text(GTK_ENTRY(name_entry));
     if(template_str && name_str) {
-      SCM new_ss = scm_call_2(make_ss, 
-			      scm_makfrom0str(template_str),
-			      scm_makfrom0str(name_str));
-      gtk_clist_clear(GTK_CLIST(ssd->list));
-      gnc_style_sheet_dialog_fill(ssd, new_ss);
+      new_ss = scm_call_2(make_ss, 
+			  scm_makfrom0str(template_str),
+			  scm_makfrom0str(name_str));
     }
   }
 
-  gnome_dialog_close(GNOME_DIALOG(dlg));
+  gtk_widget_destroy(dlg);
+  return(new_ss);
+}
+
+
+/************************************************************
+ *               Style Sheet Selection Dialog               *
+ ************************************************************/
+static void
+gnc_style_sheet_select_dialog_add_one(StyleSheetDialog * ss,
+				      SCM sheet_info,
+				      gboolean select)
+{
+  SCM get_name, scm_name;
+  const gchar *c_name;
+  GtkTreeSelection *selection;
+  GtkTreeIter iter;
+
+  get_name = scm_c_eval_string("gnc:html-style-sheet-name");
+  scm_name = scm_call_1(get_name, sheet_info);
+  c_name = SCM_STRING_CHARS(scm_name);
+  if (!c_name)
+    return;
+
+  /* add the column name */
+  scm_gc_protect_object(sheet_info);
+  gtk_list_store_append (ss->list_store, &iter);
+  gtk_list_store_set (ss->list_store, &iter,
+		      COLUMN_NAME, c_name,
+		      COLUMN_STYLESHEET, sheet_info,
+		      -1);
+
+  if (select) {
+    selection = gtk_tree_view_get_selection (ss->list_view);
+    gtk_tree_selection_select_iter (selection, &iter);
+  }
 }
 
+static void
+gnc_style_sheet_select_dialog_fill(StyleSheetDialog * ss)
+{
+  SCM stylesheets = scm_c_eval_string("(gnc:get-html-style-sheets)");
+  SCM sheet_info;
+
+  /* pack it full of content */
+  for(; !SCM_NULLP(stylesheets); stylesheets=SCM_CDR(stylesheets)) {
+    sheet_info = SCM_CAR(stylesheets);
+    gnc_style_sheet_select_dialog_add_one(ss, sheet_info, FALSE);
+  }
+}
 
 static void
-gnc_style_sheet_delete_cb(GtkWidget * w, gpointer user_data) {
-  StyleSheetDialog * ssd = user_data;
-  struct ss_info   * ssi = ssd->selection;
-  SCM remover = scm_c_eval_string("gnc:html-style-sheet-remove");
-  scm_call_1(remover, ssi->stylesheet);
-  gtk_clist_clear(GTK_CLIST(ssd->list));
-  gnc_style_sheet_dialog_fill(ssd, SCM_BOOL_F);
+gnc_style_sheet_select_dialog_response_cb (GtkDialog *unused,
+					   gint response,
+					   gpointer user_data)
+{
+  StyleSheetDialog  * ss;
+  GtkTreeSelection  * selection;
+  GtkTreeRowReference * row_ref;
+  GtkTreeModel      * model;
+  GtkTreePath       * path;
+  GtkTreeIter         iter;
+  ss_info           * ssinfo;
+  SCM                 remover;
+  SCM sheet_info;
+  gchar *name;
+
+  ss = (StyleSheetDialog *)user_data;
+  switch (response) {
+   case GNC_RESPONSE_NEW:
+    sheet_info = gnc_style_sheet_new(ss);
+    if (sheet_info == SCM_BOOL_F)
+      break;
+    gnc_style_sheet_select_dialog_add_one(ss, sheet_info, TRUE);
+    /* Fall through */
+
+   case GNC_RESPONSE_EDIT:
+    selection = gtk_tree_view_get_selection (ss->list_view);
+    if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+      gtk_tree_model_get (model, &iter,
+			  COLUMN_NAME, &name,
+			  COLUMN_STYLESHEET, &sheet_info,
+			  -1);
+      /* Fire off options dialog here */
+      path = gtk_tree_model_get_path (GTK_TREE_MODEL(ss->list_store), &iter);
+      row_ref = gtk_tree_row_reference_new (GTK_TREE_MODEL(ss->list_store), path);
+      ssinfo = gnc_style_sheet_dialog_create(ss, name, sheet_info, row_ref);
+      gtk_list_store_set (ss->list_store, &iter,
+			  COLUMN_DIALOG, ssinfo,
+			  -1);
+    }
+    break;
+    
+   case GNC_RESPONSE_DELETE:
+    selection = gtk_tree_view_get_selection (ss->list_view);
+    if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+      gtk_tree_model_get (model, &iter,
+			  COLUMN_STYLESHEET, &sheet_info,
+			  COLUMN_DIALOG, &ssinfo,
+			  -1);
+      gtk_list_store_remove (ss->list_store, &iter);
+
+      if (ssinfo)
+	gnc_style_sheet_options_close_cb(NULL, ssinfo);
+      remover = scm_c_eval_string("gnc:html-style-sheet-remove");
+      scm_call_1(remover, sheet_info);
+      scm_gc_unprotect_object(sheet_info);
+    }
+    break;
+
+   case GTK_RESPONSE_CLOSE:
+   default:
+    gnc_style_sheet_dialog = NULL;
+    gtk_widget_destroy(ss->toplevel);
+    g_free(ss);
+    break;
+  }
 }
 
 
-static int
-gnc_style_sheet_dialog_close_cb(GtkWidget * w, GdkEventAny * ev,
-                                gpointer user_data) {
-  StyleSheetDialog * ss = user_data;
-  gtk_widget_hide(GTK_WIDGET(ss->toplevel));
-  return TRUE;
+static void
+gnc_style_sheet_select_dialog_event_cb (GtkWidget *widget,
+					GdkEvent *event,
+					gpointer user_data)
+{
+  StyleSheetDialog  * ss = user_data;
+
+  g_return_if_fail(event != NULL);
+  g_return_if_fail(ss != NULL);
+
+  if (event->type != GDK_2BUTTON_PRESS)
+    return;
+
+  /* Synthesize a click of the edit button */
+  gnc_style_sheet_select_dialog_response_cb (NULL, GNC_RESPONSE_EDIT, ss);
 }
 
+
 static StyleSheetDialog *
-gnc_style_sheet_dialog_create() {
+gnc_style_sheet_select_dialog_create(void)
+{
   StyleSheetDialog  * ss = g_new0(StyleSheetDialog, 1);
-  GtkWidget         * new_button=NULL;
-  GtkWidget         * delete_button=NULL;
   GladeXML          * xml;
+  GtkCellRenderer   * renderer;
+  GtkTreeSelection  * selection;
 
-  xml = gnc_glade_xml_new ("report.glade", "HTML Style Sheet Dialog");
+  xml = gnc_glade_xml_new ("report.glade", "Select Style Sheet Dialog");
 
-  ss->toplevel   = glade_xml_get_widget (xml, "HTML Style Sheet Dialog");
+  ss->toplevel   = glade_xml_get_widget (xml, "Select Style Sheet Dialog");
 
-  ss->list          = glade_xml_get_widget (xml, "style_sheet_list");
-  ss->options_frame = glade_xml_get_widget (xml, "style_sheet_options");
-  new_button        = glade_xml_get_widget (xml, "new_button");
-  delete_button     = glade_xml_get_widget (xml, "delete_button");
-
-  gtk_signal_connect(GTK_OBJECT(ss->list), "select_row",
-                     GTK_SIGNAL_FUNC(gnc_style_sheet_dialog_select_cb), ss);
-  gtk_signal_connect(GTK_OBJECT(new_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_style_sheet_new_cb), ss);
-  gtk_signal_connect(GTK_OBJECT(delete_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_style_sheet_delete_cb), ss); 
-  gtk_signal_connect(GTK_OBJECT(ss->toplevel), "delete_event",
-                     GTK_SIGNAL_FUNC(gnc_style_sheet_dialog_close_cb), ss); 
+  ss->list_view  = GTK_TREE_VIEW(glade_xml_get_widget (xml, "style_sheet_list_view"));
+  ss->list_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_POINTER);
+  gtk_tree_view_set_model(ss->list_view, GTK_TREE_MODEL(ss->list_store));
+  renderer = gtk_cell_renderer_text_new ();
+  gtk_tree_view_insert_column_with_attributes(ss->list_view, -1,
+					      _("Style Sheet Name"), renderer,
+					      "text", COLUMN_NAME,
+					      NULL);
+
+  selection = gtk_tree_view_get_selection (ss->list_view);
+  gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+
+  gtk_signal_connect(GTK_OBJECT(ss->toplevel), "response",
+                     GTK_SIGNAL_FUNC(gnc_style_sheet_select_dialog_response_cb), ss); 
+  gtk_signal_connect(GTK_OBJECT(ss->list_view), "event-after",
+                     GTK_SIGNAL_FUNC(gnc_style_sheet_select_dialog_event_cb), ss); 
   
-  gnc_style_sheet_dialog_fill(ss, SCM_BOOL_F);
-
-  gtk_window_set_policy(GTK_WINDOW(ss->toplevel), TRUE, TRUE, FALSE);
-
-  gtk_clist_columns_autosize (GTK_CLIST (ss->list));
+  gnc_style_sheet_select_dialog_fill(ss);
 
-  gtk_widget_show(ss->toplevel);
+  gtk_widget_show_all(ss->toplevel);
 
   return ss;
 }
 
 
 void
-gnc_style_sheet_dialog_open(void) {
+gnc_style_sheet_dialog_open(void)
+{
   if(gnc_style_sheet_dialog) {
     gtk_window_present(GTK_WINDOW(gnc_style_sheet_dialog->toplevel));
   }
   else {
     gnc_style_sheet_dialog = 
-      gnc_style_sheet_dialog_create();
+      gnc_style_sheet_select_dialog_create();
   }
 }
 
Index: report-gnome.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/report-gnome.scm,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/report/report-gnome/report-gnome.scm -Lsrc/report/report-gnome/report-gnome.scm -u -r1.11 -r1.12
--- src/report/report-gnome/report-gnome.scm
+++ src/report/report-gnome/report-gnome.scm
@@ -12,6 +12,7 @@
 (use-modules (ice-9 slib))
 (require 'printf)
 
+(use-modules (g-wrapped gw-core-utils))
 (use-modules (g-wrapped gw-report-gnome))
 
 (gnc:module-load "gnucash/gnome-utils" 0)
@@ -21,11 +22,15 @@
 (export gnc:report-menu-setup)
 (export gnc:add-report-template-menu-items)
 
+;; returns a function that takes a list: (options, report),
+;; and returns a widget
 (define (gnc:report-options-editor report) 
   (if (equal? (gnc:report-type report) "Multicolumn View")
       gnc:column-view-edit-options
       gnc:default-options-editor))
 
+;; do not rely on the return value of this function - it has none.
+;; instead, this function's side-effect is to set the report's editor widget.
 (define (gnc:report-edit-options report) 
   (let* ((editor-widg (gnc:report-editor-widget report)))
     (if editor-widg
@@ -51,12 +56,15 @@
               (menu-tip (gnc:report-template-menu-tip template))
               (item #f))
 
+          ;;(if (not menu-path)
+              ;;(set! menu-path '(""))
+              ;;(set! menu-path
+              ;; (append menu-path '(""))))
+
           (if (not menu-path)
-              (set! menu-path '(""))
-              (set! menu-path
-                    (append menu-path '(""))))
+              (set! menu-path '()))
 
-          (set! menu-path (append (list gnc:window-name-main gnc:menuname-reports) menu-path))
+          (set! menu-path (append (list gnc:menuname-reports) menu-path))
 
           (if (not menu-tip)
               (set! menu-tip
@@ -67,10 +75,10 @@
                  ((menu-namer 'add-name) name)
                  menu-tip
                  menu-path
-                 (lambda ()
+                 (lambda (window)
                    (let ((report (gnc:make-report
                                   (gnc:report-template-name template))))
-                     (gnc:main-window-open-report report #f)))))
+                     (gnc:main-window-open-report report window)))))
           (gnc:add-extension item))))
 
   (define (add-template name template)
@@ -87,30 +95,20 @@
      (add-template-menu-item (car item) (cdr item)))
    (sort *template-items* sort-templates)))
 
-
 (define (gnc:report-menu-setup)
-  ;; since this menu gets added to every child window, we say it 
-  ;; comes after the "_Actions" menu. 
-  (define menu (gnc:make-menu gnc:menuname-reports
-			      (list gnc:window-name-main "_Actions")))
   (define menu-namer (gnc:new-menu-namer))
   (define asset-liability-menu
-    (gnc:make-menu gnc:menuname-asset-liability
-                   (list gnc:window-name-main gnc:menuname-reports "")))
+    (gnc:make-menu gnc:menuname-asset-liability (list gnc:menuname-reports)))
   (define income-expense-menu
-    (gnc:make-menu gnc:menuname-income-expense
-                   (list gnc:window-name-main gnc:menuname-reports "")))
+    (gnc:make-menu gnc:menuname-income-expense (list gnc:menuname-reports)))
   (define utility-menu
-    (gnc:make-menu gnc:menuname-utility
-                   (list gnc:window-name-main gnc:menuname-reports "")))
+    (gnc:make-menu gnc:menuname-utility (list gnc:menuname-reports)))
   (define custom-menu
-    (gnc:make-menu gnc:menuname-custom
-                   (list gnc:window-name-main gnc:menuname-reports "")))
+    (gnc:make-menu gnc:menuname-custom (list gnc:menuname-reports)))
   (define tax-menu 
-    (gnc:make-menu gnc:menuname-taxes
-		   (list gnc:window-name-main gnc:menuname-reports "")))
+    (gnc:make-menu gnc:menuname-taxes (list gnc:menuname-reports)))
 
-  (gnc:add-extension menu)
+  (gnc:warn "report-menu-setup") ;; why do we do this?
 
   ;; (gnc:add-extension tax-menu)
   (gnc:add-extension income-expense-menu)
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/report-gnome/.cvsignore -Lsrc/report/report-gnome/.cvsignore -u -r1.4 -r1.5
--- src/report/report-gnome/.cvsignore
+++ src/report/report-gnome/.cvsignore
@@ -1,3 +1,4 @@
+*.gladep
 *.lo
 *.la
 .scm-links
Index: gw-report-gnome-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/gw-report-gnome-spec.scm,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/report-gnome/gw-report-gnome-spec.scm -Lsrc/report/report-gnome/gw-report-gnome-spec.scm -u -r1.5 -r1.6
--- src/report/report-gnome/gw-report-gnome-spec.scm
+++ src/report/report-gnome/gw-report-gnome-spec.scm
@@ -29,12 +29,9 @@
      (list
       "#include <dialog-column-view.h>\n"
       "#include <dialog-style-sheet.h>\n"
+      "#include <gnc-plugin-page-report.h>\n"
       "#include <window-report.h>\n")))
 
-  (gw:wrap-as-wct ws
-                  '<gnc:report-window*>
-                  "gnc_report_window*" "const gnc_report_window*")
-
   (gw:wrap-function
    ws
    'gnc:report-window
@@ -45,22 +42,6 @@
 
   (gw:wrap-function
    ws
-   'gnc:report-window-reload
-   '<gw:void>
-   "gnc_report_window_reload"
-   '((<gnc:report-window*> wind))
-   "Force reload of a report window")
-
-  (gw:wrap-function
-   ws
-   'gnc:report-window-add-edited-report
-   '<gw:void>
-   "gnc_report_window_add_edited_report"
-   '((<gnc:report-window*> wind) (<gw:scm> report))
-   "Add a report to the list of reports with open editors")
-
-  (gw:wrap-function
-   ws
    'gnc:print-report
    '<gw:void>
    "gnc_print_report"
@@ -80,9 +61,12 @@
    'gnc:main-window-open-report
    '<gw:void>
    "gnc_main_window_open_report"
-   '((<gw:int> report-id) (<gw:bool> top-level))
+   '((<gw:int> report-id) (<gnc:MainWindow*> window))
    "Show report window")
 
+
+;; This is the function that's responsible for creating and returning
+;; the editor widget for a report's options.
   (gw:wrap-function
    ws
    'gnc:default-options-editor
@@ -93,14 +77,6 @@
 
   (gw:wrap-function
    ws
-   'gnc:style-sheet-dialog-open
-   '<gw:void>
-   "gnc_style_sheet_dialog_open"
-   '()
-   "Show the style sheet editor window.")
-
-  (gw:wrap-function
-   ws
    'gnc:column-view-edit-options
    '<gnc:UIWidget>
    "gnc_column_view_edit_options"
Index: window-report.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/window-report.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/report/report-gnome/window-report.c -Lsrc/report/report-gnome/window-report.c -u -r1.22 -r1.23
--- src/report/report-gnome/window-report.c
+++ src/report/report-gnome/window-report.c
@@ -35,989 +35,27 @@
 #include <g-wrap-wct.h>
 
 #include "dialog-options.h"
-#include "dialog-utils.h"
 #include "file-utils.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-file-dialog.h"
-#include "gnc-gui-query.h"
-#include "gnc-html-history.h"
-#include "gnc-html.h"
 #include "gnc-report.h"
 #include "gnc-ui.h"
 #include "option-util.h"
-#include "window-help.h"
 #include "window-report.h"
 #include "guile-mappings.h"
 
-#define WINDOW_REPORT_CM_CLASS "window-report"
-
-struct gnc_report_window_s
-{
-  GNCMDIChildInfo * mc; 
-  GtkWidget    * container;   
-
-  /* the report that's currently being shown.  For any option change
-   * we need to rerun the report */
-  SCM          cur_report;      
-  GNCOptionDB  * cur_odb;
-  SCM          option_change_cb_id;
-  
-  /* initial_report is special; it's the one that's saved and 
-   * restored.  The name_change_callback only gets called when
-   * the initial_report name is changed. */
-  SCM          initial_report; 
-  GNCOptionDB  * initial_odb;
-  SCM          name_change_cb_id;
-  
-  SCM          edited_reports;
-
-  /* This is set to mark the fact that we need to reload the html */
-  gboolean	need_reload;
-
-  gnc_html     * html;
-};
-
-
-static void gnc_report_window_print_cb(GtkWidget * w, gpointer data);
-static void gnc_report_window_reload_cb(GtkWidget * w, gpointer data);
-
-/********************************************************************
- * REPORT WINDOW FUNCTIONS 
- * creating/managing report-window mdi children
- ********************************************************************/
-
-/********************************************************************
- * gnc_report_window_view_labeler
- * label the window/tab/menu item with the report name 
- ********************************************************************/
-
-static GtkWidget * 
-gnc_report_window_view_labeler(GnomeMDIChild * child, GtkWidget * current,
-                               gpointer user_data)
-{
-  GNCMDIChildInfo  * rwin = gtk_object_get_user_data(GTK_OBJECT(child));
-  gnc_report_window * report;
-  SCM    get_name = scm_c_eval_string("gnc:report-name");
-  char   * name = NULL; 
-  
-  if(rwin) {
-    report = rwin->user_data;
-    if(report->initial_report != SCM_BOOL_F) {
-      name = gh_scm2newstr(scm_call_1(get_name, 
-				      report->initial_report),
-                           NULL);
-    }
-    else {
-      name = strdup(_("(Report not found)"));
-    }
-    g_free(rwin->title);
-    rwin->title = g_strdup(name);    
-  }
-  else {
-    name = strdup(_("Report"));
-  }
-
-  if(current == NULL) {
-    current = gtk_label_new(name);    
-    free(name);
-  }
-  else {
-    gtk_label_set_text(GTK_LABEL(current), name);
-    free(name);
-  }
-  gtk_misc_set_alignment (GTK_MISC(current), 0.0, 0.5);
-  return current;
-}
-
-static void
-gnc_report_window_view_destroy(GtkObject * obj, gpointer user_data)
-{
-  GNCMDIChildInfo  * mc = user_data;
-
-  gnc_mdi_remove_child(gnc_mdi_get_current(), mc);
-  g_free(mc->toolbar_info);
-  g_free(mc->menu_info);
-  g_free(mc->title);
-  g_free(mc);
-}
-
-static void
-gnc_report_window_menu_tweaking (GNCMDIChildInfo * mc)
-{
-  /* Do not i18n these strings!!! */
-}
-
-/********************************************************************
- * report_view_new
- * create a new report view.  
- ********************************************************************/
-
-static GtkWidget *
-gnc_report_window_view_new(GnomeMDIChild * child, gpointer user_data)
-{
-  GNCMDIInfo        * maininfo = user_data;
-  GNCMDIChildInfo    * mc = g_new0(GNCMDIChildInfo, 1);
-  gnc_report_window  * win = gnc_report_window_new(mc);
-  URLType            type;
-  char               * url_location = NULL;
-  char               * url_label = NULL;
-
-  mc->contents     = gnc_report_window_get_container(win);
-  mc->app          = NULL;
-  mc->toolbar      = NULL;
-  mc->user_data    = win;
-  mc->child        = child; 
-  mc->title        = g_strdup("Report");
-  mc->menu_tweaking  = gnc_report_window_menu_tweaking;
-  gnc_mdi_add_child (maininfo, mc);
-
-  /* Override a couple of standard buttons. */
-  gnc_mdi_set_dispatch_cb(mc, GNC_DISP_PRINT,
-			  gnc_report_window_print_cb, win);
-  gnc_mdi_set_dispatch_cb(mc, GNC_DISP_REFRESH,
-			  gnc_report_window_reload_cb, win);
-  type = gnc_html_parse_url(gnc_report_window_get_html(win),
-                            child->name, &url_location, &url_label);
-  
-  gnc_html_show_url(gnc_report_window_get_html(win), 
-                    type, url_location, url_label, 0);
-  
-  gtk_object_set_user_data(GTK_OBJECT(child), mc);
-  
-  /* make sure menu entry and label get refreshed */
-  gnome_mdi_child_set_name(child, child->name);
-
-  gtk_signal_connect(GTK_OBJECT(child), "destroy", 
-                     gnc_report_window_view_destroy, mc);
-  
-  gnc_report_window_create_menu(win, mc); 
-  gnc_report_window_create_toolbar(win, mc);
-  gnc_mdi_create_child_toolbar(maininfo, mc);
-  
-  if(mc->menu_info) {
-    gnome_mdi_child_set_menu_template(child, mc->menu_info);  
-  }
-  
-  g_free(url_location);
-  g_free(url_label);
-  return mc->contents;
-}
-
-
-/********************************************************************
- * gnc_report_window_create_child()
- * return an MDI child that will create views of the specified report 
- * (configstring is the report URL)
- ********************************************************************/
-
-GnomeMDIChild * 
-gnc_report_window_create_child(const gchar * configstring)
-{
-  GnomeMDIGenericChild * reportchild = 
-    gnome_mdi_generic_child_new(configstring);
-  GNCMDIInfo * maininfo = gnc_mdi_get_current();
-  
-  gnome_mdi_generic_child_set_label_func(reportchild, 
-                                         gnc_report_window_view_labeler,
-                                         maininfo);
-  gnome_mdi_generic_child_set_view_creator(reportchild, 
-                                           gnc_report_window_view_new,
-                                           maininfo);
-  return GNOME_MDI_CHILD(reportchild);
-}
-
-
-/********************************************************************
- * gnc_main_window_open_report()
- * open an report in a top level window from an ID number 
- ********************************************************************/
-
-void
-gnc_main_window_open_report(int report_id, gint toplevel)
-{
-  char * id_name = g_strdup_printf("id=%d", report_id);  
-  char * child_name = gnc_build_url (URL_TYPE_REPORT, id_name, NULL);
-  g_free (id_name);
-  gnc_main_window_open_report_url(child_name, toplevel);
-}
-
-
-void
-gnc_main_window_open_report_url(const char * url, gint toplevel)
-{
-  GnomeMDIChild * reportchild = gnc_report_window_create_child(url);
-  GNCMDIInfo   * maininfo = gnc_mdi_get_current();
-  
-  gnome_mdi_add_child(GNOME_MDI(maininfo->mdi), 
-                      GNOME_MDI_CHILD(reportchild));  
-  if(toplevel) {
-    gnome_mdi_add_toplevel_view(GNOME_MDI(maininfo->mdi), 
-                                GNOME_MDI_CHILD(reportchild));
-  }
-  else {
-    GNCMDIChildInfo * childwin;
-
-    gnome_mdi_add_view(GNOME_MDI(maininfo->mdi), 
-                       GNOME_MDI_CHILD(reportchild));
-
-    childwin = gtk_object_get_user_data(GTK_OBJECT(reportchild));
-    if (childwin && childwin->app && GTK_WIDGET (childwin->app)->window)
-      gdk_window_raise (GTK_WIDGET (childwin->app)->window);
-  }
-}
-
-
-/********************************************************************
- * gnc_report_window_check_urltype
- * is it OK to show a certain URLType in this window?
- ********************************************************************/
-
-static int
-gnc_report_window_check_urltype(URLType t)
-{
-  if (!safe_strcmp (t, URL_TYPE_REPORT)) {
-    return TRUE;
-  } else {
-    return FALSE;
-  }
-}
-
-
-/********************************************************************
- * toolbar callbacks
- ********************************************************************/
-
-static int 
-gnc_report_window_fwd_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window     * report = data;
-  gnc_html_history_node * node = NULL;
-
-  gnc_html_history_forward(gnc_html_get_history(report->html));
-  node = gnc_html_history_get_current(gnc_html_get_history(report->html));
-  if(node) {
-    gnc_html_show_url(report->html, node->type, node->location, 
-                      node->label, 0);
-  }
-  return TRUE;
-}
-
-static int 
-gnc_report_window_back_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window     * report = data;
-  gnc_html_history_node * node;
-  
-  gnc_html_history_back(gnc_html_get_history(report->html));
-  node = gnc_html_history_get_current(gnc_html_get_history(report->html));
-  if(node) {
-    gnc_html_show_url(report->html, node->type, node->location, 
-                      node->label, 0);
-  }
-  return TRUE;
-}
-
-
-static int
-gnc_report_window_stop_button_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * report = data;
-  gnc_html_cancel(report->html);
-  return TRUE;
-}
-
-/* Returns SCM_BOOL_F if cancel. Returns SCM_BOOL_T if html.
- * Otherwise returns pair from export_types. */
-static SCM
-gnc_get_export_type_choice (SCM export_types)
-{
-  GList * choices = NULL;
-  gboolean bad = FALSE;
-  GList * node;
-  int choice;
-  SCM tail;
-
-  if (!SCM_LISTP (export_types))
-    return SCM_BOOL_F;
-
-  for (tail = export_types; !SCM_NULLP (tail); tail = SCM_CDR (tail))
-  {
-    SCM pair = SCM_CAR (tail);
-    char * name;
-    SCM scm;
-
-    if (!SCM_CONSP (pair))
-    {
-      g_warning ("unexpected list element");
-      bad = TRUE;
-      break;
-    }
-
-    scm = SCM_CAR (pair);
-    if (!SCM_STRINGP (scm))
-    {
-      g_warning ("unexpected pair element");
-      bad = TRUE;
-      break;
-    }
+#include "gnc-plugin-page-report.h"
 
-    name = gh_scm2newstr (scm, NULL);
-    choices = g_list_prepend (choices, g_strdup (name));
-    if (name) free (name);
-  }
-
-  if (!bad)
-  {
-    choices = g_list_reverse (choices);
-
-    choices = g_list_prepend (choices, g_strdup (_("HTML")));
-
-    choice = gnc_choose_radio_option_dialog
-      (NULL, _("Choose export format"),
-       _("Choose the export format for this report:"), 0, choices);
-  }
-  else
-    choice = -1;
-
-  for (node = choices; node; node = node->next)
-    g_free (node->data);
-  g_list_free (choices);
-
-  if (choice < 0)
-    return SCM_BOOL_F;
-
-  if (choice == 0)
-    return SCM_BOOL_T;
-
-  choice--;
-  if (choice >= scm_ilength (export_types))
-    return SCM_BOOL_F;
-
-  return scm_list_ref (export_types, scm_int2num (choice));
-}
-
-static const char *
-gnc_get_export_filename (SCM choice)
-{
-  const char * filepath;
-  struct stat statbuf;
-  char * title;
-  char * type;
-  int rc;
-
-  if (choice == SCM_BOOL_T)
-    type = g_strdup (_("HTML"));
-  else
-  {
-    char * s = gh_scm2newstr (SCM_CAR (choice), NULL);
-    type = g_strdup (s);
-    if (s) free (s);
-  }
-
-  /* %s is the type of what is about to be saved, e.g. "HTML". */
-  title = g_strdup_printf (_("Save %s To File"), type);
-
-  filepath = gnc_file_dialog (title, NULL, NULL);
-
-  g_free (title);
-  g_free (type);
-
-  if (!filepath)
-    return NULL;
-
-  rc = stat (filepath, &statbuf);
-
-  /* Check for an error that isn't a non-existant file. */
-  if (rc != 0 && errno != ENOENT)
-  {
-    /* %s is the strerror(3) string of the error that occurred. */
-    const char *format = _("You cannot save to that filename.\n\n%s");
-
-    gnc_error_dialog (NULL, format, strerror(errno));
-    return NULL;
-  }
-
-  /* Check for a file that isn't a regular file. */
-  if (rc == 0 && !S_ISREG (statbuf.st_mode))
-  {
-    const char *message = _("You cannot save to that file.");
-
-    gnc_error_dialog (NULL, message);
-    return NULL;
-  }
-
-  if (rc == 0)
-  {
-    const char *format = _("The file \n    %s\n already exists.\n"
-                           "Are you sure you want to overwrite it?");
-
-    if (!gnc_verify_dialog (NULL, FALSE, format, filepath))
-      return NULL;
-  }
-
-  return filepath;
-}
-
-static int
-gnc_report_window_export_button_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * report = data;
-  const char * filepath;
-  SCM export_types;
-  SCM export_thunk;
-  gboolean result;
-  SCM choice;
-
-  export_types = scm_call_1 (scm_c_eval_string ("gnc:report-export-types"),
-			     report->cur_report);
-
-  export_thunk = scm_call_1 (scm_c_eval_string ("gnc:report-export-thunk"),
-			     report->cur_report);
-
-  if (SCM_LISTP (export_types) && SCM_PROCEDUREP (export_thunk))
-    choice = gnc_get_export_type_choice (export_types);
-  else
-    choice = SCM_BOOL_T;
-
-  if (choice == SCM_BOOL_F)
-    return TRUE;
-
-  filepath = gnc_get_export_filename (choice);
-  if (!filepath)
-    return TRUE;
-
-  if (SCM_CONSP (choice))
-  {
-    SCM file_scm;
-    SCM res;
-
-    choice = SCM_CDR (choice);
-    file_scm = scm_makfrom0str (filepath);
-
-    res = scm_call_3 (export_thunk, report->cur_report, choice, file_scm);
-
-    result = (res != SCM_BOOL_F);
-  }
-  else
-    result = gnc_html_export (report->html, filepath);
-
-  if (!result)
-  {
-    const char *fmt = _("Could not open the file\n"
-                        "     %s\n%s");
-    gnc_error_dialog (NULL, fmt, filepath ? filepath : "(null)",
-		      strerror (errno) ? strerror (errno) : "");
-  }
-
-  return TRUE;
-}
-
-
-static int
-gnc_report_window_params_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * report = data;
-  SCM start_editor = scm_c_eval_string("gnc:report-edit-options");
-
-  if(report->cur_report != SCM_BOOL_F)
-  {
-    if(scm_call_1(start_editor, report->cur_report) == SCM_BOOL_F) {
-      gnc_warning_dialog(GTK_WIDGET(report->mc->app),
-			 _("There are no options for this report."));
-    }
-    else {
-      gnc_report_window_add_edited_report(report, report->cur_report);
-    }
-  }
-
-  return TRUE;
-}
-
-static int
-gnc_report_window_save_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * report = data;
-  SCM save_func = gh_eval_str("gnc:report-save-to-savefile");
-
-  if(report->cur_report != SCM_BOOL_F)
-  {
-    gh_call1(save_func, report->cur_report);
-  }
-
-  return TRUE;
-}
-
-/* We got a draw event.  See if we need to reload the report */
-static void
-gnc_report_window_draw_cb(GtkWidget *unused, GdkRectangle *unused1, gpointer data)
-{
-  gnc_report_window *win = data;
-
-  if (!win->need_reload)
-    return;
-
-  win->need_reload = FALSE;
-  gnc_html_reload(win->html);
-}
-
-static void
-gnc_report_window_reload_cb(GtkWidget * unused, gpointer data)
-{
-  gnc_report_window * report = data;
-  SCM               dirty_report = scm_c_eval_string("gnc:report-set-dirty?!");
-
-  if(report->cur_report != SCM_BOOL_F) {
-    scm_call_2(dirty_report, report->cur_report, SCM_BOOL_T);
-
-    /* now queue the fact that we need to reload this report */
-    report->need_reload = TRUE;
-    gtk_widget_queue_draw(report->container);
-  }
-}
-
-static void
-gnc_report_window_set_back_button(gnc_report_window * win, int enabled)
-{
-  GnomeApp    * app = win->mc->app;
-  GnomeUIInfo * info;
-
-  /* the code below is broken, so just return */
-  return;
-
-  if(app) {
-    info = gnome_mdi_get_child_menu_info(app);
-    if(info) gtk_widget_set_sensitive(info[0].widget, enabled);
-  }
-}
-
-static void
-gnc_report_window_set_fwd_button(gnc_report_window * win, int enabled)
-{
-  GnomeApp    * app = win->mc->app;
-  GnomeUIInfo * info;
-
-  /* the code below is broken, so just return */
-  return;
-
-  if(app) {
-    info = gnome_mdi_get_child_menu_info(app);
-    if(info) gtk_widget_set_sensitive(info[1].widget, enabled);
-  }
-}
-
-void
-gnc_report_window_reload(gnc_report_window * win)
-{
-  gnc_html_reload(win->html);
-}
-
-static void
-gnc_report_window_option_change_cb(gpointer data)
-{
-  gnc_report_window * report = data;
-  SCM               dirty_report = scm_c_eval_string("gnc:report-set-dirty?!");
-
-  if(report->cur_report != SCM_BOOL_F) {
-    /* it's probably already dirty, but make sure */
-    scm_call_2(dirty_report, report->cur_report, SCM_BOOL_T);
-
-    /* Now queue the fact that we need to reload this report */
-    report->need_reload = TRUE;
-    gtk_widget_queue_draw(report->container);
-  }
-}
-
-/********************************************************************
- * gnc_report_window_load_cb
- * called after a report is loaded into the gnc_html widget 
- ********************************************************************/
-
-static void
-gnc_report_window_refresh (gpointer data)
-{
-  gnc_mdi_child_refresh (data);
-}
-
-static void 
-gnc_report_window_load_cb(gnc_html * html, URLType type, 
-                          const gchar * location, const gchar * label, 
-                          gpointer data)
-{
-  gnc_report_window * win = data;
-  int  report_id;
-  SCM  find_report    = scm_c_eval_string("gnc:find-report");
-  SCM  get_options    = scm_c_eval_string("gnc:report-options");
-  SCM  set_needs_save = scm_c_eval_string("gnc:report-set-needs-save?!");
-  SCM  inst_report;
-  
-  /* we get this callback if a new report is requested to be loaded OR
-   * if any URL is clicked.  If an options URL is clicked, we want to
-   * know about it */
-  if(!safe_strcmp (type, URL_TYPE_REPORT) && 
-     location && (strlen(location) > 3) && 
-     !strncmp("id=", location, 3)) {
-    sscanf(location+3, "%d", &report_id);
-  }
-  else if(!safe_strcmp( type, URL_TYPE_OPTIONS)
-	  && location && (strlen(location) > 10) &&
-          !strncmp("report-id=", location, 10)) {
-    sscanf(location+10, "%d", &report_id);
-    inst_report = scm_call_1(find_report, scm_int2num(report_id));
-    if(inst_report != SCM_BOOL_F) {
-      gnc_report_window_add_edited_report(win, inst_report);      
-    }
-    return;
-  }
-  else {
-    return;
-  }
-  
-  /* get the inst-report from the Scheme-side hash, and get its
-   * options and editor thunk */
-  if((inst_report = scm_call_1(find_report, scm_int2num(report_id))) ==
-     SCM_BOOL_F) {
-    return;
-  }
-
-  if(win->initial_report == SCM_BOOL_F) {    
-    scm_gc_unprotect_object(win->initial_report);
-    win->initial_report = inst_report;
-    scm_gc_protect_object(win->initial_report);
-    
-    scm_call_2(set_needs_save, inst_report, SCM_BOOL_T);
-
-    win->initial_odb = gnc_option_db_new(scm_call_1(get_options, inst_report));  
-    win->name_change_cb_id = 
-      gnc_option_db_register_change_callback(win->initial_odb,
-                                             gnc_report_window_refresh,
-                                             win->mc,
-                                             "General", "Report name");
-  }
-  
-  if((win->cur_report != SCM_BOOL_F) && (win->cur_odb != NULL)) {
-    gnc_option_db_unregister_change_callback_id(win->cur_odb,
-                                                win->option_change_cb_id);
-    gnc_option_db_destroy(win->cur_odb);
-    win->cur_odb = NULL;
-  }
-  
-  if(win->cur_report != SCM_BOOL_F)
-    scm_gc_unprotect_object(win->cur_report);
-  win->cur_report = inst_report;
-  scm_gc_protect_object(win->cur_report);
-
-  win->cur_odb = gnc_option_db_new(scm_call_1(get_options, inst_report));  
-  win->option_change_cb_id = 
-    gnc_option_db_register_change_callback(win->cur_odb,
-                                           gnc_report_window_option_change_cb,
-                                           win, NULL, NULL);
-  
-  if(gnc_html_history_forward_p(gnc_html_get_history(win->html))) {
-    gnc_report_window_set_fwd_button(win, TRUE); 
-  }
-  else {
-    gnc_report_window_set_fwd_button(win, FALSE); 
-  }
-
-  if(gnc_html_history_back_p(gnc_html_get_history(win->html))) {
-    gnc_report_window_set_back_button(win, TRUE); 
-  }
-  else {
-    gnc_report_window_set_back_button(win, FALSE); 
-  }
-}
-
-
-/********************************************************************
- * gnc_report_window_destroy_cb
- ********************************************************************/
-
-static void
-gnc_report_window_destroy_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * win = data;
-  /* make sure we don't get a double dose -o- destruction */ 
-  gtk_signal_disconnect_by_data(GTK_OBJECT(win->container), 
-                                data);
-  
-  gnc_report_window_destroy(win);
-}
-
-
-/********************************************************************
- * gnc_report_window_print_cb
- ********************************************************************/
-
-static void
-gnc_report_window_print_cb(GtkWidget * w, gpointer data)
-{
-  gnc_report_window * win = data;
-  gnc_html_print(win->html);
-}
-
-static void 
-gnc_report_window_history_destroy_cb(gnc_html_history_node * node, 
-                                     gpointer user_data)
-{
-  static SCM         remover = SCM_BOOL_F;
-  int                report_id;
-  
-  if(remover == SCM_BOOL_F) {
-    remover = scm_c_eval_string("gnc:report-remove-by-id");
-  }
-  
-  if(node && 
-     !safe_strcmp (node->type, URL_TYPE_REPORT) && 
-     !strncmp("id=", node->location, 3)) {
-    sscanf(node->location+3, "%d", &report_id);
-    /*    printf("unreffing report %d and children\n", report_id);
-          scm_call_1(remover, scm_int2num(report_id)); */
-  }
-  else {
-    return;
-  }
-}
-
-static void
-close_handler (gpointer user_data)
-{
-  gnc_report_window *win = user_data;  
-  printf("in close handler\n");
-  gnc_report_window_destroy (win);
-}
-
-/********************************************************************
- * gnc_report_window_new 
- * allocates and opens up a report window
- ********************************************************************/
-
-gnc_report_window *
-gnc_report_window_new(GNCMDIChildInfo * mc)
-{
-  gnc_report_window * report = g_new0(gnc_report_window, 1);
-  GtkObject         * tlo; 
-
-  report->mc               = mc;
-  report->html             = gnc_html_new();
-  report->cur_report       = SCM_BOOL_F;
-  report->initial_report   = SCM_BOOL_F;
-  report->edited_reports   = SCM_EOL;
-  report->name_change_cb_id = SCM_BOOL_F;
-
-  scm_gc_protect_object(report->cur_report);
-  scm_gc_protect_object(report->initial_report);
-  scm_gc_protect_object(report->edited_reports);
-
-  gnc_html_history_set_node_destroy_cb(gnc_html_get_history(report->html),
-                                       gnc_report_window_history_destroy_cb,
-                                       (gpointer)report);
-  
-
-  report->container = gtk_frame_new(NULL);
-  gtk_frame_set_shadow_type(GTK_FRAME(report->container), GTK_SHADOW_NONE);
-  
-  tlo = GTK_OBJECT(report->container);
-  gtk_container_add(GTK_CONTAINER(report->container), 
-                    gnc_html_get_widget(report->html));
-  
-  gnc_register_gui_component (WINDOW_REPORT_CM_CLASS, NULL,
-                              close_handler, report);
-  
-  gnc_html_set_urltype_cb(report->html, gnc_report_window_check_urltype);
-  gnc_html_set_load_cb(report->html, gnc_report_window_load_cb, report);
-  
-  gtk_signal_connect(GTK_OBJECT(report->container), "destroy",
-                     GTK_SIGNAL_FUNC(gnc_report_window_destroy_cb),
-                     report);
-  gtk_signal_connect(GTK_OBJECT(report->container), "draw",
-		     GTK_SIGNAL_FUNC(gnc_report_window_draw_cb), report);
-
-  
-  gtk_widget_show_all(report->container);
-  
-  return report;
-}
-
-
-/********************************************************************
- * gnc_report_window_create_toolbar
- * make a toolbar for the top-level MDI app 
- ********************************************************************/
-
-void
-gnc_report_window_create_toolbar(gnc_report_window * win,
-                                 GNCMDIChildInfo * child)
-{
-  GnomeUIInfo       toolbar_data[] = 
-  {
-    { GNOME_APP_UI_ITEM,
-      _("Back"),
-      _("Move back one step in the history"),
-      gnc_report_window_back_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_BACK,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      _("Forward"),
-      _("Move forward one step in the history"),
-      gnc_report_window_fwd_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_FORWARD,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Reload"),
-      N_("Reload the current report"),
-      gnc_report_window_reload_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_REFRESH,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Stop"),
-      N_("Cancel outstanding HTML requests"),
-      gnc_report_window_stop_button_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_STOP,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      _("Export"),
-      _("Export HTML-formatted report to file"),
-      gnc_report_window_export_button_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_CONVERT,
-      0, 0, NULL
-    },    
-    { GNOME_APP_UI_ITEM,
-      _("Options"),
-      _("Edit report options"),
-      gnc_report_window_params_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_PROPERTIES,
-      0, 0, NULL
-    },    
-    { GNOME_APP_UI_ITEM,
-      _("Print"),
-      _("Print report window"),
-      gnc_report_window_print_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_PRINT,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      _("Save report"),
-      _("Save the current report for later use in ~/.gnucash/saved-reports-1.8 so that they are accessible as menu entries in the report menu. Will go into effect at the next startup of gnucash."),
-      gnc_report_window_save_cb, win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_SAVE,
-      0, 0, NULL
-    },    
-    GNOMEUIINFO_END
-  };
-  
-  child->toolbar_info = g_memdup (toolbar_data, sizeof(toolbar_data));
-}
-
-
-/********************************************************************
- * gnc_report_window_create_menu
- * child menu for reports (none currently)
- ********************************************************************/
-void
-gnc_report_window_create_menu(gnc_report_window * report, 
-                              GNCMDIChildInfo * child)
-{
-  child->menu_info = NULL;
-}
+#define WINDOW_REPORT_CM_CLASS "window-report"
 
 
 /********************************************************************
- * gnc_report_window_destroy 
- * free and destroy a window 
+ *
  ********************************************************************/
 
 void
-gnc_report_window_destroy(gnc_report_window * win)
-{
-
-  SCM  get_editor = scm_c_eval_string("gnc:report-editor-widget");
-  SCM  set_editor = scm_c_eval_string("gnc:report-set-editor-widget!");
-  SCM  edited, editor; 
-
-  gnc_unregister_gui_component_by_data (WINDOW_REPORT_CM_CLASS, win);
-
-  /* close any open editors */
-  for(edited = scm_list_copy(win->edited_reports); !SCM_NULLP(edited); 
-      edited = SCM_CDR(edited)) {
-    editor = scm_call_1(get_editor, SCM_CAR(edited));
-    scm_call_2(set_editor, SCM_CAR(edited), SCM_BOOL_F);
-    if(editor != SCM_BOOL_F) {
-      gtk_widget_destroy(GTK_WIDGET(gw_wcp_get_ptr(editor)));
-    }
-  }
-
-  if(win->initial_odb) {
-    gnc_option_db_unregister_change_callback_id(win->initial_odb, 
-                                                win->name_change_cb_id);
-    
-    gnc_option_db_destroy(win->initial_odb);
-    win->initial_odb = NULL;
-  }
-
-  gnc_html_destroy(win->html);
-  
-  win->container     = NULL;
-  win->html          = NULL;
-  
-  scm_gc_unprotect_object(win->cur_report);
-  scm_gc_unprotect_object(win->edited_reports);
-  
-  g_free(win);
-}
-
-gnc_html *
-gnc_report_window_get_html(gnc_report_window * report)
-{
-  return report->html;
-}
-
-GtkWidget *
-gnc_report_window_get_container(gnc_report_window * report)
-{
-  return report->container;
-}
-
-SCM
-gnc_report_window_get_report(gnc_report_window * report)
-{
-  return report->cur_report;
-}
-
-void
-gnc_report_window_show_report(gnc_report_window * report, int report_id)
-{
-  char * location = g_strdup_printf("id=%d", report_id);  
-  gnc_html_show_url(report->html, URL_TYPE_REPORT, location, NULL, 0);
-  g_free(location);
-}
-
-void
 reportWindow(int report_id)
 {
   gnc_set_busy_cursor (NULL, TRUE);
-  gnc_main_window_open_report(report_id, FALSE);
+  gnc_main_window_open_report(report_id, NULL);
   gnc_unset_busy_cursor (NULL);
 }
 
@@ -1027,7 +65,7 @@
   gnc_html *html;
   char * location;
 
-  html = gnc_html_new ();
+  html = gnc_html_new( GTK_WINDOW(gnc_ui_get_toplevel()) );
 
   gnc_set_busy_cursor (NULL, TRUE);
   location = g_strdup_printf("id=%d", report_id);  
@@ -1094,7 +132,7 @@
   SCM get_title  = scm_c_eval_string("gnc:report-type");
   SCM ptr;
   
-  char *title = NULL;
+  const gchar *title = NULL;
 
   ptr = scm_call_1(get_editor, report);
   if(ptr != SCM_BOOL_F) {
@@ -1111,16 +149,12 @@
     prm->db          = gnc_option_db_new(prm->scm_options);
 
     ptr = scm_call_1(get_title, report);
-    if (ptr != SCM_BOOL_F) {
-      title = gh_scm2newstr(ptr, NULL);
+    if (SCM_STRINGP(ptr)) {
+      title = SCM_STRING_CHARS(ptr);
     }
     /* Don't forget to translate the window title */
-    prm->win         = gnc_options_dialog_new(TRUE, _(title));
+    prm->win  = gnc_options_dialog_new((gchar*)_(title));
     
-    if (title) {
-      free(title);
-    }
-
     scm_gc_protect_object(prm->scm_options);
     scm_gc_protect_object(prm->cur_report);
     
@@ -1141,24 +175,6 @@
 }
 
 void
-gnc_report_window_remove_edited_report(gnc_report_window * win, SCM report)
-{ 
-  SCM new_edited = scm_delete(win->edited_reports, report);
-  scm_gc_unprotect_object(win->edited_reports);
-  win->edited_reports = new_edited;
-  scm_gc_protect_object(win->edited_reports);
-}
-
-void
-gnc_report_window_add_edited_report(gnc_report_window * win, SCM report)
-{
-  SCM new_edited = scm_cons(report, win->edited_reports);
-  scm_gc_unprotect_object(win->edited_reports);
-  win->edited_reports = new_edited;
-  scm_gc_protect_object(win->edited_reports);
-}
-
-void
 gnc_report_raise_editor(SCM report)
 {
   SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
@@ -1251,7 +267,7 @@
     char *url;
 
     url = gnc_build_url (URL_TYPE_REPORT, location, label);
-    gnc_main_window_open_report_url (url, FALSE);
+    gnc_main_window_open_report_url (url, NULL);
     g_free (url);
 
     result->load_to_stream = FALSE;
@@ -1269,20 +285,8 @@
                       gboolean new_window, GNCURLResult *result)
 {
   g_return_val_if_fail (location != NULL, FALSE);
-  g_return_val_if_fail (result != NULL, FALSE);
-
-  if (new_window)
-  {
-    gnc_help_window * help;
-
-    help = gnc_help_window_new ();
-    gnc_help_window_show_help (help, location, label);
-
-    result->load_to_stream = FALSE;
-  }
-  else
-    result->load_to_stream = TRUE;
 
+  gnc_gnome_help (location, label);
   return TRUE;
 }
 
Index: window-report.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/window-report.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/report/report-gnome/window-report.h -Lsrc/report/report-gnome/window-report.h -u -r1.3 -r1.4
--- src/report/report-gnome/window-report.h
+++ src/report/report-gnome/window-report.h
@@ -27,40 +27,23 @@
 #include <libguile.h>
 
 #include "gnc-html.h"
-#include "gnc-mdi-utils.h"
   
 typedef struct gnc_report_window_s gnc_report_window;
 
 /** PROTOTYPES ******************************************************/
 
-gnc_report_window * gnc_report_window_new(GNCMDIChildInfo * mc);
-void       gnc_report_window_destroy(gnc_report_window * rep);
-void       gnc_report_window_show_report(gnc_report_window * rw, int id);
-void       gnc_report_window_reload(gnc_report_window * rw);
-gnc_html   * gnc_report_window_get_html(gnc_report_window * rw);
-GtkWidget  * gnc_report_window_get_container(gnc_report_window * rw);
-SCM        gnc_report_window_get_report(gnc_report_window * rw);
-
-void       gnc_report_window_create_menu(gnc_report_window * report, 
-                                         GNCMDIChildInfo * child);
-void       gnc_report_window_create_toolbar(gnc_report_window * report, 
-                                            GNCMDIChildInfo * child);
-
+// scm-exposed
 GtkWidget * gnc_report_window_default_params_editor(SCM options, SCM report);
 
-void       gnc_main_window_open_report (int report_id, gint toplevel);
-void       gnc_main_window_open_report_url (const char * url, gint toplevel);
-
-GnomeMDIChild * gnc_report_window_create_child(const gchar * url);
+// called from multiple places
+// [business-gnome/dialog-invoice.c;gnome/window-register.c]; and
+// scm-exposed; 3-liner which calls gnc_main_window_open_report after handling busy-cursor.
 void       reportWindow(int id);
+// window-register; scm-exposed
 void       gnc_print_report (int report_id);
-
-void       gnc_report_window_add_edited_report(gnc_report_window * win, 
-                                               SCM report);
-void       gnc_report_window_remove_edited_report(gnc_report_window * win, 
-                                                  SCM report);
+// scm-exposed; ~priv
 void       gnc_report_raise_editor(SCM report);
-
+// module[/plugin]-init
 void       gnc_report_init (void);
 
 #endif
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/report/report-gnome/Makefile.am -Lsrc/report/report-gnome/Makefile.am -u -r1.15 -r1.16
--- src/report/report-gnome/Makefile.am
+++ src/report/report-gnome/Makefile.am
@@ -1,27 +1,32 @@
-SUBDIRS = . test
+SUBDIRS = .
+# test -- removed 'test' from SUBDIRS by jsled 2004.05.02 .. I don't know how
+# to get the test-link-mumble to link correctly; plz assist.
 PWD := $(shell pwd)
 
 pkglib_LTLIBRARIES = libgncmod-report-gnome.la libgw-report-gnome.la
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnome-utils \
-  -I${top_srcdir}/src/app-file \
+  -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/report/report-system \
   ${GLADE_CFLAGS} \
   ${GUILE_INCS} \
   ${GTKHTML_CFLAGS} \
   ${GNOME_PRINT_CFLAGS} \
   ${G_WRAP_COMPILE_ARGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
 
 libgncmod_report_gnome_la_SOURCES = \
   dialog-column-view.c \
   dialog-style-sheet.c \
+  gnc-plugin-page-report.c \
   gncmod-report-gnome.c \
   window-report.c
 
@@ -29,24 +34,22 @@
 gncinclude_HEADERS = \
   dialog-column-view.h \
   dialog-style-sheet.h \
+  gnc-plugin-page-report.h \
   window-report.h
 
-libgncmod_report_gnome_la_LDFLAGS = -module
-
 libgncmod_report_gnome_la_LIBADD = \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
-  ${top_builddir}/src/app-file/libgncmod-app-file.la \
   ${top_builddir}/src/report/report-system/libgncmod-report-system.la \
   ${GLADE_LIBS} \
   ${GUILE_LIBS} \
   ${GNOME_PRINT_LIBS} \
-  ${GNOME_LIBDIR} \
-  ${GNOMEUI_LIBS} \
+  ${GNOME_LIBS} \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
 libgw_report_gnome_la_SOURCES = gw-report-gnome.c
-libgw_report_gnome_la_LDFLAGS = -module
 
 gwmoddir = ${GNC_GWRAP_LIBDIR}
 gwmod_DATA = gw-report-gnome.scm gw-report-gnome-spec.scm
@@ -59,6 +62,11 @@
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = report.glade
 
+uidir = $(GNC_UI_DIR)
+
+ui_DATA = \
+	gnc-plugin-page-report-ui.xml
+
 noinst_HEADERS = \
  gw-report-gnome.h
 
@@ -66,7 +74,8 @@
   .cvsignore \
   ${glade_DATA} \
   ${gwmod_DATA} \
-  ${gncmod_DATA}
+  ${gncmod_DATA} \
+  ${ui_DATA}
 
 if GNUCASH_SEPARATE_BUILDDIR
 #Only needed when srcdir and builddir are different
@@ -93,6 +102,7 @@
 	  (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
 	  (set! %load-path (cons \"${top_builddir}/src/app-utils\" %load-path)) \
 	  (set! %load-path (cons \"${top_builddir}/src/gnome-utils\" %load-path)) \
+	  (set! %load-path (cons \"${top_builddir}/src/gnome\" %load-path)) \
 	  (primitive-load \"./gw-report-gnome-spec.scm\") \
 	  (gw:generate-wrapset \"gw-report-gnome\")"
 
Index: gncmod-report-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/gncmod-report-gnome.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/report/report-gnome/gncmod-report-gnome.c -Lsrc/report/report-gnome/gncmod-report-gnome.c -u -r1.7 -r1.8
--- src/report/report-gnome/gncmod-report-gnome.c
+++ src/report/report-gnome/gncmod-report-gnome.c
@@ -11,7 +11,6 @@
 
 #include <stdio.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 #include <glib.h>
 
 #include "gnc-module.h"
@@ -62,10 +61,6 @@
     return FALSE;
   }
 
-  if(!gnc_module_load("gnucash/app-file", 0)) {
-    return FALSE;
-  }
-
   if(!gnc_module_load("gnucash/report/report-system", 0)) {
     return FALSE;
   }
Index: make-gnucash-potfiles.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/make-gnucash-potfiles.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lmake-gnucash-potfiles.in -Lmake-gnucash-potfiles.in -u -r1.4 -r1.5
--- make-gnucash-potfiles.in
+++ make-gnucash-potfiles.in
@@ -11,7 +11,7 @@
 use File::Basename;
 
 my @cvsignores = `find src -name '.cvsignore'`;
-my @possible_files = `find src -name '*.c' -o -name '*.glade' -o -name '*.desktop.in' -o -name '*.keys.in'`;
+my @possible_files = `find src -name '*.c' -o -name '*.glade' -o -name '*.desktop.in' -o -name '*.keys.in' -o -name '*.pl' |sort`;
 
 chomp(my $cwd = `pwd`);
 
@@ -52,3 +52,4 @@
 }
 
 print "intl-scm/guile-strings.c\n";
+print "doc/tip_of_the_day.list.in"
Index: Makefile.TAGS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Makefile.TAGS,v
retrieving revision 1.2
retrieving revision 1.3
diff -LMakefile.TAGS -LMakefile.TAGS -u -r1.2 -r1.3
--- Makefile.TAGS
+++ Makefile.TAGS
@@ -7,23 +7,17 @@
 # i.e. TAGS: etags.files $(shell cat etags.files) doesn't work right
 # because etags.files contents are expanded before it's re-generated.
 
-# The $(shell find . -type d) dependency seems to be pointless -- it
-# always fires.  It appears that someone's always touching something.
-etags.files: $(shell find . -type d)
-	find . -path './debian' -prune -o -name '*.[ch]' -print -o -name '*.scm' -print | sort > etags.files.tmp
-	@if cmp --quiet etags.files etags.files.tmp; \
-        then \
-          echo "TAGS file list hasn't changed."; \
-          rm -f etags.files.tmp; \
-        else \
-          echo "TAGS file list has changed."; \
-          mv etags.files.tmp etags.files; \
-        fi
+etags.files: $(shell find . -mindepth 1 -type d ! -name CVS ! -path "*/.*")
+	find . -path '*/.*' -prune -o \( -name '*.[ch]' -o -name '*.scm' \) \
+		-print | sort > etags.files.tmp
+	cmp -s etags.files etags.files.tmp || cp etags.files.tmp etags.files
+	rm -f etags.files.tmp
+	touch etags.files
 
 # we don't need an etags.files dep here b/c you always call this after
 # re-generating etags.files if needed from the top-level Makefile.am.
-etags: $(shell cat etags.files)
+TAGS: $(shell cat etags.files)
 	etags `cat etags.files`
 
-ctags: $(shell cat etags.files)
+tags: $(shell cat etags.files)
 	ctags `cat etags.files`
Index: ltmain.sh
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ltmain.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lltmain.sh -Lltmain.sh -u -r1.9 -r1.10
--- ltmain.sh
+++ ltmain.sh
@@ -1,7 +1,7 @@
 # ltmain.sh - Provide generalized library-building support services.
 # NOTE: Changing this file will not affect anything until you rerun configure.
 #
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
 # Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
 #
@@ -17,15 +17,40 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# turn off piecewise linking
-max_cmd_len=-2
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.16
+TIMESTAMP=" (1.1220.2.235 2005/04/25 18:13:26)"
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes.
+if test -n "${ZSH_VERSION+set}" ; then
+  setopt NO_GLOB_SUBST
+fi
 
 # Check that we have a working $echo.
 if test "X$1" = X--no-reexec; then
@@ -39,7 +64,7 @@
   :
 else
   # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$0" --no-reexec ${1+"$@"}
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
 fi
 
 if test "X$1" = X--fallback-echo; then
@@ -48,19 +73,9 @@
   cat <<EOF
 $*
 EOF
-  exit 0
+  exit $EXIT_SUCCESS
 fi
 
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.4c
-TIMESTAMP=" (1.1054 2001/09/16 15:48:23)"
-
 default_mode=
 help="Try \`$progname --help' for more information."
 magic="%%%MAGIC variable%%%"
@@ -70,10 +85,19 @@
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
+Xsed="${SED}"' -e 1s/^X//'
 sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+  SP2NL="tr '\100' '\n'"
+  NL2SP="tr '\r\n' '\100\100'"
+  ;;
+ *) # Assume ASCII based system
+  SP2NL="tr '\040' '\012'"
+  NL2SP="tr '\015\012' '\040\040'"
+  ;;
+esac
 
 # NLS nuisances.
 # Only set LANG and LC_ALL to C if already set.
@@ -88,12 +112,14 @@
 fi
 
 # Make sure IFS has a sensible default
-: ${IFS=" 	"}
+lt_nl='
+'
+IFS=" 	$lt_nl"
 
 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  echo "$modename: not configured to build any kind of library" 1>&2
-  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit 1
+  $echo "$modename: not configured to build any kind of library" 1>&2
+  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+  exit $EXIT_FAILURE
 fi
 
 # Global variables.
@@ -107,6 +133,224 @@
 execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
+quote_scanset='[[~#^*{};<>?'"'"' 	]'
+
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 | \
+	sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+      if test "X$win32_nmres" = "Ximport" ; then
+        win32_libid_type="x86 archive import"
+      else
+        win32_libid_type="x86 archive static"
+      fi
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	case $arg in
+	  *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+	CC_quoted="$CC_quoted $arg"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	    # Double-quote args containing other shell metacharacters.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    CC_quoted="$CC_quoted $arg"
+	  done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  $echo "$modename: unable to infer tagged configuration"
+	  $echo "$modename: specify a tag with \`--tag'" 1>&2
+	  exit $EXIT_FAILURE
+#        else
+#          $echo "$modename: using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+
+    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
+    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
+      exit $EXIT_FAILURE
+    fi
+}
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+    my_status=""
+
+    $show "${rm}r $my_gentop"
+    $run ${rm}r "$my_gentop"
+    $show "$mkdir $my_gentop"
+    $run $mkdir "$my_gentop"
+    my_status=$?
+    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
+      exit $my_status
+    fi
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
+      my_xdir="$my_gentop/$my_xlib"
+
+      $show "${rm}r $my_xdir"
+      $run ${rm}r "$my_xdir"
+      $show "$mkdir $my_xdir"
+      $run $mkdir "$my_xdir"
+      status=$?
+      if test "$status" -ne 0 && test ! -d "$my_xdir"; then
+	exit $status
+      fi
+      case $host in
+      *-darwin*)
+	$show "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	if test -z "$run"; then
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
+	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
+	  if test -n "$darwin_arches"; then 
+	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      lipo -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    ${rm}r unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd "$darwin_orig_dir"
+ 	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	fi # $run
+      ;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+        ;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
+    func_extract_archives_result="$my_oldobjs"
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
 
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
@@ -127,12 +371,13 @@
       ;;
     tag)
       tagname="$arg"
+      preserve_args="${preserve_args}=$arg"
 
       # Check whether tagname contains only valid characters
       case $tagname in
       *[!-_A-Za-z0-9,/]*)
-	echo "$progname: invalid tag name: $tagname" 1>&2
-	exit 1
+	$echo "$progname: invalid tag name: $tagname" 1>&2
+	exit $EXIT_FAILURE
 	;;
       esac
 
@@ -142,12 +387,12 @@
 	# not specially marked.
 	;;
       *)
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
+	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
 	  taglist="$taglist $tagname"
 	  # Evaluate the configuration.
-	  eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
+	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
 	else
-	  echo "$progname: ignoring unknown tag $tagname" 1>&2
+	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
 	fi
 	;;
       esac
@@ -169,27 +414,27 @@
     ;;
 
   --version)
-    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    echo
-    echo "Copyright 1996, 1997, 1998, 1999, 2000, 2001"
-    echo "Free Software Foundation, Inc."
-    echo "This is free software; see the source for copying conditions.  There is NO"
-    echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit 0
+    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+    $echo
+    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
+    $echo "This is free software; see the source for copying conditions.  There is NO"
+    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+    exit $?
     ;;
 
   --config)
-    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
     # Now print the configurations for the tags.
     for tagname in $taglist; do
-      sed -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
+      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
     done
-    exit 0
+    exit $?
     ;;
 
   --debug)
-    echo "$progname: enabling shell trace mode"
+    $echo "$progname: enabling shell trace mode"
     set -x
+    preserve_args="$preserve_args $arg"
     ;;
 
   --dry-run | -n)
@@ -197,18 +442,18 @@
     ;;
 
   --features)
-    echo "host: $host"
+    $echo "host: $host"
     if test "$build_libtool_libs" = yes; then
-      echo "enable shared libraries"
+      $echo "enable shared libraries"
     else
-      echo "disable shared libraries"
+      $echo "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      echo "enable static libraries"
+      $echo "enable static libraries"
     else
-      echo "disable static libraries"
+      $echo "disable static libraries"
     fi
-    exit 0
+    exit $?
     ;;
 
   --finish) mode="finish" ;;
@@ -216,8 +461,11 @@
   --mode) prevopt="--mode" prev=mode ;;
   --mode=*) mode="$optarg" ;;
 
+  --preserve-dup-deps) duplicate_deps="yes" ;;
+
   --quiet | --silent)
     show=:
+    preserve_args="$preserve_args $arg"
     ;;
 
   --tag) prevopt="--tag" prev=tag ;;
@@ -225,6 +473,7 @@
     set tag "$optarg" ${1+"$@"}
     shift
     prev=tag
+    preserve_args="$preserve_args --tag"
     ;;
 
   -dlopen)
@@ -235,7 +484,7 @@
   -*)
     $echo "$modename: unrecognized option \`$arg'" 1>&2
     $echo "$help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
     ;;
 
   *)
@@ -248,7 +497,7 @@
 if test -n "$prevopt"; then
   $echo "$modename: option \`$prevopt' requires an argument" 1>&2
   $echo "$help" 1>&2
-  exit 1
+  exit $EXIT_FAILURE
 fi
 
 # If this variable is set in any of the actions, the command in it
@@ -260,8 +509,10 @@
 
   # Infer the operation mode.
   if test -z "$mode"; then
+    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
     case $nonopt in
-    *cc | *++ | gcc* | *-gcc*)
+    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
       mode=link
       for arg
       do
@@ -302,7 +553,7 @@
   if test -n "$execute_dlfiles" && test "$mode" != execute; then
     $echo "$modename: unrecognized option \`-dlopen'" 1>&2
     $echo "$help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
   fi
 
   # Change the help message to a mode-specific one.
@@ -316,152 +567,121 @@
     modename="$modename: compile"
     # Get the compilation command and the source file.
     base_compile=
-    prev=
-    lastarg=
-    srcfile="$nonopt"
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
     suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
 
-    user_target=no
     for arg
     do
-      case $prev in
-      "") ;;
-      xcompiler)
-	# Aesthetically quote the previous argument.
-	prev=
-	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
-	case $arg in
-	# Double-quote args containing other shell metacharacters.
-	# Many Bourne shells cannot handle close brackets correctly
-	# in scan sets, so we specify it separately.
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-
-	# Add the previous argument to base_compile.
-	if test -z "$base_compile"; then
-	  base_compile="$lastarg"
-	else
-	  base_compile="$base_compile $lastarg"
-	fi
-	continue
+      case "$arg_mode" in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
 	;;
-      esac
 
-      # Accept any command-line options.
-      case $arg in
-      -o)
-	if test "$user_target" != "no"; then
-	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	  exit 1
-	fi
-	user_target=next
-	;;
-
-      -static)
-	build_old_libs=yes
+      target )
+	libobj="$arg"
+	arg_mode=normal
 	continue
 	;;
 
-      -prefer-pic)
-	pic_mode=yes
-	continue
-	;;
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  if test -n "$libobj" ; then
+	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+	  arg_mode=target
+	  continue
+	  ;;
 
-      -prefer-non-pic)
-	pic_mode=no
-	continue
-	;;
+	-static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
 
-      -Xcompiler)
-	prev=xcompiler
-	continue
-	;;
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
 
-      -Wc,*)
-	args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-	lastarg=
-	save_ifs="$IFS"; IFS=','
-	for arg in $args; do
-	  IFS="$save_ifs"
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+ 	  for arg in $args; do
+	    IFS="$save_ifs"
 
-	  # Double-quote args containing other shell metacharacters.
-	  # Many Bourne shells cannot handle close brackets correctly
-	  # in scan sets, so we specify it separately.
-	  case $arg in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    arg="\"$arg\""
-	    ;;
-	  esac
-	  lastarg="$lastarg $arg"
-	done
-	IFS="$save_ifs"
-	lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+	    # Double-quote args containing other shell metacharacters.
+	    # Many Bourne shells cannot handle close brackets correctly
+	    # in scan sets, so we specify it separately.
+	    case $arg in
+	      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	      arg="\"$arg\""
+	      ;;
+	    esac
+	    lastarg="$lastarg $arg"
+	  done
+	  IFS="$save_ifs"
+	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
 
-	# Add the arguments to base_compile.
-	if test -z "$base_compile"; then
-	  base_compile="$lastarg"
-	else
+	  # Add the arguments to base_compile.
 	  base_compile="$base_compile $lastarg"
-	fi
-	continue
-	;;
-      esac
+	  continue
+	  ;;
 
-      case $user_target in
-      next)
-	# The next one is the -o target name
-	user_target=yes
-	continue
-	;;
-      yes)
-	# We got the output file
-	user_target=set
-	libobj="$arg"
-	continue
+	* )
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
 	;;
-      esac
-
-      # Accept the current argument as the source file.
-      lastarg="$srcfile"
-      srcfile="$arg"
+      esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-
-      # Backslashify any backslashes, double quotes, and dollar signs.
-      # These are the only characters that are still specially
-      # interpreted inside of double-quoted scrings.
       lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
 
+      case $lastarg in
       # Double-quote args containing other shell metacharacters.
       # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, so we specify it separately.
-      case $lastarg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      # in scan sets, and some SunOS ksh mistreat backslash-escaping
+      # in scan sets (worked around with variable expansion),
+      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
+      # at all, so we specify them separately.
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	lastarg="\"$lastarg\""
 	;;
       esac
 
-      # Add the previous argument to base_compile.
-      if test -z "$base_compile"; then
-	base_compile="$lastarg"
-      else
-	base_compile="$base_compile $lastarg"
-      fi
-    done
+      base_compile="$base_compile $lastarg"
+    done # for arg
 
-    case $user_target in
-    set)
+    case $arg_mode in
+    arg)
+      $echo "$modename: you must specify an argument for -Xcompile"
+      exit $EXIT_FAILURE
       ;;
-    no)
-      # Get the name of the library object.
-      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+    target)
+      $echo "$modename: you must specify a target with \`-o'" 1>&2
+      exit $EXIT_FAILURE
       ;;
     *)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit 1
+      # Get the name of the library object.
+      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
       ;;
     esac
 
@@ -490,54 +710,40 @@
     *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
     *)
       $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
       ;;
     esac
 
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base compile
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case $base_compile in
-      "$CC "*) ;;
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when ltconfig was run.
-      "`$echo $CC` "*) ;;
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case $base_compile in
-	    "$CC "*)
-	      # The compiler in the base compile command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    "`$echo $CC` "*)
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  echo "$modename: unable to infer tagged configuration"
-	  echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#        else
-#          echo "$modename: using $tagname tagged configuration"
-	fi
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -static)
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
 	;;
       esac
-    fi
+    done
 
+    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
+    case $qlibobj in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	qlibobj="\"$qlibobj\"" ;;
+    esac
+    if test "X$libobj" != "X$qlibobj"; then
+	$echo "$modename: libobj name \`$libobj' may not contain shell special characters."
+	exit $EXIT_FAILURE
+    fi
     objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
     xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
     if test "X$xdir" = "X$obj"; then
@@ -550,7 +756,7 @@
     if test -z "$base_compile"; then
       $echo "$modename: you must specify a compilation command" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Delete any leftover library objects.
@@ -561,7 +767,7 @@
     fi
 
     $run $rm $removelist
-    trap "$run $rm $removelist; exit 1" 1 2 15
+    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
 
     # On Cygwin there's no "real" PIC flag so we must build both object types
     case $host_os in
@@ -580,7 +786,7 @@
       output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
       lockfile="$output_obj.lock"
       removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit 1" 1 2 15
+      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
     else
       output_obj=
       need_locks=no
@@ -590,13 +796,13 @@
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
     if test "$need_locks" = yes; then
-      until $run ln "$0" "$lockfile" 2>/dev/null; do
+      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
 	$show "Waiting for $lockfile to be removed"
 	sleep 2
       done
     elif test "$need_locks" = warn; then
       if test -f "$lockfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile exists and contains:
 `cat $lockfile 2>/dev/null`
 
@@ -608,14 +814,19 @@
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
-      echo $srcfile > "$lockfile"
+      $echo "$srcfile" > "$lockfile"
     fi
 
     if test -n "$fix_srcfile_path"; then
       eval srcfile=\"$fix_srcfile_path\"
     fi
+    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
+    case $qsrcfile in
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+      qsrcfile="\"$qsrcfile\"" ;;
+    esac
 
     $run $rm "$libobj" "${libobj}T"
 
@@ -637,10 +848,10 @@
       fbsd_hideous_sh_bug=$base_compile
 
       if test "$pic_mode" != no; then
-	command="$base_compile $srcfile $pic_flag"
+	command="$base_compile $qsrcfile $pic_flag"
       else
 	# Don't build PIC code
-	command="$base_compile $srcfile"
+	command="$base_compile $qsrcfile"
       fi
 
       if test ! -d "${xdir}$objdir"; then
@@ -663,12 +874,12 @@
       if $run eval "$command"; then :
       else
 	test -n "$output_obj" && $run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -683,7 +894,7 @@
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed, then go on to compile the next one
@@ -704,7 +915,9 @@
 EOF
 
       # Allow error messages only from the first compilation.
-      suppress_output=' >/dev/null 2>&1'
+      if test "$suppress_opt" = yes; then
+        suppress_output=' >/dev/null 2>&1'
+      fi
     else
       # No PIC object so indicate it doesn't exist in the libtool
       # object file.
@@ -718,9 +931,9 @@
     if test "$build_old_libs" = yes; then
       if test "$pic_mode" != yes; then
 	# Don't build PIC code
-	command="$base_compile $srcfile"
+	command="$base_compile $qsrcfile"
       else
-	command="$base_compile $srcfile $pic_flag"
+	command="$base_compile $qsrcfile $pic_flag"
       fi
       if test "$compiler_c_o" = yes; then
 	command="$command -o $obj"
@@ -733,12 +946,12 @@
       if $run eval "$command"; then :
       else
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	echo "\
+	$echo "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -753,7 +966,7 @@
 compiler."
 
 	$run $rm $removelist
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed
@@ -791,7 +1004,7 @@
       $run $rm "$lockfile"
     fi
 
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool link mode
@@ -802,7 +1015,7 @@
       # It is impossible to link a dll without this setting, and
       # we shouldn't force the makefile maintainer to figure out
       # which system we are compiling for in order to pass an extra
-      # flag for every libtool invokation.
+      # flag for every libtool invocation.
       # allow_undefined=no
 
       # FIXME: Unfortunately, there are problems with the above when trying
@@ -817,7 +1030,7 @@
       ;;
     esac
     libtool_args="$nonopt"
-    base_compile="$nonopt"
+    base_compile="$nonopt $@"
     compile_command="$nonopt"
     finalize_command="$nonopt"
 
@@ -833,6 +1046,7 @@
     linker_flags=
     dllsearchpath=
     lib_search_path=`pwd`
+    inst_prefix_dir=
 
     avoid_version=no
     dlfiles=
@@ -848,6 +1062,7 @@
     no_install=no
     objs=
     non_pic_objects=
+    precious_files_regex=
     prefer_static_libs=no
     preload=no
     prev=
@@ -859,6 +1074,9 @@
     temp_rpath=
     thread_safe=no
     vinfo=
+    vinfo_number=no
+
+    func_infer_tag $base_compile
 
     # We need to know -static, to get the right output filenames.
     for arg
@@ -891,10 +1109,9 @@
     # Go through the arguments, transforming them on the way.
     while test "$#" -gt 0; do
       arg="$1"
-      base_compile="$base_compile $arg"
       shift
       case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
 	;;
       *) qarg=$arg ;;
@@ -955,7 +1172,7 @@
 	  export_symbols="$arg"
 	  if test ! -f "$arg"; then
 	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  prev=
 	  continue
@@ -965,6 +1182,16 @@
 	  prev=
 	  continue
 	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
 	release)
 	  release="-$arg"
 	  prev=
@@ -981,7 +1208,7 @@
 	      # A libtool-controlled object.
 
 	      # Check to see that this really is a libtool object.
-	      if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 		pic_object=
 		non_pic_object=
 
@@ -997,7 +1224,7 @@
 		   test "$pic_object" = none && \
 		   test "$non_pic_object" = none; then
 		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
 		fi
 
 		# Extract subdirectory from the argument.
@@ -1050,7 +1277,7 @@
 		# Only an error if not doing a dry-run.
 		if test -z "$run"; then
 		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
 		else
 		  # Dry-run case.
 
@@ -1071,7 +1298,7 @@
 	    done
 	  else
 	    $echo "$modename: link input file \`$save_arg' does not exist"
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  arg=$save_arg
 	  prev=
@@ -1083,7 +1310,7 @@
 	  [\\/]* | [A-Za-z]:[\\/]*) ;;
 	  *)
 	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	    ;;
 	  esac
 	  if test "$prev" = rpath; then
@@ -1115,6 +1342,24 @@
 	  finalize_command="$finalize_command $wl$qarg"
 	  continue
 	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  compile_command="$compile_command $qarg"
+	  finalize_command="$finalize_command $qarg"
+	  continue
+	  ;;
+	shrext)
+  	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+        darwin_framework)
+	  compiler_flags="$compiler_flags $arg"
+	  prev=
+	  continue
+	  ;;
 	*)
 	  eval "$prev=\"\$arg\""
 	  prev=
@@ -1163,7 +1408,7 @@
       -export-symbols | -export-symbols-regex)
 	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
 	  $echo "$modename: more than one -exported-symbols argument is not allowed"
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	if test "X$arg" = "X-export-symbols"; then
 	  prev=expsyms
@@ -1173,6 +1418,17 @@
 	continue
 	;;
 
+      -framework)
+        prev=darwin_framework
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
       # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
       # so, if we see these flags be careful not to treat them like -L
       -L[A-Z][A-Z]*:*)
@@ -1194,7 +1450,7 @@
 	  absdir=`cd "$dir" && pwd`
 	  if test -z "$absdir"; then
 	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  dir="$absdir"
 	  ;;
@@ -1228,7 +1484,7 @@
 	    # These systems don't actually have a C library (as such)
 	    test "X$arg" = "X-lc" && continue
 	    ;;
-	  *-*-openbsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -1239,7 +1495,7 @@
 	  esac
 	elif test "X$arg" = "X-lc_r"; then
 	 case $host in
-	 *-*-openbsd*)
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	   # Do not include libc_r directly, use -pthread flag.
 	   continue
 	   ;;
@@ -1249,11 +1505,57 @@
 	continue
 	;;
 
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      -model)
+	compile_command="$compile_command $arg"
+	compiler_flags="$compiler_flags $arg"
+	finalize_command="$finalize_command $arg"
+	prev=xcompiler
+	continue
+	;;
+
+     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	compiler_flags="$compiler_flags $arg"
+	compile_command="$compile_command $arg"
+	finalize_command="$finalize_command $arg"
+	continue
+	;;
+
       -module)
 	module=yes
 	continue
 	;;
 
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*)
+
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+	case $arg in
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
+	  arg="\"$arg\""
+	  ;;
+	esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
       -no-fast-install)
 	fast_install=no
 	continue
@@ -1285,6 +1587,11 @@
 
       -o) prev=output ;;
 
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
       -release)
 	prev=release
 	continue
@@ -1307,7 +1614,7 @@
 	[\\/]* | [A-Za-z]:[\\/]*) ;;
 	*)
 	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 	case "$xrpath " in
@@ -1335,6 +1642,11 @@
 	prev=vinfo
 	continue
 	;;
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
 
       -Wc,*)
 	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
@@ -1343,7 +1655,7 @@
 	for flag in $args; do
 	  IFS="$save_ifs"
 	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	    flag="\"$flag\""
 	    ;;
 	  esac
@@ -1361,7 +1673,7 @@
 	for flag in $args; do
 	  IFS="$save_ifs"
 	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	    flag="\"$flag\""
 	    ;;
 	  esac
@@ -1383,13 +1695,18 @@
 	continue
 	;;
 
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
       # Some other compiler flag.
       -* | +*)
 	# Unknown arguments in both finalize_command and compile_command need
 	# to be aesthetically quoted because they are evaled later.
 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
 	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	  arg="\"$arg\""
 	  ;;
 	esac
@@ -1404,7 +1721,7 @@
 	# A libtool-controlled object.
 
 	# Check to see that this really is a libtool object.
-	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  pic_object=
 	  non_pic_object=
 
@@ -1420,7 +1737,7 @@
 	     test "$pic_object" = none && \
 	     test "$non_pic_object" = none; then
 	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 
 	  # Extract subdirectory from the argument.
@@ -1473,7 +1790,7 @@
 	  # Only an error if not doing a dry-run.
 	  if test -z "$run"; then
 	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  else
 	    # Dry-run case.
 
@@ -1523,7 +1840,7 @@
 	# to be aesthetically quoted because they are evaled later.
 	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
 	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+	*$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	  arg="\"$arg\""
 	  ;;
 	esac
@@ -1540,51 +1857,7 @@
     if test -n "$prev"; then
       $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
       $echo "$help" 1>&2
-      exit 1
-    fi
-
-    # Infer tagged configuration to use if any are available and
-    # if one wasn't chosen via the "--tag" command line option.
-    # Only attempt this if the compiler in the base link
-    # command doesn't match the default compiler.
-    if test -n "$available_tags" && test -z "$tagname"; then
-      case $base_compile in
-      "$CC "*) ;;
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when ltconfig was run.
-      "`$echo $CC` "*) ;;
-      *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`sed -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
-	    case $base_compile in
-	    "$CC "*)
-	      # The compiler in $compile_command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    "`$echo $CC` "*)
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  echo "$modename: unable to infer tagged configuration"
-	  echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit 1
-#       else
-#         echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
+      exit $EXIT_FAILURE
     fi
 
     if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@@ -1628,7 +1901,7 @@
     "")
       $echo "$modename: you must specify an output file" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
       ;;
     *.$libext) linkmode=oldlib ;;
     *.lo | *.$objext) linkmode=obj ;;
@@ -1636,17 +1909,28 @@
     *) linkmode=prog ;; # Anything else should be a program.
     esac
 
+    case $host in
+    *cygwin* | *mingw* | *pw32*)
+      # don't eliminate duplications in $postdeps and $predeps
+      duplicate_compiler_generated_deps=yes
+      ;;
+    *)
+      duplicate_compiler_generated_deps=$duplicate_deps
+      ;;
+    esac
     specialdeplibs=
+
     libs=
     # Find all interdependent deplibs by searching for libraries
     # that are linked more than once (e.g. -la -lb -la)
     for deplib in $deplibs; do
-      case "$libs " in
-      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-      esac
+      if test "X$duplicate_deps" = "Xyes" ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
       libs="$libs $deplib"
     done
-    specialdeplibs=
 
     if test "$linkmode" = lib; then
       libs="$predeps $libs $compiler_lib_search_path $postdeps"
@@ -1655,12 +1939,14 @@
       # $postdeps and mark them as special (i.e., whose duplicates are
       # not to be eliminated).
       pre_post_deps=
-#      for pre_post_dep in $predeps $postdeps; do
-#        case "$pre_post_deps " in
-#	*" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-#	esac
-#	pre_post_deps="$pre_post_deps $pre_post_dep"
-#      done
+      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
       pre_post_deps=
     fi
 
@@ -1678,7 +1964,7 @@
 	  *.la) ;;
 	  *)
 	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	    ;;
 	  esac
 	done
@@ -1716,23 +2002,34 @@
 	lib=
 	found=no
 	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	  fi
+	  continue
+	  ;;
 	-l*)
 	  if test "$linkmode" != lib && test "$linkmode" != prog; then
 	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
 	    continue
 	  fi
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
 	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
 	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-	    # Search the libtool library
-	    lib="$searchdir/lib${name}.la"
-	    if test -f "$lib"; then
-	      found=yes
-	      break
-	    fi
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
 	  done
 	  if test "$found" != yes; then
 	    # deplib doesn't seem to be a libtool library
@@ -1744,6 +2041,42 @@
 	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
 	    fi
 	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if (${SED} -e '2q' $lib |
+                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+		  library_names=
+		  old_library=
+		  case $lib in
+		  */* | *\\*) . $lib ;;
+		  *) . ./$lib ;;
+		  esac
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+		    test "X$ladir" = "X$lib" && ladir="."
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+	        ;;
+	      *) ;;
+	      esac
+	    fi
 	  fi
 	  ;; # -l
 	-L*)
@@ -1761,11 +2094,11 @@
 	    fi
 	    if test "$pass" = scan; then
 	      deplibs="$deplib $deplibs"
-	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 	    else
 	      compile_deplibs="$deplib $compile_deplibs"
 	      finalize_deplibs="$deplib $finalize_deplibs"
 	    fi
+	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
 	    ;;
 	  *)
 	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
@@ -1793,18 +2126,33 @@
 	  fi
 	  case $linkmode in
 	  lib)
-	    if test "$deplibs_check_method" != pass_all; then
-	      echo
-	      echo "*** Warning: Trying to link with static lib archive $deplib."
-	      echo "*** I have the capability to make that library automatically link in when"
-	      echo "*** you link to this library.  But I can only do this if you have a"
-	      echo "*** shared version of the library, which you do not appear to have"
-	      echo "*** because the file extensions .$libext of this argument makes me believe"
-	      echo "*** that it is just a static archive that I should not used here."
+	    valid_a_lib=no
+	    case $deplibs_check_method in
+	      match_pattern*)
+		set dummy $deplibs_check_method
+	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+		if eval $echo \"$deplib\" 2>/dev/null \
+		    | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		  valid_a_lib=yes
+		fi
+		;;
+	      pass_all)
+		valid_a_lib=yes
+		;;
+            esac
+	    if test "$valid_a_lib" != yes; then
+	      $echo
+	      $echo "*** Warning: Trying to link with static lib archive $deplib."
+	      $echo "*** I have the capability to make that library automatically link in when"
+	      $echo "*** you link to this library.  But I can only do this if you have a"
+	      $echo "*** shared version of the library, which you do not appear to have"
+	      $echo "*** because the file extensions .$libext of this argument makes me believe"
+	      $echo "*** that it is just a static archive that I should not used here."
 	    else
-	      echo
-	      echo "*** Warning: Linking the shared library $output against the"
-	      echo "*** static library $deplib is not portable!"
+	      $echo
+	      $echo "*** Warning: Linking the shared library $output against the"
+	      $echo "*** static library $deplib is not portable!"
 	      deplibs="$deplib $deplibs"
 	    fi
 	    continue
@@ -1844,14 +2192,14 @@
 	if test "$found" = yes || test -f "$lib"; then :
 	else
 	  $echo "$modename: cannot find the library \`$lib'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
@@ -1864,8 +2212,11 @@
 	library_names=
 	old_library=
 	# If the library was installed with an old release of libtool,
-	# it will not redefine variable installed.
+	# it will not redefine variables installed, or shouldnotlink
 	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
 
 	# Read the .la file
 	case $lib in
@@ -1886,7 +2237,7 @@
 	  if test -z "$libdir"; then
 	    if test -z "$old_library"; then
 	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	      exit 1
+	      exit $EXIT_FAILURE
 	    fi
 	    # It is a libtool convenience library, so add in its objects.
 	    convenience="$convenience $ladir/$objdir/$old_library"
@@ -1894,19 +2245,21 @@
 	    tmp_libs=
 	    for deplib in $dependency_libs; do
 	      deplibs="$deplib $deplibs"
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
+              if test "X$duplicate_deps" = "Xyes" ; then
+	        case "$tmp_libs " in
+	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	        esac
+              fi
 	      tmp_libs="$tmp_libs $deplib"
 	    done
-            specialdeplibs=
 	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
 	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  continue
 	fi # $pass = conv
 
+
 	# Get the name of the library we link against.
 	linklib=
 	for l in $old_library $library_names; do
@@ -1914,16 +2267,18 @@
 	done
 	if test -z "$linklib"; then
 	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# This library was specified with -dlopen.
 	if test "$pass" = dlopen; then
 	  if test -z "$libdir"; then
 	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
-	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
 	    # If there is no dlname, no dlopen support or we're linking
 	    # statically, we need to preload.  We also need to preload any
 	    # dependent libraries so libltdl's deplib preloader doesn't
@@ -1960,11 +2315,19 @@
 	    dir="$libdir"
 	    absdir="$libdir"
 	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
 	else
-	  dir="$ladir/$objdir"
-	  absdir="$abs_ladir/$objdir"
-	  # Remove this search path later
-	  notinst_path="$notinst_path $abs_ladir"
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
 	fi # $installed = yes
 	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
 
@@ -1972,7 +2335,7 @@
 	if test "$pass" = dlpreopen; then
 	  if test -z "$libdir"; then
 	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-	    exit 1
+	    exit $EXIT_FAILURE
 	  fi
 	  # Prefer using a static library (so that no silly _DYNAMIC symbols
 	  # are required to link).
@@ -1999,6 +2362,7 @@
 	  continue
 	fi
 
+
 	if test "$linkmode" = prog && test "$pass" != link; then
 	  newlib_search_path="$newlib_search_path $ladir"
 	  deplibs="$lib $deplibs"
@@ -2022,10 +2386,11 @@
 	      # or/and link against static libraries
 	      newdependency_libs="$deplib $newdependency_libs"
 	    fi
-	    case "$tmp_libs " in
-	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	    esac
-	    specialdeplibs=
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
 	    tmp_libs="$tmp_libs $deplib"
 	  done # for deplib
 	  continue
@@ -2035,7 +2400,7 @@
 	  if test -n "$library_names" &&
 	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
 	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var"; then
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
 	      # Make sure the rpath contains only unique directories.
 	      case "$temp_rpath " in
 	      *" $dir "*) ;;
@@ -2084,6 +2449,18 @@
 	    need_relink=yes
 	  fi
 	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on
+	  # some systems (darwin)
+	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
+	    $echo
+	    if test "$linkmode" = prog; then
+	      $echo "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $echo "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $echo "*** $linklib is not portable!"
+	  fi
 	  if test "$linkmode" = lib &&
 	     test "$hardcode_into_libs" = yes; then
 	    # Hardcode the library path.
@@ -2121,7 +2498,7 @@
 	    elif test -n "$soname_spec"; then
 	      # bleh windows
 	      case $host in
-	      *cygwin*)
+	      *cygwin* | mingw*)
 		major=`expr $current - $age`
 		versuffix="-$major"
 		;;
@@ -2133,17 +2510,18 @@
 
 	    # Make a new name for the extract_expsyms_cmds to use
 	    soroot="$soname"
-	    soname=`echo $soroot | sed -e 's/^.*\///'`
-	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
 
 	    # If the library has no export list, then create one now
 	    if test -f "$output_objdir/$soname-def"; then :
 	    else
 	      $show "extracting exported symbol list from \`$soname'"
 	      save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$extract_expsyms_cmds\"
+	      cmds=$extract_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -2154,9 +2532,10 @@
 	    if test -f "$output_objdir/$newlib"; then :; else
 	      $show "generating import library for \`$soname'"
 	      save_ifs="$IFS"; IFS='~'
-	      eval cmds=\"$old_archive_from_expsyms_cmds\"
+	      cmds=$old_archive_from_expsyms_cmds
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd" || exit $?
 	      done
@@ -2176,6 +2555,22 @@
 	    immediate | unsupported)
 	      if test "$hardcode_direct" = no; then
 		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a module then we can not link against
+		    # it, someone is ignoring the new warnings I added
+		    if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+		      $echo "** Warning, lib $linklib is a module, not a shared library"
+		      if test -z "$old_library" ; then
+		        $echo
+		        $echo "** And there doesn't seem to be a static archive available"
+		        $echo "** The link will probably fail, sorry"
+		      else
+		        add="$dir/$old_library"
+		      fi
+		    fi
+		esac
 	      elif test "$hardcode_minus_L" = no; then
 		case $host in
 		*-*-sunos*) add_shlibpath="$dir" ;;
@@ -2194,6 +2589,14 @@
 		add="$dir/$linklib"
 	      elif test "$hardcode_minus_L" = yes; then
 		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case "$libdir" in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
 		add="-l$name"
 	      elif test "$hardcode_shlibpath_var" = yes; then
 		add_shlibpath="$dir"
@@ -2207,7 +2610,7 @@
 
 	    if test "$lib_linked" != yes; then
 	      $echo "$modename: configuration error: unsupported hardcode properties"
-	      exit 1
+	      exit $EXIT_FAILURE
 	    fi
 
 	    if test -n "$add_shlibpath"; then
@@ -2249,13 +2652,25 @@
 	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
 	      esac
 	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+	        add="$inst_prefix_dir$libdir/$linklib"
+	      else
+	        add="$libdir/$linklib"
+	      fi
 	    else
 	      # We cannot seem to hardcode it, guess we'll fake it.
 	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case "$libdir" in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
 	      add="-l$name"
-	      # Cope with "make install --prefix=<xxx>" where <xxx> changed:
-	      # use this instead....
-	      # add="$ladir/$objdir/$linklib"
 	    fi
 
 	    if test "$linkmode" = prog; then
@@ -2286,21 +2701,21 @@
 
 	    # Just print a warning and add the library to dependency_libs so
 	    # that the program can be linked against the static library.
-	    echo
-	    echo "*** Warning: This system can not link to static lib archive $lib."
-	    echo "*** I have the capability to make that library automatically link in when"
-	    echo "*** you link to this library.  But I can only do this if you have a"
-	    echo "*** shared version of the library, which you do not appear to have."
+	    $echo
+	    $echo "*** Warning: This system can not link to static lib archive $lib."
+	    $echo "*** I have the capability to make that library automatically link in when"
+	    $echo "*** you link to this library.  But I can only do this if you have a"
+	    $echo "*** shared version of the library, which you do not appear to have."
 	    if test "$module" = yes; then
-	      echo "*** But as you try to build a module library, libtool will still create "
-	      echo "*** a static module, that should work as long as the dlopening application"
-	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      $echo "*** But as you try to build a module library, libtool will still create "
+	      $echo "*** a static module, that should work as long as the dlopening application"
+	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
 	      if test -z "$global_symbol_pipe"; then
-		echo
-		echo "*** However, this would only work if libtool was able to extract symbol"
-		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		echo "*** not find such a program.  So, this module is probably useless."
-		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+		$echo
+		$echo "*** However, this would only work if libtool was able to extract symbol"
+		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$echo "*** not find such a program.  So, this module is probably useless."
+		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	      fi
 	      if test "$build_old_libs" = no; then
 		build_libtool_libs=module
@@ -2319,7 +2734,8 @@
 
 	if test "$linkmode" = lib; then
 	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes ||
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
 	       test "$link_static" = yes; }; then
 	    # Extract -R from dependency_libs
 	    temp_deplibs=
@@ -2343,10 +2759,11 @@
 	  tmp_libs=
 	  for deplib in $dependency_libs; do
 	    newdependency_libs="$deplib $newdependency_libs"
-	    case "$tmp_libs " in
-	    *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	    esac
-	    specialdeplibs=
+	    if test "X$duplicate_deps" = "Xyes" ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
 	    tmp_libs="$tmp_libs $deplib"
 	  done
 
@@ -2370,24 +2787,69 @@
 		  ;;
 		esac
 		if grep "^installed=no" $deplib > /dev/null; then
-		  path="-L$absdir/$objdir"
+		  path="$absdir/$objdir"
 		else
-		  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		  if test -z "$libdir"; then
 		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		    exit 1
+		    exit $EXIT_FAILURE
 		  fi
 		  if test "$absdir" != "$libdir"; then
 		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
 		  fi
-		  path="-L$absdir"
+		  path="$absdir"
 		fi
+		depdepl=
+		case $host in
+		*-*-darwin*)
+		  # we do not want to link against static libs,
+		  # but need to link against shared
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$path/$depdepl" ; then
+		      depdepl="$path/$depdepl"
+		    fi
+		    # do not add paths which are already there
+		    case " $newlib_search_path " in
+		    *" $path "*) ;;
+		    *) newlib_search_path="$newlib_search_path $path";;
+		    esac
+		  fi
+		  path=""
+		  ;;
+		*)
+		  path="-L$path"
+		  ;;
+		esac
+		;;
+	      -l*)
+		case $host in
+		*-*-darwin*)
+		  # Again, we only want to link against shared libraries
+		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+		  for tmp in $newlib_search_path ; do
+		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
+		      eval depdepl="$tmp/lib$tmp_libs.dylib"
+		      break
+		    fi
+		  done
+		  path=""
+		  ;;
+		*) continue ;;
+		esac
 		;;
 	      *) continue ;;
 	      esac
 	      case " $deplibs " in
 	      *" $path "*) ;;
-	      *) deplibs="$deplibs $path" ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	      case " $deplibs " in
+	      *" $depdepl "*) ;;
+	      *) deplibs="$depdepl $deplibs" ;;
 	      esac
 	    done
 	  fi # link_all_deplibs != no
@@ -2418,7 +2880,6 @@
 	else
 	  vars="compile_deplibs finalize_deplibs"
 	fi
-	specialdeplibs=
 	for var in $vars dependency_libs; do
 	  # Add libraries to $var in reverse order
 	  eval tmp_libs=\"\$$var\"
@@ -2432,6 +2893,7 @@
 	    # practice:
 	    case $deplib in
 	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
 	    *)
 	      # And here is the reason: when a library appears more
 	      # than once as an explicit dependence of a library, or
@@ -2474,6 +2936,20 @@
 	  eval $var=\"$tmp_libs\"
 	done # for var
       fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
     done # for pass
     if test "$linkmode" = prog; then
       dlfiles="$newdlfiles"
@@ -2499,7 +2975,7 @@
       fi
 
       if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
       fi
 
       if test -n "$release"; then
@@ -2521,17 +2997,19 @@
       case $outputname in
       lib*)
 	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+	eval shared_ext=\"$shrext_cmds\"
 	eval libname=\"$libname_spec\"
 	;;
       *)
 	if test "$module" = no; then
 	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	if test "$need_lib_prefix" != no; then
 	  # Add the "lib" prefix for modules if required
 	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+	  eval shared_ext=\"$shrext_cmds\"
 	  eval libname=\"$libname_spec\"
 	else
 	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -2542,11 +3020,11 @@
       if test -n "$objs"; then
 	if test "$deplibs_check_method" != pass_all; then
 	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-	  exit 1
+	  exit $EXIT_FAILURE
 	else
-	  echo
-	  echo "*** Warning: Linking the shared library $output against the non-libtool"
-	  echo "*** objects $objs is not portable!"
+	  $echo
+	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
+	  $echo "*** objects $objs is not portable!"
 	  libobjs="$libobjs $objs"
 	fi
       fi
@@ -2574,7 +3052,7 @@
 	fi
 
 	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
 	fi
 
 	if test -n "$release"; then
@@ -2590,45 +3068,82 @@
 	if test -n "$8"; then
 	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
-	current="$2"
-	revision="$3"
-	age="$4"
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$2"
+	  number_minor="$3"
+	  number_revision="$4"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows)
+	    current=`expr $number_major + $number_minor`
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    current=`expr $number_major + $number_minor - 1`
+	    age="$number_minor"
+	    revision="$number_minor"
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$2"
+	  revision="$3"
+	  age="$4"
+	  ;;
+	esac
 
 	# Check that each of the things are valid numbers.
 	case $current in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $revision in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	case $age in
-	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
 	*)
-	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
 	if test "$age" -gt "$current"; then
 	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
 	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Calculate the version variables.
@@ -2645,7 +3160,7 @@
 	  versuffix="$major.$age.$revision"
 	  # Darwin ld doesn't like 0 for these options...
 	  minor_current=`expr $current + 1`
-	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
 	  ;;
 
 	freebsd-aout)
@@ -2658,16 +3173,21 @@
 	  versuffix=".$current";
 	  ;;
 
-	irix)
+	irix | nonstopux)
 	  major=`expr $current - $age + 1`
-	  verstring="sgi$major.$revision"
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
 
 	  # Add in all the interfaces that we are compatible with.
 	  loop=$revision
 	  while test "$loop" -ne 0; do
 	    iface=`expr $revision - $loop`
 	    loop=`expr $loop - 1`
-	    verstring="sgi$major.$iface:$verstring"
+	    verstring="$verstring_prefix$major.$iface:$verstring"
 	  done
 
 	  # Before this point, $major must not contain `.'.
@@ -2681,7 +3201,7 @@
 	  ;;
 
 	osf)
-	  major=`expr $current - $age`
+	  major=.`expr $current - $age`
 	  versuffix=".$current.$age.$revision"
 	  verstring="$current.$age.$revision"
 
@@ -2711,8 +3231,8 @@
 
 	*)
 	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit 1
+	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
@@ -2760,12 +3280,18 @@
 	# Remove our outputs, but don't remove object files since they
 	# may have been created when compiling PIC objects.
 	removelist=
-	tempremovelist=`echo "$output_objdir/*"`
+	tempremovelist=`$echo "$output_objdir/*"`
 	for p in $tempremovelist; do
 	  case $p in
 	    *.$objext)
 	       ;;
 	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+	         then
+		   continue
+		 fi
+	       fi
 	       removelist="$removelist $p"
 	       ;;
 	    *) ;;
@@ -2787,9 +3313,9 @@
 
       # Eliminate all temporary directories.
       for path in $notinst_path; do
-	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
-	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
-	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+	lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+	deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+	dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
       done
 
       if test -n "$xrpath"; then
@@ -2840,7 +3366,7 @@
 	  *-*-netbsd*)
 	    # Don't link with libc until the a.out ld.so is fixed.
 	    ;;
-	  *-*-openbsd*)
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
 	    # Do not include libc due to us having libc/libc_r.
 	    test "X$arg" = "X-lc" && continue
 	    ;;
@@ -2873,7 +3399,7 @@
 	  # This might be a little naive.  We might want to check
 	  # whether the library exists or not.  But this is on
 	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behaviour.
+	  # implementing what was already the behavior.
 	  newdeplibs=$deplibs
 	  ;;
 	test_compile)
@@ -2892,62 +3418,82 @@
 	    for i in $deplibs; do
 	      name="`expr $i : '-l\(.*\)'`"
 	      # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" -a "$name" -ne "0"; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		set dummy $deplib_matches
-		deplib_match=$2
-		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		  newdeplibs="$newdeplibs $i"
-		else
-		  droppeddeps=yes
-		  echo
-		  echo "*** Warning: dynamic linker does not accept needed library $i."
-		  echo "*** I have the capability to make that library automatically link in when"
-		  echo "*** you link to this library.  But I can only do this if you have a"
-		  echo "*** shared version of the library, which I believe you do not have"
-		  echo "*** because a test_compile did reveal that the linker did not use it for"
-		  echo "*** its dynamic dependency list that programs get resolved with at runtime."
+              if test "$name" != "" && test "$name" -ne "0"; then
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+	        fi
+		if test -n "$i" ; then
+		  libname=`eval \\$echo \"$libname_spec\"`
+		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		  set dummy $deplib_matches
+		  deplib_match=$2
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $echo
+		    $echo "*** Warning: dynamic linker does not accept needed library $i."
+		    $echo "*** I have the capability to make that library automatically link in when"
+		    $echo "*** you link to this library.  But I can only do this if you have a"
+		    $echo "*** shared version of the library, which I believe you do not have"
+		    $echo "*** because a test_compile did reveal that the linker did not use it for"
+		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
 		fi
 	      else
 		newdeplibs="$newdeplibs $i"
 	      fi
 	    done
 	  else
-	    # Error occured in the first compile.  Let's try to salvage the situation:
-	    # Compile a seperate program for each library.
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
 	    for i in $deplibs; do
 	      name="`expr $i : '-l\(.*\)'`"
-	     # If $name is empty we are operating on a -L argument.
-	      if test "$name" != "" -a "$name" != "0"; then
+	      # If $name is empty we are operating on a -L argument.
+              if test "$name" != "" && test "$name" != "0"; then
 		$rm conftest
 		$LTCC -o conftest conftest.c $i
 		# Did it work?
 		if test "$?" -eq 0 ; then
 		  ldd_output=`ldd conftest`
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    echo
-		    echo "*** Warning: dynamic linker does not accept needed library $i."
-		    echo "*** I have the capability to make that library automatically link in when"
-		    echo "*** you link to this library.  But I can only do this if you have a"
-		    echo "*** shared version of the library, which you do not appear to have"
-		    echo "*** because a test_compile did reveal that the linker did not use this one"
-		    echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval \\$echo \"$libname_spec\"`
+		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
+		    set dummy $deplib_matches
+		    deplib_match=$2
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $echo
+		      $echo "*** Warning: dynamic linker does not accept needed library $i."
+		      $echo "*** I have the capability to make that library automatically link in when"
+		      $echo "*** you link to this library.  But I can only do this if you have a"
+		      $echo "*** shared version of the library, which you do not appear to have"
+		      $echo "*** because a test_compile did reveal that the linker did not use this one"
+		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
 		  fi
 		else
 		  droppeddeps=yes
-		  echo
-		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  echo "***  make it link in!  You will probably need to install it or some"
-		  echo "*** library that it depends on before this library will be fully"
-		  echo "*** functional.  Installing it before continuing would be even better."
+		  $echo
+		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $echo "***  make it link in!  You will probably need to install it or some"
+		  $echo "*** library that it depends on before this library will be fully"
+		  $echo "*** functional.  Installing it before continuing would be even better."
 		fi
 	      else
 		newdeplibs="$newdeplibs $i"
@@ -2961,11 +3507,20 @@
 	  for a_deplib in $deplibs; do
 	    name="`expr $a_deplib : '-l\(.*\)'`"
 	    # If $name is empty we are operating on a -L argument.
-	    if test "$name" != "" -a "$name" != "0"; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		    for potent_lib in $potential_libs; do
+            if test "$name" != "" && test  "$name" != "0"; then
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
 		      # Follow soft links.
 		      if ls -lLd "$potent_lib" 2>/dev/null \
 			 | grep " -> " >/dev/null; then
@@ -2978,34 +3533,35 @@
 		      # but so what?
 		      potlib="$potent_lib"
 		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
 			case $potliblink in
 			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
 			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
 			esac
 		      done
 		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | sed 10q \
-			 | egrep "$file_magic_regex" > /dev/null; then
+			 | ${SED} 10q \
+			 | $EGREP "$file_magic_regex" > /dev/null; then
 			newdeplibs="$newdeplibs $a_deplib"
 			a_deplib=""
 			break 2
 		      fi
-		    done
-	      done
+		  done
+		done
+	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		echo
-		echo "*** Warning: linker path does not have real file for library $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have"
-		echo "*** because I did check the linker path looking for a file starting"
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
-		  echo "*** with $libname but no candidates were found. (...for file magic test)"
+		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
 		else
-		  echo "*** with $libname and none of the candidates passed a file format test"
-		  echo "*** using a file magic. Last file checked: $potlib"
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a file magic. Last file checked: $potlib"
 		fi
 	      fi
 	    else
@@ -3021,33 +3577,43 @@
 	    name="`expr $a_deplib : '-l\(.*\)'`"
 	    # If $name is empty we are operating on a -L argument.
 	    if test -n "$name" && test "$name" != "0"; then
-	      libname=`eval \\$echo \"$libname_spec\"`
-	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		for potent_lib in $potential_libs; do
-		  potlib="$potent_lib" # see symlink-check above in file_magic test
-		  if eval echo \"$potent_lib\" 2>/dev/null \
-		      | sed 10q \
-		      | egrep "$match_pattern_regex" > /dev/null; then
-		    newdeplibs="$newdeplibs $a_deplib"
-		    a_deplib=""
-		    break 2
-		  fi
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval \\$echo \"$libname_spec\"`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval $echo \"$potent_lib\" 2>/dev/null \
+		        | ${SED} 10q \
+		        | $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
 		done
-	      done
+	      fi
 	      if test -n "$a_deplib" ; then
 		droppeddeps=yes
-		echo
-		echo "*** Warning: linker path does not have real file for library $a_deplib."
-		echo "*** I have the capability to make that library automatically link in when"
-		echo "*** you link to this library.  But I can only do this if you have a"
-		echo "*** shared version of the library, which you do not appear to have"
-		echo "*** because I did check the linker path looking for a file starting"
+		$echo
+		$echo "*** Warning: linker path does not have real file for library $a_deplib."
+		$echo "*** I have the capability to make that library automatically link in when"
+		$echo "*** you link to this library.  But I can only do this if you have a"
+		$echo "*** shared version of the library, which you do not appear to have"
+		$echo "*** because I did check the linker path looking for a file starting"
 		if test -z "$potlib" ; then
-		  echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
 		else
-		  echo "*** with $libname and none of the candidates passed a file format test"
-		  echo "*** using a regex pattern. Last file checked: $potlib"
+		  $echo "*** with $libname and none of the candidates passed a file format test"
+		  $echo "*** using a regex pattern. Last file checked: $potlib"
 		fi
 	      fi
 	    else
@@ -3058,16 +3624,23 @@
 	  ;;
 	none | unknown | *)
 	  newdeplibs=""
-	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
-	     grep . >/dev/null; then
-	    echo
+	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+	    -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+	    done
+	  fi
+	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
+	    | grep . >/dev/null; then
+	    $echo
 	    if test "X$deplibs_check_method" = "Xnone"; then
-	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
 	    else
-	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	      $echo "*** Warning: inter-library dependencies are not known to be supported."
 	    fi
-	    echo "*** All declared inter-library dependencies are being dropped."
+	    $echo "*** All declared inter-library dependencies are being dropped."
 	    droppeddeps=yes
 	  fi
 	  ;;
@@ -3087,17 +3660,17 @@
 
 	if test "$droppeddeps" = yes; then
 	  if test "$module" = yes; then
-	    echo
-	    echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    echo "*** a static module, that should work as long as the dlopening"
-	    echo "*** application is linked with the -dlopen flag."
+	    $echo
+	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $echo "*** a static module, that should work as long as the dlopening"
+	    $echo "*** application is linked with the -dlopen flag."
 	    if test -z "$global_symbol_pipe"; then
-	      echo
-	      echo "*** However, this would only work if libtool was able to extract symbol"
-	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      echo "*** not find such a program.  So, this module is probably useless."
-	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      $echo
+	      $echo "*** However, this would only work if libtool was able to extract symbol"
+	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $echo "*** not find such a program.  So, this module is probably useless."
+	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
 	    fi
 	    if test "$build_old_libs" = no; then
 	      oldlibs="$output_objdir/$libname.$libext"
@@ -3107,16 +3680,16 @@
 	      build_libtool_libs=no
 	    fi
 	  else
-	    echo "*** The inter-library dependencies that have been dropped here will be"
-	    echo "*** automatically added whenever a program is linked with this library"
-	    echo "*** or is declared to -dlopen it."
+	    $echo "*** The inter-library dependencies that have been dropped here will be"
+	    $echo "*** automatically added whenever a program is linked with this library"
+	    $echo "*** or is declared to -dlopen it."
 
 	    if test "$allow_undefined" = no; then
-	      echo
-	      echo "*** Since this library must not contain undefined symbols,"
-	      echo "*** because either the platform does not support them or"
-	      echo "*** it was explicitly requested with -no-undefined,"
-	      echo "*** libtool will only create a static version of it."
+	      $echo
+	      $echo "*** Since this library must not contain undefined symbols,"
+	      $echo "*** because either the platform does not support them or"
+	      $echo "*** it was explicitly requested with -no-undefined,"
+	      $echo "*** libtool will only create a static version of it."
 	      if test "$build_old_libs" = no; then
 		oldlibs="$output_objdir/$libname.$libext"
 		build_libtool_libs=module
@@ -3174,7 +3747,11 @@
 	  if test -n "$hardcode_libdir_separator" &&
 	     test -n "$hardcode_libdirs"; then
 	    libdir="$hardcode_libdirs"
-	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
 	  fi
 	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
 	    # We should set the runpath_var.
@@ -3194,6 +3771,7 @@
 	fi
 
 	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
 	eval library_names=\"$library_names_spec\"
 	set dummy $library_names
 	realname="$2"
@@ -3223,17 +3801,26 @@
 	    $show "generating symbol list for \`$libname.la'"
 	    export_symbols="$output_objdir/$libname.exp"
 	    $run $rm $export_symbols
-	    eval cmds=\"$export_symbols_cmds\"
+	    cmds=$export_symbols_cmds
 	    save_ifs="$IFS"; IFS='~'
 	    for cmd in $cmds; do
 	      IFS="$save_ifs"
-	      $show "$cmd"
-	      $run eval "$cmd" || exit $?
+	      eval cmd=\"$cmd\"
+	      if len=`expr "X$cmd" : ".*"` &&
+	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	        $show "$cmd"
+	        $run eval "$cmd" || exit $?
+	        skipped_export=false
+	      else
+	        # The command line is too long to execute in one step.
+	        $show "using reloadable object file for export list..."
+	        skipped_export=:
+	      fi
 	    done
 	    IFS="$save_ifs"
 	    if test -n "$export_symbols_regex"; then
-	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
 	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
 	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
 	    fi
@@ -3244,47 +3831,30 @@
 	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
 	fi
 
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+		case " $convenience " in
+		*" $test_deplib "*) ;;
+		*)
+			tmp_deplibs="$tmp_deplibs $test_deplib"
+			;;
+		esac
+	done
+	deplibs="$tmp_deplibs"
+
 	if test -n "$convenience"; then
 	  if test -n "$whole_archive_flag_spec"; then
 	    save_libobjs=$libobjs
 	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
 	  else
 	    gentop="$output_objdir/${outputname}x"
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$gentop"; then
-	      exit $status
-	    fi
 	    generated="$generated $gentop"
 
-	    for xlib in $convenience; do
-	      # Extract the objects.
-	      case $xlib in
-	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	      *) xabs=`pwd`"/$xlib" ;;
-	      esac
-	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	      xdir="$gentop/$xlib"
-
-	      $show "${rm}r $xdir"
-	      $run ${rm}r "$xdir"
-	      $show "$mkdir $xdir"
-	      $run $mkdir "$xdir"
-	      status=$?
-	      if test "$status" -ne 0 && test ! -d "$xdir"; then
-		exit $status
-	      fi
-	      $show "(cd $xdir && $AR x $xabs)"
-	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	      libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	    done
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
 	  fi
 	fi
-
+	
 	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
 	  eval flag=\"$thread_safe_flag_spec\"
 	  linker_flags="$linker_flags $flag"
@@ -3296,24 +3866,25 @@
 	fi
 
 	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
 	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval cmds=\"$archive_expsym_cmds\"
+	  eval test_cmds=\"$archive_expsym_cmds\"
+	  cmds=$archive_expsym_cmds
 	else
-	  save_deplibs="$deplibs"
-	  for conv in $convenience; do
-	    tmp_deplibs=
-	    for test_deplib in $deplibs; do
-	      if test "$test_deplib" != "$conv"; then
-		tmp_deplibs="$tmp_deplibs $test_deplib"
-	      fi
-	    done
-	    deplibs="$tmp_deplibs"
-	  done
-	  eval cmds=\"$archive_cmds\"
-	  deplibs="$save_deplibs"
+	  eval test_cmds=\"$archive_cmds\"
+	  cmds=$archive_cmds
+	  fi
 	fi
 
-	if len=`expr "X$cmds" : ".*"` &&
+	if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
 	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
 	  :
 	else
@@ -3332,6 +3903,7 @@
 	    save_libobjs=$libobjs
 	  fi
 	  save_output=$output
+	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
 
 	  # Clear the reloadable object creation command queue and
 	  # initialize k to one.
@@ -3341,7 +3913,7 @@
 	  delfiles=
 	  last_robj=
 	  k=1
-	  output=$output_objdir/$save_output-${k}.$objext
+	  output=$output_objdir/$output_la-${k}.$objext
 	  # Loop over the list of objects to be linked.
 	  for obj in $save_libobjs
 	  do
@@ -3361,9 +3933,9 @@
 		# the last one created.
 		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
 	      fi
-	      last_robj=$output_objdir/$save_output-${k}.$objext
+	      last_robj=$output_objdir/$output_la-${k}.$objext
 	      k=`expr $k + 1`
-	      output=$output_objdir/$save_output-${k}.$objext
+	      output=$output_objdir/$output_la-${k}.$objext
 	      objlist=$obj
 	      len=1
 	    fi
@@ -3374,13 +3946,22 @@
 	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
 
-	  # Set up a command to remove the reloadale object files
+	  if ${skipped_export-false}; then
+	    $show "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $run $rm $export_symbols
+	    libobjs=$output
+	    # Append the command to create the export file.
+	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+          fi
+
+	  # Set up a command to remove the reloadable object files
 	  # after they are used.
 	  i=0
 	  while test "$i" -lt "$k"
 	  do
 	    i=`expr $i + 1`
-	    delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
 	  done
 
 	  $echo "creating a temporary reloadable object file: $output"
@@ -3405,19 +3986,28 @@
 	  # value of $libobjs for piecewise linking.
 
 	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
 	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	    eval cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
 	  else
-	    eval cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	    fi
 	  fi
 
 	  # Append the command to remove the reloadable object files
 	  # to the just-reset $cmds.
-	  eval cmds=\"\$cmds~$rm $delfiles\"
+	  eval cmds=\"\$cmds~\$rm $delfiles\"
 	fi
 	save_ifs="$IFS"; IFS='~'
 	for cmd in $cmds; do
 	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
 	  $show "$cmd"
 	  $run eval "$cmd" || exit $?
 	done
@@ -3426,7 +4016,7 @@
 	# Restore the uninstalled library and exit
 	if test "$mode" = relink; then
 	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-	  exit 0
+	  exit $EXIT_SUCCESS
 	fi
 
 	# Create links to the real library.
@@ -3474,7 +4064,7 @@
       *.lo)
 	if test -n "$objs$old_deplibs"; then
 	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	libobj="$output"
 	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
@@ -3503,38 +4093,10 @@
 	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
 	else
 	  gentop="$output_objdir/${obj}x"
-	  $show "${rm}r $gentop"
-	  $run ${rm}r "$gentop"
-	  $show "$mkdir $gentop"
-	  $run $mkdir "$gentop"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$gentop"; then
-	    exit $status
-	  fi
 	  generated="$generated $gentop"
 
-	  for xlib in $convenience; do
-	    # Extract the objects.
-	    case $xlib in
-	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	    *) xabs=`pwd`"/$xlib" ;;
-	    esac
-	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	    xdir="$gentop/$xlib"
-
-	    $show "${rm}r $xdir"
-	    $run ${rm}r "$xdir"
-	    $show "$mkdir $xdir"
-	    $run $mkdir "$xdir"
-	    status=$?
-	    if test "$status" -ne 0 && test ! -d "$xdir"; then
-	      exit $status
-	    fi
-	    $show "(cd $xdir && $AR x $xabs)"
-	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	    reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-	  done
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
 	fi
       fi
 
@@ -3542,10 +4104,11 @@
       reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
       output="$obj"
-      eval cmds=\"$reload_cmds\"
+      cmds=$reload_cmds
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
 	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
       done
@@ -3558,7 +4121,7 @@
 	  $run ${rm}r $gentop
 	fi
 
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test "$build_libtool_libs" != yes; then
@@ -3571,17 +4134,18 @@
 	# accidentally link it into a program.
 	# $show "echo timestamp > $libobj"
 	# $run eval "echo timestamp > $libobj" || exit $?
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test -n "$pic_flag" || test "$pic_mode" != default; then
 	# Only do commands if we really have different PIC objects.
 	reload_objs="$libobjs $reload_conv_objs"
 	output="$libobj"
-	eval cmds=\"$reload_cmds\"
+	cmds=$reload_cmds
 	save_ifs="$IFS"; IFS='~'
 	for cmd in $cmds; do
 	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
 	  $show "$cmd"
 	  $run eval "$cmd" || exit $?
 	done
@@ -3593,12 +4157,12 @@
 	$run ${rm}r $gentop
       fi
 
-      exit 0
+      exit $EXIT_SUCCESS
       ;;
 
     prog)
       case $host in
-	*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
       esac
       if test -n "$vinfo"; then
 	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@@ -3623,6 +4187,16 @@
 	;;
       esac
 
+      case $host in
+      *darwin*)
+        # Don't allow lazy linking, it breaks C++ global constructors
+        if test "$tagname" = CXX ; then
+        compile_command="$compile_command ${wl}-bind_at_load"
+        finalize_command="$finalize_command ${wl}-bind_at_load"
+        fi
+        ;;
+      esac
+
       compile_command="$compile_command $compile_deplibs"
       finalize_command="$finalize_command $finalize_deplibs"
 
@@ -3773,31 +4347,31 @@
 	    done
 
 	    if test -n "$exclude_expsyms"; then
-	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
 	      $run eval '$mv "$nlist"T "$nlist"'
 	    fi
 
 	    if test -n "$export_symbols_regex"; then
-	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
 	      $run eval '$mv "$nlist"T "$nlist"'
 	    fi
 
 	    # Prepare the list of exported symbols
 	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$output.exp"
+	      export_symbols="$output_objdir/$outputname.exp"
 	      $run $rm $export_symbols
-	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      $run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
 	    else
-	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
-	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+	      $run eval "${SED} -e 's/\([ ][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
 	      $run eval 'mv "$nlist"T "$nlist"'
 	    fi
 	  fi
 
 	  for arg in $dlprefiles; do
 	    $show "extracting global C symbols from \`$arg'"
-	    name=`echo "$arg" | sed -e 's%^.*/%%'`
-	    $run eval 'echo ": $name " >> "$nlist"'
+	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+	    $run eval '$echo ": $name " >> "$nlist"'
 	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
 	  done
 
@@ -3806,12 +4380,18 @@
 	    test -f "$nlist" || : > "$nlist"
 
 	    if test -n "$exclude_expsyms"; then
-	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
 	      $mv "$nlist"T "$nlist"
 	    fi
 
 	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+	    if grep -v "^: " < "$nlist" |
+		if sort -k 3 </dev/null >/dev/null 2>&1; then
+		  sort -k 3
+		else
+		  sort +2
+		fi |
+		uniq > "$nlist"S; then
 	      :
 	    else
 	      grep -v "^: " < "$nlist" > "$nlist"S
@@ -3820,7 +4400,7 @@
 	    if test -f "$nlist"S; then
 	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
 	    else
-	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
+	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
 	    fi
 
 	    $echo >> "$output_objdir/$dlsyms" "\
@@ -3835,7 +4415,26 @@
 #endif
 
 /* The mapping between symbol names and symbols. */
+"
+
+	    case $host in
+	    *cygwin* | *mingw* )
+	  $echo >> "$output_objdir/$dlsyms" "\
+/* DATA imports from DLLs on WIN32 can't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs */
+struct {
+"
+	      ;;
+	    * )
+	  $echo >> "$output_objdir/$dlsyms" "\
 const struct {
+"
+	      ;;
+	    esac
+
+
+	  $echo >> "$output_objdir/$dlsyms" "\
   const char *name;
   lt_ptr address;
 }
@@ -3895,7 +4494,7 @@
 	  ;;
 	*)
 	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
       else
@@ -3983,7 +4582,7 @@
 	# Link the executable and exit
 	$show "$link_command"
 	$run eval "$link_command" || exit $?
-	exit 0
+	exit $EXIT_SUCCESS
       fi
 
       if test "$hardcode_action" = relink; then
@@ -4033,15 +4632,15 @@
 	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
 	  fi
 	done
-	relink_command="cd `pwd`; $relink_command"
+	relink_command="(cd `pwd`; $relink_command)"
 	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
       fi
 
       # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
-	case $0 in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
 	esac
 	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
       else
@@ -4053,15 +4652,230 @@
 	# win32 will think the script is a binary if it has
 	# a .exe suffix, so we strip it off here.
 	case $output in
-	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
 	esac
 	# test for cygwin because mv fails w/o .exe extensions
 	case $host in
-	  *cygwin*) exeext=.exe ;;
+	  *cygwin*)
+	    exeext=.exe
+	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
 	  *) exeext= ;;
 	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    cwrappersource=`$echo ${objdir}/lt-${outputname}.c`
+	    cwrapper=`$echo ${output}.exe`
+	    $rm $cwrappersource $cwrapper
+	    trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+
+   Currently, it simply execs the wrapper *script* "/bin/sh $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int i;
+
+  program_name = (char *) xstrdup ((char *) basename (argv[0]));
+  newargz = XMALLOC(char *, argc+2);
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  newargz[0] = "$SHELL";
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+  newargz[1] = fnqualify(argv[0]);
+  /* we know the script has the same name, without the .exe */
+  /* so make sure newargz[1] doesn't end in .exe */
+  strendzap(newargz[1],".exe");
+  for (i = 1; i < argc; i++)
+    newargz[i+1] = xstrdup(argv[i]);
+  newargz[argc+1] = NULL;
+EOF
+
+	    cat >> $cwrappersource <<EOF
+  execv("$SHELL",newargz);
+EOF
+
+	    cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void * p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha (name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+  size_t size;
+  char *p;
+  char tmp[LT_PATHMAX + 1];
+
+  assert(path != NULL);
+
+  /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha (path[0]) && path[1] == ':')
+    return xstrdup (path);
+#endif
+  if (IS_DIR_SEPARATOR (path[0]))
+    return xstrdup (path);
+
+  /* prepend the current directory */
+  /* doesn't handle '~' */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+  p = XMALLOC(char, size);
+  sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+  return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert(str != NULL);
+  assert(pat != NULL);
+
+  len = strlen(str);
+  patlen = strlen(pat);
+
+  if (patlen <= len)
+  {
+    str += len - patlen;
+    if (strcmp(str, pat) == 0)
+      *str = '\0';
+  }
+  return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+          const char * message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
+EOF
+	  # we should really use a build-platform specific compiler
+	  # here, but OTOH, the wrappers (shell script and this C one)
+	  # are only useful if you want to execute the "real" binary.
+	  # Since the "real" binary is built for $host, then this
+	  # wrapper might as well be built for $host, too.
+	  $run $LTCC -s -o $cwrapper $cwrappersource
+	  ;;
+	esac
 	$rm $output
-	trap "$rm $output; exit 1" 1 2 15
+	trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
 
 	$echo > $output "\
 #! $SHELL
@@ -4077,12 +4891,12 @@
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
+Xsed='${SED} -e 1s/^X//'
 sed_quote_subst='$sed_quote_subst'
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 relink_command=\"$relink_command\"
 
@@ -4115,7 +4929,7 @@
   test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
   # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
   while test -n \"\$file\"; do
     destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
 
@@ -4128,7 +4942,7 @@
     fi
 
     file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
   done
 
   # Try to get the absolute directory name.
@@ -4137,12 +4951,12 @@
 "
 
 	if test "$fast_install" = yes; then
-	  echo >> $output "\
+	  $echo >> $output "\
   program=lt-'$outputname'$exeext
   progdir=\"\$thisdir/$objdir\"
 
   if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
        test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
     file=\"\$\$-\$program\"
@@ -4153,7 +4967,7 @@
       $rm \"\$progdir/\$file\"
     fi"
 
-	  echo >> $output "\
+	  $echo >> $output "\
 
     # relink executable if necessary
     if test -n \"\$relink_command\"; then
@@ -4161,7 +4975,7 @@
       else
 	$echo \"\$relink_command_output\" >&2
 	$rm \"\$progdir/\$file\"
-	exit 1
+	exit $EXIT_FAILURE
       fi
     fi
 
@@ -4171,13 +4985,13 @@
     $rm \"\$progdir/\$file\"
   fi"
 	else
-	  echo >> $output "\
+	  $echo >> $output "\
   program='$outputname'
   progdir=\"\$thisdir/$objdir\"
 "
 	fi
 
-	echo >> $output "\
+	$echo >> $output "\
 
   if test -f \"\$progdir/\$program\"; then"
 
@@ -4208,14 +5022,6 @@
       # Run the actual program with our arguments.
 "
 	case $host in
-	# win32 systems need to use the prog path for dll
-	# lookup to work
-	*-*-cygwin* | *-*-pw32*)
-	  $echo >> $output "\
-      exec \$progdir/\$program \${1+\"\$@\"}
-"
-	  ;;
-
 	# Backslashes separate directories on plain windows
 	*-*-mingw | *-*-os2*)
 	  $echo >> $output "\
@@ -4225,30 +5031,26 @@
 
 	*)
 	  $echo >> $output "\
-      # Export the path to the program.
-      PATH=\"\$progdir:\$PATH\"
-      export PATH
-
-      exec \$program \${1+\"\$@\"}
+      exec \$progdir/\$program \${1+\"\$@\"}
 "
 	  ;;
 	esac
 	$echo >> $output "\
       \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
-      exit 1
+      exit $EXIT_FAILURE
     fi
   else
     # The program doesn't exist.
     \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
     \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit 1
+    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit $EXIT_FAILURE
   fi
 fi\
 "
 	chmod +x $output
       fi
-      exit 0
+      exit $EXIT_SUCCESS
       ;;
     esac
 
@@ -4264,57 +5066,85 @@
 	  oldobjs="$libobjs_save"
 	  build_libtool_libs=no
 	else
-	  oldobjs="$objs$old_deplibs $non_pic_objects"
+	  oldobjs="$old_deplibs $non_pic_objects"
 	fi
 	addlibs="$old_convenience"
       fi
 
       if test -n "$addlibs"; then
 	gentop="$output_objdir/${outputname}x"
-	$show "${rm}r $gentop"
-	$run ${rm}r "$gentop"
-	$show "$mkdir $gentop"
-	$run $mkdir "$gentop"
-	status=$?
-	if test "$status" -ne 0 && test ! -d "$gentop"; then
-	  exit $status
-	fi
 	generated="$generated $gentop"
 
-	# Add in members from convenience archives.
-	for xlib in $addlibs; do
-	  # Extract the objects.
-	  case $xlib in
-	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
-	  *) xabs=`pwd`"/$xlib" ;;
-	  esac
-	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
-	  xdir="$gentop/$xlib"
-
-	  $show "${rm}r $xdir"
-	  $run ${rm}r "$xdir"
-	  $show "$mkdir $xdir"
-	  $run $mkdir "$xdir"
-	  status=$?
-	  if test "$status" -ne 0 && test ! -d "$xdir"; then
-	    exit $status
-	  fi
-	  $show "(cd $xdir && $AR x $xabs)"
-	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
-	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
-	done
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
       fi
 
       # Do each command in the archive commands.
       if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-	eval cmds=\"$old_archive_from_new_cmds\"
+       cmds=$old_archive_from_new_cmds
       else
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $echo "copying selected object files to avoid basename conflicts..."
+
+	  if test -z "$gentop"; then
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    $show "${rm}r $gentop"
+	    $run ${rm}r "$gentop"
+	    $show "$mkdir $gentop"
+	    $run $mkdir "$gentop"
+	    status=$?
+	    if test "$status" -ne 0 && test ! -d "$gentop"; then
+	      exit $status
+	    fi
+	  fi
+
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		counter=`expr $counter + 1`
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      $run ln "$obj" "$gentop/$newobj" ||
+	      $run cp "$obj" "$gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
+	  done
+	fi
+
 	eval cmds=\"$old_archive_cmds\"
 
 	if len=`expr "X$cmds" : ".*"` &&
 	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  :
+	  cmds=$old_archive_cmds
 	else
 	  # the command line is too long to link in one step, link in parts
 	  $echo "using piecewise archive linking..."
@@ -4323,6 +5153,12 @@
 	  objlist=
 	  concat_cmds=
 	  save_oldobjs=$oldobjs
+
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
 	  for obj in $save_oldobjs
 	  do
 	    oldobjs="$objlist $obj"
@@ -4334,6 +5170,9 @@
 	    else
 	      # the above command should be used before it gets too long
 	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+	        RANLIB=$save_RANLIB
+	      fi
 	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
 	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
 	      objlist=
@@ -4341,11 +5180,16 @@
 	  done
 	  RANLIB=$save_RANLIB
 	  oldobjs=$objlist
-	  eval cmds=\"\$concat_cmds~$old_archive_cmds\"
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
 	fi
       fi
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
+        eval cmd=\"$cmd\"
 	IFS="$save_ifs"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
@@ -4377,8 +5221,12 @@
 	fi
       done
       # Quote the link command for shipping.
-      relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
       relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
 
       # Only create the output if not a dry run.
       if test -z "$run"; then
@@ -4394,10 +5242,10 @@
 	      case $deplib in
 	      *.la)
 		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-		eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
 		if test -z "$libdir"; then
 		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		  exit 1
+		  exit $EXIT_FAILURE
 		fi
 		newdependency_libs="$newdependency_libs $libdir/$name"
 		;;
@@ -4408,10 +5256,10 @@
 	    newdlfiles=
 	    for lib in $dlfiles; do
 	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 	      if test -z "$libdir"; then
 		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
+		exit $EXIT_FAILURE
 	      fi
 	      newdlfiles="$newdlfiles $libdir/$name"
 	    done
@@ -4419,20 +5267,39 @@
 	    newdlprefiles=
 	    for lib in $dlprefiles; do
 	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
 	      if test -z "$libdir"; then
 		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit 1
+		exit $EXIT_FAILURE
 	      fi
 	      newdlprefiles="$newdlprefiles $libdir/$name"
 	    done
 	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
 	  fi
 	  $rm $output
 	  # place dlname in correct position for cygwin
 	  tdlname=$dlname
 	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
 	  esac
 	  $echo > $output "\
 # $outputname - a libtool library file
@@ -4461,6 +5328,9 @@
 # Is this an already installed library?
 installed=$installed
 
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
 # Files to dlopen/dlpreopen
 dlopen='$dlfiles'
 dlpreopen='$dlprefiles'
@@ -4480,7 +5350,7 @@
       $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
       ;;
     esac
-    exit 0
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool install mode
@@ -4495,7 +5365,7 @@
       # Aesthetically quote it.
       arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
       case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	arg="\"$arg\""
 	;;
       esac
@@ -4511,7 +5381,7 @@
     # Aesthetically quote it.
     arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
     case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+    *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
       arg="\"$arg\""
       ;;
     esac
@@ -4559,7 +5429,7 @@
       # Aesthetically quote the argument.
       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
       case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
+      *$quote_scanset* | *]* | *\|* | *\&* | *\(* | *\)* | "")
 	arg="\"$arg\""
 	;;
       esac
@@ -4569,13 +5439,13 @@
     if test -z "$install_prog"; then
       $echo "$modename: you must specify an install program" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     if test -n "$prev"; then
       $echo "$modename: the \`$prev' option requires an argument" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     if test -z "$files"; then
@@ -4585,7 +5455,7 @@
 	$echo "$modename: you must specify a destination" 1>&2
       fi
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Strip any trailing slash from the destination.
@@ -4606,7 +5476,7 @@
       if test "$#" -gt 2; then
 	$echo "$modename: \`$dest' is not a directory" 1>&2
 	$echo "$help" 1>&2
-	exit 1
+	exit $EXIT_FAILURE
       fi
     fi
     case $destdir in
@@ -4618,7 +5488,7 @@
 	*)
 	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
       done
@@ -4643,11 +5513,11 @@
 
       *.la)
 	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	library_names=
@@ -4678,12 +5548,33 @@
 	dir="$dir$objdir"
 
 	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  if test "$inst_prefix_dir" = "$destdir"; then
+	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+	    exit $EXIT_FAILURE
+	  fi
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
 	  $echo "$modename: warning: relinking \`$file'" 1>&2
 	  $show "$relink_command"
 	  if $run eval "$relink_command"; then :
 	  else
 	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-	    continue
+	    exit $EXIT_FAILURE
 	  fi
 	fi
 
@@ -4718,10 +5609,11 @@
 
 	  # Do each command in the postinstall commands.
 	  lib="$destdir/$realname"
-	  eval cmds=\"$postinstall_cmds\"
+	  cmds=$postinstall_cmds
 	  save_ifs="$IFS"; IFS='~'
 	  for cmd in $cmds; do
 	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
 	    $show "$cmd"
 	    $run eval "$cmd" || exit $?
 	  done
@@ -4761,7 +5653,7 @@
 	*)
 	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	  ;;
 	esac
 
@@ -4779,7 +5671,7 @@
 	  $show "$install_prog $staticobj $staticdest"
 	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
 	fi
-	exit 0
+	exit $EXIT_SUCCESS
 	;;
 
       *)
@@ -4791,21 +5683,49 @@
 	  destfile="$destdir/$destfile"
 	fi
 
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      file=`$echo $file|${SED} 's,.exe$,,'`
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
 	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	case $host in
+	*cygwin*|*mingw*)
+	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
 	  notinst_deplibs=
 	  relink_command=
 
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
 	  # If there is no directory component, then add one.
 	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
 	  esac
 
 	  # Check the variables that should have been set.
 	  if test -z "$notinst_deplibs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
-	    exit 1
+	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
+	    exit $EXIT_FAILURE
 	  fi
 
 	  finalize=yes
@@ -4827,10 +5747,17 @@
 	  done
 
 	  relink_command=
+	  # To insure that "foo" is sourced, and not "foo.exe",
+	  # finese the cygwin/MSYS system by explicitly sourcing "foo."
+	  # which disallows the automatic-append-.exe behavior.
+	  case $build in
+	  *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+	  *) wrapperdot=${wrapper} ;;
+	  esac
 	  # If there is no directory component, then add one.
 	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
+	  */* | *\\*) . ${wrapperdot} ;;
+	  *) . ./${wrapperdot} ;;
 	  esac
 
 	  outputname=
@@ -4839,12 +5766,16 @@
 	      tmpdir="/tmp"
 	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
 	      tmpdir="$tmpdir/libtool-$$"
-	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+	      save_umask=`umask`
+	      umask 0077
+	      if $mkdir "$tmpdir"; then
+	        umask $save_umask
 	      else
+	        umask $save_umask
 		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
 		continue
 	      fi
-	      file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
 	      outputname="$tmpdir/$file"
 	      # Replace the output file specification.
 	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
@@ -4862,7 +5793,7 @@
 	    fi
 	  else
 	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
 	  fi
 	fi
 
@@ -4878,7 +5809,7 @@
 	    destfile=$destfile.exe
 	    ;;
 	  *:*.exe)
-	    destfile=`echo $destfile | sed -e 's,.exe$,,'`
+	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
 	    ;;
 	  esac
 	  ;;
@@ -4899,16 +5830,17 @@
       $show "$install_prog $file $oldlib"
       $run eval "$install_prog \$file \$oldlib" || exit $?
 
-      if test -n "$stripme" && test -n "$striplib"; then
+      if test -n "$stripme" && test -n "$old_striplib"; then
 	$show "$old_striplib $oldlib"
 	$run eval "$old_striplib $oldlib" || exit $?
       fi
 
       # Do each command in the postinstall commands.
-      eval cmds=\"$old_postinstall_cmds\"
+      cmds=$old_postinstall_cmds
       save_ifs="$IFS"; IFS='~'
       for cmd in $cmds; do
 	IFS="$save_ifs"
+	eval cmd=\"$cmd\"
 	$show "$cmd"
 	$run eval "$cmd" || exit $?
       done
@@ -4922,9 +5854,9 @@
     if test -n "$current_libdirs"; then
       # Maybe just do a dry run.
       test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $0 --finish$current_libdirs'
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
     else
-      exit 0
+      exit $EXIT_SUCCESS
     fi
     ;;
 
@@ -4943,10 +5875,11 @@
       for libdir in $libdirs; do
 	if test -n "$finish_cmds"; then
 	  # Do each command in the finish commands.
-	  eval cmds=\"$finish_cmds\"
+	  cmds=$finish_cmds
 	  save_ifs="$IFS"; IFS='~'
 	  for cmd in $cmds; do
 	    IFS="$save_ifs"
+	    eval cmd=\"$cmd\"
 	    $show "$cmd"
 	    $run eval "$cmd" || admincmds="$admincmds
        $cmd"
@@ -4963,43 +5896,43 @@
     fi
 
     # Exit here if they wanted silent mode.
-    test "$show" = : && exit 0
+    test "$show" = : && exit $EXIT_SUCCESS
 
-    echo "----------------------------------------------------------------------"
-    echo "Libraries have been installed in:"
+    $echo "----------------------------------------------------------------------"
+    $echo "Libraries have been installed in:"
     for libdir in $libdirs; do
-      echo "   $libdir"
+      $echo "   $libdir"
     done
-    echo
-    echo "If you ever happen to want to link against installed libraries"
-    echo "in a given directory, LIBDIR, you must either use libtool, and"
-    echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    echo "flag during linking and do at least one of the following:"
+    $echo
+    $echo "If you ever happen to want to link against installed libraries"
+    $echo "in a given directory, LIBDIR, you must either use libtool, and"
+    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $echo "flag during linking and do at least one of the following:"
     if test -n "$shlibpath_var"; then
-      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      echo "     during execution"
+      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $echo "     during execution"
     fi
     if test -n "$runpath_var"; then
-      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      echo "     during linking"
+      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $echo "     during linking"
     fi
     if test -n "$hardcode_libdir_flag_spec"; then
       libdir=LIBDIR
       eval flag=\"$hardcode_libdir_flag_spec\"
 
-      echo "   - use the \`$flag' linker flag"
+      $echo "   - use the \`$flag' linker flag"
     fi
     if test -n "$admincmds"; then
-      echo "   - have your system administrator run these commands:$admincmds"
+      $echo "   - have your system administrator run these commands:$admincmds"
     fi
     if test -f /etc/ld.so.conf; then
-      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
     fi
-    echo
-    echo "See any operating system documentation about shared libraries for"
-    echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    echo "----------------------------------------------------------------------"
-    exit 0
+    $echo
+    $echo "See any operating system documentation about shared libraries for"
+    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+    $echo "----------------------------------------------------------------------"
+    exit $EXIT_SUCCESS
     ;;
 
   # libtool execute mode
@@ -5011,7 +5944,7 @@
     if test -z "$cmd"; then
       $echo "$modename: you must specify a COMMAND" 1>&2
       $echo "$help"
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     # Handle -dlopen flags immediately.
@@ -5019,18 +5952,18 @@
       if test ! -f "$file"; then
 	$echo "$modename: \`$file' is not a file" 1>&2
 	$echo "$help" 1>&2
-	exit 1
+	exit $EXIT_FAILURE
       fi
 
       dir=
       case $file in
       *.la)
 	# Check to see that this really is a libtool archive.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
 	else
 	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
 	  $echo "$help" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 
 	# Read the libtool library.
@@ -5057,7 +5990,7 @@
 	  dir="$dir/$objdir"
 	else
 	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit 1
+	  exit $EXIT_FAILURE
 	fi
 	;;
 
@@ -5097,7 +6030,7 @@
       -*) ;;
       *)
 	# Do a test to see if this is really a libtool program.
-	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  # If there is no directory component, then add one.
 	  case $file in
 	  */* | *\\*) . $file ;;
@@ -5120,7 +6053,7 @@
 	eval "export $shlibpath_var"
       fi
 
-      # Restore saved enviroment variables
+      # Restore saved environment variables
       if test "${save_LC_ALL+set}" = set; then
 	LC_ALL="$save_LC_ALL"; export LC_ALL
       fi
@@ -5137,7 +6070,7 @@
 	$echo "export $shlibpath_var"
       fi
       $echo "$cmd$args"
-      exit 0
+      exit $EXIT_SUCCESS
     fi
     ;;
 
@@ -5165,18 +6098,19 @@
     if test -z "$rm"; then
       $echo "$modename: you must specify an RM program" 1>&2
       $echo "$help" 1>&2
-      exit 1
+      exit $EXIT_FAILURE
     fi
 
     rmdirs=
 
+    origobjdir="$objdir"
     for file in $files; do
       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
       if test "X$dir" = "X$file"; then
 	dir=.
-	objdir="$objdir"
+	objdir="$origobjdir"
       else
-	objdir="$dir/$objdir"
+	objdir="$dir/$origobjdir"
       fi
       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
       test "$mode" = uninstall && objdir="$dir"
@@ -5206,7 +6140,7 @@
       case $name in
       *.la)
 	# Possibly a libtool archive, so verify it.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 	  . $dir/$name
 
 	  # Delete the libtool libraries and symlinks.
@@ -5219,10 +6153,11 @@
 	  if test "$mode" = uninstall; then
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      eval cmds=\"$postuninstall_cmds\"
+	      cmds=$postuninstall_cmds
 	      save_ifs="$IFS"; IFS='~'
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd"
 		if test "$?" -ne 0 && test "$rmforce" != yes; then
@@ -5234,10 +6169,11 @@
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      eval cmds=\"$old_postuninstall_cmds\"
+	      cmds=$old_postuninstall_cmds
 	      save_ifs="$IFS"; IFS='~'
 	      for cmd in $cmds; do
 		IFS="$save_ifs"
+		eval cmd=\"$cmd\"
 		$show "$cmd"
 		$run eval "$cmd"
 		if test "$?" -ne 0 && test "$rmforce" != yes; then
@@ -5253,7 +6189,7 @@
 
       *.lo)
 	# Possibly a libtool object, so verify it.
-	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
 
 	  # Read the .lo file
 	  . $dir/$name
@@ -5273,15 +6209,31 @@
 	;;
 
       *)
-	# Do a test to see if this is a libtool program.
-	if test "$mode" = clean &&
-	   (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  relink_command=
-	  . $dir/$file
+	if test "$mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    file=`$echo $file|${SED} 's,.exe$,,'`
+	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    rmfiles="$rmfiles $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	    relink_command=
+	    . $dir/$noexename
 
-	  rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-	  if test "$fast_install" = yes && test -n "$relink_command"; then
-	    rmfiles="$rmfiles $objdir/lt-$name"
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles="$rmfiles $objdir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+	    fi
 	  fi
 	fi
 	;;
@@ -5289,6 +6241,7 @@
       $show "$rm $rmfiles"
       $run $rm $rmfiles || exit_status=1
     done
+    objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
@@ -5304,20 +6257,20 @@
   "")
     $echo "$modename: you must specify a MODE" 1>&2
     $echo "$generic_help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
     ;;
   esac
 
   if test -z "$exec_cmd"; then
     $echo "$modename: invalid operation mode \`$mode'" 1>&2
     $echo "$generic_help" 1>&2
-    exit 1
+    exit $EXIT_FAILURE
   fi
 fi # test -z "$show_help"
 
 if test -n "$exec_cmd"; then
   eval exec $exec_cmd
-  exit 1
+  exit $EXIT_FAILURE
 fi
 
 # We need to display help for each of the modes.
@@ -5350,8 +6303,10 @@
       uninstall       remove libraries from an installed directory
 
 MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
-  exit 0
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool at gnu.org>."
+  exit $EXIT_SUCCESS
   ;;
 
 clean)
@@ -5463,6 +6418,8 @@
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
   -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
@@ -5504,14 +6461,14 @@
 *)
   $echo "$modename: invalid operation mode \`$mode'" 1>&2
   $echo "$help" 1>&2
-  exit 1
+  exit $EXIT_FAILURE
   ;;
 esac
 
-echo
+$echo
 $echo "Try \`$modename --help' for more information about other modes."
 
-exit 0
+exit $?
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting
@@ -5530,7 +6487,7 @@
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
Index: TODO
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/TODO,v
retrieving revision 1.16
retrieving revision 1.17
diff -LTODO -LTODO -u -r1.16 -r1.17
--- TODO
+++ TODO
@@ -1,8 +1,50 @@
-For the latest plans regarding future GnuCash features, please consult
-the file:
+For plans regarding future GnuCash features, please consult
+the file:  doc/projects.html, or its clone: 
+ http://cvs.gnucash.org/linux/gnucash/projects.html
+However, these files are currently (4/03) far out of date.
 
- doc/projects.html
+Currently, This TODO file is the start of a categorized list 
+of developers' notes of work noted and left for later, together 
+with the a list of developers.  If a work item is substantial 
+enough to require an RFE, the item and all discussion, status, 
+and progress reports are kept in bugzilla, with no references 
+from bugzilla to the TODO file, or vice versa.
 
-or the webpage:
+If you want to work on the Gnome2 port, please let me (TomF) 
+know what subcategories you want to work on.  New categories 
+are welcome.
 
- http://cvs.gnucash.org/linux/gnucash/projects.html
+
+
+The current developers are:
+	email: TomF at sjpc.org	IRC: #gnucash TomF	TODO, Build
+
+The categorized list:
+
+gnucash-gnome2-dev	Gnome2 port
+
+	Build	Problems to solve before running gnucash the first time
+	  Delete declare of gnc_html_register_object_handler	(FIXME)
+	  Delete typedef of GncHTMLObjectCB			(FIXME)
+
+	Replace deprecated functions 
+		Make a table mapping deprecated functions in gdkfont.h to their 
+		Pango replacements.
+		Replace all deprecated functions in gdkfont.h
+		Replace deprecated GnomeMDI functions by gdknotebook functions.
+	
+	Run	Problems which affect running gnucash
+		Is deprecated gtk_object_class_add_signals handled correctly?
+		
+	gtk-changes-2-0 Handle the changes documented in:
+		http://developer.gnome.org/doc/API/2.0/gtk/gtk-changes-2-0.html
+
+	GNOME 2.0 platform  Handle the changes documented in:	
+		http://developer.gnome.org/dotplan/porting/
+
+	doc
+		Add links to examples in GTK+ Reference Manual.
+		Update *.glade files for GNOME_BUTTON changes
+
+	Misc 
+		
--- acconfig.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/********************************************************************\
- * acconfig.h -- configuration defines for gnucash                  *
- * Copyright (C) 1997 Robin D. Clark (rclark at cs.hmc.edu)            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-
-#ifndef GNC_CONFIG_H
-#define GNC_CONFIG_H
-
-/* ieeefp.h header present */
-#undef HAVE_IEEEFP_H
-
-/* If configure found libXpm, then use it */
-#undef HAVE_XPM            
-
-/* is guile available */
-#undef HAVE_GUILE
-
-/* New or old Guile Smob for G-wrap */
-#undef GWRAP_OLD_GUILE_SMOB
-
-/* misc image and compression libs needed by html widget */
-#undef HAVE_ZLIB               
-#undef HAVE_PNG             
-#undef HAVE_JPEG            
-
-/* Configure found the function malloc_usable_size */
-#undef HAVE_MALLOC_USABLE_SIZE  
-
-
-/*** Begin i18n ***/
-
-/* internationalization with catgets */ 
-#undef HAVE_CATGETS
-
-/* specific locale directory */ 
-#undef HAVE_LOCALE_DIR
-
-/*** End i18n ***/
-
-#undef HAVE_XML_VERSION_HEADER
-
-#endif
Index: configure.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/configure.in,v
retrieving revision 1.403
retrieving revision 1.404
diff -Lconfigure.in -Lconfigure.in -u -r1.403 -r1.404
--- configure.in
+++ configure.in
@@ -18,38 +18,47 @@
 #   Libraries - Check for libraries
 #   Footer    - Autoconf footer stuff
 
+# Autoconf initialization
+AC_INIT
+AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_SRCDIR(src/engine/Transaction.h)
+AC_PREREQ(2.53)
 
-##  Do this first, because the other tests depend on it:
+# Define the version number
+GNUCASH_MAJOR_VERSION=1
+GNUCASH_MINOR_VERSION=9
+GNUCASH_MICRO_VERSION=0
+GNUCASH_VERSION_STRING="$GNUCASH_MAJOR_VERSION.$GNUCASH_MINOR_VERSION.$GNUCASH_MICRO_VERSION"
 
-### --------------------------------------------------------------------------
-### Headers
-### check for various programs, and stuff (do this first because later
-### commands depend on them):
+AM_INIT_AUTOMAKE(gnucash, $GNUCASH_VERSION_STRING)
 
-AC_INIT(src/engine/Transaction.h)
-AC_PREREQ(2.53)
 
+##  Do this first, because the other tests depend on it:
+
+# Check for gcc and intltool (somehow breaks the suggested content
+# order, doesn't it? Whatever.)
 AC_PROG_CC
+AC_PROG_INTLTOOL
+
+AM_GCONF_SOURCE_2
+
+# Override gconf default install locations.  The default is to always
+# put them into /etc.  This change puts them into $(prefix)/etc.
+if test "x$GCONF_SCHEMA_INSTALL_SOURCE" = "x"; then
+  GCONF_SCHEMA_CONFIG_SOURCE="xml::${sysconfdir}/gconf/gconf.xml.defaults"
+fi
+GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY=`echo $GCONF_SCHEMA_CONFIG_SOURCE | cut -d ':' -f 3`
+AC_SUBST(GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY)
+
 
 # Comment out for production or semi-production builds.  I.E. Anything
 # that is explicitly tagged in cvs as a version.
 AC_DEFINE(GNUCASH_CVS,1,[Define if built from untagged cvs])
 
-GNUCASH_MAJOR_VERSION=1
-GNUCASH_MINOR_VERSION=9
-GNUCASH_MICRO_VERSION=0
-GNUCASH_VERSION=$GNUCASH_MAJOR_VERSION.$GNUCASH_MINOR_VERSION.$GNUCASH_MICRO_VERSION
-
 AC_SUBST(GNUCASH_MAJOR_VERSION)
 AC_SUBST(GNUCASH_MINOR_VERSION)
 AC_SUBST(GNUCASH_MICRO_VERSION)
 
-AM_INIT_AUTOMAKE(gnucash,$GNUCASH_VERSION)
-
-AC_PROG_INTLTOOL
-
-AM_CONFIG_HEADER(config.h)
-
 AC_DEFINE_UNQUOTED(GNUCASH_MAJOR_VERSION, $GNUCASH_MAJOR_VERSION,
 	[GnuCash Major version number])
 AC_DEFINE_UNQUOTED(GNUCASH_MINOR_VERSION, $GNUCASH_MINOR_VERSION,
@@ -59,11 +68,18 @@
 
 dnl Set of available languages.
 ALL_LINGUAS="da de el en_GB es es_NI fr hu it ja nb nl pl pt pt_BR ru rw sk sv ta uk zh_CN zh_TW"
-AM_GNU_GETTEXT([use-libtool])
+
+GETTEXT_PACKAGE=gnucash
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
+	[GetText version number])
+               
+AM_GLIB_GNU_GETTEXT
 
 
 AM_MAINTAINER_MODE
-AM_ACLOCAL_INCLUDE(macros)
+AC_CONFIG_MACRO_DIR(macros)
+
 
 AC_PROG_INSTALL
 
@@ -73,29 +89,6 @@
 
 AC_SUBST(LIBTOOL_DEPS)
 
-# # checks for the pthreads library
-# have_pthread=no
-# for i in pthreads lthread pthread; do
-#   if test "x$have_pthread" = xno; then
-#     AC_CHECK_LIB($i, pthread_once, [
-#  	PTHREAD_LIBS=-l$i
-# 	have_pthread=yes
-# 	])
-#   fi
-# done
-# 
-# # Hmm, maybe it's just in libc?
-# if test "x$have_pthread" = xno; then
-#     AC_CHECK_FUNC(pthread_once, [ have_pthread=yes ])
-# fi
-# 
-# # Do we HAVE threads?!?
-# if test "x$have_pthread" = xno; then
-#   AC_MSG_ERROR([unable to find pthreads on your system.  Sorry.])
-# fi
-# 
-# AC_SUBST(PTHREAD_LIBS)
-
 AC_ISC_POSIX
 AC_C_BIGENDIAN
 AC_PROG_MAKE_SET
@@ -103,6 +96,18 @@
 
 AC_CHECK_HEADERS(limits.h)
 AC_CHECK_FUNCS(stpcpy memcpy timegm towupper)
+AC_CHECK_FUNCS(setenv,,[
+  AC_CHECK_FUNCS(putenv,,[
+    AC_MSG_ERROR([Must have one of the setenv or putenv functions.])
+  ])
+])
+
+## +jsled
+# copied from gnumeric
+AC_CHECK_HEADERS(ieeefp.h ieee754.h)
+dnl Check for some functions
+AC_CHECK_FUNCS(random drand48 finite memmove mkdtemp uname times sysconf fmin)
+## --jsled
 
 STRUCT_TM_GMTOFF_CHECK
 SCANF_LLD_CHECK
@@ -119,14 +124,29 @@
   AC_MSG_ERROR([Cannot find ltdl.h -- libtool-devel not installed?])
 fi
 
-AM_PATH_GLIB
+AM_PATH_GLIB_2_0(2.4.0,,AC_MSG_ERROR([
+*** GLIB >= 2.4 is required to build Gnucash; please make sure you have the
+*** development headers installed. The latest version of GLIB is
+*** always available at ftp://ftp.gnome.org/pub/gnome/sources/glib/.]),
+	gthread gobject)
 
 if test ${no_glib}x = yesx
 then
   AC_MSG_ERROR([Cannot find glib. Check config.log])
 fi
 
-AC_CHECK_HEADERS(dlfcn.h dl.h ghttp_ssl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
+AC_MSG_CHECKING(for GLIB - version >= 2.6.0)
+if $PKG_CONFIG 'glib-2.0 >= 2.6.0'
+then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(HAVE_GLIB26,1,[System has glib 2.6.0 or better])
+  HAVE_GLIB26=yes
+else
+  AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_GLIB26, test "x$HAVE_GLIB26" = "xyes" )
+
+AC_CHECK_HEADERS(dlfcn.h dl.h utmp.h locale.h mcheck.h unistd.h wctype.h)
 
 DL_LIB=
 AC_CHECK_FUNCS(dlopen,,[
@@ -149,8 +169,9 @@
 ### MacOS 10.x requires some special handling...
 
 # Some systems (MacOS) require -lintl
-AC_SEARCH_LIBS(gettext, intl, ,[
-	AC_MSG_ERROR([Cannot find gettext -- do you need to build -lintl?])], )
+# not true for darwin 10.3 - halts the build.
+#AC_SEARCH_LIBS(gettext, intl, ,[
+#	AC_MSG_ERROR([Cannot find gettext -- do you need to build -lintl?])], )
 
 AC_MSG_CHECKING(for darwin)
 case $host_os in
@@ -160,6 +181,16 @@
 update to latest  darwin])
 		;;
 	darwin*)
+     dnl Use fink under MacOS X to find popt
+     AC_MSG_CHECKING(for fink support)
+     if test -d "/sw/lib" -a -d "/sw/include"; then
+        AM_CFLAGS="$AM_CFLAGS -I/sw/include"
+        LDFLAGS="$LDFLAGS -L/sw/lib"
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+    AC_CHECK_HEADERS(popt.h)
 		AC_MSG_RESULT([yes, patching libtool to always build dylibs])
 		mv libtool libtool.old
 		sed -e 's/^deplibs_check_method.*/deplibs_check_method=pass_all/g' \
@@ -179,8 +210,10 @@
 ### Guile and g-wrap version checks (should this be something other than
 ### the Gnome check?)
 
+GUILE_LIBS=""
 GNOME_CHECK_GUILE
 AS_SCRUB_INCLUDE(GUILE_INCS)
+AC_SUBST(GUILE_LIBS)
 
 ### --------------------------------------------------------------------------
 ### G-wrap (libraries and executable)
@@ -188,12 +221,11 @@
 G_WRAP_COMPILE_ARGS=""
 G_WRAP_LINK_ARGS=""
 
-AM_GUILE_VERSION_CHECK(1.3.4, , , [AC_MSG_ERROR([
+AM_GUILE_VERSION_CHECK(1.6, , , [AC_MSG_ERROR([
 
   guile  does not appear to be installed correctly, or is not in the
   correct version range.  Perhaps you have not installed the guile
-  development packages?  Right now gnucash requires at least version
-  1.3.4 to build.
+  development packages?  Gnucash requires at least version 1.6 to build.
 ])])
 
 AC_DEFINE_UNQUOTED(GNC_GUILE_MAJOR_VERSION, ${guile_major_version},
@@ -206,10 +238,7 @@
 AM_PATH_GWRAP(1.3.3, , , [AC_MSG_ERROR([
 
   g-wrap does not appear to be installed correctly, or is not new
-  enough.  Right now gnucash requires at least version 1.3.3 to build
-  as there were major changes between version 1.3.1 and 1.3.2, and
-  extra support added between 1.3.2 and 1.3.3 that is now required
-  by gnucash.
+  enough.  Right now gnucash requires at least version 1.3.3 to build.
   If you need to install g-wrap, you can find it at
   http://www.gnucash.org/pub/g-wrap.
 ])])
@@ -241,7 +270,7 @@
 ### Check size of long_long - some guile's are broken.
 AC_MSG_CHECKING(if guile long_long is at least as big as gint64)
 GNC_OLDCFLAGS="$CFLAGS"
-CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
+CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
 AC_TRY_RUN([
   #include <glib.h>
   #include <libguile/__scm.h>
@@ -263,7 +292,7 @@
 # unless you've done sufficient code review/testing.
 AC_MSG_CHECKING(if unsigned long is at least as big as guint32)
 GNC_OLDCFLAGS="$CFLAGS"
-CFLAGS="${GNOME_INCLUDEDIR} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
+CFLAGS="${GNOME_CFLAGS} ${GUILE_INCS} ${CFLAGS} ${GLIB_CFLAGS}"
 AC_TRY_RUN([
   #include <glib.h>
   int main(int argc, char *argv[]) {
@@ -323,24 +352,169 @@
   AC_MSG_RESULT(yes)
 fi
 
+### --------------------------------------------------------------------------
+### See if we have pkg-config
+
+AC_PATH_PROG(PKG_CONFIG,pkg-config)
+if test "x$PKG_CONFIG" = x; then
+    # @*%&$ Ximian programmers renamed this application
+    AC_PATH_PROG(PKG_CONFIG,pkgconfig)
+    if test "x$PKG_CONFIG" = x; then
+    	AC_MSG_ERROR([Could not find the pkg-config (or pkgconfig) program.],)
+    fi
+fi
+
+PKG_CHECK_MODULES(GCONF, gconf-2.0 >= "2.0")
+AC_SUBST(GCONF_CFLAGS)
+AC_SUBST(GCONF_LIBS)
+
 AM_CONDITIONAL(GNC_HAVE_GUILE_WWW, test "${gnc_have_guile_www}" = yes)
 
 ### --------------------------------------------------------------------------
 ### Gnome XML -- GNOME_XML_LIB is defined by GNOME_XML_CHECK
 
-GNOME_XML_CHECK
-GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
-AS_SCRUB_INCLUDE(GNOME_XML_CFLAGS)
-
-AC_SUBST(GNOME_XML_CFLAGS)
+PKG_CHECK_MODULES(XML, libxml-2.0)
+AS_SCRUB_INCLUDE(XML_CFLAGS)
+AC_SUBST(XML_CFLAGS)
+AC_SUBST(XML_LIBS)
+
+LIBXML2_REQUIRED=2.5.10
+PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
+LIBXML_VERSION=`$PKG_CONFIG --version xml`
+AC_SUBST(LIBXML2_CFLAGS)
+AC_SUBST(LIBXML2_LIBS)
+AC_SUBST(LIBXML_VERSION)
 
 oLIBS="$LIBS"
-LIBS="$LIBS $GNOME_XML_LIB"
-AC_CHECK_LIB(xml, xmlElemDump, [:], [
-  AC_MSG_ERROR([libxml 1.8.3 or newer required for GnuCash])
+LIBS="$LIBS $XML_LIBS"
+
+# Compile a test program to verify that the xml2 library works.
+AC_CHECK_LIB(xml2, xmlElemDump, [:], [
+  AC_MSG_ERROR([libxml2 is required for GnuCash])
   ])
 LIBS="$oLIBS"
 
+dnl *************************************
+dnl QOF
+dnl *************************************
+
+AC_ARG_WITH(qof, [  --with-qof=path         prefix for Query Object Framework - QOF (auto)])
+QOF_REQUIRED=0.6.0
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test pkg-config = no; then
+        AC_MSG_ERROR([Please install pkgconfig])
+        exit 1
+fi
+AC_MSG_CHECKING([for QOF, version >= $QOF_REQUIRED])
+if test "$withval" != "yes"; then
+        QOF=`$PKG_CONFIG --exists '$withval/lib/pkgconfig/qof-1.pc >= $QOF_REQUIRED'`
+        QOF_LIBS=`$PKG_CONFIG --libs $withval/lib/pkgconfig/qof-1.pc`
+        QOF_CFLAGS=`$PKG_CONFIG --cflags $withval/lib/pkgconfig/qof-1.pc`
+        QOF_VERSION=`$PKG_CONFIG --modversion $withval/lib/pkgconfig/qof-1.pc`
+        QOF_PREFIX=`$PKG_CONFIG --variable=prefix $withval/lib/pkgconfig/qof-1.pc`
+        QOF_LIB_DIR=`$PKG_CONFIG --variable=libdir $withval/lib/pkgconfig/qof-1.pc`
+        QOF_XML_DIR=`$PKG_CONFIG --variable=xmldir $withval/lib/pkgconfig/qof-1.pc`
+else
+        QOF=`$PKG_CONFIG --exists 'qof-1 >= $QOF_REQUIRED'`
+        QOF_LIBS=`$PKG_CONFIG --libs qof-1`
+        QOF_CFLAGS=`$PKG_CONFIG --cflags qof-1`
+        QOF_VERSION=`$PKG_CONFIG --modversion qof-1`
+        QOF_PREFIX=`$PKG_CONFIG --variable=prefix qof-1`
+        QOF_LIB_DIR=`$PKG_CONFIG --variable=libdir qof-1`
+        QOF_XML_DIR=`$PKG_CONFIG --variable=xmldir qof-1`
+fi
+if test x$QOF_XML_DIR = x; then
+        AC_MSG_RESULT([no, will use internal QOF code])
+	QOF_CFLAGS="-I\${top_srcdir}/src/engine"
+	QOF_LIBS="\${top_srcdir}/src/engine/libqof.la"
+	QOF_LIB_DIR="${libdir}"
+	QOF_PREFIX="internal"
+	QOF_XML_DIR="$QSF_SCHEMA_DIR"
+	LIBQOF_LIBRARY_VERSION=1:1:0
+	LIBQOF_BACKEND_QSF_LIBRARY_VERSION=0:0:0
+	AC_SUBST(LIBQOF_LIBRARY_VERSION)
+	AC_SUBST(LIBQOF_BACKEND_QSF_LIBRARY_VERSION)
+  	AC_DEFINE(HAVE_LIBQOF,,[We will use the internal QOF code])
+	HAVE_LIBQOF="use_internal"
+else
+        AC_MSG_RESULT([yes])
+fi
+AM_CONDITIONAL(USE_LIBQOF, [test x$HAVE_LIBQOF != x])
+AM_CONDITIONAL(USE_LIBQOF, [test $HAVE_LIBQOF = "use_internal"])
+AC_SUBST(USE_LIBQOF)
+AC_SUBST(QOF_CFLAGS)
+AC_SUBST(QOF_LIBS)
+AS_SCRUB_INCLUDE(QOF_PREFIX)
+AC_SUBST(QOF_PREFIX)
+AC_SUBST(QOF_LIB_DIR)
+
+### --------------------------------------------------------------------------
+### for GOG/goffice...
+
+dnl If libgoffice-1 >= 0.0.3-2 and libgsf >= 1.12.0-1 are found, 
+dnl we need to omit lib/goffice and use the external library
+dnl because lib/goffice will not build with newer versions of libgsf.
+
+GOFFICE_REQUIRED=0.0.3
+GSF_REQUIRED=1.12.0
+AC_MSG_CHECKING([for GOffice and GSF])
+LIBGOFFICE_CFLAGS=`$PKG_CONFIG --silence-errors --cflags " libgoffice-1 >= $GOFFICE_REQUIRED"`
+LIBGOFFICE_LIBS=`$PKG_CONFIG --silence-errors --libs " libgoffice-1 >= $GOFFICE_REQUIRED"`
+LIBGSF_CFLAGS=`$PKG_CONFIG --silence-errors --cflags " libgsf-1 >= $GSF_REQUIRED"`
+LIBGSF_LIBS=`$PKG_CONFIG --silence-errors --libs " libgsf-1 >= $GSF_REQUIRED"`
+AC_SUBST(LIBGOFFICE_CFLAGS)
+AC_SUBST(LIBGOFFICE_LIBS)
+
+if test x"$LIBGOFFICE_LIBS" = x; then
+  AC_MSG_RESULT([No, GOffice not found, will build using internal goffice library.])
+else
+  AC_MSG_RESULT([Yes, using GOffice])
+  AC_DEFINE(HAVE_GOFFICE,,[We have found an external GOffice])
+  HAVE_GOFFICE="use_external"
+fi
+AM_CONDITIONAL(USE_LIBGOFFICE, [test x$HAVE_GOFFICE != x])
+AM_CONDITIONAL(USE_LIBGOFFICE, [test $HAVE_GOFFICE = "use_external"])
+AC_SUBST(USE_LIBGOFFICE)
+
+###
+### GSF
+PKG_CHECK_MODULES(GSF, libgsf-1 >= 1.8.0
+                       libgsf-gnome-1 >= 1.8.0)
+AC_SUBST(GSF_LIBS)
+AC_SUBST(GSF_CFLAGS)
+
+### libart
+PKG_CHECK_MODULES(ART, libart-2.0 >= 2.3.11)
+AC_SUBST(ART_LIBS)
+AC_SUBST(ART_CFLAGS)
+
+### silence convention-difference from cut-n-paste'd gnumeric Makefile.am's:
+AM_CONDITIONAL(WITH_GNOME, true)
+# for lib/goffice/graph/plugins/plot_barcol/gog-1.5d.c's use of
+# goffice/graph/gog-error-bar.h:gog_error_bar_prefs, which is bounded by
+# WITH_GTK for some reason... :/
+AM_CONDITIONAL(WITH_GTK, true)
+AC_DEFINE(WITH_GTK, 1, [Define if UI is built])
+
+### gnome-print [= gnome-font]
+PKG_CHECK_MODULES(PRINT, libgnomeprint-2.2 >= 2.5.2)
+AC_SUBST(PRINT_LIBS)
+AC_SUBST(PRINT_CFLAGS)
+
+AC_ARG_VAR(GLIB_GENMARSHAL, [Absolute path of the glib-genmarshal executable.])
+AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+
+gog_plugindir='${GNC_LIBDIR}/plugins'
+# do this to minimize changes in the plugin makefiles...
+gnumeric_plugindir='${gog_plugindir}'
+AC_SUBST(gog_plugindir)
+AC_SUBST(gnumeric_plugindir)
+#AC_SUBST(pkglibdir) -- this breaks builds into /opt.
+gnumeric_icondir='${GNC_SHAREDIR}/pixmaps'
+AC_SUBST(gnumeric_icondir)
+
+
+# /GOG
 
 ### --------------------------------------------------------------------------
 ### Variables
@@ -376,14 +550,18 @@
 
 GNC_ACCOUNTS_DIR='${GNC_SHAREDIR}/accounts'
 GNC_GLADE_DIR='${GNC_SHAREDIR}/glade'
+QSF_SCHEMA_DIR='${GNC_SHAREDIR}/xml/qsf'
+GNC_UI_DIR='${GNC_SHAREDIR}/ui'
 GNC_GWRAP_LIBDIR='${GNC_SHAREDIR}/guile-modules/g-wrapped'
 GNC_MODULE_DIR='${pkglibdir}'
-GNC_PIXMAP_DIR='${datadir}/pixmaps/gnucash'
+GNC_PIXMAP_DIR='${GNC_SHAREDIR}/pixmaps'
 
 AC_SUBST(GNC_ACCOUNTS_DIR)
 AC_SUBST(GNC_CONFIGDIR)
 AC_SUBST(GNC_DOC_INSTALL_DIR)
 AC_SUBST(GNC_GLADE_DIR)
+AC_SUBST(QSF_SCHEMA_DIR)
+AC_SUBST(GNC_UI_DIR)
 AC_SUBST(GNC_GWRAP_LIBDIR)
 AC_SUBST(GNC_INCLUDE_DIR)
 AC_SUBST(GNC_LIBDIR)
@@ -405,6 +583,11 @@
        CFLAGS="${CFLAGS} -pg"
        LDFLAGS="${LDFLAGS} -pg")
 
+AC_ARG_ENABLE( ref-counts-dumps,
+  [  --enable-ref-counts-dumps     compile with ref count dumps],
+       AC_DEFINE(DEBUG_REFERENCE_COUNTING,1,Enable reference count dumps),
+       AC_DEFINE(DEBUG_REFERENCE_COUNTING,0,Enable reference count dumps) )
+
 
 ### --------------------------------------------------------------------------
 ### SQL
@@ -572,7 +755,7 @@
 	  [ AC_MSG_ERROR([cannot find libofx header, needed for OFX support.]) ] )
     fi
 
-    LIBOFX_LIBS="${LIBOFX_LIBS} -lofx -lstdc++"
+    LIBOFX_LIBS="${LIBOFX_LIBS} -lofx"
     AC_MSG_CHECKING(for libofx)
     save_LIBS="${LIBS}"
     LIBS="${LIBS} ${LIBOFX_LIBS}"
@@ -667,8 +850,8 @@
 # Used to initialize doc-path.
 AC_ARG_WITH( help-prefix,
   [  --with-help-prefix=PATH      specify where to store the help files],
-  GNC_HELPDIR="$with_help_prefix/gnome/help/gnucash",
-  GNC_HELPDIR="\${datadir}/gnome/help/gnucash")
+  GNC_HELPDIR="$with_help_prefix",
+  GNC_HELPDIR="\${datadir}")
 
 AC_SUBST(GNC_HELPDIR)
 
@@ -793,68 +976,8 @@
 
 
 ### --------------------------------------------------------------------------
-### Berkeley db
-
-AC_ARG_ENABLE(prefer-db1,
-  [  --enable-prefer-db1          Prefer Berkeley DB 1.x],[prefer_db1="$enableval"],[prefer_db1=yes])
-
-DB_LIBS=
-AC_CHECK_FUNC(dbopen, [],
-if test "$prefer_db1" = "yes"; then
- AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
-  AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
-   AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
-    AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
-     AC_CHECK_LIB(db-4.1, __db185_open, DB_LIBS="-ldb-4.1",
-      AC_CHECK_LIB(db-4.2, __db185_open, DB_LIBS="-ldb-4.2",
-       AC_CHECK_LIB(db, __db185_open, DB_LIBS="-ldb",
-        AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
-       )
-      )
-     )
-    )
-   )
-  )
- )
-else
- AC_CHECK_LIB(db, dbopen, DB_LIBS="-ldb",
-  AC_CHECK_LIB(db1, dbopen, DB_LIBS="-ldb1",
-   AC_CHECK_LIB(db-3, __db185_open, DB_LIBS="-ldb-3",
-    AC_CHECK_LIB(db-4.0, __db185_open, DB_LIBS="-ldb-4.0",
-     AC_CHECK_LIB(db-4.1, __db185_open, DB_LIBS="-ldb-4.1",
-      AC_CHECK_LIB(db-4.2, __db185_open, DB_LIBS="-ldb-4.2",
-       AC_CHECK_LIB(db, __db185_open, DB_LIBS="-ldb",
-        AC_MSG_ERROR([Your db library is missing db 1.85 compatibility mode])
-       )
-      )
-     )
-    )
-   )
-  )
- )
-fi
-)
-
-dnl look for db headers
-if test "$prefer_db1" = "yes"; then
-	AC_CHECK_HEADERS(db_185.h db1/db.h db4/db_185.h)
-	if test "$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nonono; then
-	  AC_MSG_ERROR([Berkeley db library required for GnuCash])
-	fi
-	AC_DEFINE(PREFER_DB1,,Prefer DB1)
-else
-	AC_CHECK_HEADERS(db.h db_185.h db1/db.h db4/db_185.h)
-
-	if test "$ac_cv_header_db_h$ac_cv_header_db_185_h$ac_cv_header_db1_db_h$ac_cv_header_db4_db_185_h" = nononono; then
-	  AC_MSG_ERROR([Berkeley db library required for GnuCash])
-	fi
-fi
-
-AC_SUBST(DB_LIBS)
-
-### --------------------------------------------------------------------------
 ### popt
-
+AC_CHECK_HEADERS(popt.h)
 AC_CHECK_LIB(popt, poptStrippedArgv,, [AC_MSG_ERROR([
 
   popt 1.5 or newer is required to build gnucash. You can download
@@ -881,125 +1004,84 @@
 
 if test x${gnc_build_gui} = xtrue ;
 then
-    GNOME_INIT
     GNOME_COMPILE_WARNINGS
-    GNOME_CHECK_GDK_PIXBUF
-    GNOME_PRINT_CHECK
-    
-    # gnome-print-check appears tobe sort of b0rked for the time being
-    GNOME_PRINT_CFLAGS=`${GNOME_CONFIG} --cflags print`
+
+    # Look for libgnomeui by pkg-config
+    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4)
+    AS_SCRUB_INCLUDE(GTK_CFLAGS)
+    AC_SUBST(GTK_CFLAGS)
+    AC_SUBST(GTK_LIBS)
+
+    PKG_CHECK_MODULES(GNOME, libgnomeui-2.0 >= 2.4)
+    AS_SCRUB_INCLUDE(GNOME_CFLAGS)
+
+    AC_SUBST(GNOME_CFLAGS)
+    AC_SUBST(GNOME_LIBS)
+
+    # look for gdk-pixbuf
+    PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
+    AS_SCRUB_INCLUDE(GDK_PIXBUF_CFLAGS)
+    AC_SUBST(GDK_PIXBUF_CFLAGS)
+    AC_SUBST(GDK_PIXBUF_LIBS)
+
+    # Gnome-Print -- some people already have/need libgnomeprint-2.2
+    # Yep, so lets test to see if it is 2.0 or 2.2, 
+    # Anyone know why gnome has versions in the package config? 
+    # Why cant I just ask for the version of 'libgnomeprint'
+
+    PKG_CHECK_MODULES(GNOME_PRINT, libgnomeprint-2.2 libgnomeprintui-2.2)
     AS_SCRUB_INCLUDE(GNOME_PRINT_CFLAGS)
+    AC_SUBST(GNOME_PRINT_CFLAGS)
+    AC_SUBST(GNOME_PRINT_LIBS)
+
+    # There is no libguppi.  Just substitute empty stuff
+    LIBGUPPI_CFLAGS=
+    LIBGUPPI_LIBS=
+    AC_SUBST(LIBGUPPI_CFLAGS)
+    AC_SUBST(LIBGUPPI_LIBS)
     
     ### ----------------------------------------------------------------------
-    ### Check for glade
-    
-    AM_PATH_LIBGLADE
-    
-    GLADE_LIBS="$LIBGLADE_LIBS"
-    GLADE_CFLAGS="$LIBGLADE_CFLAGS"
+    ### Check for glade, gtkhtml
     
+    PKG_CHECK_MODULES(GLADE, libglade-2.0 >= 2.4)
     AS_SCRUB_INCLUDE(GLADE_CFLAGS)
-    AC_SUBST(GLADE_LIBS)
     AC_SUBST(GLADE_CFLAGS)
-    
-    
-    ### ----------------------------------------------------------------------
-    AC_CHECK_LIB(gal, main, true,
-      [AC_MSG_ERROR([gal library not found. See the README and config.log for more info.])],
-      `$GNOME_CONFIG --libs gal`)
-    
-    #
-    # Check for GtkHTML..  First check for 1.1, then check for < 1.1
-    #
-
-    AC_PATH_PROG(PKG_CONFIG,pkg-config)
-    if test "x$PKG_CONFIG" = x; then
-	# @*%&$ Ximian programmers renamed this application
-	AC_PATH_PROG(PKG_CONFIG,pkgconfig)
-    fi
-
-    AC_MSG_CHECKING([for gtkhtml >= 1.1])
-    if test "x$PKG_CONFIG" != x; then
-	GTKHTML_LIBS=`$PKG_CONFIG --libs gtkhtml-1.1`
-	GTKHTML_CFLAGS=`$PKG_CONFIG --cflags gtkhtml-1.1`
-        AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
-    fi
-
-    if test "x$GTKHTML_LIBS" != x; then
-	AC_MSG_RESULT(yes)
-	# check for gtkhtml and enable it via HAVE_LIBGTKHTML if found
-	AC_CHECK_LIB(gtkhtml-1.1, gtk_html_new,
-		     GNOMEBUILDLIBS="${GNOMEBUILDLIBS} $GTKHTML_TEST_LIB"
-		     AC_DEFINE(HAVE_LIBGTKHTML,,We Have LIBGTKHTML),
-		     AC_MSG_ERROR([Cannot link gtkhtml-1.1. See the README and config.log for more info.]),
-		     $GTKHTML_LIBS)
-    else
-        AC_MSG_CHECKING([for gtkhtml < 1.1])
-        GTKHTML_LIBS=`$GNOME_CONFIG --libs gtkhtml`
-        GTKHTML_CFLAGS=`$GNOME_CONFIG --cflags gtkhtml`
-        AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
-
-	if test "x$GTKHTML_LIBS" != x; then
-	    AC_MSG_RESULT(yes)
-
-	    # check for gtkhtml and enable it via HAVE_LIBGTKHTML if found
-	    AC_CHECK_LIB(gtkhtml, gtk_html_new,
-		     GNOMEBUILDLIBS="${GNOMEBUILDLIBS}"
-		     AC_DEFINE(HAVE_LIBGTKHTML,,We Have LIBGTKHTML),
-		     AC_MSG_ERROR([Cannot link gtkhtml. See the README and config.log for more info.]),
-		     $GTKHTML_LIBS)
-	else
-	    AC_MSG_ERROR([Cannot find GtkHTML <= 1.x on your system.  See the README and config.log for more info.])
+    AC_SUBST(GLADE_LIBS)
 
-	fi
+    # check for gtkhtml 3.x
+    gtkhtml=0
+    PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.8 , [gtkhtml=1] , [gtkhtml=0])
+    if test $gtkhtml = 0
+      then
+    	PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.6 , [gtkhtml=1] , [gtkhtml=0])
+    	if test $gtkhtml = 0
+    	  then
+    	     PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.2 , [gtkhtml=1] , [gtkhtml=0])
+    	     if test $gtkhtml = 0
+    	       then 
+    	          PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.1 , [gtkhtml=1] , [gtkhtml=0])
+    	          if test $gtkhtml = 0
+    	            then 
+    	              PKG_CHECK_MODULES(GTKHTML, libgtkhtml-3.0 ,,
+    	    		AC_MSG_ERROR([Could not find a working gtkhtml version]))
+    	          fi
+    	    fi
+    	fi
     fi
-    
-    #
-    # Check for GHTTP
-    #
-
-    GHTTP_LIBS=`$GNOME_CONFIG --libs ghttp`
-    GHTTP_CFLAGS=`$GNOME_CONFIG --cflags ghttp`
-    
-    # Note: this doesn't croak if GHTTP_LIBS is empty! (e.g. on RH6.2)
-    AC_CHECK_LIB(ghttp, ghttp_request_new,
-                 GNOMEBUILDLIBS="${GNOMEBUILDLIBS} ghttp"
-                 AC_DEFINE(HAVE_LIBGHTTP,,We Have GHTTP)
-    	     if test "x$GHTTP_LIBS" = "x" ; then
-    		GHTTP_LIBS=-lghttp
-    	     fi,
-                 AC_MSG_ERROR([Cannot find ghttp. See the README and config.log for more info.]),
-                 $GHTTP_LIBS)
-    
-    AC_CHECK_LIB(ghttp, ghttp_enable_ssl,
-                 AC_DEFINE(HAVE_OPENSSL,,We Have OpenSSL),
-    	     AC_MSG_WARN([****** ghttp does not have SSL support.]),
-    	     $GHTTP_LIBS)
-    
-    AS_SCRUB_INCLUDE(GHTTP_CFLAGS)
-    AC_SUBST(GTKHTML_LIBS)
+    AS_SCRUB_INCLUDE(GTKHTML_CFLAGS)
+dnl if Mac OSX, also scrub /sw/include
+dnl GIVEN_CFLAGS=$(echo $GIVEN_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
+case $host_os in
+	darwin*)
+		GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | sed -e "s;-I/sw/include ;;" | sed -e "s;-I/sw/include$;;")
+		GTKHTML_CFLAGS=$(echo $GTKHTML_CFLAGS | sed -e "s;-I/sw/include/gtkhtml ;;" | sed -e "s;-I/sw/includ/gtkhtmle$;;")
+		;;
+esac
     AC_SUBST(GTKHTML_CFLAGS)
-    AC_SUBST(GHTTP_LIBS)
-    AC_SUBST(GHTTP_CFLAGS)
-    
-    
+    AC_SUBST(GTKHTML_LIBS)
+
+   
     ### ----------------------------------------------------------------------
-    ### guppi
-    
-    AC_ARG_ENABLE( guppi,
-      [  --disable-guppi               compile without guppi support],
-      if test $enableval = no; then
-        USE_GUPPI=0
-      else
-        USE_GUPPI=1
-      fi,
-      USE_GUPPI=1 )
-    
-    if test ${USE_GUPPI} = 0; then
-      AC_MSG_WARN([Compiling without guppi support])
-    else
-      AC_DEFINE(USE_GUPPI,,We are using guppi)
-    
     
     AC_ARG_ENABLE( efence,
       [  --enable-efence               link using efence],
@@ -1012,34 +1094,6 @@
       EFENCE_LIBS="")
     AC_SUBST(EFENCE_LIBS)
     
-    ## Things guppi needs (actually are these guppi dependencies or gtkhtml's?)
-    
-    # LAME: if you ask gnome-config for the zvt libs, it doesn't include
-    # imlib, though it needs it so we'll just steal gtkhtml's which does.
-    AC_CHECK_LIB(zvt, main, true,
-      [AC_MSG_ERROR([libzvt development files not found. See config.log.])],
-      `$GNOME_CONFIG --libs zvt` $GTKHTML_LIBS)
-    
-    #AC_CHECK_LIB(bonobo, main, true,
-    #  [AC_MSG_ERROR([libbonobo development files not found. See config.log.])
-    #],
-    #  `$GNOME_CONFIG --libs bonobo`)
-    
-    AC_CHECK_LIB(oaf, main, true,
-      [AC_MSG_ERROR([liboaf development files not found. See config.log.])],
-      `$GNOME_CONFIG --libs oaf`)
-    
-    ## guppi itself.
-    
-    GUPPI_LIBS=`$GNOME_CONFIG --libs libguppi`
-    GUPPI_CFLAGS=`$GNOME_CONFIG --cflags libguppi`
-    AS_SCRUB_INCLUDE(GUPPI_CFLAGS)
-    LIBGUPPI_CHECK
-    AC_SUBST(GUPPI_LIBS)
-    AC_SUBST(GUPPI_CFLAGS)
-    
-    fi
-    
     ### ----------------------------------------------------------------------
     ### XIM
     AC_ARG_ENABLE(xim,
@@ -1153,6 +1207,7 @@
   # us to keep it turned on, but also not break configure proceses.
   # -- warlord, 02/02/2003
 
+
   # Enable error-on-warning by default -- I'm tired of fixing other
   # people's missing #includes, etc.
   AC_ARG_ENABLE(error-on-warning,
@@ -1173,6 +1228,10 @@
      if test `echo ${GCC_VERSION} | cut -d. -f2` -ge 4; then
 	# This is gcc >= 3.4.x
 	warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement"
+     else if test `echo ${GCC_VERSION} | cut -d. -f1` -ge 4; then
+	# This is gcc == 4.x.x
+	warnFLAGS="${warnFLAGS} -Wdeclaration-after-statement -Wno-pointer-sign"
+	fi
      fi
   fi
 
@@ -1202,8 +1261,7 @@
 LIBOBJS_SEDSCRIPT="s,\.[[^.]]* ,$U&,g;s,\.[[^.]]*\$\$,$U&,"
 AC_SUBST(LIBOBJS_SEDSCRIPT)
 
-AC_OUTPUT( intl/Makefile po/Makefile.in 
-	  m4/Makefile
+AC_CONFIG_FILES(po/Makefile.in
           dnl # Makefiles
           Makefile
           accounts/Makefile
@@ -1224,15 +1282,29 @@
           doc/examples/Makefile
           intl-scm/Makefile
           lib/Makefile
+          lib/glib26/Makefile
           lib/guile-www/Makefile
           lib/srfi/Makefile
           lib/libc/Makefile
-          macros/Makefile
+          lib/goffice/Makefile
+          lib/goffice/split/Makefile
+          lib/goffice/split/widgets/Makefile
+          lib/goffice/app/Makefile
+          lib/goffice/graph/Makefile
+          lib/goffice/graph/plugins/Makefile
+          lib/goffice/graph/plugins/plot_barcol/Makefile
+          lib/goffice/graph/plugins/plot_pie/Makefile
+          lib/goffice/graph/plugins/plot_radar/Makefile
+          lib/goffice/graph/plugins/plot_surface/Makefile
+          lib/goffice/graph/plugins/plot_xy/Makefile
+          lib/goffice/utils/Makefile
+          lib/goffice/gui-utils/Makefile
+          lib/goffice/drawing/Makefile
+          lib/goffice/pixmaps/Makefile
+          lib/goffice/cut-n-paste/Makefile
+          lib/goffice/cut-n-paste/pcre/Makefile
           rpm/Makefile
           src/Makefile
-          src/app-file/Makefile
-          src/app-file/test/Makefile
-          src/app-file/gnome/Makefile
           src/app-utils/Makefile
           src/app-utils/test/Makefile
           src/backend/Makefile
@@ -1241,6 +1313,7 @@
           src/backend/file/test/Makefile
           src/backend/file/test/test-files/Makefile
           src/backend/file/test/test-files/xml2/Makefile
+	  src/backend/qsf/Makefile
           src/backend/postgres/Makefile
           src/backend/postgres/test/Makefile
           src/backend/rpc/Makefile
@@ -1256,11 +1329,6 @@
           src/engine/Makefile
           src/engine/test/Makefile
           src/engine/test-core/Makefile
-          src/experimental/Makefile
-          src/experimental/cbb/Makefile
-          src/experimental/cbb/cbb-engine/Makefile
-          src/experimental/cgi-bin/Makefile
-          src/experimental/gg/Makefile
           src/gnc-module/Makefile
           src/gnc-module/test/Makefile
           src/gnc-module/test/mod-foo/Makefile
@@ -1268,9 +1336,13 @@
           src/gnc-module/test/mod-baz/Makefile
           src/gnc-module/test/misc-mods/Makefile
           src/gnome/Makefile
-          src/gnome/glade/Makefile
+	  src/gnome/glade/Makefile
+	  src/gnome/schemas/Makefile
+	  src/gnome/ui/Makefile
           src/gnome-utils/Makefile
-          src/gnome-utils/test/Makefile
+	  src/gnome-utils/schemas/Makefile
+	  src/gnome-utils/test/Makefile
+	  src/gnome-utils/ui/Makefile
           src/gnome-search/Makefile
           src/import-export/Makefile
           src/import-export/test/Makefile
@@ -1282,12 +1354,14 @@
           src/import-export/qif-import/test/Makefile
           src/import-export/qif-io-core/Makefile
           src/import-export/qif-io-core/test/Makefile
+          src/import-export/schemas/Makefile
           src/import-export/ofx/Makefile
           src/import-export/ofx/test/Makefile
           src/import-export/mt940/Makefile
           src/import-export/log-replay/Makefile
           src/import-export/hbci/Makefile
           src/import-export/hbci/glade/Makefile
+          src/import-export/hbci/schemas/Makefile
           src/import-export/hbci/test/Makefile
           src/network-utils/Makefile
           src/network-utils/test/Makefile
@@ -1305,7 +1379,7 @@
           src/register/register-gnome/test/Makefile
           src/report/Makefile
           src/report/report-gnome/Makefile
-          src/report/report-gnome/test/Makefile
+          dnl # src/report/report-gnome/test/Makefile
           src/report/report-system/Makefile
           src/report/report-system/test/Makefile
           src/report/standard-reports/Makefile
@@ -1332,6 +1406,8 @@
           src/business/dialog-tax-table/Makefile
           src/business/business-gnome/Makefile
           src/business/business-gnome/glade/Makefile
+          src/business/business-gnome/schemas/Makefile
+          src/business/business-gnome/ui/Makefile
           src/business/business-ledger/Makefile
           src/business/business-reports/Makefile
 
@@ -1343,14 +1419,30 @@
           gnucash-config
           ,
           dnl # commands go here, but we don't have any right now
-          )
+)
+AC_OUTPUT
 
 if test x$RPC_DIR = xrpc ; then
        AC_MSG_WARN([
 
-       The RPC Backend is depricated.  You should not use it.
+       The RPC Backend is deprecated.  You should not use it.
        It may go away in the future.  If you need it, please
        contact gnucash-devel at gnucash.org and let the developers
        know.
        ])
 fi
+
+AC_MSG_RESULT([
+  Options detected/selected
+  -------------------------
+  gnucash version ...... : $VERSION
+  Build for host ....... : $host
+  Extra Warnings ....... : $warnFLAGS
+  CPPFLAGS ............. : $CPPFLAGS
+  CFLAGS ............... : $CFLAGS
+  LDFLAGS .............. : $LDFLAGS
+  QOF support ...........: $QOF_VERSION
+  QOF location ..........: $QOF_PREFIX
+  QOF library dir .......: $QOF_LIB_DIR
+  QOF backend config ....: $QOF_XML_DIR
+])
Index: HACKING
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/HACKING,v
retrieving revision 1.12
retrieving revision 1.13
diff -LHACKING -LHACKING -u -r1.12 -r1.13
--- HACKING
+++ HACKING
@@ -76,7 +76,7 @@
 
 To run gnucash from your build tree:
 -- edit ./src/bin/overrides/gnucash and replace gnucash-env with
-   gnucash-build-env
+   ./src/bin/overrides/gnucash-build-env
 -- then start gnucash by saying ./src/bin/overrides/gnucash
 -- Make sure you undo this change before installing gnucash
 
@@ -107,6 +107,33 @@
     [gdb output]
     % gdb> run -e main -s ./src/bin/overrides/gnucash --g-fatal-warnings
 
+To run gdb on an opt-style-install from your build tree:
+
+   $ ./gnucash-env gdb /usr/bin/guile
+   [gdb output]
+   gdb> run -e main -s ../libexec/overrides/gnucash --g-fatal-warning
+
+You'll also probably want to know about these:
+
+    % gdb> catch fork
+    % gdb> set follow-fork-mode child
+
+-----
+It may be the case that running GDB from within emacs doesn't work for you,
+with the following error:
+
+[C-u M-x gdb /opt/gnucash-cvs/bin/gnucash-env gdb /usr/bin/guile...
+ ...in buffer *gud-gdb*:]
+
+/opt/gnucash-cvs/libexec/gnucash/overrides/gnucash-env: line 28: exec: -d: invalid option
+exec: usage: exec [-cl] [-a name] file [redirection ...]
+
+jsled needed to re-define a gud.el function as such:
+
+  (defun gud-gdb-massage-args (file args)
+    (let ((l (copy-list args)))
+      (nconc l (list "-cd" (expand-file-name default-directory) "-fullname"))))
+
 
 Using Electric Fence with GnuCash
 ---------------------------------
@@ -126,10 +153,10 @@
 -- run ./src/bin/overrides/gnucash-valgrind
 
 However, I did not find valgrind to be useful.  It reported a bunch of
-guile bugs, some g_has_table bugs, and then the program exited prematurely 
+guile bugs, some g_hash_table bugs, and then the program exited prematurely 
 for no appearenet reason. :-( 
 
-For the moment, use the supressions in lib/gnucash_valgrind.supp.
+For the moment, use the supressions in src/valgrind-gnucash.supp
 
 This file needs to be cleaned up in two ways:
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/.cvsignore,v
retrieving revision 1.37
retrieving revision 1.38
diff -L.cvsignore -L.cvsignore -u -r1.37 -r1.38
--- .cvsignore
+++ .cvsignore
@@ -32,6 +32,7 @@
 make-gnucash-patch
 make-gnucash-potfiles
 missing
+mkinstalldirs
 stamp-h
 stamp-h1
 stamp-h.in
@@ -50,5 +51,11 @@
 *.diff
 *.diffs
 *.xac.*.xac
+autom4te.cache
 ltmain.sh
 mkinstalldirs
+.DS_Store
+*.prj
+*.pws
+.tm_project.cache
+
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/ChangeLog,v
retrieving revision 1.1918
retrieving revision 1.1919
diff -LChangeLog -LChangeLog -u -r1.1918 -r1.1919
--- ChangeLog
+++ ChangeLog
@@ -1,3 +1,6340 @@
+2005-11-01  David Hampton  <hampton at employees.org>
+
+	* All: Collapse the gnome2 branch back into HEAD.
+
+-=-=-=- cvs gnome2 branch ChangeLog is below this line -=-=-=-
+
+2005-11-01  Karl Hegbloom  <hegbloom at pdx.edu>
+
+        * src/backend/postgres/upgrade.c:
+        * src/backend/postgres/price.c: Use glib
+        * src/backend/postgres/base-autogen.c:
+        * src/backend/postgres/kvp-sql.c: Use glib macros for type
+	conversions to suppress compiler warnings on amd64.
+
+        * src/backend/postgres/putil.h: Cast fun to long long int to
+	suppress compiler warning on amd64.
+
+2005-10-31  David Hampton  <hampton at employees.org>
+
+	* macros/autogen.sh: Remove obsolete warning about gettext.
+
+	* various: Final sync from HEAD to the gnucash-gnome2-dev branch.
+
+2005-10-30  Joshua Sled  <jsled at asynchronous.org>
+
+	* GNOME2_STATUS: Updates
+	* src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_button_press):
+	Better transient-window positioning.
+	* src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas:
+	* src/gnome/dialog-scheduledxaction.[ch]: 
+	* src/gnome/dialog-sx-from-trans.c: 
+	Rename "notify-days" to "remind-days", as it should have been in
+	the first place.  Fix conditional-option logic in preferences.
+	* src/gnome/glade/sched-xact.glade (SX Preferences):
+	Re-layout to visually and semantically mirror SX editor; rename
+	"notify-days" to "remind-days"
+	* src/gnome/glade/sched-xact.glade (Scheduled Transaction Editor):
+	Reformat {create,remind}-days-in-advance checkbox + spinbutton
+	pairs to respect UI semantic of gtk2.0 checkboxes (since the whole
+	label is selectable, we can't embed a control in the label lest it
+	can never be used).
+
+2005-10-30  David Hampton  <hampton at employees.org>
+
+	* src/backend/file/gnc-pricedb-xml-v2.c:
+	* src/engine/Period.c:
+	* src/engine/gnc-pricedb-p.h:
+	* src/engine/gnc-pricedb.[ch]: Slightly modified version of
+	Herbert Toma's fix to reduce load time with a large database of
+	stock prices.
+
+2005-10-30  Joshua Sled  <jsled at asynchronous.org>
+
+	Patches from Scott Oonk <scott.oonk at gmail.com>:
+	* src/register/register-gnome/combocell-gnome.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	Remove sort-state flag, code.
+	* src/register/register-gnome/gnucash-item-list.c
+	(gnc_item_list_show_selected): scroll to selected position.
+	* src/register/register-gnome/combocell-gnome.c
+	(gnc_combo_cell_autopop_init): auto-raise popups when initialized.
+	* src/register/register-gnome/gnucash-item-list.c:
+	Change signal emission so initial-combobox-display, keyboard
+	arrows/return and selection work correctly.
+	* GNOME2_STATUS: Remove items as per fixes.  Yay! :)
+
+2005-10-28  David Hampton  <hampton at employees.org>
+
+	* src/backend/file/gnc-pricedb-xml-v2.c:
+	* src/backend/file/gnc-transaction-xml-v2.c:
+	* src/backend/file/io-gncxml-v1.c:
+	* src/backend/file/sixtp-dom-parsers.[ch]:
+	* src/backend/file/test/test-dom-converters1.c:
+	* src/business/business-core/file/gnc-entry-xml-v2.c:
+	* src/business/business-core/file/gnc-invoice-xml-v2.c:
+	* src/business/business-core/file/gnc-order-xml-v2.c: Print a
+	better error when an invalid timestamp is in a data file.
+
+2005-10-27  David Hampton  <hampton at employees.org>
+
+	* src/engine/gnc-budget-book-p.h:
+	* src/engine/gnc-budget-book.[ch]:
+	* src/engine/gnc-budget-cat-p.h:
+	* src/engine/gnc-budget-cat.[ch]:
+	* src/engine/gnc-budget-p.h:
+	* src/engine/gnc-budget-period-p.h:
+	* src/engine/gnc-budget-period-value-p.h:
+	* src/engine/gnc-budget-period-value.[ch]:
+	* src/engine/gnc-budget-period.[ch]:
+	* src/gnome/dialog-budget-category.[ch]:
+	* src/gnome/dialog-budget-list.[ch]:
+	* src/gnome/dialog-budget-workbench.[ch]:
+	* src/gnome/druid-budget-create.[ch]:
+	* src/gnome/gnc-budget-gui.h:
+	* src/gnome-utils/gnc-budget-list-tree-model.[ch]:
+	* src/gnome-utils/gnc-budget-tree-model.[ch]: Remove files from
+	old budgeting code that are no longer used.
+
+	* src/app-utils/app-utils.scm:
+	* src/app-utils/options.scm:
+	* src/backend/file/Makefile.am:
+	* src/backend/file/gnc-xml.h:
+	* src/backend/file/io-gncxml-v2.[ch]:
+	* src/backend/file/sixtp-dom-generators.[ch]:
+	* src/backend/file/sixtp-dom-parsers.[ch]:
+	* src/backend/file/sixtp-utils.c:
+	* src/backend/file/test/Makefile.am:
+	* src/engine/Makefile.am:
+	* src/engine/cashobjects.c:
+	* src/engine/gnc-budget.[ch]:
+	* src/engine/gnc-engine.[ch]:
+	* src/engine/gw-engine-spec.scm:
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-plugin-basic-commands.c:
+	* src/gnome/top-level.c:
+	* src/gnome/glade/budget.glade:
+	* src/gnome/ui/Makefile.am:
+	* src/gnome/ui/gnc-plugin-basic-commands-ui.xml:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/gnc-html.[ch]:
+	* src/gnome-utils/gnc-icons.h:
+	* src/gnome-utils/test/Makefile.am:
+	* src/report/report-system/html-utilities.scm:
+	* src/report/report-system/report-system.scm:
+	* src/report/standard-reports/Makefile.am:
+	* src/report/standard-reports/standard-reports.scm: Files that are
+	changed somewhat with the addition of Chris Shoemaker's budgeting
+	functionality rewrite.  A changed include file here, a single
+	function there, etc. etc.
+
+	* src/backend/file/gnc-budget-xml-v2.c:
+	* src/backend/file/gnc-recurrence-xml-v2.c:
+	* src/gnome/gnc-plugin-budget.[ch]:
+	* src/gnome/gnc-plugin-page-budget.[ch]:
+	* src/gnome/gncmod-budget.c:
+	* src/gnome/ui/gnc-plugin-budget-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-budget-ui.xml:
+	* src/gnome-utils/gnc-dialog.[ch]:
+	* src/gnome-utils/gnc-recurrence.[ch]:
+	* src/gnome-utils/gnc-tree-model-budget.[ch]:
+	* src/gnome-utils/test/test-gnc-dialog.c:
+	* src/gnome-utils/test/test-gnc-recurrence.c:
+	* src/report/standard-reports/budget.scm: New files for Chris
+	Shoemaker's rewrite of budgeting functionality.
+	
+	* src/business/business-gnome/glade/businessprefs.glade:
+	* src/gnome/glade/sched-xact.glade:
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/preferences.glade:
+	* src/import-export/generic-import.glade:
+	* src/import-export/hbci/glade/hbciprefs.glade: Fix items from
+	Volker Englisch's review of the preferences dialog.
+
+	* configure.in: Temporarily revert to the old-school way of
+	defining the PACKAGE variable.
+
+	* macros/autogen.sh: Tweak so that autoconf still gets run.
+
+2005-10-26  Christian Stimming  <stimming at tuhh.de>
+
+	* configure.in: Compose the version string again from several
+	shell variables. Makes life much easier for anyone, including
+	potential automated tarball builds. Slight updates in the build
+	system.
+
+2005-10-26  David Hampton  <hampton at employees.org>
+
+	* src/scm/main.scm: Update previous version to 1.8.12.
+
+	* lib/goffice/cut-n-paste/pcre/pcre.c:
+	* src/gnome-utils/gnc-date-edit.c: Add extra initialization to fix
+	compilation errors on some gcc4 systems.
+
+	* src/bin/update-gnucash-gconf.in:
+	* src/gnome-utils/druid-gconf-setup.c:
+	* src/gnome-utils/druid-gconf-setup.glade: Fix items from Volker
+	Englisch's review of the setup druid.  The initial window now sets
+	the "Setup" button as the default button.  Update the druid to fix
+	problems with the tab focus.  Add some clarifying text on how to
+	restart gconf.  Update the script to restart gconf for the user.
+
+2005-10-25  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/gnc-plugin-business.c:
+	* src/gnome/dialog-chart-export.c:
+	* src/gnome-utils/gnc-file.[ch]:
+	* src/import-export/log-replay/gnc-log-replay.c:
+	* src/import-export/mt940/gnc-mt940-import.c:
+	* src/import-export/ofx/gnc-ofx-import.c:
+	* src/import-export/qif-import/druid-qif-import.c:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Update file
+	selection boxes to use a GtkFileChooserDialog.  Reinstate file
+	filtering in the dialog.  Patch from Arnout 'raboof' Engelen
+	<gnomebugzilla at bzzt.net>.  #116205
+
+2005-10-24  David Hampton  <hampton at employees.org>
+
+	* src/engine/Makefile.am:
+	* src/engine/Recurrence.[ch]:
+	* src/engine/test/Makefile.am:
+	* src/engine/test/test-recurrence.c: Chris Shoemaker's patch to
+	add a "Recurrence" data type to the engine.  This should
+	eventually subsume the FreqSpec data type.
+
+	* src/business/business-gnome/gnc-plugin-page-invoice.c:
+	* src/business/business-gnome/ui/gnc-plugin-page-invoice-ui.xml:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome-utils/gnc-main-window.[ch]:
+	* src/gnome-utils/gnc-plugin-page.[ch]:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml:
+	* src/report/report-gnome/gnc-plugin-page-report-ui.xml:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Factor out
+	common code for handling menus, popup menus, and the toolbar and
+	move the code to the shared base class.  Rework the private data
+	structure in gnc-plugin-page.c.
+
+2005-10-23  David Hampton  <hampton at employees.org>
+
+	* Makefile.TAGS:
+	* Makefile.am: Chris Shoemaker's enhancements to tags generation.
+
+	* src/gnome-utils/dialog-options.c: Disable the "OK" and "Apply"
+	buttons before calling the apply function.  Makes the UI appear
+	more responsive and prevents a crash if the user clicks Apply then
+	OK quickly. (#319546) Patch from Arnout 'raboof' Engelen
+	<gnomebugzilla at bzzt.net>.
+	
+	* src/register/register-gnome/gnucash-sheet.c: Patch from Scott
+	Oonk to re-enable mouse scrolling in the account register.
+
+	* src/gnome-utils/dialog-options.c: Patch from Scott Oonk to fix
+	an invalid cast warning when selecting an account in the accounts
+	tab of the options dialog.
+	
+2005-10-21  Neil Williams <linux at codehelp.co.uk>
+
+	* src/engine/Makefile.am :
+	* src/engine/gncla-dir.h.in : Use ${libdir} instead
+	of $GNC_LIBDIR to work without opt-style-install.
+
+2005-10-20  Neil Williams <linux at codehelp.co.uk>
+
+	* configure.in: Allow GnuCash to use QOF externally,
+	where available, otherwise use internal QOF.
+	* src/app-utils/gnc-ui-util.c : Didier Vital's patch to
+	solve pango warnings with non UTF-8 locales.
+	
+	Replace private headers with new API functions.
+	* src/backend/postgres/PostgresBackend.h : 
+	* src/backend/postgres/account.c : 
+	* src/backend/postgres/book.c : 
+	* src/backend/postgres/events.c : 
+	* src/backend/postgres/gncquery.c : 
+	* src/backend/postgres/price.c: 
+	* src/backend/postgres/putil.h: 
+	* src/backend/postgres/table.m4 : 
+	* src/backend/postgres/txnmass.c : 
+	* src/engine/engine-helpers.c : 
+	* src/engine/qofbackend-p.h: 
+	* src/engine/qofbook.c: 
+
+	* src/engine/.cvsignore : New file.
+	* src/engine/gncla-dir.h.in: 
+
+	Maintaining backwards compatibility.
+	* src/engine/gnc-engine-util.c: 
+	* src/engine/gnc-engine-util.h: 
+
+	New home for functions that do not belong in QOF.
+	* src/engine/gnc-engine.c : 
+	* src/engine/gnc-engine.h : 
+
+	Conditional QOF build.
+	* src/app-utils/Makefile.am:
+	* src/app-utils/test/Makefile.am :
+	* src/backend/Makefile.am : 
+	* src/backend/file/Makefile.am: 
+	* src/backend/file/test/Makefile.am: 
+	* src/backend/postgres/Makefile.am : 
+	* src/backend/postgres/test/Makefile.am  : 
+	* src/business/business-core/Makefile.am : 
+	* src/business/business-core/file/Makefile.am : 
+	* src/business/business-core/test/Makefile.am : 
+	* src/business/business-gnome/Makefile.am : 
+	* src/business/business-ledger/Makefile.am : 
+	* src/business/business-utils/Makefile.am : 
+	* src/business/dialog-tax-table/Makefile.am: 
+	* src/calculation/Makefile.am : 
+	* src/calculation/expression_parser.c : 
+	* src/calculation/test/Makefile.am : 
+	* src/engine/Makefile.am : 
+	* src/engine/test-core/Makefile.am : 
+	* src/engine/test/Makefile.am : 
+	* src/engine/test/test-book-merge.c: 
+	* src/gnome-search/Makefile.am: 
+	* src/gnome-utils/Makefile.am : 
+	* src/gnome/Makefile.am : 
+	* src/import-export/Makefile.am : 
+	* src/import-export/binary-import/Makefile.am : 
+	* src/import-export/log-replay/Makefile.am : 
+	* src/import-export/qif-import/Makefile.am : 
+	* src/import-export/qif/Makefile.am: 
+	* src/import-export/qif/test/Makefile.am : 
+	* src/import-export/test/Makefile.am : 
+	* src/network-utils/Makefile.am : 
+	* src/register/ledger-core/Makefile.am: 
+	* src/register/register-core/Makefile.am : 
+	* src/register/register-gnome/Makefile.am : 
+	* src/report/report-gnome/Makefile.am : 
+	* src/report/stylesheets/Makefile.am : 
+
+	* src/engine/test/test-book-merge.c: QOF sync.
+
+2005-10-17  Derek Atkins  <derek at ihtfp.com>
+
+	* src/bin/gnc-generate-script: revert Neils utf-8 change.
+	  Gnucash should accept and use non-utf8 locales, and
+	  instead use g_locale_to_utf8() to convert locale-specific
+	  strings to utf8 (e.g. currency symbol).
+
+2005-10-16  David Hampton  <hampton at employees.org>
+
+	* configure.in: Remove debug message.
+
+	* src/report/report-system/html-style-sheet.scm: Need to truncate
+	the file on write, now that stylesheets have their own file.
+
+2005-10-16  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/import-backend.c: Improve speed of general
+	importer.
+
+2005-10-16  Neil Williams <linux at codehelp.co.uk>
+
+	* src/bin/generate-gnc-script: Reversing Didier Vidal's
+	1.8 patch to require and use UTF-8 if not found in the X locale.
+
+2005-10-16  Neil Williams <linux at codehelp.co.uk>
+
+	* README.dependencies: Fix Debian listing - unstable.
+	* src/business/business-core/file/gncmod-business-backend-file.c:
+	Remove call to non-existent backend-file gnc-module.
+	* src/engine/cashobjects.c: New objects.
+	* src/engine/cashobjects.h: Unused code removed.
+	* src/engine/gnc-engine.c: Initialising the backend GModules
+	as part of the engine. Allow for checking if the engine is 
+	initialised OK. (retain en_us spelling).
+	* src/engine/gnc-engine.h: Check engine initialised.
+	* src/engine/gnc-lot-p.h: Make register func return boolean
+	* src/engine/gnc-lot.c: Provide a fuller object description -
+	still commented out for now.
+
+2005-10-16  Christian Stimming  <stimming at tuhh.de>
+
+	* src/backend/file/io-gncxml-v2.c: Fix accessing a gnc_commodity
+	after it has been destroyed - xaccTransSetCurrency requires the
+	original currency still to exist.
+
+	* src/import-export/import-backend.c: Woohoo! Tracked down and
+	fixed a nasty double-free error when the importer reconciled
+	existing transactions.
+
+2005-10-14  David Hampton  <hampton at employees.org>
+
+	* src/register/register-gnome/gnucash-item-edit.c: Didier Vidal's
+	patch to restore horizontal scrolling in the editable cells of the
+	register if the content is too wide. It also maintains the cell
+	alignment when you switch to edit mode.
+
+	* src/report/report-system/html-acct-table.scm: Patch from Chris
+	Shoemaker to fix one use of price source where exchange-fn was
+	needed.  Added lots of comments, clarify some explanations,
+	documented some bugs.
+
+	* configure.in: Check for libgtkhtml 3.8.  Life would be so much
+	easier if the gtkhtml developers would fix stop renaming their
+	pkg-config script with every release.
+
+	* src/gnome-utils/gnc-tree-model-account-types.[ch]: File rewrite
+	from Chris Shoemaker.  Adds an API for accessing a static shared
+	program-wide account-type tree model for simple tree usage.  Adds
+	convenience functions for mapping between the selection state of a
+	treeview using the static account-type tree model and a
+	account-type selection bitfield.
+
+	* src/engine/FreqSpec.c: Line wrapping fixes from Chris Shoemaker.
+	
+	* src/engine/test/test-freq-spec.c: Patch from Chris Shoemaker to
+	add a new negative test case.
+
+	* src/app-utils/gnc-component-manager.c:
+	* src/business/business-core/gncAddress.c:
+	* src/business/business-core/gncBillTerm.c:
+	* src/business/business-core/gncCustomer.c:
+	* src/business/business-core/gncEmployee.c:
+	* src/business/business-core/gncEntry.c:
+	* src/business/business-core/gncInvoice.c:
+	* src/business/business-core/gncJob.c:
+	* src/business/business-core/gncOrder.c:
+	* src/business/business-core/gncTaxTable.c:
+	* src/business/business-core/gncVendor.c:
+	* src/business/business-core/test/test-customer.c:
+	* src/business/business-core/test/test-employee.c:
+	* src/business/business-core/test/test-job.c:
+	* src/business/business-core/test/test-vendor.c:
+	* src/engine/Transaction.c:
+	* src/engine/gnc-commodity.c:
+	* src/engine/gnc-engine.c:
+	* src/engine/gnc-pricedb.c:
+	* src/engine/kvp_frame.c:
+	* src/engine/qofid.c:
+	* src/engine/qofquery-deserial.c:
+	* src/engine/test/test-commodities.c:
+	* src/gnome-utils/QuickFill.c: Patch from Chris Shoemaker to
+	convert all the string cache users to use the public access
+	functions.  Consolidate all the CACHE_INSERT and CACHE_REMOVE
+	macros into one place.
+
+	* src/engine/gnc-engine-util.[ch]: Patch from Chris Shoemaker to
+	privatize the gnucash string cache code and force all usage
+	through gnc_string_cache_{remove,insert}() functions.  This makes
+	debugging various uses (and misuses) of the cache easier.
+
+	* src/engine/qofquery-deserial.c: Patch from Chris Shoemaker to
+	annotate a possible bug.
+
+	* src/report/report-system/commodity-utilities.scm: Patch from
+	Chris Shoemaker to change the collector handling of invalid
+	exchange functions.  Add a warning about dangerous usage of
+	gnc:exchange-if-same.
+
+	* src/backend/postgres/PostgresBackend.c:
+	* src/backend/postgres/checkpoint.c:
+	* src/backend/postgres/events.c:
+	* src/business/business-core/file/gnc-bill-term-xml-v2.c:
+	* src/business/business-core/file/gnc-tax-table-xml-v2.c:
+	* src/engine/Scrub.c:
+	* src/engine/gnc-hooks.c:
+	* src/import-export/import-backend.c:Patch from Chris Shoemaker to
+	add the missing semicolon to the end of some trace invocations to
+	make them look like normal C code.
+
+	* src/engine/gnc-trace.h: Patch from Chris Shoemaker to swallow
+	the semicolon on the end of the tracing macros.
+
+	* GNOME2_STATUS:
+	* HACKING:
+	* src/app-utils/config-var.scm:
+	* src/app-utils/gnc-component-manager.h:
+	* src/backend/file/gnc-schedxaction-xml-v2.c:
+	* src/backend/postgres/gncquery.c:
+	* src/business/business-utils/business-options.scm:
+	* src/doc/multicurrency-discussion.txt:
+	* src/engine/Query.h:
+	* src/engine/SX-book.c:
+	* src/engine/SchedXaction.c:
+	* src/engine/TransactionP.h:
+	* src/engine/gnc-numeric.h:
+	* src/engine/guid.c:
+	* src/engine/qofbook.h:
+	* src/engine/qofclass.c:
+	* src/engine/qofclass.h:
+	* src/engine/qofquery.c:
+	* src/engine/qofquery.h:
+	* src/engine/qofsession.c:
+	* src/experimental/cgi-bin/gnc-server.c:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome-utils/dialog-utils.c:
+	* src/gnome-utils/gnc-amount-edit.c:
+	* src/gnome-utils/gnc-amount-edit.h:
+	* src/gnome-utils/gnc-date-format.c:
+	* src/gnome-utils/gnc-plugin-manager.h:
+	* src/gnome-utils/gnc-plugin.h:
+	* src/gnome-utils/gnc-tree-model-account.c:
+	* src/gnome-utils/gnc-tree-model.c:
+	* src/report/report-gnome/gw-report-gnome-spec.scm:
+	* src/report/report-gnome/report-gnome.scm:
+	* src/report/report-system/html-document.scm:
+	* src/report/report-system/html-table.scm:
+	* src/report/report-system/report-utilities.scm:
+	* src/report/report-system/report.scm: Patch from Chris Shoemaker
+	to make various spelling corrections and a couple of line wrap
+	fixes.  Adds comments to mark thread unsafe code.  Adds various
+	other documentation.
+
+	* src/doc/design/engine.texinfo: Patch from Chris Shoemaker to
+	silence a texinfo warning.
+
+2005-10-13  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/gnc-euro.c:
+	* src/app-utils/gnc-ui-util.h:
+	* src/gnome-utils/dialog-commodity.h:
+	* src/gnome-utils/gnc-currency-edit.c: Patch from Chris Shoemaker
+	to remove unneeded header files. Add a few comments.
+	
+	* src/backend/file/gnc-account-xml-v2.c:
+	* src/engine/qofbook.c:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Minor code
+	simplification from Chris Shoemaker.  Some line wrap fixes and
+	comments.
+
+	* src/gnc-module/gnc-module.c: Minor code factoring patch from
+	Chris Shoemaker.
+
+	* src/gnome-utils/gnc-main-window.c: Patch from Chris Shoemaker to
+	avoid trying to double-add plugins to plugin manager by delaying
+	signal connection until the plugins are already managed by the
+	plugin manager.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Patch from Chris
+	Shoemaker to convert gnc-tree-view-account to a GObject base
+	instead of a GtkObject base. Also contains some line wrapping
+	fixes.
+
+2005-10-13  Derek Atkins  <derek at ihtfp.com>
+
+	* src/lib/glib26/Makefile.am:
+	  fix to properly include sources in the DIST.
+
+	* macros/autogen.sh: Revert the change that ignores libtool.
+	  we still need to check for libtool.
+
+2005-10-13  Neil Williams <linux at codehelp.co.uk>
+
+	* macros/autogen.sh: Mac OSX fix.
+	* src/business/business-core/gncBusPeriod.c: typos.
+
+	Removing non-portable -module setting - Mac OSX fix.
+	* src/app-utils/Makefile.am:
+	* src/business/business-core/Makefile.am:
+	* src/business/business-gnome/Makefile.am
+	* src/business/business-ledger/Makefile.am 
+	* src/business/business-utils/Makefile.am
+	* src/business/dialog-tax-table/Makefile.am
+	* src/calculation/Makefile.am 
+	* src/core-utils/Makefile.am 
+	* src/engine/Makefile.am 
+	* src/engine/test/Makefile.am 
+	* src/gnc-module/Makefile.am 
+	* src/gnc-module/test/misc-mods/Makefile.am 
+	* src/gnc-module/test/mod-bar/Makefile.am 
+	* src/gnc-module/test/mod-baz/Makefile.am
+	* src/gnc-module/test/mod-foo/Makefile.am
+	* src/gnome-search/Makefile.am 
+	* src/gnome-utils/Makefile.am 
+	* src/gnome/Makefile.am 
+	* src/import-export/Makefile.am 
+	* src/import-export/binary-import/Makefile.am
+	* src/import-export/hbci/Makefile.am 
+	* src/import-export/log-replay/Makefile.am 
+	* src/import-export/mt940/Makefile.am 
+	* src/import-export/ofx/Makefile.am 
+	* src/import-export/qif-import/Makefile.am 
+	* src/import-export/qif-io-core/Makefile.am 
+	* src/import-export/qif/Makefile.am 
+	* src/network-utils/Makefile.am 
+	* src/register/ledger-core/Makefile.am 
+	* src/register/register-core/Makefile.am 
+	* src/register/register-gnome/Makefile.am 
+	* src/register/register-gnome/test/Makefile.am 
+	* src/report/locale-specific/us/Makefile.am 
+	* src/report/report-gnome/Makefile.am 
+	* src/report/report-gnome/window-report.c 
+	* src/report/report-system/Makefile.am 
+	* src/report/standard-reports/Makefile.am 
+	* src/tax/us/Makefile.am: 
+
+2005-10-13  David Hampton  <hampton at employees.org>
+
+	* src/business/business-core/gncBusPeriod.c: Patch from Chris
+	Shoemaker to prevents gettext from finding unintentional strings
+	in an undeclared comment block.
+
+2005-10-13  Neil Williams <linux at codehelp.co.uk>
+
+	* GNOME2_STATUS: Remove qof_begin_edit note (fixed)
+	Make a note of remaining pricedb issue.
+	* configure.in: Fix conditional external GOffice build.
+	* lib/Makefile.am: Conditional goffice.
+	* po/POTFILES.in: Remove files removed from CVS.
+	* src/backend/file/Makefile.am: Convert to a GModule.
+	* src/backend/file/gnc-backend-file.c: Remove QSF code.
+	* src/backend/file/test/.cvsignore: new file
+	* src/backend/file/test/Makefile.am: Cannot link against
+	the new loadable GModule, list the sources individually.
+	* src/backend/file/test/test-dom-converters1.c: fix test.
+
+	Update test data files to use G2 XML syntax.
+	* src/backend/file/test/test-files/xml2/Money95bank_fr.gml2
+	* src/backend/file/test/test-files/xml2/Money95invst.gml2
+	* src/backend/file/test/test-files/xml2/Money95mutual.gml2
+	* src/backend/file/test/test-files/xml2/Money95stocks.gml2
+	* src/backend/file/test/test-files/xml2/abc.gml2
+	* src/backend/file/test/test-files/xml2/abcall.gml2
+	* src/backend/file/test/test-files/xml2/carols-data-file.gml2
+	* src/backend/file/test/test-files/xml2/cbb-export.gml2
+	* src/backend/file/test/test-files/xml2/conrads-file.gml2
+	* src/backend/file/test/test-files/xml2/every.gml2
+	* src/backend/file/test/test-files/xml2/goonies-file.gml2
+	* src/backend/file/test/test-files/xml2/hierachical-data-file.gml2
+	* src/backend/file/test/test-files/xml2/ms-money.gml2
+	* src/backend/file/test/test-files/xml2/pricedb1.gml2
+
+	* src/backend/file/test/test-load-backend.c: Test the new GModule.
+	* src/backend/file/test/test-load-xml2.c: Load the new GModule and
+	correct the book test. (backend/file tests can no longer use Guile)
+	* src/backend/file/test/test-string-converters.c: QOF header changes
+	* src/backend/file/test/test-xml-account.c: Remove guile and fix test.
+	* src/backend/file/test/test-xml-pricedb.c: Fixed test. (problem was
+	in test-engine-stuff.c
+	* src/backend/file/test/test-xml-transaction.c: Remove guile and fix
+	test.
+	* src/backend/postgres/Makefile.am: Make into a GModule.
+	* src/backend/postgres/PostgresBackend.c: GModule (Other changes
+	will follow).
+	* src/backend/postgres/PostgresBackend.h: GModule
+	* src/backend/postgres/kvp-sql.c: typo
+	* src/backend/postgres/test/.cvsignore: new file.
+	* src/backend/postgres/test/Makefile.am: GModule changes, as with
+	backend/file - no guile and no linking against the GModule.
+	* src/backend/postgres/test/test-db.c: GModule and remove private 
+	QOF headers.
+	* src/backend/postgres/test/test-load-backend.c: GModule test.
+	* src/backend/postgres/test/test-period.c: Convert to GModule.
+	* src/backend/qsf/Makefile.am: GModule.
+	* src/backend/qsf/qsf-backend.c: QOF Sync
+	* src/backend/qsf/qsf-xml.c: QOF sync
+	* src/bin/test/test-version: fix test
+	* src/business/business-core/test/Makefile.am: GModule changes
+	* src/engine/Account.c: qof_begin_edit change
+	* src/engine/Makefile.am: qofsql.h is not a distributed header - 
+	GnuCash does not yet use SQL with QOF.
+	* src/engine/Period.h: Doxygen tweak.
+	* src/engine/Transaction.c: qof_begin_edit changes.
+	* src/engine/gnc-engine.c: Load the two default GModules.
+	* src/engine/gnc-pricedb.c: Pair up the ENTER and LEAVE calls.
+	* src/engine/gnc-trace.c: QOF sync.
+	* src/engine/gnc-trace.h: QOF Sync
+	* src/engine/qof-be-utils.h: qof_begin_edit changes.
+	* src/engine/qof.h: Locate the GModules.
+	* src/engine/qofbackend.c: Full use of GModule support.
+	* src/engine/qofsession.c: Remove gnc-module methods for backends.
+	* src/engine/test-core/test-engine-stuff.c: Splits outside
+	transactions where causing some tests to fail, also errors are now
+	reported back.
+	* src/engine/test-core/test-engine-stuff.h: Fix declarations.
+	* src/engine/test/test-split-vs-account.c: test fix.
+	* src/gnome-utils/Makefile.am: GOffice conditional build.
+	* src/gnome-utils/gnc-html-graph-gog.c:  GOffice conditional build.
+	* src/gnome-utils/gnc-plugin.c: GOffice conditional build.
+	* src/gnome/Makefile.am: GModule changes - cannot link against the
+	GModule.
+	* src/gnome/dialog-chart-export.c: Fix QOF headers.
+	* src/import-export/qif-import/test/Makefile.am: fix test.
+
+2005-10-13  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/gnc-ui-util.c:
+	* src/backend/file/io-example-account.c:
+	* src/backend/file/io-gncxml-v2.c:
+	* src/engine/Account.[ch]: Patch from Chris Shoemaker to add a
+	sprinkling of 'const' keywords to Account accessor function
+	arguments.
+
+	* src/valgrind-gdk.supp:
+	* src/valgrind-gnucash.supp:
+	* src/valgrind-x11.supp: Patch from Chris Shoemaker to add some
+	additional suppressions when invoking gnucash via valgrind.
+
+	* Makefile.TAGS: Patch from Chris Shoemaker to exclude emacs
+	temporary files from etags table.
+
+	* src/app-utils/gnc-ui-util.c:
+	* src/business/business-core/gncAddress.c:
+	* src/business/business-core/gncCustomer.c:
+	* src/business/business-core/gncEmployee.c:
+	* src/business/business-core/gncEntry.c:
+	* src/business/business-core/gncJob.c:
+	* src/business/business-core/gncOrder.c:
+	* src/business/business-core/gncVendor.c:
+	* src/engine/Account.c:
+	* src/engine/Transaction.c:
+	* src/register/register-gnome/gnucash-grid.c:
+	* src/register/register-gnome/gnucash-sheet.c: Patch from Chris
+	Shoemaker to remove the G_INLINE_FUNC macro from various function
+	definitions.  Fixes undefined symbol errors preventing him from
+	linking the program.
+
+2005-10-12  David Hampton  <hampton at employees.org>
+
+	* Makefile.am:
+	* configure.in:
+	* make-gnucash-potfiles.in:
+	* doc/Makefile.am:
+	* lib/goffice/Makefile.am:
+	* lib/goffice/split/Makefile.am:
+	* macros/autogen.sh:
+	* po/ChangeLog:
+	* src/Makefile.am:
+	* src/backend/Makefile.am:
+	* src/bin/Makefile.am:
+	* src/business/business-core/file/Makefile.am:
+	* src/business/business-gnome/Makefile.am:
+	* src/business/business-gnome/schemas/Makefile.am:
+	* src/doc/Makefile.am:
+	* src/engine/Makefile.am:
+	* src/gnome/Makefile.am:
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome-utils/schemas/Makefile.am:
+	* src/import-export/Makefile.am:
+	* src/import-export/hbci/schemas/Makefile.am:
+	* src/import-export/log-replay/Makefile.am:
+	* src/import-export/schemas/Makefile.am:
+	* src/report/stylesheets/Makefile.am: Chris Shoemaker's changes to
+	make 'make dist' work again.
+
+2005-10-12  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome-utils/gnc-html-graph-gog.c: Cleanups and finishing:
+	get bar-chart data correctly hooked up; get scatter-plot hooked
+	up.  Generally refactor code for clarity.
+
+2005-10-12  David Hampton  <hampton at employees.org>
+
+	* configure.in: Remove the stdc++ link requirement from the OFX
+	test.  Add the -Wno-pointer-sign flag when using GCC4.  With this
+	flag all of gnucash can be compiled with GCC4. (Without it
+	lib/goffice fails.)
+
+2005-10-10  Christian Stimming  <stimming at tuhh.de>
+
+	* src/register/register-gnome/gnucash-grid.c: Patch by Didier
+	Vidal: Implement real right justify in the register.
+
+2005-10-09  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/hbci-interaction.c: Further gnome2
+	porting of dialogs.
+
+2005-10-08  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/Makefile.am:
+	* src/app-utils/app-utils.scm:
+	* src/app-utils/global-options.[ch]:
+	* src/app-utils/gw-app-utils-spec.scm:
+	* src/app-utils/prefs.scm:
+	* src/gnome-utils/dialog-options.[ch]:
+	* src/scm/main.scm: Remove unused global options code.  Global
+	options are now all stored in gconf.
+
+	* numerous: Remove include of global-options.h.
+
+	* src/register/ledger-core/split-register-control.c:
+	* src/register/ledger-core/split-register-load.c:
+	* src/register/ledger-core/split-register-model.c:
+	* src/register/ledger-core/split-register-util.c:
+	* src/register/ledger-core/split-register.c: Remove unneeded
+	include files.  Call function with their current name, not the
+	backward compatibility name.
+
+	* src/app-utils/global-options.[ch]:
+	* src/app-utils/gnc-ui-util.[ch]: Migrate a couple of functions
+	from one global-options to gnc-ui-utils.
+	
+	* src/gnome/window-reconcile.c: Track changes to user's toolbar
+	style preference using the new gconf method.
+
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome-utils/dialog-utils.c:
+	* src/gnome-utils/gnc-main-window.c: Share a couple of gconf key
+	names between files.
+	
+	* src/register/register-gnome/table-gnome.c: Use new gconf key to
+	decide whether to save the column sizings.
+	
+	*src/gnome/window-main-summarybar.c: Remove obsolete code for
+	catching (scheme) option changes.  This file already has support
+	for catching gconf option changes.
+
+	* src/gnome/gnc-split-reg.[ch]: Split register no longer contains
+	the menus/toolbar/etc support so no need to track changes to the
+	toolbar settings.
+
+	* src/backend/file/io-gncxml-v2.c: Remove unused code fragment.
+	
+	* src/gnome-utils/gnc-main-window.c: Don't let the window manager
+	delete the last window.  Instead queue a shutdown call.
+
+2005-10-08  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/register/ledger-core/dialog-dup-trans.c
+	(gnc_dup_trans_dialog): Cleanup the window after dialog returns.
+	(gnc_dup_trans_dialog_create): attach to existing signals; re-implement
+	spinbutton behavior workaround.
+
+2005-10-08  Joshua Sled  <jsled at asynchronous.org>
+
+	* goffice.c (libgoffice_init): fully initialize so plugins get
+	loaded at init-time, and thus displayed at run-time. :p
+	Other goffice/html/graphing code cleanups.
+
+2005-10-08  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_destroy_widget): remove the report when
+	the page is destroyed so the report will be removed, &c. 
+	(gnc_plugin_page_report_setup): gnc:report-set-needs-save?! on
+	report setup to indicate that the report needs to be written out
+	at book-state-save time.
+
+2005-10-08  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/ofx/gnc-ofx-import.c: Fix errornerous
+	double-free at OFX import.
+
+2005-10-07  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/register/register-gnome/gnucash-item-list.c
+	(tree_view_selection_changed): Condition handling; avoid a set of
+	setfaults in use of the auto-complete.
+
+2005-10-07  Joshua Sled  <jsled at asynchronous.org>
+
+	Patch from Chris Shoemaker <c.shoemaker at cox.net>:
+	* src/engine/Account.[ch]: Refactoring of
+	account-*-balance(as-of-date) code.
+	* src/engine/Account.[ch], src/engine/Group.[ch]:
+	Tyop/misspelling correction, formatting cleanup, notes and
+	comments.
+
+2005-10-07  David Hampton  <hampton at employees.org>
+
+	* src/report/report-system/html-style-sheet.scm:
+	* src/scm/main.scm:
+	* src/scm/path.scm: Put the saved stylesheets into their own file
+	in the .gnucash directory.
+
+	* src/app-utils/Makefile.am:
+	* src/app-utils/gnc-exp-parser.c: Convert the expression parser
+	over from saving persistent data as a scheme fragments to saving
+	it in a glib key/value file.
+	
+	* src/core-utils/Makefile.am:
+	* src/core-utils/gnc-gkeyfile-utils.[ch]: Add some helper
+	functions for reading/writing glib key/value data structures.
+
+	* configure.in:
+	* lib/Makefile.am:
+	* lib/glib26: Add glib key-value support for systems running
+	glib24.
+
+2005-10-07  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/register/register-gnome/gnucash-sheet.c
+	(GTK_ALLOWED_SELECTION_WITHIN_INSERT_SIGNAL): Use
+	autocompletion-selection workaround for	gtk 2.(<6).*
+
+2005-10-07  Joshua Sled  <jsled at asynchronous.org>
+
+	Patch from Edward J. Huff <ejhuff at huff20may77.us>:
+	* src/report/standard-reports/transaction.scm: 
+	* src/app-utils/date-utilities.scm: 
+	* src/app-utils/app-utils.scm: 
+	Add "Quarterly" option to transaction report. Add support
+	functions to app-utils.scm and date-utilities.scm to support
+	finding the quarter of a given date, and to format it as Q1, Q2,
+	Q3, or Q4.  Fix a bug in the as-yet-unused function
+	gnc:timepair-get-month-day.  Make use of the existing support
+	functions instead of re-inventing them in transaction.scm.
+	Move all uses of strftime from transaction.scm to
+	date-utilities.scm. 
+
+2005-10-07  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/dialog-options.c: Convert the multiple choice
+	option from using the deprecated GtkOptionMenu widget to using a
+	GtkComboBox widget.  Fix some warnings when using a currency
+	option.  Make the account list option expand to fill available
+	space.
+
+	* src/app-utils/option-util.c: Correctly convert a scheme string
+	to a C string.
+
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/preferences.glade: Rename preference dialog
+	windows.
+	
+2005-10-06  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-main-window.c: Make the gtk notebook pages
+	scrollable, and enable right-click menu selection of pages.
+
+	* configure.in:
+	* graph/plugins/plot_radar/gog-radar.c: Conditionally compile the
+	fmin() function.
+
+2005-10-06  Joshua Sled  <jsled at asynchronous.org>
+
+	Patch from Didier Vidal <didier-devel at 9online.fr>:
+	* src/register/register-gnome/gnucash-sheet.c
+	(compute_optimal_width): Fix to allow register resize.
+
+2005-10-03  David Hampton  <hampton at employees.org>
+
+	* src/gnome/top-level.c: Remove duplicate function.
+
+	* src/gnome-utils/dialog-utils.[ch]: Pull the local
+	gtk_window_present() function and use the one in gtk2.
+
+2005-10-02  David Hampton  <hampton at employees.org>
+
+	* src/import-export/import-backend.c:
+	* src/import-export/import-settings.c:
+	* src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas:
+	Add the 'bayesian matching' preference that was hidden in the
+	code.
+
+	* src/import-export/generic-import.glade: Forgot to name the
+	widgets properly so that the preferences dialog would time them in
+	with their gconf settings.  Add the 'bayesian matching'
+	preference.
+
+	* src/app-utils/prefs.scm: Remove unreferenced "Fancy Date Format"
+	option.
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-network.[ch]:
+	* src/gnome/top-level.c:
+	* src/gnome-utils/gnc-html.[ch]:
+	* src/gnome-utils/gw-gnome-utils-spec.scm: Finish pulling all
+	references to the old "gnucash network" code.
+
+	* src/engine/Transaction.c: Temporary fix to remove ISO C90
+	warning.  Real fix should occur when converted back to
+	qof_begin_edit function.
+
+2005-10-02  Joshua Sled  <jsled at asynchronous.org>
+
+	Patches from Didier Vidal <didier-devel at 9online.fr>:
+	
+	* src/register/register-gnome/gnucash-item-edit.c: Fixes to show
+	pango cursor in register edit cells.
+	* src/engine/Transaction.c (xaccTransBeginEdit): runtime crash
+	when committing partially-editing transaction.
+	
+
+2005-10-02  Joshua Sled  <jsled at asynchronous.org>
+
+	* GNOME2_STATUS: updates for status
+
+	* src/register/register-gnome/gnucash-item-list.c
+	(gnc_item_list_select): re-implement to get register combocells
+	working better.
+
+2005-10-02  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/window-main-summarybar.c:
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome/schemas/apps_gnucash_window_pages_account_tree.schemas:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/preferences.glade:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Convert the account
+	tree summary bar over to using GConf preferences.
+
+	* src/gnome-utils/dialog-preferences.[ch]: Add support for a
+	GncDateEdit widget and the new GncPeriodSelect widget.
+
+	* src/app-utils/Makefile.am:
+	* src/app-utils/gnc-accounting-period.[ch]:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-period-select.[ch]: Add a selection widget
+	and non-gui supporting functions for choosing accounting periods.
+
+	* src/engine/Account.c: Revert change to xaccAccountCommitEdit()
+	that causes gnucash to crash at exit.
+	
+2005-10-01  David Hampton  <hampton at employees.org>
+
+	* src/backend/postgres/*:
+	* src/engine/gnc-trace.h:
+	* src/gnome-utils/gnc-html-graph-gog.c:
+	* src/gnome-utils/gnc-plugin.c:
+	* src/import-export/hbci/gnc-plugin-hbci.c: Fix compilation
+	breakage.
+
+2005-10-01  Neil Williams <linux at codehelp.co.uk>
+
+	* configure.in: Detect GCC 4.0 or later and add
+	-Wdeclaration-after-statement
+	* src/backend/file/gnc-backend-file.c: CashUtil sync.
+	remove ifdefs, move one declaration (spotted using the
+	change in configure.in) and remove reference to XML file.
+	* src/backend/qsf/qsf-backend.c: Add QofBackendOption 
+	to compress QSF files via libxml2. Also fix QSF XML output
+	to always specify UTF-8.
+	* src/business/business-core/gncAddress.c: Fix ability to
+	cast from QofEntity to gncAddress and vice-versa.
+	* src/engine/Account.c: Fix test-lots and test-period,
+	trace subsystem changes and qof.h fixes.
+	* src/engine/Period.c: Fix test-period, include
+	trace subsystem changes and qof.h fixes.
+	* src/engine/cap-gains.c: Fix curious translation bug
+	from cashutil. Fix trace subsystem changes and qof.h
+	* src/engine/cashobjects.c: Cashutil sync.
+	* src/engine/gnc-engine.c: Initialise the new trace
+	subsystem on startup, shutdown logging cleanly and
+	fix qof.h headers.
+	* src/engine/gnc-engine.h: The new QofLogModule
+	identifiers for core modules. Others can be added
+	ad-hoc throughout the source tree and set to be
+	logged locally.
+	* src/engine/gnc-pricedb.c: Use public API calls
+	to remove private headers and use new trace 
+	subsystem.
+	* src/engine/gnc-trace.h
+	* src/engine/gnc-trace.c: New trace subsystem based
+	on string identifiers and accessible to all QOF
+	applications.
+	* src/engine/qofbook.h
+	* src/engine/qofbook.c: New trace subsystem, qof.h
+	fixes and test-period fixes. Balance ENTER and LEAVE
+	in log output.
+	* src/engine/qofquery.c: Balance ENTER and LEAVE.
+	* src/engine/qofsession.c: Balance ENTER and LEAVE
+	and new trace subsystem changes.
+	* src/engine/test/Makefile.am
+	* src/engine/test-core/test-engine-stuff.c: Fix
+	int-out-of-range error.
+	* src/engine/test/test-freq-spec.c: Provide feedback
+	on test progress.
+	* src/engine/test/test-lots.c: Fix segmentation fault.
+	* src/engine/test/test-period.c: Fix segmentation 
+	fault, fix headers and cashutil sync (remove guile).
+	
+
+	Remove guile - cashutil sync.
+	* src/engine/test/test-group-vs-book.c
+	* src/engine/test/test-guid.c
+	* src/engine/test/test-load-engine.c
+	* src/engine/test/test-object.c
+	* src/engine/test/test-query.c
+	* src/engine/test/test-querynew.c
+	* src/engine/test/test-resolve-file-path.c
+	* src/engine/test/test-split-vs-account.c
+	
+
+2005-10-01  Neil Williams <linux at codehelp.co.uk>
+
+	Remove references to internal QOF headers and replace 
+	with qof.h
+	* src/app-utils/gnc-helpers.c
+	* src/backend/file/gnc-freqspec-xml-v2.c
+	* src/backend/file/gnc-transaction-xml-v2.c
+	* src/backend/file/io-utils.c
+	* src/backend/file/test/test-dom-converters1.c
+	* src/backend/file/test/test-file-stuff.c
+	* src/backend/file/test/test-load-example-account.c
+	* src/business/business-core/gncAddressP.h
+	* src/business/business-core/gncBillTerm.h
+	* src/business/business-core/gncBillTermP.h
+	* src/business/business-core/gncCustomer.h
+	* src/business/business-core/gncCustomerP.h
+	* src/business/business-core/gncEmployee.h
+	* src/business/business-core/gncEntry.h
+	* src/business/business-core/gncEntryP.h
+	* src/business/business-core/gncInvoice.h
+	* src/business/business-core/gncInvoiceP.h
+	* src/business/business-core/gncJob.h
+	* src/business/business-core/gncJobP.h
+	* src/business/business-core/gncOrder.h
+	* src/business/business-core/gncOrderP.h
+	* src/business/business-core/gncOwner.c
+	* src/business/business-core/gncOwner.h
+	* src/business/business-core/gncOwnerP.h
+	* src/business/business-core/gncTaxTable.h
+	* src/business/business-core/gncTaxTableP.h
+	* src/business/business-core/gncVendor.h
+	* src/business/business-core/gncVendorP.h
+	* src/business/business-core/test/test-address.c
+	* src/business/business-core/test/test-business.c
+	* src/business/business-core/test/test-employee.c
+	* src/business/business-core/test/test-job.c
+	* src/business/business-core/test/test-vendor.c
+	* src/engine/Account.h
+	* src/engine/AccountP.h
+	* src/engine/FreqSpec.h
+	* src/engine/FreqSpecP.h
+	* src/engine/Group.h
+	* src/engine/GroupP.h
+	* src/engine/Query.h
+	* src/engine/SX-book.h
+	* src/engine/SX-ttinfo.h
+	* src/engine/SchedXaction.h
+	* src/engine/SchedXactionP.h
+	* src/engine/TransLog.c
+	* src/engine/gnc-lot-p.h
+	* src/engine/gnc-lot.h
+	* src/engine/gnc-pricedb-p.h
+	* src/engine/test/test-numeric.c
+	* src/engine/test/test-transaction-reversal.c
+	* src/engine/test/test-transaction-voiding.c
+	* src/gnome-utils/gnc-dense-cal.c
+	* src/gnome-utils/search-param.c
+	* src/register/register-gnome/gnucash-item-list.c
+	* src/register/register-gnome/gnucash-style.c
+
+	Change from short int module to QofLogModule log_module
+	and use new log_module identifiers.
+	* Various.
+
+	Adjust QOF internal headers to fix qof.h.
+	* src/backend/qsf/qsf-xml-map.c
+	* src/engine/gnc-engine-util.h
+	* src/engine/gnc-engine-util.c
+	* src/engine/qof-be-utils.h
+	* src/engine/qof.h
+	* src/engine/qof_book_merge.c:
+	
+	QOF default trace modules.
+	* src/engine/kvp_frame.h
+	* src/engine/qof_book_merge.h
+	* src/engine/qofbackend.h
+	* src/engine/qofclass.h
+	* src/engine/qofid.h
+	* src/engine/qofobject.h
+	* src/engine/qofquery.h
+	* src/engine/qofsession.h
+	
+
+2005-10-01  Neil Williams <linux at codehelp.co.uk>
+
+	Doxygen tweaks
+	* src/backend/file/gnc-backend-file.h
+	* src/business/business-core/gncAddress.h
+	* src/engine/Period.h
+	* src/engine/qofbackend-p.h
+
+2005-10-01  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/QuickFill.c: Improve quickfill behavior when
+	presenting accented characters.  Patch from Didier Vidal
+	<didier-devel at 9online.fr>.
+
+2005-09-29  David Hampton  <hampton at employees.org>
+
+	* various: Fix a bunch of warnings generated by doxygen.
+
+2005-09-26  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-plugin-page.c: Use the right data structure
+	offsets when defining signals.
+
+	* src/app-utils/gnc-helpers.[ch]:
+	* src/core-utils/Makefile.am:
+	* src/core-utils/gnc-gdate-utils.[ch]:
+	* src/engine/gnc-date.[ch]:
+	* src/gnome/druid-acct-period.c:
+	* src/gnome/druid-loan.c: Collect gdate related functions into a
+	common file.  Add a bunch of gdate modification functions.
+
+2005-09-25  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/global-options.c:
+	* src/core-utils/gnc-gconf-utils.c:
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/dialog-utils.c: Add some extra checks for null
+	strings.
+
+2005-09-24  David Hampton  <hampton at employees.org>
+
+	* src/report/standard-reports/register.scm: Update commented out
+	code to reflect the use of gconf.
+	
+	* src/app-utils/prefs.scm: Remove unused options.
+
+	* src/app-utils/global-options.c:
+	* src/app-utils/prefs.scm:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/preferences.glade: Convert the default currency
+	preferences over to gconf.
+
+	* src/app-utils/prefs.scm:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/top-level.c:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/preferences.glade: Convert the date and time
+	preferences (except 'fancy date') over to gconf.
+
+2005-09-21  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/dialog-options.c: Remove remnants of the old
+	"Advanced Preferences" page.
+	
+	* src/app-utils/prefs.scm:
+	* src/gnome/schemas/apps_gnucash_dialog_common.schemas:
+	* src/gnome-search/dialog-search.c:
+	* src/gnome-utils/preferences.glade: Convert the "search limit"
+	preference over to gconf.
+
+	* src/gnome-utils/dialog-transfer.c: Fix warning message when
+	opening reconciliation window.
+	
+	* src/gnome-utils/transfer.glade: Fix crash when clicking the "no
+	automatic transfer" button in the automatic interest transfer
+	dialog.
+
+	* doc/What_is_Euro_support:
+	* src/app-utils/prefs.scm:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/preferences.glade:
+	Convert the "EURO support" preference over to gconf.
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/reconcile-list.c:
+	* src/gnome/reconcile-list.h:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome/schemas/apps_gnucash_dialog_reconcile.schemas:
+	* src/gnome-utils/preferences.glade:
+	Convert the reconcile window preferences over to gconf.
+
+	* configure.in:
+	* src/app-utils/prefs.scm:
+	* src/import-export/Makefile.am:
+	* src/import-export/generic-import.glade:
+	* src/import-export/generic-import.scm:
+	* src/import-export/gncmod-generic-import.c:
+	* src/import-export/import-settings.c:
+	* src/import-export/qif-import/druid-qif-import.c:
+	* src/import-export/qif-import/gnc-plugin-qif-import.c:
+	* src/import-export/qif-import/qif.glade:
+	* src/import-export/schemas/.cvsignore:
+	* src/import-export/schemas/Makefile.am:
+	* src/import-export/schemas/apps_gnucash_import_generic_matcher.schemas:
+	Migrate QIF and 'Generic Matcher' preferences over to gconf.
+
+	* src/import-export/qif-import/qif.glade: Remove non-standard
+	background color declarations.
+	
+	* src/gnome-utils/dialog-preferences.c: Do a better job spacing
+	preferences pages that are merged together.
+
+	* src/import-export/qif-import/druid-qif-import.c: Remove
+	double-free of memory.  Remove access of GDK window data
+	structure.
+
+2005-09-17  David Hampton  <hampton at employees.org>
+
+	* src/gnome/dialog-price-editor.c:
+	* src/gnome-utils/gnc-currency-edit.[ch]: Convert from the
+	deprecated GtkCombo widget to a GtkComboBox widget.  Add some
+	documentation.
+
+2005-09-16  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Move the "Check &
+	Repair" menu definition to a common location.  Restore the
+	register window "Check & Repair" menu items.
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/schemas/apps_gnucash_dialog_common.schemas: Finish
+	conversion of the hidden "first startup" preference.
+
+	* src/gnome-utils/gnc-file.c:
+	* src/gnome-utils/gnc-plugin-file-history.c:
+	* src/gnome-utils/gw-gnome-utils-spec.scm: Clean up handling of
+	the return value from gnc_history_get_last().
+	
+	* src/core-utils/gnc-gconf-utils.c: Handle this undocumented case
+	where gconf_client_set_string() can return FALSE without setting
+	the error variable.  Also modify this function to return NULL if
+	gconf returns an empty string.  This is more in line with what all
+	the rest of GnuCash code expects.  Centralize error handling in
+	this file.
+
+2005-09-14  David Hampton  <hampton at employees.org>
+
+	* src/engine/gnc-date.[ch]: Fix function name.  Document
+	functions.
+
+	* src/gnome-utils/gnc-date-format.[ch]:
+	* src/gnome-utils/gnc-date-format.glade: Use a GtkComboBox in
+	place of the deprecated GtkOptionMenu.  Add a choice in the combo
+	box for the UTC time format to match the new addition to the
+	QofDateFormat enum.  Clean up the code slightly.
+
+2005-09-10  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/dialog-hbcitrans.[hc]: Add support for
+	"internal bank transfers" as supported by latest aqbanking. If
+	aqbanking >= 1.6.1 is available, it will automatically be compiled
+	in, otherwise ifdef'd out.
+
+2005-09-08  David Hampton  <hampton at employees.org>
+
+	* lib/libc/Makefile.am:
+	* lib/libc/setenv.[ch]:
+	* src/core-utils/Makefile.am:
+	* src/core-utils/core-utils.[ch]: Move the gnucash
+	gnc_setenv/gnc_unsetenv functions to the library directory and
+	rename them to setenv/unsetenv.  These functions are only compiled
+	if not provided by the system libc library.
+
+	* configure.in: Enforce check for one of setenv() or putenv()
+	during configure, not compilation.
+
+	* src/backend/file/sixtp-utils.c:
+	* src/backend/file/test/Makefile.am:
+	* src/backend/file/test/test-save-in-lang.c:
+	* src/core-utils/gw-core-utils-spec.scm:
+	* src/gnc-module/Makefile.am:
+	* src/gnc-module/gnc-module.c: Cleanup for the rename of
+	setenv/unsetenv.
+
+2005-09-05  Derek Atkins  <derek at ihtfp.com>
+
+	* src/backend/file/sixtp-utils.c:  Revert change.. Make sure
+	  we still use gnc_setenv and gnc_unsetenv.
+	
+2005-09-04  Derek Atkins  <derek at ihtfp.com>
+
+	* src/backend/qsf/qsf-backend.c: more a declaration to the top
+	  of a function because ISO C90 forbids mixed declarations.
+	* src/backend/file/gnc-backend-file.c: comment out unused function.
+
+2005-09-04  Neil Williams <linux at codehelp.co.uk>
+
+	* src/backend/file/gnc-backend-file.c: Backend Configuration handler,
+	handling binary file type and adding gettext support.
+	* src/backend/file/gnc-backend-file.h: Provider init.
+	* src/backend/file/io-gncbin-r.c: Binary file determination.
+	* src/backend/file/io-gncbin.h: Binary file determination and Doxygen.
+	* src/backend/file/io-gncxml-v2.h: Doxygen
+	* src/backend/file/io-gncxml.h: Doxygen.
+	* src/backend/file/sixtp-utils.c: CashUtil sync.
+	* src/backend/qsf/Makefile.am: Gettext support.
+	* src/backend/qsf/qsf-backend.c: Backend configuration, handling new
+	files and gettext support.
+	* src/backend/qsf/qsf-dir.h.in: Licence fix.
+	* src/backend/qsf/qsf-xml.c: Validation fix.
+	* src/backend/qsf/qsf-xml.h: Gettext support.
+	* src/business/business-core/file/gnc-customer-xml-v2.c:
+	* src/business/business-core/file/gnc-employee-xml-v2.c:
+	* src/business/business-core/file/gnc-job-xml-v2.c:
+	* src/business/business-core/file/gnc-order-xml-v2.c:
+	* src/business/business-core/file/gnc-tax-table-xml-v2.c:
+	Overdue removal of bad casts.
+	* src/engine/cashobjects.c: Extra objects for libcashobjects.la
+	* src/engine/gnc-date.c: Resolving query on previous bug fix.
+	* src/engine/gnc-event.h: Adding to Doxygen.
+	* src/engine/qof-be-utils.h: Adding to Doxygen.
+	* src/engine/qof.h: Doxygen handling.
+	* src/engine/qof_book_merge.h: Doxygen handling.
+	* src/engine/qofbackend-p.h: Move check type into
+	QofBackendProvider.
+	* src/engine/qofbackend.c: Backend configuration.
+	* src/engine/qofbackend.h: Doxygen.
+	* src/engine/qofchoice.h: Licence fix and Doxygen
+	* src/engine/qofid.h: Doxygen fix.
+	* src/engine/qofquery-deserial.h: Remove from Doxygen.
+	* src/engine/qofquery-serialize.h: Remove from Doxygen.
+	(query-serialise may be removed from QOF later.)
+	* src/engine/qofsession.c: Backend discrimination.
+	* src/engine/qofsession.h: check_data_type.
+
+2005-09-02  David Hampton  <hampton at employees.org>
+
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/preferences.glade: Frederic Leroy's patch
+	(#314512) to add a close box to each notebook tab.  Enhanced to
+	make the tab visibility a user preference.
+
+2005-08-29  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/gnc-date.c: fix bug #170444 by making sure we
+	  pass a full tm to strftime()
+
+2005-08-28  Christian Stimming  <stimming at tuhh.de>
+
+	* macros/autogen.sh: Make build system up to date: Remove
+	acinclude.m4 and remove the 3 last remaining legacy macros into
+	macros/legacy_macros.m4; have ltmain.sh created by libtoolizes
+	instead of having it in CVS; remove old macros/acx_pthread.m4
+	which hasn't been used since 2003; remove AM_ACLOCAL_INCLUDE macro
+	from configure.in because that's no longer a supported autoconf
+	macro.
+
+2005-08-27  Neil Williams <linux at codehelp.co.uk>
+
+	* src/business/business-core/businessmod-core.c: Loading
+	business objects in the same order as CashUtil to correctly
+	set the choice rules.
+
+2005-08-26  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome-utils/Makefile.am:  move the module back into
+	  pkglibdir so that gnucash actually runs properly instead
+	  of dying at runtime.
+
+2005-08-23  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_constr_init): Since we want to pass the
+	reportId in at page-construction time, appropriately define a
+	gobject constructor, &c. to get the property.  As a result, the
+	report page now understands which report (by id) it's actually
+	for.
+	* GNOME2_STATUS: update
+
+2005-08-23  Derek Atkins  <derek at ihtfp.com>
+
+	* lib/goffice/split/gnumeric-gconf.c: we don't need this
+	  printf (and it causes the build to fail because it's
+	  not defined in any included header).
+
+2005-08-22  Josh Sled <jsled at asynchronous.org>
+	* lib/goffice/: Conditionallize #warnings used as TODO tracking
+	from "goffice" import.  Fix compiler warnings.  lib/goffice/
+	should now build with -Werror.  As such, remove -Werror removal
+	from .mk files.
+
+2005-08-22  Neil Williams <linux at codehelp.co.uk>
+
+	* configure.in: Provisional building of libgoffice.
+	* make-gnucash-potfiles.in: Support for perl in gettext.
+	* src/backend/file/gnc-backend-file.c: New backend
+	configuration support using translatable XML and KVP.
+	* src/backend/file/gnc-book-xml-v2.c: Avoid private headers.
+
+	Patch to fix bug #88078 -  Incorrect namespace definition in XML file.
+	* src/backend/file/io-gncxml-v2.c:
+	* src/backend/file/io-gncxml-v2.h:
+	* src/business/business-core/file/gnc-address-xml-v2.c:
+	* src/business/business-core/file/gnc-address-xml-v2.h:
+	* src/business/business-core/file/gnc-bill-term-xml-v2.c:
+	* src/business/business-core/file/gnc-customer-xml-v2.c:
+	* src/business/business-core/file/gnc-employee-xml-v2.c:
+	* src/business/business-core/file/gnc-entry-xml-v2.c:
+	* src/business/business-core/file/gnc-invoice-xml-v2.c:
+	* src/business/business-core/file/gnc-job-xml-v2.c:
+	* src/business/business-core/file/gnc-order-xml-v2.c:
+	* src/business/business-core/file/gnc-owner-xml-v2.c:
+	* src/business/business-core/file/gnc-owner-xml-v2.h:
+	* src/business/business-core/file/gnc-tax-table-xml-v2.c:
+	* src/business/business-core/file/gnc-vendor-xml-v2.c:
+	* src/business/business-core/file/gncmod-business-backend-file.c:
+
+	* src/backend/file/sixtp-utils.c: Avoid building core-utils functions
+	in the backend - not portable to CashUtil. FIXME.
+	* src/backend/qsf/qsf-backend.c: Beginning to isolate file type
+	determination from the GnuCash backend to build separately.
+	* src/backend/qsf/qsf-object.xsd.xml: Language tweak.
+	* src/business/business-core/gncAddress.c: QOF_TYPE_CHOICE
+	* src/business/business-core/gncBillTerm.c: CashUtil sync.
+	* src/business/business-core/gncBillTerm.h:
+	* src/business/business-core/gncCustomer.c: undo bad casts.
+	* src/business/business-core/gncEmployee.c: CashUtil sync.
+	* src/business/business-core/gncEmployeeP.h:
+	* src/business/business-core/gncEntry.c: CashUtil sync.
+	* src/business/business-core/gncEntry.h: CashUtil sync.
+	* src/business/business-core/gncInvoice.c: undo bad casts
+	* src/business/business-core/gncJob.c: CashUtil sync.
+	* src/business/business-core/gncOrder.c: CashUtil sync.
+	* src/business/business-core/gncOwner.c: undo bad casts.
+	* src/business/business-core/gncTaxTable.c: CashUtil sync.
+	* src/business/business-core/gncTaxTable.h: CashUtil sync.
+	* src/business/business-core/gncVendor.c: CashUtil sync.
+
+	Removal of guile code from test cases - tests pass but report
+	a redundant gnucash-backend interface failure.
+	* src/business/business-core/test/test-address.c:
+	* src/business/business-core/test/test-customer.c:
+	* src/business/business-core/test/test-employee.c:
+	* src/business/business-core/test/test-job.c:
+	* src/business/business-core/test/test-vendor.c:
+
+	* src/engine/.cvsignore:
+	* src/engine/FreqSpec.c: undo bad casts.
+	* src/engine/Makefile.am: CashUtil sync.
+	* src/engine/Transaction.c: Fix test reports.
+	* src/engine/cashobjects.c: Convenience wrapper from CashUtil.
+	* src/engine/cashobjects.h:
+	* src/engine/gnc-engine-util.c: Convenience functions for QOF.
+	* src/engine/gnc-engine-util.h:
+	* src/engine/gnc-numeric.c: inline fix.
+	* src/engine/kvp-util-p.h: Doxygen tweaks.
+	* src/engine/kvp-util.h: Doxygen tweaks.
+	* src/engine/kvp_frame.h: Doxygen tweaks.
+	* src/engine/qof.h: Convenience wrapper.
+
+	Backend configuration support and new method for dlopen(),
+	DO NOT PASS *.so anymore, pass the *.la instead for
+	portability reasons.
+	* src/engine/qofbackend-p.h:
+	* src/engine/qofbackend.c:
+	* src/engine/qofbackend.h:
+	* src/engine/qofbook.c: CashUtil sync.
+	* src/engine/qofla-dir.h.in: New file to locate the .la files.
+	* src/engine/qofsession.c: Deprecating current_session handler and
+	converting QSF to pass the .la for loading.
+	* src/engine/qofsession.h: Marking deprecated code.
+	* src/engine/qofsql.c: CashUtil/QOF Sync where libgda can be used
+	externally.
+	* src/engine/test/test-commodities.c: Removing Guile.
+	* src/engine/test/test-freq-spec.c: Removing Guile.
+	* src/engine/test/test-numeric.c: Removing Guile.
+	* src/engine/test/test-transaction-reversal.c: Removing Guile.
+	* src/engine/test/test-transaction-voiding.c: Removing Guile.
+
+2005-08-18  Derek Atkins  <derek at ihtfp.com>
+
+	Frederic Leroy's patch to fix more %lld issues without casts.
+	Fixes bug #313741.
+	* src/app-utils/gnc-ui-util.c
+	* src/backend/file/sixtp-dom-generators.c
+	* src/backend/file/test/test-string-converters.c
+	* src/backend/postgres/builder.c
+	* src/backend/postgres/gncquery.c
+	* src/backend/postgres/kvp-sql.c
+	* src/backend/postgres/checkpoint.c
+	* src/engine/kvp_frame.c
+	* src/engine/test/test-numeric.c
+	* src/engine/qofsql.c
+	* src/engine/TransLog.c
+	  all vars are gint64
+	  ->replaced %lld by G_GINT64_FORMAT and removed unnecessary
+	  long long int' cast
+
+	* src/backend/file/test/test-date-converting.c
+	* src/backend/file/test/test-dom-converters1.c
+	* src/engine/test/test-date.c
+	  %lld for casted tv_sec vars
+	  ->No change
+
+	* src/backend/postgres/putil.h
+	  #define COMP_INT64(sqlname,fun,ndiffs)
+	  Macro using %lld, but not used
+	  ->No change, dead code
+
+	* src/engine/gnc-numeric.c
+	  use long long int for local variable instead gint64
+	  ->replaced longlongint by gint64 and lld by G_GINT64_FORMAT
+	  and replaced GNC_SCANF_LLD by G_GINT64_FORMAT
+	  /!\ should we remove GNC_SCANF_LLD ??
+
+	* src/engine/qofquerycore.c
+	  type incoherency
+	  -> replaced GNC_SCANF_LLD by G_GINT64_FORMAT
+
+	* src/import-export/log-replay/gnc-log-replay.c
+	  dead code commented
+	  -> no change
+
+	* src/engine/qofmath128.c
+	  some lld used instead of llu
+	  -> replacement of lld/llu along vars type
+	  I didn't check but I think there is mixed (un)signed
+
+	* src/engine/qofquery-serialize.c
+	  in macro PUT_INT64 : replaced %lld by G_GINT64_FORMAT
+
+	* lib/goffice/drawing/god-drawing-renderer-gdk.c
+	  -> defined format for go_unit_t
+	  silly change because lines containing %lld are commented
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	*  src/import-export/hbci/hbci-interaction.c:
+	Replacing an inadvertent change.
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	* .cvsignore :
+	* configure.in : Mac changes.
+	* rpm/.cvsignore :
+	* src/.cvsignore : All .cvsignore changes in this
+	commit are for the Mac.
+	* src/app-utils/Makefile.am : Mac build fix.
+	* src/app-utils/test/Makefile.am : Mac build fix.
+	* src/app-utils/test/test-exp-parser.c :  Mac build fix.
+	* src/backend/.cvsignore :
+	* src/backend/file/gnc-xml.h : Remove temporary fix.
+	* src/backend/file/sixtp.c : Tweak
+	* src/backend/file/test/.cvsignore :
+	* src/backend/file/test/test-xml-pricedb.c : Improve failure
+	reporting.
+	* src/backend/file/test/test-xml-transaction.c : Improve
+	failure reporting.
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	QOF Sync.
+	* src/backend/qsf/.cvsignore :
+	* src/backend/qsf/Makefile.am : Tweaked
+	* src/backend/qsf/pilot-qsf-GnuCashInvoice.xml : QOF_TYPE_CHOICE
+	* src/backend/qsf/qof-backend-qsf.h : Tweak
+	* src/backend/qsf/qsf-backend.c : QOF_TYPE_CHOICE
+	* src/backend/qsf/qsf-object.xsd.xml : QOF_TYPE_CHOICE
+	* src/backend/qsf/qsf-xml-map.c : map conversion, v1
+	* src/backend/qsf/qsf-xml.c : Cast changes and bug fix.
+	* src/backend/qsf/qsf-xml.h : KVP, COLLECT and CHOICE
+	* src/business/.cvsignore :
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	Business-core/file/: cast changes and removal of private headers.
+	Also removed GNCBook references. CashUtil Sync.
+	* src/business/business-core/.cvsignore :
+	* src/business/business-core/file/.cvsignore :
+	* src/business/business-core/file/gnc-bill-term-xml-v2.c :
+	* src/business/business-core/file/gnc-customer-xml-v2.c :
+	* src/business/business-core/file/gnc-employee-xml-v2.c :
+	* src/business/business-core/file/gnc-entry-xml-v2.c :
+	* src/business/business-core/file/gnc-invoice-xml-v2.c :
+	* src/business/business-core/file/gnc-job-xml-v2.c :
+	* src/business/business-core/file/gnc-lot-xml-v2.c :
+	* src/business/business-core/file/gnc-order-xml-v2.c :
+	* src/business/business-core/file/gnc-owner-xml-v2.c :
+	* src/business/business-core/file/gnc-tax-table-xml-v2.c :
+	* src/business/business-core/file/gnc-vendor-xml-v2.c :
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	CashUtil Sync
+	* src/business/business-core/gncAddress.c : Removal of private headers
+	* src/business/business-core/gncBillTerm.c : Using a string as the
+	QOF billterm type parameter.
+	* src/business/business-core/gncBillTerm.h :
+	* src/business/business-core/gncCustomer.c : Removal of private headers
+	and cast fixes. Fixed printable.
+	* src/business/business-core/gncEntry.c : Removal of private headers
+	* src/business/business-core/gncInvoice.c : Removal of private headers
+	and cast fixes. Change functions ready for a later change to use
+	QOF_TYPE_CHOICE - not implemented here yet.
+	* src/business/business-core/gncJob.c : Removal of private headers
+	and cast fixes. Change functions ready for a later change to use
+	QOF_TYPE_CHOICE - not implemented here yet.
+	* src/business/business-core/gncOrder.c : Removal of private headers
+	and cast fixes.
+	* src/business/business-core/gncOwner.c : Removal of private headers
+	and cast fixes.
+	* src/business/business-core/gncTaxTable.c : Removal of private headers.
+	* src/business/business-core/test/test-customer.c : Make sure customer
+	object is registered before trying to use a QofObject call.
+	* src/business/business-core/test/test-employee.c : Tweak
+	* src/business/business-core/test/test-job.c : Tweak
+	* src/business/business-core/test/test-vendor.c : Tweak
+	* src/business/business-gnome/.cvsignore :
+	* src/business/business-utils/.cvsignore :
+	* src/doc/.cvsignore :
+	* src/doc/design/.cvsignore :
+	* src/doc/xml/.cvsignore :
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	CashUtil Sync.
+	* src/engine/.cvsignore :
+	* src/engine/Account.c : Removal of private headers.
+	* src/engine/FreqSpec.c : Removal of private headers
+	and cast fixes.
+	* src/engine/Group.c : Removal of private headers.
+	* src/engine/Makefile.am : Taking qofmath128.c out of
+	the include list - replace with qofmath128.h
+	* src/engine/SX-book.c : Removal of private headers.
+	* src/engine/SchedXaction.c : Removal of private headers.
+	* src/engine/Scrub2.c : Cast fixes.
+	* src/engine/Transaction.c : Removal of private headers
+	and cast fixes. QOF QofSetterFunc changes to ensure the
+	transaction is open before editing.
+	* src/engine/gnc-commodity.c : Removal of private headers.
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	QOF Sync
+	* src/engine/gnc-engine-util.h : Enhanced enumas string macro
+	* src/engine/gnc-event-p.h : Move gen_event into the API.
+	* src/engine/gnc-event.h : gnc_engine_gen_event
+	* src/engine/gnc-lot-p.h : Remove unneeded header.
+	* src/engine/gnc-lot.c : Remove unneeded header.
+	* src/engine/gnc-numeric.c : qofmath128 change.
+	* src/engine/gnc-numeric.h : Doxygen fix.
+	* src/engine/gnc-pricedb.c : Remove private headers and outline the
+	areas of FileBackend / QofBackend that need modification to work with
+	CashUtil.
+	* src/engine/qof-be-utils.h : Begin to map the macros to functions
+	to allow routines to be used when QOF is external.
+	* src/engine/qof.h : qofchoice
+	* src/engine/qof_book_merge.c : QOF_TYPE_CHOICE
+	* src/engine/qof_book_merge.h : header tweak
+	* src/engine/qofbackend-p.h : header tweak
+	* src/engine/qofbackend.c : Definition of qof-be-utils functions.
+	* src/engine/qofbackend.h : Move qof_book_get_backend
+	* src/engine/qofbook.h : Remove qof_book_get_backend
+	* src/engine/qofclass.c : Downgrade warning for CashUtil.
+	* src/engine/qofclass.h : Tweak.
+	* src/engine/qofgobj.c : Cast fix.
+	* src/engine/qofid.h : QOF_TYPE_COLLECT & QOF_TYPE_CHOICE
+	* src/engine/qofinstance.c : Dirty instance handling
+	* src/engine/qofinstance.h : Dirty instance API
+	* src/engine/qofobject.h : Doxygen tweak.
+	* src/engine/qofquery.c : typo
+	* src/engine/qofquery.h : tweak
+	* src/engine/qofquerycore-p.h : QOF_TYPE_CHOICE
+	* src/engine/qofquerycore.c : QOF_TYPE_CHOICE
+	* src/engine/qofquerycore.h : QOF_TYPE_CHOICE
+	* src/engine/qofsession-p.h : Tweak.
+	* src/engine/qofsession.c : Ensure objects are open for
+	editing before trying to commit data.
+	* src/engine/qofsession.h : QOF_TYPE_CHOICE
+	* src/engine/qofsql.c : Cast fixes.
+
+2005-08-17  Neil Williams <linux at codehelp.co.uk>
+
+	Mac changes.
+	* src/engine/test-core/Makefile.am :
+	* src/engine/test-core/test-engine-stuff.c : Improved
+	failure reporting.
+	* src/gnc-module/test/misc-mods/Makefile.am : The linking
+	order is important for Mac OSX because of a bug in the gtkhtml
+	implementation.
+	* src/gnome-utils/Makefile.am :
+	* src/gnome/.cvsignore :
+	* src/gnome/glade/.cvsignore :
+	* src/gnome/schemas/.cvsignore :
+	* src/gnome/ui/.cvsignore :
+	* src/test-core/Makefile.am :
+
+2005-08-16  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/hbci-interaction.c (inputBoxCB): Aaarg,
+	fix extremely stupid bug that occasionally crashes the PIN entry.
+
+2005-08-15  David Hampton  <hampton at employees.org>
+
+	* src/backend/file/test/test-xml-transaction.c:
+	* src/business/business-core/file/gnc-bill-term-xml-v2.c:
+	* src/business/business-core/file/gnc-tax-table-xml-v2.c:
+	* src/engine/Account.c:
+	* src/engine/Transaction.c:
+	* src/engine/cap-gains.c:
+	* src/engine/qof_book_merge.c:
+	* src/engine/qofquery.c:
+	* src/engine/qofsession.c:
+	* src/gnome/dialog-budget-workbench.c:
+	* src/gnome-utils/gnc-html.c:
+	* src/gnome-utils/gnc-plugin-menu-additions.c: Frederic Leroy's
+	update to Dan Widyono's patch to compile cleanly on 64 bit systems.
+
+	* src/register/register-gnome/gnucash-item-edit.c: Scott Oonk's fix
+	to make the cursor visible in the register.
+
+2005-08-12  Neil Williams <linux at codehelp.co.uk>
+
+	* src/backend/file/gnc-account-xml-v2.c: Cast fixes
+	* src/backend/file/gnc-backend-file.c: Remove unnecessary headers
+	and provide a duplicate backend loader suitable for QOF which will
+	replace the gnc-backend module to allow CashUtil to work with the
+	current XML backend and ease spin-out of QOF. The new loader is
+	not executed as yet.
+	* src/backend/file/gnc-backend-file.h: Put a copy of price_lookup
+	and export into FileBackend ready to replace the versions currently
+	retained in QOF on a conditional build.
+	* src/backend/file/gnc-book-xml-v2.c: To be reviewed.
+	* src/backend/file/gnc-commodity-xml-v2.c:
+	* src/backend/file/gnc-pricedb-xml-v2.c:
+	* src/backend/file/gnc-schedxaction-xml-v2.c:
+	* src/backend/file/gnc-transaction-xml-v2.c: Cast fixes
+	* src/backend/file/gnc-xml.h: Stop use of gncbook.h, GNCBook.
+	* src/backend/file/io-gncbin-r.c: Unnecessary header, not available in QOF.
+	* src/backend/file/io-gncxml-v1.c: Cast fixes
+	* src/backend/file/io-gncxml-v2.c: Stop use of gnc- prefix, remove
+	unnecessary header and cast fixes.
+	* src/backend/file/sixtp-dom-generators.c:
+	* src/backend/file/sixtp-dom-parsers.c:
+	* src/backend/file/sixtp-to-dom-parser.c: Cast fixes
+	* src/backend/file/sixtp-utils.c: Other files in this backend already use <time.h>,
+	no need to provide a duplicate here.
+	* src/backend/file/sixtp.c:
+	* src/backend/file/test/test-dom-converters1.c:
+	* src/backend/file/test/test-file-stuff.c:
+	* src/backend/file/test/test-xml-account.c:
+	* src/backend/file/test/test-xml-commodity.c:
+	* src/backend/file/test/test-xml-transaction.c: Cast fixes
+	* src/engine/Makefile.am: Add qofchoice files.
+	* src/engine/qofchoice.c: QOF_TYPE_CHOICE handlers.
+	* src/engine/qofchoice.h:
+
+2005-08-02  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/dialog-scheduledxaction.[ch]:
+	* src/gnome/dialog-sx-from-trans.c:
+	* src/gnome/dialog-sxsincelast.[ch]:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.c:
+	* src/gnome/glade/sched-xact.glade:
+	* src/gnome/schemas/apps_gnucash_dialog_scheduled_transctions.schemas:
+	* src/gnome/ui/gnc-plugin-page-sxregister-ui.xml:
+	* src/gnome/ui/gnc-sxed-window-ui.xml:
+	* src/scm/main.scm: Convert scheduled transactions over to the new
+	preferences dialog and gconf storage.  Fix register menu problems
+	when in embedded windows.  Use C side hooks to set up the "since
+	last run" dialog.
+
+	* src/gnome/gnc-plugin-page-register.c: Properly set the window
+	field in the gnc_split_register data structure when installing the
+	page into a GncEmbeddedWindow.
+
+	* src/core-utils/gnc-gobject-utils.c: Enhance object tracking to
+	catch the deletion of an object that hasn't been removed from the
+	tracking list.
+
+	* src/gnome-utils/gnc-embedded-window.c:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/gnc-window.[ch]: Add method for retrieving the
+	GtkWindow associated with a GncWindow.
+
+	* src/gnome-utils/dialog-preferences.c:
+	* src/gnome-utils/preferences.glade: Clean up xml data structures
+	when the dialog is destroyed.  Connect signals in all add-in
+	preference pages.  Don't show the dialog until completely built
+	and moved to the remembered position.
+
+2005-07-30  David Hampton  <hampton at employees.org>
+
+	* Lots 'o files: Remove unnecessary includes.
+
+	* Lots 'o files: Guile 1.6 is now required for gnucash.  Finish
+	removal of all functions deprecated in that version.  Don't enable
+	warnings as g-wrap 1.3 still uses some deprecated functions.
+
+	* src/app-utils/option-util.c:
+	* src/engine/engine-helpers.c:
+	* src/engine/glib-helpers.c:
+	* src/engine/kvp-scm.c:
+	* src/gnome-utils/argv-list-converters.c:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/gnc-menu-extensions.c: The SCM_xxx_CHARS macros
+	return pointers to internal scheme data and should be treated as
+	const.  Use the compiler to enforce this restriction.
+
+2005-07-28  David Hampton  <hampton at employees.org>
+
+	* src/import-export/hbci/Makefile.am:
+	* src/import-export/hbci/gnc-hbci-utils.c:
+	* src/import-export/hbci/gncmod-hbci.c:
+	* src/import-export/hbci/hbci-interaction.[ch]:
+	* src/import-export/hbci/hbci.scm:
+	* src/import-export/hbci/glade/Makefile.am:
+	* src/import-export/hbci/glade/hbci.glade:
+	* src/import-export/hbci/glade/hbcipass.glade:
+	* src/import-export/hbci/glade/hbciprefs.glade:
+	* src/import-export/hbci/schemas/Makefile.am:
+	* src/import-export/hbci/schemas/apps_gnucash_dialog_hbci.schemas:
+	Make HBCI setup work again.  Use gconf and the new preferences
+	dialog for HBCI preferences.  (Would be nice if these could be
+	pushed out to the dialogs where they apply.)
+
+	* src/import-export/import-account-matcher.c: Must specify what
+	columns should be visible columns after adding a new column.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Build a kvp based column properly.
+
+	* src/import-export/hbci/glade/hbcipass.glade: Wrap the text in
+	labels.
+
+	* src/import-export/hbci/glade/hbci.glade: Run through glade-2.6
+	to reset properties to the gtk-2.4 level.  The changes are mostly
+	formatting though.  Content changes to follow in separate commits.
+
+	* src/gnome-utils/preferences.glade: When selecting the toolbar
+	style use the same labels as the gnome preferences dialog.  Add a
+	couple of explicit mnemonic targets.
+
+2005-07-27  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/dialog-hbcitrans.c: Eventually enable all
+	HBCI actions again. Only the convenience transfer templates are
+	not yet available, but all online actions work.
+
+2005-07-26  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/prefs.scm:
+	* src/gnome/druid-hierarchy.[ch]:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.c:
+	* src/gnome/schemas/apps_gnucash_dialog_common.schemas:
+	* src/gnome-utils/preferences.glade:
+	* src/scm/main.scm: Finish converting the "Tip of the Day" dialog
+	and the New File Hierarchy druid over to storing data in gconf.
+
+	* doc/Makefile.am: Fix problem with "tip of the day" file and opt
+	style installs.
+
+2005-07-25  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/dialog-daterange.c: Enable HBCI statement
+	download again. Works fully now.
+
+2005-07-25  Derek Atkins  <derek at ihtfp.com>
+
+	* src/business/business-core/gncInvoice.c:  revert the
+	  OWNER to GNC_ID_OWNER because it breaks lots of existing
+	  queries.  QSF needs to find a better method, either using
+	  a secondary entry into the parameter or coming up with a
+	  new meta-type in QOF where you can implement GNC_ID_OWNER
+	  in terms of the new metatype.  QOF_TYPE_COLLECT is absolutely
+	  the WRONG answer for GNC_ID_OWNER.
+
+	* src/engine/gnc-hooks.c: Call the correct API to delete a hook
+	  so we don't throw an error at shutdown.
+
+2005-07-24  David Hampton  <hampton at employees.org>
+
+	* various src/backend and src/business/business-core: Add gchar*
+	to xmlChar* casting of string constants to eliminate some gcc4
+	warnings.
+
+	* src/gnome-utils/print-session.c: Some gchar* to guchar* casting
+	to make gcc4 happy.
+
+	* src/gnome-utils/gw-gnome-utils-spec.scm: Remove references to
+	deleted data structures.  Gnucash now compiles against
+	g-wrap-1.9.6 as well as g-wrap-1.3.
+
+2005-07-24  Christian Stimming  <stimming at tuhh.de>
+
+	* src/import-export/hbci/dialog-pass.c, gnc-hbci-utils.c,
+	hbci-interaction.c, glade/hbcipass.glade: Fix transition from
+	GNOME_DIALOG to GTK_DIALOG. Eventually enable HBCI online actions
+	again. Needs more work but at least contacts the bank correctly.
+
+2005-07-23  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/druid-gconf-setup.c: Use $(HOME) instead of '~'
+	when creating the .gconf.path file.
+
+	* various files: Reorganize where these files appear in doxygen
+	output.
+
+2005-07-22  David Hampton  <hampton at employees.org>
+
+	* numerous business file: Migrate the business preferences over to
+	the new preferences dialog.
+
+	* src/gnome-utils/dialog-preferences.[ch]: Rework the widget
+	lookup code to handle widgets from multiple glade files.
+	Documentation.
+
+	* numerous file: Begin migrating preferences over to the new
+	preferences dialog.
+
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/dialog-preferences.[ch]:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/preferences.glade:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Add the
+	infrastructure for the new preferences dialog.  Begin migrating
+	preferences over to the new dialog.
+
+	* src/core-utils/gnc-gconf-utils.[ch]: Add central notification
+	dispatcher for the "general" set of gconf keys.  This is needed
+	because lots of file need callbacks for just one or two keys from
+	this section.  Add routines to get/set float values in gconf.
+	Miscellaneous tweaks.
+
+2005-07-20  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-gui-query.c: Skipping a dialog permanently
+	takes precedence over skipping it temporarily.  Make sure to set
+	only one flag per dialog.  Actually wire up the callbacks.
+
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome/schemas/apps_gnucash_warnings.schemas:
+	* src/register/ledger-core/split-register-control.c:
+	* src/register/ledger-core/split-register-model.c: Use the new
+	dialog that remembers whether or not it should suppress further
+	instances.
+
+	* src/business/business-gnome/dialog-invoice.h:
+	* src/business/business-gnome/gnc-plugin-page-invoice.c:
+	* src/business/business-gnome/schemas/apps_gnucash_dialog_business_common.schemas:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/gnome-utils/gnc-main-window.[ch]:
+	* src/gnome-utils/gnc-plugin-page.[ch[:
+	* src/register/register-core/table-allgui.h:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Allow pages to
+	state whether they should be loaded in the current window or in a
+	new window.  This will soon be controlled by preferences.
+
+	* src/gnome/gnc-plugin-page-register.c: Propagate window changes
+	to the register.  Fix the "transaction report" to use the current
+	window's status bar for updates.
+
+	* src/gnome/gnc-plugin-basic-commands.c: Example "important"
+	actions.  Subject to review.
+
+	* src/gnome-utils/gnc-plugin.[ch]: Add support for marking actions
+	as "important".  This is a setting used by the toolbar when it is
+	set to GTK_TOOLBAR_BOTH_HORIZ.
+
+	* src/core-utils/gnc-gconf-utils.c: Handle what was thought to be
+	an unexpected case when building gconf keys.
+
+2005-07-19  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.c:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/gnc-mdi-utils.[ch]:
+	* src/gnome-utils/gnc-window.c:
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/report/report-gnome/window-report.h:
+	* src/report/report-system/report-utilities.scm:
+	* src/scm/main-window.scm: Remove the remnants of the gtk1/gnome1
+	MDI code.
+
+	* src/report/report-gnome/gnc-plugin-page-report.c: Use the
+	progress bar in the current window, not always the first window.
+
+	* src/gnome-utils/gnc-main-window.c: Spruce up the delete window
+	dialog to make it more HIG compliant.
+
+	* src/engine/qofbook.h:
+	* src/engine/qofbook-p.h: Expose the qof_book_mark_saved()
+	function.
+
+2005-07-18  David Hampton  <hampton at employees.org>
+
+	* src/app-file/gnc-file.[ch]:
+	* src/app-file/gnc-file-dialog.h:
+	* src/app-file/gnome/gnc-file-dialog.c: Combined together as
+	gnc-file.[ch] in the gnome-utils directory.
+
+	* src/app-file/gnc-file-history.[ch]:
+	* src/gnome/gnc-plugin-file-history.[ch]: Combined together as
+	gnc-plugin-file-history.[ch] in the gnome-utils directory.
+
+	* src/app-file/gw-app-file-spec.scm: Folded into
+	gw-gnome-utils-spec.scm in the gnome-utils directory.
+
+	* src/app-file/schemas/apps_gnucash_history.schemas: Moved to the
+	gnome-utils directory.
+
+	* various: Update file include statements, remove files no longer
+	needed, etc.
+
+2005-07-17  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Add a "Transaction"
+	top level menu that collects all the menu items from Edit and
+	Actions that modify transactions.  This menu parallels the HIG
+	definition of an "Edit" menu as much as possible.
+
+	* src/gnome/ui/gnc-plugin-basic-commands-ui.xml: Move a couple
+	menu items within the Actions menu.
+
+	* src/gnome/schemas/apps_gnucash_dialog_common.schemas:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/dialog-reset-warnings.[ch]:
+	* src/gnome-utils/dialog-reset-warnings.glade:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Add a new dialog to
+	reset the state of warning messages.
+
+	* src/gnome-utils/druid-gconf-setup.c: Reset all temporary warning
+	suppressions at startup.
+
+	* src/gnc-ui.h:
+	* src/gnome-utils/gnc-gui-query.c:
+	* src/gnome-utils/gnc-gui-query.glade: New info/question/warning
+	dialogs that remember whether or not the user wants to see them
+	again.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Add a refresh callback
+	to update the page when preferences change.
+
+	* src/engine/gnc-trace.[ch]: New log module for the
+	preferences/warnings code.
+
+	* src/gnome-utils/gnc-tree-view.c:
+	* src/core-utils/gnc-gconf-utils.[ch]: Add some schema related
+	functions.  Remove extraneous argument from
+	gnc_gconf_client_all_entries().  Doxygen updates.
+
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/gnc-window.[ch]: When deleting a window make
+	sure to update the progress bar code.  Fixes a crash when you
+	delete the last window and then try to save.  From Phil Longstaff
+	<plongstaff at newearth.org>.
+
+	* src/report/standard-reports/equity-statement.scm:
+	* src/report/standard-reports/income-statement.scm: Fix for
+	mispellings in scheme code from Phil Longstaff
+	<plongstaff at newearth.org>.
+
+2005-07-15  David Hampton  <hampton at employees.org>
+
+	* src/gnc-ui.h:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/druid-gconf-setup.[ch]:
+	* src/gnome-utils/druid-gconf-setup.glade:
+	* src/gnome-utils/gnc-dir.h.in: Test whether or not Gnucash can
+	find its GConf keys.  If not present the user with a warning
+	message.  If the user chooses to setup gconf, launch a druid to
+	lead them through the process.
+
+	* src/core-utils/gnc-gconf-utils.[ch]: New function to check
+	existence of gconf keys.  New functions to add/remove gconf
+	notifications for use by code that doesn't have a GObject
+	available.
+
+	* src/bin/Makefile.am:
+	* src/bin/update-gnucash-gconf.in: New script to install all of
+	Gnucash's gconf schemas into the users ~/.gconf directory.
+
+	* configure.in:
+	* src/app-file/schemas/Makefile.am:
+	* src/business/business-gnome/schemas/Makefile.am:
+	* src/gnome/schemas/Makefile.am: Do all schema installs into
+	${prefix}/etc/gconf, not /etc/gconf.  Make sure this directory
+	exists before installing.
+
+	* src/gnome-utils/gnc-gnome-utils.[ch]:
+	* src/gnome-utils/gnc-main-window.[ch]: Move the gnc_shutdown
+	routine to a different file.
+
+2005-07-11  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/gnc-plugin-page-invoice.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-plugin-register.c: Add a hook to catch changes to
+	register configuration keys and update any registers.  This gives
+	live updating when changes are made.
+
+	* doc/gtkrc-2.0.gnucash:
+	* src/app-utils/prefs.scm:
+	* src/business/business-gnome/dialog-invoice.c:
+	* src/business/business-gnome/dialog-order.c:
+	* src/business/business-ledger/gncEntryLedger.h:
+	* src/business/business-ledger/gncEntryLedgerModel.c:
+	* src/gnome/top-level.c:
+	* src/gnome/schemas/Makefile.am:
+	* src/gnome/schemas/apps_gnucash_general.schemas:
+	* src/register/ledger-core/Makefile.am:
+	* src/register/ledger-core/split-register-model.[ch]:
+	* src/register/ledger-core/split-register.h:
+	* src/register/register-core/table-allgui.[ch]:
+	* src/register/register-gnome/gnucash-grid.c:
+	* src/register/register-gnome/gnucash-header.c:
+	* src/register/register-gnome/gnucash-item-edit.c:
+	* src/register/register-gnome/gnucash-sheet.[ch]:
+	* src/register/register-gnome/gnucash-style.[ch]: Add code to
+	allow the register colors to be set by the system theme (i.e from
+	gtkrc files).  Remove the preferences to set the register colors.
+	Add a gconf keys to 1) specify whether to use the gtkrc colors or
+	the default gnucash colors, 2) display the horizontal/vertical
+	lines in the register, and 3) set the alternate coloring mode.
+
+2005-07-07  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/Makefile.am:
+	* src/business/business-gnome/dialog-invoice.[ch]:
+	* src/business/business-gnome/gnc-plugin-page-invoice.[ch]:
+	* src/business/business-gnome/glade/invoice.glade:
+	* src/business/business-gnome/ui/Makefile.am:
+	* src/business/business-gnome/ui/gnc-plugin-page-invoice-ui.xml:
+	Convert the invoice dialog over to a GncPluginPage.  The new file
+	is in large part a wrapper around the original dialog code, since
+	the same logic was actually used to drive two different dialogs.
+
+	* src/business/business-gnome/business-gnome.scm:
+	* src/business/business-gnome/businessmod-gnome.c:
+	* src/business/business-gnome/gnc-plugin-business.[ch]:
+	* src/business/business-gnome/gw-business-gnome-spec.scm: Move the
+	logic to call the bills due dialog at startup.  Track the window
+	where the last business command was issued and use this value to
+	place any new business pages created.  Update accelerator keys.
+
+	* src/business/business-gnome/ui/gnc-plugin-business-ui.xml:
+	Add a couple of placeholders.
+
+	* src/gnome-utils/gnc-main-window.c: Catch the window manager
+	delete signal and query the user before allowing the last window
+	to be deleted.
+
+	* src/import-export/binary-import/Makefile.am:
+	* src/import-export/binary-import/druid-commodity.[ch]:
+	* src/import-export/binary-import/gncmod-binary-import.c:
+	* src/import-export/binary-import/binary-import.scm (removed):
+	* src/import-export/binary-import/gw-binary-import-spec.scm (removed):
+	Rewrite this module's book-opened-hook into C.
+
+	* src/enginc/gnc-hooks.[ch]:
+	* src/engine/gw-engine-spec.scm: Explicitly state the number of
+	arguments a hook callback should have.  Scheme gets very unhappy
+	if you don't supply the right number of arguments.
+
+	* src/app-file/gw-app-file-spec.scm: Eliminate double free of
+	memory.
+
+2005-07-06  David Hampton  <hampton at employees.org>
+
+	* src/register/register-gnome/gnucash-sheet.c: The register uses a
+	non-visible GtkEntry to handle its data input.  Except this widget
+	from being shown by gtk_widget_show_all.
+
+2005-07-05  David Hampton  <hampton at employees.org>
+
+	* src/app-file/gnc-file.c:
+	* src/gnome/dialog-new-user.c:
+	* src/gnome/top-level.c: Eliminate double call of some hooks.
+
+	* src/gnome/top_level.c:
+	* src/gnome-utils/gnc-main-window.c: A new GncMainWindow should
+	show itself instead of requiring the caller to call
+	gtk_widget_show.
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome-utils/gnc-main-window.[ch]:
+	* src/gnome-utils/gnc-plugin-page.[ch]:
+	* src/gnome-utils/gnc-window.c:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Move some of
+	the fields in a GncPluginPage from the public to the private data
+	structures.
+
+	* src/gnome-utils/dialog-query-list.c:
+
+	Look for the window manager deletion signal and clean up the
+	dialog.
+
+	* src/gnome-utils/dialog-query-list.glade: Give the dialog a
+	default size.
+
+2005-07-03  David Hampton  <hampton at employees.org>
+
+	* src/gnome/glade/price.glade: Update to use HIG2.0 guidelines for
+	widget spacing.
+
+	* src/gnome/dialog-print-check.c:
+	* src/gnome-utils/gnc-html.c:
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/gnome-utils/print-session.[ch]:
+	* src/scm/printing/print-check.scm: Convert printing over to g2.
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml: Move the "Print
+	Check" command to overlay the "Print" placeholder.
+
+	* src/report/report-gnome/gnc-plugin-page-report.c: Replace the
+	gtk1.2 "draw" signal with the gtk2.0 "expose_event" signal.
+
+2005-07-02  David Hampton  <hampton at employees.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report-ui.xml:
+	* src/report/report-gnome/gnc-plugin-page-report.c: Duplicate a
+	couple of the toolbar buttons as menu items.
+
+	* src/gnome-utils/print-session.[ch]:
+	* configure.in: Remove old checks for libgnomeprint2.0.
+
+	* src/gnome-utils/gnc-main-window.c: Print is a placeholder that
+	must be overridden.
+
+	* src/business/business-core/gncEmployee.h: Add #define for
+	deprecated function.
+
+2005-07-01  David Hampton  <hampton at employees.org>
+
+	* src/business/business-core/gncEmployee.h: Add #define for
+	deprecated function.
+
+	* src/gnome-utils/dialog-query-list.c: Finish g1->g2 widget conversion.
+
+	* src/gnome/gnc-plugin-basic-commands.c: Rename "Find Transactions"
+	back to "Find".
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-sxregister-ui.xml: Restore missing
+	commands.
+
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Tweak menu locations.
+
+	* src/gnome/dialog-scheduledxaction.c: Destroy the dialog when the
+	user dismisses it. Releases resources instead of losing them.
+
+	* src/gnome/glade/register.glade: Tweak the "Void Transaction"
+	dialog.
+
+	* src/gnome-utils/gnc-embedded-window.c: Add object tracking.
+
+	* src/gnome-utils/gnc-main-window.c: Add object tracking.
+	Cut/Copy/Paste are only placeholders that must be overridden.
+	Remove function stubs and make the actions insensitive.
+
+2005-06-30  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-plugin-page.[ch]: Add a utility function to
+	retrieve the page title.
+
+	* src/gnome-utils/gnc-date-edit.[ch]: Reconnect the
+	focus_out_event signal.  Add a function so this widget can be
+	generated from a glade file.
+
+	* src/gnome/gnc-split-reg.[ch]: Enable translation of the
+	SortType enumeration to/from a string.
+
+	* src/gnome/gnc-plugin-file-history.c:
+	* src/gnome/ui/gnc-plugin-file-history-ui.xml: Promote file
+	history information to the 'File' menu per Gnome HIG 2.0.
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome/glade/register.glade: Promote the register style
+	options to the 'Edit' menu per Gnome HIG 2.0.  Rework the various
+	sort, status and date menu items into the HIG "Sort By" and
+	"Filter By" menus.
+
+	* src/gnome/gnc-plugin-basic-commands.c:
+	* src/gnome/ui/gnc-plugin-basic-commands-ui.xml:
+	* src/gnome-utils/gnc-main-window.c:
+	* src/gnome-utils/ui/gnc-main-window-ui.xml: Move a few commands
+	around to try and better align with HIG 2.0.
+
+	* src/gnome-utils/gnc-main-window.h:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/scm/main.scm: Remove unneeded functions now that the main
+	window title is updated internally.
+
+	* various: Use HIG 2.0 specified access keys wherever
+	possible. Try and ensure that all menu items have access keys
+	defined.
+
+2005-06-19  Neil Williams <linux at codehelp.co.uk>
+	* qofid.c:
+	* qofid.h: qof_collection_count
+
+2005-06-19  Neil Williams <linux at codehelp.co.uk>
+	* src/engine/qof_book_merge.c: Re-organising to
+	use static functions.
+	* src/engine/qof_book_merge.h: Setting public API.
+	* src/engine/qofclass.h: Typos.
+
+2005-06-19  Neil Williams <linux at codehelp.co.uk>
+	* src/business/business-core/gncAddress.c:
+	* src/business/business-core/gncAddress.h:
+	* src/business/business-core/gncCustomer.c:
+	* src/business/business-core/gncCustomer.h:
+	* src/business/business-core/gncEmployee.c:
+	* src/business/business-core/gncEmployee.h:
+	* src/business/business-core/gncInvoice.c:
+	* src/business/business-core/gncInvoice.h:
+	* src/business/business-core/gncJob.c:
+	* src/business/business-core/gncJob.h:
+	* src/business/business-core/gncOwner.c:
+	* src/business/business-core/gncOwner.h:
+	* src/business/business-core/gncVendor.c:
+	* src/business/business-core/gncVendor.h
+	* src/engine/Account.c
+	* src/engine/Account.h: Changing to static functions,
+	and using QOF_TYPE_COLLECT in QofObject parameters.
+	* src/engine/FreqSpec.c
+	* src/engine/FreqSpec.h: Removing compiler hack, using
+	static functions.
+	* src/engine/Transaction.c
+	* src/engine/Transaction.h: Changing to static functions.
+
+2005-06-19  Neil Williams <linux at codehelp.co.uk>
+	* src/backend/qsf/qsf-backend.c: API
+	* src/backend/qsf/qsf-object.xsd.xml: QOF_TYPE_COLLECT
+	* src/backend/qsf/qsf-xml.h: Make into a private header.
+	* src/backend/qsf/qof-backend-qsf.h: Public API for the library.
+
+2005-06-19  Neil Williams <linux at codehelp.co.uk>
+	* src/doc/backend-api.txt
+	* src/doc/backend-errors.txt
+	* src/doc/backup.txt
+	* src/doc/books.txt
+	* src/doc/budget.txt
+	* src/doc/business.txt
+	* src/doc/constraints.txt
+	* src/doc/currencies.txt
+	* src/doc/doxygen.cfg.in
+	* src/doc/doxygen_main_page.c
+	* src/doc/engine.txt
+	* src/doc/g2-architecture.txt
+	* src/doc/generic-druid-framework.txt
+	* src/doc/guid.txt
+	* src/doc/loans.txt
+	* src/doc/lots.txt
+	* src/doc/multicurrency-discussion.txt
+	* src/doc/netlogin.txt
+	* src/doc/plugin.txt
+	* src/doc/prices.txt
+	* src/doc/qif.txt
+	* src/doc/tax.txt
+	* src/doc/user-prefs-howto.txt
+	* src/engine/design.txt
+	* src/engine/extensions.txt
+	* src/engine/kvp_doc.txt
+	* src/scm/startup-design.txt: Folding text files
+	into Doxygen output.
+
+	* src/doc/gnc-commodity.txt: Removed: empty.
+
+2005-06-12  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/gnc-hooks*:
+	  First attempt at implementing SCM hooks in C.
+	* src/engine/Makefile.am:
+	  Handle new (private) header file, gnc-hooks-scm.h
+
+	* src/engine/gnc-hooks.c:
+	  Use ENTER/LEAVE macros instead of commented printfs
+
+	* src/engine/gw-engine-spec.scm:
+	  use gnc-hooks-scm.h header
+	* src/engine/gnc-hooks.[ch]:
+	  Fix APIs..  Even though we return 'const' don't say we do.
+
+	* src/app-utils/hooks.scm:
+	  remove most of the hooks code; use the C impl.
+	* src/app-utils/prefs.scm: don't define the save-options-hook here
+	* src/engine/gnc-hooks.[ch]:
+	  Fix the actual implementation of the scheme callback
+	  Make sure we call back with appropriate number of args
+	* src/engine/gw-engine-spec.scm:
+	  wrap the gnc-hooks APIs
+	  define the old hooks as strings.
+	* src/gnome-utils/gnc-menu-extensions.scm:
+	  remove definition of add-extension-hook
+	* various others:
+	  remove call to run-c-hook, just use the run-dangers API
+
+2005-06-11  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-plugin-manager.[ch]: Take ownership of
+	plugins passed to the manager.  Free all plugins at gui shutdown.
+	Documentation.
+
+2005-06-11  Derek Atkins  <derek at ihtfp.com>
+
+	* src/core-utils/Makefile.am
+	  Removed gnc-hooks to src/engine.
+	* src/core-utils/gw-core-utils-spec.scm:
+	  Removed gnc-hooks
+	* src/engine/gnc-hooks.[ch]:
+	  gnc-hooks are here, so it can deal with QofEntity handling.
+	  Changed the API to take a GFunc and a cbarg.
+	* src/engine/gw-engine-spec.scm:
+	  added gnc-hooks wrapper
+
+2005-06-10  David Hampton  <hampton at employees.org>
+
+	* configure.in: Break out gtk from gnome to get access to a
+	GTK_CFLAGS variable.
+
+	* src/core-utils/gnc-gobject-utils.[ch]: Add functions for
+	tracking GObject based items.  To help find memory leaks, if
+	gnucash is compiled with --enable-ref-counts-dumps the contents of
+	this database will be dumped when gnucash quits.
+
+	* src/gnome-utils/gnc-tree-model.[ch]: New base tree model that
+	utilizes the new object tracking functions.
+
+	* src/gnome-utils/gnc-plugin.c:
+	* src/gnome-utils/gnc-plugin-page.c:
+	* src/gnome-utils/gnc-tree-view.[ch]: Utilize the new object
+	tracking functions in these gnucash base class objects.
+
+	* various: Remove old debugging code that is no longer
+	needed. Debugging is now in the base class objects.
+
+2005-06-09  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-plugin-manager.[ch]: Assume ownership of all
+	registered plugins instead of incrementing their reference count.
+	Install a ui-shutdown hook so that the plugin manager can clean up
+	and free any installed plugins..
+
+	* src/app-utils/prefs.scm:
+	* src/core-utils/gnc-hooks.h:
+	* src/gnome-utils/gnc-menu-extensions.scm:
+	* src/report/report-gnome/report-gnome.scm:
+	* src/scm/main.scm: Finish regularizing C side hook names.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Unref the sort_model so
+	that the entire set of models will be properly deleted.
+
+2005-06-08  Derek Atkins  <derek at ihtfp.com>
+
+	* src/core-utils/gnc-hooks.[ch]: rename some functions, set up the
+	  architecture to handle SCM and C hook danglers all in the same
+	  place.
+	* src/app-file/gnc-file.c:
+	* src/core-utils/gw-core-utils-spec.scm:
+	* src/gnome/dialog-new-user.c:
+	* src/gnome/top-level.c:
+	  point to new gnc-hook function names
+
+	* src/engine/qofsession-p.h, src/engine/qofsession.c:
+	  Make a session sort of look like a QofEntity.  This will
+	  be useful when I add scheme bindings to the hooks.
+
+2005-06-07  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-split-reg.[ch]: Make the summarybar for the
+	register work again.
+
+	* src/core-utils/gnc-hooks.[ch]: Implement C side hook lists.  Will
+	allow hooks to be easily installed from either Scheme or C code.
+
+	* various files: Call the C hooks whenever a Scheme hook is called.
+
+2005-06-06  David Hampton  <hampton at employees.org>
+
+	* gnucash/src/backend/qsf/qsf-backend.c: Couple of bug fixes.
+
+	* src/gnome/gnc-plugin-basic-commands.c: Forgot to change the
+	callback data provided to these commands now that they're provided
+	by a plugin.
+
+	* src/app-file/gnc-file.c: Fix double free.
+
+	* src/gnome/druid-merge.c: Use gtk_widget_show_all so that the
+	first page of the druid is shown.
+
+	Restructure the code.
+
+	* src/gnome/gnc-embedded-window.[ch]:
+	* src/gnome/gnc-plugin-basic-commands.[ch]:
+	* src/gnome/gnc-plugin-manager.[ch]:
+	* src/gnome/gnc-plugin-menu-additions.[ch]:
+	* src/gnome/gnc-plugin-page.[ch]:
+	* src/gnome/gnc-plugin.[ch]:
+	* src/gnome/gnc-window.[ch]: These files were moved whole from
+	src/gnome to src/gnome-utils:
+
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/ui/gnc-main-window-ui.xml: These files were split into
+	two parts, and the part with the existing name was moved from
+	src/gnome to src/gnome-utils.  The parts left in src/gnome are
+	called gnc-plugin-basic-commands.[ch].
+
+	* src/app-file/gnc-file.[ch]:
+	* src/app-file/gncmod-app-file.c: Call gnc-main-window directly
+	now instead of through a function pointer loaded at runtime.
+
+	* src/gnome/top-level.c:
+
+	* gnucash/src/gnc-ui.h:
+	* src/report/stylesheets/Makefile.am: Revert temporary workaround.
+
+	(Now removed) Temporary workaround.
+
+	* gnucash/src/gnc-ui.h:
+	* gnucash/src/gnome/gnc-main-window.h:
+	* gnucash/src/gnome/gnc-window.h:
+	* gnucash/src/gnome/gw-gnc-spec.scm:
+	* gnucash/src/gnome-utils/gw-gnome-utils-spec.scm:
+	* gnucash/src/report/report-gnome/gw-report-gnome-spec.scm:
+	* gnucash/src/report/stylesheets/ Makefile.am: Temporary
+	workaround to resolve circular build dependency:
+
+2005-06-05  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml: Restore the
+	register report menu items.  They've been missing for a while.
+
+	* src/gnome/Makefile.am:
+	* src/gnome/top-level.c:
+	* src/gnome/gnc-plugin-menu-additions.[ch]: New files for
+	installing the report menu items into the main window(s).
+
+	* src/gnome-utils/gnc-menu-extensions.[ch]:
+	* src/gnome-utils/gnc-menu-extensions.scm: Build data structures
+	that are easier to use with the new menu installation code. Code
+	cleanup.
+
+	* src/business/business-gnome/business-gnome.scm:
+	* src/report/report-gnome/Makefile.am:
+	* src/report/report-gnome/gnc-plugin-page-report.[ch]:
+	* src/report/report-gnome/gw-report-gnome-spec.scm:
+	* src/report/report-gnome/report-gnome.scm:
+	* src/report/report-system/report.scm:
+	* src/scm/main.scm: Reports are now opened in the window where the
+	menu was selected. Other updates for recent changes.
+
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/report/report-gnome/window-report.[ch]: Removal of old code.
+
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/ui/gnc-main-window-ui.xml:
+	* src/gnome/gnc-plugin-page-account-tree.c: Include the Reports
+	menu in the main user interface.  Extracted common code into
+	utility functions.  New function for adding hand crafted actions
+	to the user interface.  Don't allow the initial page to be closed
+	or moved.  Rename a menu entry.  Remove the dispose function.  Add
+	doxygen comments.
+
+	* src/gnome/gnc-plugin.[ch]: Add doxygen comments.
+
+	* src/gnome/gw-gnc-spec.scm Remove extraneous includes.
+
+	* src/core-utils/gnc-gconf-utils.c: Treat the dash and underscore
+	characters the same when looking up an enum by name.
+
+2005-06-04  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin.[ch]:
+	* src/gnome-utils/gnc-gnome-utils.[ch}: Migrate a couple of
+	functions to gnc-plugins.c.
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/import-export/hbci/gnc-plugin-hbci.c:
+	* src/report/report-gnome/gnc-plugin-page-report.c:
+	* src/report/stylesheets/gnc-plugin-stylesheets.c: Update for the
+	new function names.
+
+2005-06-03  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-main-window.[ch]: Move one function out of
+	window-main.c.  This may be a temporary home.
+
+	* src/gnome/window-main.[ch]:
+	* src/gnome/window-register.[ch]: Remove files that are no longer
+	needed in the g2 branch.
+
+	* src/gnome/Makefile.am:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.[ch]:
+	* src/gnome/window-main-summarybar.c: Remove references to these
+	files.
+
+2005-06-02  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/dialog-customer.c: Eliminate a
+	memory corruption bug.
+
+	* src/business/business-gnome/dialog-customer.c:
+	* src/business/business-gnome/dialog-employee.c:
+	* src/business/business-gnome/dialog-invoice.c:
+	* src/business/business-gnome/dialog-job.c:
+	* src/business/business-gnome/dialog-order.c:
+	* src/business/business-gnome/dialog-vendor.c: Fix a small memory
+	leak. Also tweak printfs for a 64 bit system.
+
+	* src/gnome-search/gnc-general-search.c: Remove the custom forall
+	method.  This allows all the child widgets to be properly
+	destroyed.
+
+2005-05-22  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/dialog-utils.c (gnc_save_window_size): Protect
+	against being called after window destruction has started.
+
+	* src/gnome/glade/lots.glade:
+	* src/gnome/lot-viewer.c: Make the dialog more HIG compliate.
+	Install the callbacks via glade instead of by hand.  Rework some
+	of the callback logic.  The buttons that require a lot be selected
+	now cannot be clicked unless a lot is selected.  Rememver window
+	and divider information in gconf.
+
+2005-05-21  David Hampton  <hampton at employees.org>
+
+	* src/gnome/glade/lots.glade: Geert Jan Janssens'
+	<janssens.geert at advalvas.be> changes to add scrollbars to 'lot
+	clist'.  Add a default window size for easier use.  Add start
+	position for vpane divider to show both panes on startup.
+
+	* All glade files: Run through the FC3 version of glade (2.6.0).
+	Additional properties added and minor reordering of properties.
+
+	* src/gnome/glade/merge.glade: Major indentation changes.
+
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-tree-view-common.[ch]:
+	* src/gnome-utils/gnc-tree-view.[ch]: Convert common functions
+	into a new base gnc-tree-view object.  Integrate the object with
+	gconf for tracking sizes and visibilities of columns within a
+	view.  Add a new popup menu for selecting column visibilities.
+	Make it easier to add new columns after a view has been created.
+
+	* src/gnome-utils/gnc-tree-view-*: Base these views on the new
+	common gnc-tree-view class.
+
+	* src/gnome-utils/gnc-tree-model-*: Remove the dedicated column
+	for right aligning numbers.  This is done by a simpler method now.
+
+	* src/gnome/dialog-budget-category.c:
+	* src/gnome/dialog-commodities.c:
+	* src/gnome/dialog-price-edit-db.c:
+	* src/gnome/druid-hierarchy.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/import-export/import-account-matcher.c: Changes because
+	called functions have moved in to the base gnc tree view.
+
+	* src/app-utils/gnc-ui-util.[ch]:
+	* src/gnome-utils/dialog-account.c:
+	* src/scm/main-window.scm: Prune three or four layers of
+	complicated code that is only ever used to extract a single value
+	from an account.
+
+2005-05-20  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-tree-model-account.c: Store the book as part
+	of the model private data.  In the event handler for the model,
+	ensure that events are for accounts that are in the model.
+
+2005-05-19  David Hampton  <hampton at employees.org>
+
+	* src/core-utils/gnc-gconf-utils.[ch]: Add some more utility
+	functions.
+
+	* src/gnome/schemas/apps_gnucash_dialog_commodities.schemas:
+	* src/gnome-utils/gnc-tree-view-commodity.c: Renamed "exchange
+	code" to "cusip code".  The former seems like it is referring to
+	NASDAQ, NYSE, etc, not a code that is unique to a specific
+	security.  The latter is by definition security specific.
+
+2005-05-15  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-tree-view-account.[ch]:
+	* src/gnome-utils/gnc-tree-model-account.c:
+	* src/gnome/druid-hierarchy.c: Chris Shoemaker's fixes to add
+	custom columns to an Account view.  Various cleanups and fixes for
+	memory leaks.
+
+2005-05-10  David Hampton  <hampton at employees.org>
+
+	* src/gnome-search/gncmod-gnome-search.c: Don't try to load code
+	that was removed two weeks ago.
+
+2005-05-08  Neil Williams <linux at codehelp.co.uk>
+	* src/business/business-core/gncInvoice.c: Implementing
+	QOF_TYPE_COLLECT.
+	* src/business/business-core/gncInvoice.h: New functions to
+	support collections.
+	* src/business/business-core/gncOwner.c: Invoice collection
+	support.
+	* src/business/business-core/gncOwner.h: Doxygen and declarations.
+
+2005-05-08  Neil Williams <linux at codehelp.co.uk>
+	* src/backend/file/test/.cvsignore: Tweak
+	* src/backend/qsf/qsf-backend.c: Handling collections
+	in QSF
+	* src/business/business-core/gncAddress.c: QOF enhancements.
+	* src/business/business-core/gncAddress.h: QOF enhancements.
+	* src/business/business-core/gncCustomer.c: Setting the address
+	via QOF.
+	* src/business/business-core/gncCustomer.h: Address handling in QOF.
+	* src/business/business-core/gncInvoice.c: Using QOF_TYPE_COLLECT for
+	owner, billto and entries.
+	* src/business/business-core/gncInvoice.h: Declarations for collect
+	handlers.
+	* src/business/business-core/gncOwner.c: Handling as a collection.
+	* src/business/business-core/gncOwner.h: Easing QOF handling.
+	* src/business/business-gnome/gnc-plugin-business.c: Recursive
+	handling.
+	* src/engine/kvp_frame.h: Doxygen fix.
+	* src/engine/qof_book_merge.c: QOF_TYPE_COLLECT merges.
+	* src/engine/qofclass.h: New QOF type, collection.
+	* src/engine/qofid.c: Collection handling.
+	* src/engine/qofid.h: Documenting QOF_TYPE_COLLECT.
+	* src/engine/qofsession.c: Recursive copies.
+	* src/engine/qofsession.h: Recursive copying documentation.
+
+2005-05-03  Neil Williams <linux at codehelp.co.uk>
+
+	* src/app-utils/gnc-ui-util.h: Doxygen update.
+	* src/backend/qsf/qsf-backend.c: Omitting kvp tag when
+	frame is empty.
+	* src/backend/qsf/qsf-object.xsd.xml: Typo.
+	* src/business/business-core/gncBillTerm.h:
+	* src/business/business-core/gncEmployee.h:
+	* src/business/business-core/gncEntry.h:
+	* src/business/business-core/gncTaxTable.h:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/engine/Account.h:
+	* src/engine/Group.h: Doxygen fixes.
+	* src/engine/Transaction.c: Replacement Timespec calls
+	because QOF needs to pass Timespec, not Timespec*
+	* src/engine/Transaction.h: qofTransSetDatePosted
+	and qofTransSetDateEntered new functions and Doxygen fixes.
+	* src/engine/gnc-commodity.h:
+	* src/gnome-utils/dialog-account.h:
+	* src/gnome-utils/dialog-commodity.c:
+	* src/gnome-utils/dialog-commodity.h:
+	* src/gnome-utils/gnc-gnome-utils.h:
+	* src/gnome-utils/gnc-tree-model-account-types.h:
+	* src/gnome-utils/gnc-tree-model-account.h:
+	* src/gnome-utils/gnc-tree-model-commodity.h:
+	* src/gnome-utils/gnc-tree-model-price.h:
+	* src/gnome-utils/gnc-tree-view-account.h:
+	* src/gnome-utils/gnc-tree-view-commodity.h:
+	* src/gnome-utils/gnc-tree-view-common.h:
+	* src/gnome-utils/gnc-tree-view-price.h:
+	* src/gnome/gnc-plugin-file-history.c:
+	* src/gnome/gnc-plugin-file-history.h:
+	* src/gnome/gnc-plugin-page-account-tree.h:
+	* src/gnome/gnc-plugin-page-register.h:
+	* src/register/ledger-core/split-register-layout.h:
+	* src/report/report-gnome/gnc-plugin-page-report.h:
+	Doxygen fixes. Sub-divided the GUI module into manageable
+	chunks and fixed @name sections. Put the @{ inside the
+	same comment block as @name but NOT on the same line
+	as the closing */
+
+2005-04-30  David Hampton  <hampton at employees.org>
+
+	* mkinstalldirs: Drop this generated file from CVS.
+
+	* configure.in: Drop the libgnomeui requirement back to 2.6 so we
+	can support SuSe 9.2.
+
+	* src/business/business-ledger/gncEntryLedger.h: Change a couple
+	of register cell names so the core register code can save/restore
+	column widths.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/ui/gnc-main-window-ui.xml: Add the (debug) extensions
+	menu back.
+
+	* src/business/business-gnome/business-gnome.scm:
+	* src/business/business-gnome/gnc-plugin-business.c:
+	* src/business/business-gnome/ui/gnc-plugin-business-ui.xml:
+	* src/scm/main.scm: Migrate the business "test" menu to a
+	GtkAction based menu.
+
+	* src/gnome-search/Makefile.am:
+	* src/gnome-search/gnome-search.scm:
+	* src/gnome-search/gw-gnome-search-spec.scm: Remove unused code.
+
+2005-04-30  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome-utils/gnc-html-graph-gog.c: chris' patch
+	  to enable showing the graph to workaround a bug in
+	  gtkhtml-3.3.2 where the widget height is set to -1.
+
+2005-04-28  David Hampton  <hampton at employees.org>
+
+	* lots-o-files: Migrate most hidden preferences over to gconf.
+	Remember geometry of more dialogs and restore it when the dialog
+	is next used.
+
+	* src/business/business-gnome/dialog-billterms.c:
+	* src/business/business-gnome/dialog-invoice.c:
+	* src/core-utils/gnc-gconf-utils.h:
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/window-main.c:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/window-register.c:
+	* src/gnome-utils/gnc-mdi-utils.c: Collapse knowledge of desktop
+	gconf keys into a single file.
+
+	* src/gnome/gnc-totd-dialog.[ch]:
+	* src/gnome/tip-of-the-day.[ch]:
+	* src/scm/tip-list.scm:
+	* src/scm/tip-of-the-day.scm: Remove old "tip of the day" code.
+
+	* make-gnucash-potfiles.in:
+	* doc/tip_of_the_day.list.in:
+	* src/gnome/dialog-totd.[ch]:
+	* src/gnome/glade/totd.glade:
+	* src/gnome/schemas/apps_gnucash_dialog_totd.schemas: New "tip of
+	the day" code entirely written in C.  The installed tip file can
+	still be updated by users, but is now essentially a free-form file
+	where tips are separated by two consecutive newline characters.
+	The tip file in the sources still contains gettext markup.  Store
+	the current tip number and whether or not to show tip in gconf.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome-utils/gnc-gnome-utils.[ch]:
+	* src/scm/main.scm: Other files affected by the "tip of the
+	day" changes.
+
+2005-04-25  Neil Williams <linux at codehelp.co.uk>
+	* src/app-utils/option-util.c:
+	* src/app-utils/option-util.h: Removing deprecated QOF code
+	DateFormat.
+	* src/backend/qsf/pilot-qsf-GnuCashInvoice.xml:
+	Making allowance for FreqSpec in pilotqof.
+	* src/backend/qsf/qsf-backend.c: Support for
+	reporting write errors to the user from the backend.
+	* src/backend/qsf/qsf-object.xsd.xml: Typos and
+	requiring certain attributes in all QSF XML.
+	* src/backend/qsf/qsf-xml-map.c: minor.
+	* src/backend/qsf/qsf-xml.h: Doxygen.
+	* src/business/business-core/gncEntry.c: Increased
+	QOF support.
+	* src/business/business-core/gncEntry.h: QOF defines.
+	* src/engine/FreqSpec.c: Removing hack, using enum as
+	string macro, adding some QOF parameters and object
+	definition. More to follow.
+	* src/engine/FreqSpec.h: enum as string macro and
+	adding QOF handling. Doxygen.
+	* src/engine/FreqSpecP.h: Moving Doxygen comments to .h
+	where they can actually be read. Removing Doxygen markers
+	where unnecessary.
+	* src/engine/SchedXaction.c: QOF Object declaration,
+	QOF parameters.
+	* src/engine/SchedXaction.h: Doxygen and QOF handling.
+	* src/engine/gnc-date.c: Adding support for UTC time formatting
+	and parsing. Doxygen. Increased MAX_DATE_LENGTH to cope
+	with UTC strings.
+	* src/engine/gnc-date.h: Removing deprecated shorthand defines.
+	UTC support. Doxygen.
+	* src/engine/gnc-engine-util.h: enum as string macro improvements.
+	* src/engine/gnc-engine.c: FreqSpec and SchedXaction QOF object
+	registration.
+	* src/engine/gnc-trace.c: Tweak.
+	* src/engine/gw-engine-spec.scm: Removing deprecated
+	QOF_DATE_MATCH_ROUNDED and replacing with QOF_DATE_MATCH_DAY.
+	* src/engine/kvp_frame.c: Deprecating mis-matched function names
+	where gnc_numeric was mixed with numeric and str with string.
+	All now use numeric or string.
+	* src/engine/kvp_frame.h: Adding defines to support deprecated
+	names for time being. Doxygen.
+	* src/engine/qof-be-utils.h: Doxygen tweak.
+	* src/engine/qof.h: Removing qof/ directory prefix on included
+	header files.
+	* src/engine/qof_book_merge.c: Using MAX_DATE_LENGTH, swapping
+	unsigned int to signed int for printing.
+	* src/engine/qof_book_merge.h: Losing the qof/ prefix.
+	* src/engine/qofclass.c: Reference handling.
+	* src/engine/qofgobj.c: Losing the qof/ prefix. Moving variable
+	declarations to top of block.
+	* src/engine/qofgobj.h: Losing qof/ prefix.
+	* src/engine/qofid.h: Removing FreqSpec from QOF.
+	* src/engine/qofquery-deserial.c: Removing deprecated date handling
+	code.
+	* src/engine/qofquery-deserial.h: Losing qof/ prefix, doxygen.
+	* src/engine/qofquery-serialize.c: Removing deprecated date handling
+	code.
+	* src/engine/qofquery-serialize.h: Losing qof/ prefix.
+	* src/engine/qofquery.c: Removing deprecated date handling code.
+	* src/engine/qofquery.h: Doxygen.
+	* src/engine/qofquerycore.c: Removing deprecated date handling code.
+	* src/engine/qofquerycore.h: Removing deprecated date handling code.
+	* src/engine/qofsession-p.h: Doxygen.
+	* src/engine/qofsession.c: Tweak.
+	* src/engine/qofsql.c: Losing qof/ prefix. Support for INSERT SQL
+	statement and UTC date queries.
+	* src/engine/qofsql.h: Losing qof/ prefix. Doxygen.
+	* src/gnome-utils/QuickFill.h: Doxygen tweak.
+	* src/gnome-utils/account-quickfill.h: Doxygen tweak.
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/gnc-date-edit.c:
+	* src/gnome-utils/gnc-date-format.c:
+	* src/gnome-utils/gnc-date-format.h:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome/druid-loan.c:
+	* src/gnome/top-level.c:
+	* src/import-export/import-main-matcher.c:
+	* src/import-export/import-match-picker.c:
+	* src/register/ledger-core/split-register-layout.h:
+	* src/register/ledger-core/split-register.c:
+	* src/register/ledger-core/split-register.h:
+	* src/register/register-gnome/datecell-gnome.c: Removing deprecated
+	date handling code.
+
+2005-04-24  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome/window-main-summarybar.c: Switch from using a gtk_select
+	with locally-defined widgets to a GtkListStore backing a standard
+	combo box.  Re-define the layout a bit, but it's still ugly.
+	* src/gnome-utils/gtkselect.[ch]: Dead.
+
+2005-04-24  David Hampton  <hampton at employees.org>
+
+	* gnucash/src/core-utils/gnc-gconf-utils.[ch]:
+	* gnucash/src/gnome-utils/gnc-gconf-utils.[ch]: Moved files from
+	the gnome-utils directory to the core-utils directory. Clean up
+	the usage of these functions.  Document the functions with
+	doxygen.
+
+	* various: Changes for the move/cleanup of gnc-gconf.
+
+	* gnucash/src/gnome/schemas/apps_gnucash_dialog_commodities.schemas:
+	* gnucash/src/gnome/schemas/apps_gnucash_dialog_prices.schemas:
+	* gnucash/src/gnome-utils/gnc-tree-view-account.c:
+	* gnucash/src/gnome-utils/gnc-tree-view-commodity.c:
+	* gnucash/src/gnome-utils/gnc-tree-view-price.c: Remove old
+	references to the GtkTreeView "rules_hint" property.  This
+	property is now controlled via the .gtkrc file (where it should
+	be).
+
+	* gnucash/src/gnome/gnc-plugin.[ch]: Add infrastructure for
+	plugins to easily request notification of changes to gconf for a
+	specific section of gnucash variables.
+
+	* configure.in:
+	* gnucash/src/app-file/Makefile.am:
+	* gnucash/src/app-file/gnc-file-history.[ch]:
+	* gnucash/src/app-file/gnc-file-p.h:
+	* gnucash/src/app-file/gw-app-file-spec.scm:
+	* gnucash/src/gnome/gnc-plugin-file-history.[ch]:
+	* gnucash/src/gnome/ui/gnc-plugin-file-history-ui.xml:
+	* gnucash/src/app-file/schemas/Makefile.am:
+	* gnucash/src/app-file/schemas/apps_gnucash_history.schemas: Hook
+	the file history list into gconf.
+
+	* gnucash/src/gnome/gnc-main-window.c:
+	* gnucash/src/gnome/gnc-plugin-page-account-tree.c:
+	* gnucash/src/gnome/gnc-plugin-page.[ch]:
+	* gnucash/src/gnome/window-main-summarybar.c: Move the summary bar
+	to the body of the page, just below the account tree.  Implement
+	support for changing the summary bar when the page is changed,
+	since the register page has a different summary bar. Hook the main
+	window in to use standard desktop gconf key to decide if the
+	toolbar is show as text/icons/both.
+
+2005-04-23  Derek Atkins <derek at ihtfp.com>
+
+	* Merge gog-integ branch into g2 branch.
+
+ --- begin gog-integ Changelog ---
+
+2005-04-17  Derek Atkins <derek at ihtfp.com>
+
+	* configure.in: don't set pkglibdir
+	* lib/goffice/split.c: implement e_xml_get_child_by_name()
+	  GOG branch now builds on FC3.
+
+2005-02-12  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/utility-reports/test-graphing.scm: Add to make
+	graphing development easier.
+
+	* src/gnome-utils/gnc-html-graph-gog.c (handle_barchart): fix;
+	handle stacked-columns.
+	(handle_scatter): add.
+
+2005-02-10  Joshua Sled  <jsled at asynchronous.org>
+
+	* lib/goffice/ : Initial import of libgoffice "port".
+
+ -- end gog-integ Changelog --
+
+2005-04-22  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/scm/main.scm (gnc:main): Expose and use functionality to
+	update the main-window title after init-file load, plus collateral
+	changes.
+
+2005-04-16  Derek Atkins <derek at ihtfp.com>
+
+	* configure.in: Downgrade glib dep to 2.4.0 so it builds on FC3.
+
+2005-04-16  David Hampton  <hampton at employees.org>
+
+	* lots of file: Switch from a requirement of Gtk-2.2 to Gtk-2.4.
+	This replaces all EggAction references with GtkAction, and
+	EggMenuMerge with GtkUIManager.  It also drops all the files in
+	lib/egg since they are no longer needed.  Due to a flub, the log
+	message on the changed source files simply reads 'foo4' instead of
+	containing the previous description.
+
+2005-04-11  Neil Williams  <linux at codehelp.co.uk>
+	* src/app-file/gnc-file.c: Added handlers for
+	write errors and made show_session_error()
+	non-static.
+	* src/app-file/gnc-file.h: Added prototype
+	for show_session_error() so that it can be called
+	to handle errors reported by any backend operation.
+	* src/backend/file/gnc-book-xml-v2.c:
+	* src/backend/file/io-gncxml-v2.c: Wrapping fprintf()
+	in error handler to catch failed write operations.
+	* src/backend/qsf/qsf-backend.c: Handling write errors
+	on QSF export.
+	* src/business/business-gnome/gnc-plugin-business.c:
+	Adding show_session_error support to inform the user of
+	any write errors reported by QSF.
+	* src/engine/qof_book_merge.c: Re-instating fixes to
+	QOF_TYPE_CHAR handling in merge.
+	* src/engine/qofbackend.h: Definition of ERR_FILEIO_WRITE_ERROR
+	* src/gnome/Makefile.am: Building dialog-chart-export with
+	show_session_error from libgncmod-app-file
+	* src/gnome/dialog-chart-export.c: Handling write errors
+	reported by QSF backend, uses show_session_error()
+	* src/gnome/glade/chart-export.glade: Removing nuisance tooltip.
+
+2005-04-03  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/transfer.glade: Make all input fields expand on
+	the X axis.
+
+	* configure.in: Remove reqirement for Berkeley DB.  The G2 branch
+	compiles and runs fine without it.
+
+	* src/gnome-utils/gnc-gnome-utils.c: Have gnucash read a private
+	RC file.  This makes it easy to apply styles to entire classes of
+	widgets in gnucsah without affecting any other application.
+
+	* src/gnome-utils/gnc-tree-view-account.c:
+	* src/gnome-utils/gnc-tree-view-commodity.c:
+	* src/gnome-utils/gnc-tree-view-price.c: Name a couple of new
+	widgets to make it easier to apply styles to them.
+
+	* doc/gtkrc-2.0.gnucash: Provide a sample RC file for gnucash.
+	This file needs work.
+
+2005-03-25  Neil Williams <linux at codehelp.co.uk>
+	* src/backend/qsf/qsf-backend.c: Support for
+	multiple references in the same entity.
+	* src/business/business-gnome/gnc-plugin-business.c:
+	Typo in employee export collection.
+	* src/engine/Account.c:
+	* src/engine/Account.h: qofAccountGetTypeString
+	and qofAccountSetType to use string values for
+	enum types in QOF.
+	* src/engine/Transaction.c:
+	* src/engine/Transaction.h: qofSplitSetParentTrans
+	and qofSplitSetAccount QOF reference QofSetterFunc.
+	* src/engine/qofclass.c: Fixing reference identification.
+	* src/engine/qofsession.c: Removing debug calls. Minor fix.
+	* src/gnome/dialog-chart-export.c: Adding references to
+	generated Transaction and Splits in Chart of Accounts export.
+
+2005-03-21  Neil Williams <linux at codehelp.co.uk>
+	* src/backend/qsf/qsf-backend.c:
+	* src/backend/qsf/qsf-xml.c:
+	* src/backend/qsf/qsf-xml.h: Reference handling improvements.
+	* src/business/business-gnome/gnc-plugin-business.c:
+	* src/business/business-gnome/ui/gnc-plugin-business-ui.xml:
+	  Adding export routines for business objects.
+	* src/engine/qofclass.c:
+	* src/engine/qofclass.h:
+	Reference handling: qof_class_get_referenceList
+	* src/engine/qofsession.c:
+	* src/engine/qofsession.h: Reference handling improvements
+	and improved error handling. Also suspending engine events
+	during copy to improve speed.
+	* src/gnome/dialog-chart-export.c:
+	* src/gnome/glade/chart-export.glade: Removing unnecessary
+	file chooser dialog, using a standard box instead.
+
+2005-03-13  Joshua Sled  <jsled at asynchronous.org>
+
+	* GNOME2_STATUS: Updates; removed some incorrectness, updated for
+	other changes.  Added many new things. :(
+
+	* src/register/register-gnome/gnucash-item-edit.c
+	(gnc_item_edit_set_cursor_pos): Fix reverse dragging/selection,
+	broken because of a change in gtk_editable semantics. :(
+	(gnc_item_edit_draw_info): Turn off pango line wrapping.
+
+2005-03-07  Neil Williams <linux at codehelp.co.uk>
+	* ./src/engine/qofsession.c:Fixing references
+	and empty partial books
+
+2005-03-07  Neil Williams  <linux at codehelp.co.uk>
+	* ./HACKING: Add a tip for using gdb with opt
+	style builds.
+	* ./src/app-file/gnc-file.c: New error message
+	to direct users to merge QSF, not open directly.
+	* ./src/backend/file/gnc-backend-file.c: Debug
+	aids.
+	* ./src/backend/qsf/qsf-backend.c: Fix object
+	count and validation; add to KVP read support.
+	* ./src/backend/qsf/qsf-xml.c: Fix object count
+	validation bug.
+	* ./src/engine/qof_book_merge.c: Fix char merge
+	bug.
+	* ./src/engine/qofbackend.h: New error message
+	support.
+	* ./src/engine/qofsession.c: Fix entity copy
+	parameter list handling. Fix library name error.
+	* ./src/engine/qofsession.h: Doxygen update.
+	* ./src/gnome/Makefile.am: New dialog support.
+	* ./src/gnome/dialog-chart-export.c: New dialog
+	to export the Chart of Accounts to QSF XML.
+	* ./src/gnome/dialog-chart-export.h: Header for
+	new dialog.
+	* ./src/gnome/druid-merge.c: Adding code to
+	support the new dialog.
+	* ./src/gnome/druid-merge.h: New dialog.
+	* ./src/gnome/glade/Makefile.am: New glade file.
+	* ./src/gnome/glade/chart-export.glade: New glade
+	file for Chart of Account export dialog.
+	* ./src/gnome/gnc-main-window.c: Menu commands for
+	new dialog.
+	* ./src/gnome/gnc-plugin-page-account-tree.c:
+	Minor tweak.
+	* ./src/gnome/ui/gnc-main-window-ui.xml: Adding
+	menu option for new dialog.
+	* ./src/gnome/window-main.c: Removing old merge
+	druid commands.
+
+
+2005-02-28  Neil Williams  <linux at codehelp.co.uk>
+
+	* ./src/app-utils/gnc-ui-util.h:
+	* ./src/doc/doxygen_main_page.c:
+	* ./src/engine/Scrub2.c:
+	* ./src/engine/Scrub3.c:
+	* ./src/engine/cap-gains.c:
+	* ./src/engine/gnc-budget-book-p.h:
+	* ./src/engine/gnc-budget-book.c:
+	* ./src/engine/gnc-budget-book.h:
+	* ./src/engine/gnc-budget-cat-p.h:
+	* ./src/engine/gnc-budget-cat.c:
+	* ./src/engine/gnc-budget-cat.h:
+	* ./src/engine/gnc-budget-p.h:
+	* ./src/engine/gnc-budget-period-p.h:
+	* ./src/engine/gnc-budget-period-value-p.h:
+	* ./src/engine/gnc-budget-period-value.c:
+	* ./src/engine/gnc-budget-period-value.h:
+	* ./src/engine/gnc-budget-period.c:
+	* ./src/engine/gnc-budget-period.h:
+	* ./src/engine/gnc-budget.c:
+	* ./src/engine/gnc-budget.h:
+	* ./src/engine/gnc-engine.h:
+	* ./src/engine/gnc-filepath-utils.c:
+	* ./src/engine/gnc-filepath-utils.h:
+	* ./src/engine/policy-p.h:
+	* ./src/engine/policy.c:
+	* ./src/gnome-utils/QuickFill.h:
+	* ./src/gnome-utils/account-quickfill.h:
+	* ./src/gnome-utils/dialog-commodity.c:
+	* ./src/gnome-utils/dialog-commodity.h:
+	* ./src/gnome-utils/gnc-budget-list-tree-model.c:
+	* ./src/gnome-utils/gnc-budget-list-tree-model.h:
+	* ./src/gnome-utils/gnc-budget-tree-model.c:
+	* ./src/gnome-utils/gnc-budget-tree-model.h:
+	* ./src/gnome-utils/gnc-gnome-utils.h:
+	* ./src/gnome-utils/gnc-tree-model-account-types.h:
+	* ./src/gnome-utils/gnc-tree-model-account.h:
+	* ./src/gnome-utils/gnc-tree-model-commodity.h:
+	* ./src/gnome-utils/gnc-tree-model-price.h:
+	* ./src/gnome-utils/gnc-tree-view-account.h:
+	* ./src/gnome-utils/gnc-tree-view-commodity.h:
+	* ./src/gnome-utils/gnc-tree-view-common.h:
+	* ./src/gnome-utils/gnc-tree-view-price.h:
+	* ./src/gnome/dialog-budget-category.c:
+	* ./src/gnome/dialog-budget-category.h:
+	* ./src/gnome/dialog-budget-list.c:
+	* ./src/gnome/dialog-budget-list.h:
+	* ./src/gnome/dialog-budget-workbench.c:
+	* ./src/gnome/dialog-budget-workbench.h:
+	* ./src/gnome/druid-budget-create.c:
+	* ./src/gnome/druid-budget-create.h:
+	* ./src/gnome/gnc-budget-gui.h:
+	* ./src/gnome/gnc-plugin-page-account-tree.h:
+	* ./src/gnome/gnc-plugin-page-register.h:
+	* ./src/report/report-gnome/gnc-plugin-page-report.h:
+	Doxygen tag updates.
+
+2005-02-23  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome/gw-gnc-spec.scm: Expose
+	gnc:window-set-progressbar-window.
+
+	* src/scm/main.scm (gnc:main): Set progress bar window
+	appropriately on startup so file-load feedback is in place.
+
+2005-02-22  Joshua Sled  <jsled at asynchronous.org>
+
+	* GNOME2_STATUS: Reverted from tabular to straight-text formatting
+	of GNOME2_STATUS, with apologies to Paul Kroenwetter.
+
+2005-02-22  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome/gnc-main-window.c (gnc_main_window_setup_window): Add
+	back the summary bar, down in the status-bar area.
+
+2005-02-20  Neil Williams  <linux at codehelp.co.uk>
+
+	* src/app-file/gnc-file.c: Adding messages to handlers for
+	new QSF backend errors.
+	* src/backend/qsf/pilot-qsf-GnuCashInvoice.xml: Correcting
+	the schema namespace URL.
+	* src/backend/qsf/qsf-backend.c:
+	* src/backend/qsf/qsf-xml-map.c:
+	* src/backend/qsf/qsf-xml.c: Re-organising and adding
+	references and almost complete KVP support to QSF backend.
+	* src/backend/qsf/qsf-map.xsd.xml:
+	* src/backend/qsf/qsf-object.xsd.xml: Correcting attribute
+	declarations and schema namespace URL. Adding KVP, double
+	and char support to object schema.
+	* src/backend/qsf/qsf-xml.h: Adding references support,
+	documenting use of a partial QofBook. Changing the namespace URL.
+	* src/engine/gnc-date.c: Fix the last-day-of-month computation for
+	leap years.  Need to use modulo, not divide - needed by other parts
+	of this update, already in HEAD.
+        * src/engine/qof_book_merge.c: Fix double free of the targetList
+        entities that cause xaccGroupGetNumSubAccounts to generate a
+        segmentation fault.
+        * src/engine/kvp_frame.c:
+        * src/engine/kvp_frame.h: Add kvp_value_to_bare_string to
+	generate strings without debug information.
+	* src/engine/qofbackend-p.h: Support for a partial QofBook.
+	The backend needs to handle external references to entities
+	outside this book and save a QofBook that contains any mix of
+	QOF objects, whether or not any specific object exists in the book.
+	* src/engine/qofbackend.h: Adding a further QSF error code for
+	when a GUID string has been mangled and fails to convert to a GUID.
+	* src/engine/qofsession.c: Adding qof_entity_copy routines to
+	copy single, lists or collections of entities between session books.
+	Note: Each function creates a partial QofBook! Only certain backends
+	{QSF} can handle partial books! Use for data export.
+	* src/engine/qofsession.h: Documenting copying entities between
+	sessions and using a partial QofBook. Also, allow a session book to
+	be printed to stdout.
+
+
+2005-02-17  Derek Atkins  <derek at ihtfp.com>
+
+	* configure.in: properly notice that we've got a gtkhtml version.
+
+2005-02-16  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/option-util.c: in lookup_string_option() use
+	  SCM_STRING_CHARS() instead of the older gh guile function.
+	  - removed comment, because the lookup_string_option() works
+	    just fine for text options.
+
+2005-02-15  Derek Atkins  <derek at ihtfp.com>
+
+	Chris Shoemaker's patch: Avoid use of unitialized values in guid.c.
+	* Avoid use of uninitialized values in guid.c
+	  - prevent md5 seeding from using uninitialized stack contents
+	  - give used/null GUID recognizable memory signature
+	  - add a simple test case that helped testing for use of
+	    uninitialized values
+
+2005-02-13  Derek Atkins  <derek at ihtfp.com>
+
+	Chris Shoemaker's patch: Fix various memory leaks.
+	* Fix memory leak of xml parser context in sixtp-stack.c, string in
+	  gnc_plugin_file_history, gdkCursor in cursors.c, GtkIconSources in
+	  gnc-icons.c, several strings in gnc-menu-extensions.c, TimeSpec and
+	  strings in test-engine-stuff.c
+	* added some constness to gnc_ext_gen_action_name()
+
+	Chris Shoemaker's patch: Allow use of gcache'd strings in hashtables.
+	* allow the use of gcache'd strings in ghashtables without leaking
+	  - Introduce functions gnc_string_cache_remove() and
+	    gnc_string_cache_insert()
+	* add comment warning about dangerous macro SAFE_STRCMP_REAL
+	* fix qofbook's leaking of strings in ghashtable by using new
+          gnc_string_cache_* functions
+
+	Chris Shoemaker's patch: Tweaks to kvp_frame.h.
+	* Tweaks to kvp_frame.h
+	  - fix typos
+	  - make #define aliases for asymetric getters/setters
+	  - tweak comments
+	  - comment on and discourage use of kvp_value_get_glist
+
+	Chris Shoemaker's patch: Various comments and typo fixes.
+	* Comments and typo fixes
+
+	Chris Shoemaker's patch: Comments and tweaks for gnc-component-manager.
+	* gnc-component-manager tweaks
+	  - Warn if we approach design limitation of component manager
+	  - pass GUID as const in gnc_gui_get_entity_events, change
+	    prototype, callers, and docs
+	  - Clarify comments about receiving events after entity life-cycle
+
+	Chris Shoemaker's patch: Debugging aids for gnc-plugin-manager
+	* gnc-plugin-manager tweaks
+	  - tweak comments
+	  - add debug traces
+	  - add function gnc_plugin_get_name()
+
+2005-02-02  Derek Atkins  <derek at ihtfp.com>
+
+	Neil Williams' patch to clean up the test-book-merge:
+	* src/engine/test/test-book-merge.c:
+	  The first change is just simplification, the second change is the fix.
+
+2005-01-30  Derek Atkins  <derek at ihtfp.com>
+
+	Neil Williams' QOF sync patch:
+	* This patch updates the QOF merge code to current QOF to bring
+	  the g2 branch into sync. This update also makes
+	  qof_book_merge_param_as_string output strings that are
+	  compatible with QSF: using false instead of FALSE in string
+	  output and using the QSF_XSD_TIME for the datestrings. KVP
+	  handling will be added in the next version.
+
+	* src/engine/Account.c:
+	  This patch fixes: (QofAccessFunc)xaccAccountSetNonStdSCU in
+	  src/engine/Account.c - that's a Set routine allocated as a
+	  QofAccessFunc - the patch changes it to the appropriate Get
+	  routine - the QofSetterFunc is OK.
+
+	* src/engine/gnc-commodity.[ch]:
+	  - Use gnc_commodity_table_find_namespace() throughout
+	  - fix a crash when adding a new namespace to the commodity table.
+
+	* src/engine/Account.c:
+	  - updated implementation of qofAccountSetParent().
+
+2005-01-26  Derek Atkins  <derek at ihtfp.com>
+
+	Neil Williams' QSF Backend.
+
+	* configure.in: add checks for libxml2 (requires >= 2.5.10)
+	* src/backend/qsf: new backend directory
+	* src/app-file/gnc-file.c: add new QSF error strings
+	* src/backend/file/gnc-backend-file.[ch]: detect for QSF input files
+	* src/engine/qofbackend.[ch]: know how to load the QSF backend
+
+2005-01-22  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's patch to convert GncItemEdit to GObject/GLib
+	and fix signal processing:
+
+        * src/register/register-gnome/gnucash-item-edit.h:
+          Made the gnc_item_edit_get_type function return GType
+        * src/register/register-gnome/gnucash-item-edit.h:
+          Made the gnc_item_edit_get_type function use GObject
+        * src/register/register-gnome/gnucash-item-list.c:
+          Removed an extra button_press_event handler
+
+2005-01-10  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's Move GNCDateFormat to GLib patch:
+        * src/gnome-utils/gnc-date-format.h:
+          Added #include <glib.h>
+          Added private member 'disposed' to GncDenseCal struct
+          Added GNC_TYPE_DATE_FORMAT macro
+        * src/gnome-utils/gnc-date-format.c:
+          Converted the following functions to use GObject:
+                gnc_date_format_get_type,
+                gnc_date_format_class_init
+          Created gnc_date_format_dipose function
+
+2005-01-02  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/test/Makefile.am: don't explicitly add -lglib.
+
+	* GNOME2_STATUS: Update from Paul Kronenwetter comparing g2 to HEAD/1.8.
+
+2004-12-23  Derek Atkins  <derek at ihtfp.com>
+
+	Chris Shoemaker's patch to silence gtk errors in dialog-budget-category.c:
+	* we don't need to get our own account TreeModel and set it to our
+	  new account TreeView, because gnc_tree_view_account_new gives us
+	  a TreeView with the global account TreeModel already set.  Plus,
+	  it already has the right TreeModelSort interface, which we are
+	  counting on.
+	* check for NULL before trying to gtk_entry_set_text().
+
+2004-12-20  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's Double free bug in GncDenseCal:
+        * src/gnome-utils/gnc-dense-cal.c:
+          Remove double calls to gdc_free_all_mark_data
+          in object cleanup,
+
+	Stephen Evanchik's patch to Update scheduled transaction dialog:
+        * src/gnome/dialog-sx-from-trans.c:
+          - Removed per-button callbacks in favor of a
+            dialog response callback
+	  - Changed per-button callback functions to
+	    simple 'action' functions that are called
+	    in the response handler.
+          - Migrated away from gtk_signal_connect
+          - Removed references to GNOME 1.x dialog
+          - C Style changes: 'open curly brace on same line'
+          - Moved 'public' function gnc_sx_create_from_trans
+	    to the bottom of the file
+
+2004-12-19  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's Minor touch-ups to GNCCurrencyEdit:
+        * src/gnome-utils/gnc-currency-edit.c:
+          In gnc_currency_edit_get_type added 'const' keyword and
+          final NULL entry in currency_edit_info declaration
+
+          In gnc_currency_edit_new use g_type_class_ref and
+          GNC_TYPE_CURRENCY_EDIT macro; move gtk_type_new to
+          g_object_new
+
+	Stephen Evanchik's patch to remove references to gtk_type_new
+	in converted widgets:
+        * src/gnome-utils/gnc-date-edit.h:
+          Added GNC_TYPE_DATE_EDIT macro
+        * src/gnome-utils/gnc-general-select.h:
+          Added GNC_TYPE_GENERAL_SELECT macro
+        * src/gnome-utils/gnc-date-edit.c:
+        * src/gnome-utils/gnc-general-select.c:
+        * src/gnome-utils/gnc-dense-cal.c:
+          gtk_type_new -> g_object_new
+
+2004-12-18  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's GncDenseCal GObject patch:
+        * src/gnome-utils/gnc-dense-cal.h:
+          Added #include <glib.h>
+          Added private member 'disposed' to GncDenseCal struct
+          Added GNC_TYPE_DENSE_CAL macro
+        * src/gnome-utils/gnc-dense-cal.c:
+          Converted the following functions to use GObject:
+                gnc_dense_cal_get_type,
+                gnc_dense_cal_class_init
+          Renamed gnc_dense_cal_destroy to gnc_dense_cal_dispose
+
+2004-12-17  Derek Atkins  <derek at ihtfp.com>
+
+	Stephen Evanchik's GNCDateEdit GObject patch:
+        * src/gnome-utils/gnc-date-edit.h:
+          Removed #include <gnome.h>
+          Added #include <glib.h>
+          Added private member 'disposed' to GNCDateEdit struct
+        * src/gnome-utils/gnc-date-edit.c:
+          Converted the following functions to use GObject:
+                gnc_date_edit_get_type,
+                gnc_date_edit_class_init
+          Renamed gnc_date_edit_destroy to gnc_date_edit_finalize
+          Added gnc_date_edit_dispose function that handles
+          child widget destruction
+          Explicit casts to GTK_WIDGET in create_children
+
+2004-12-16  Joshua Sled  <jsled at asynchronous.org>
+
+	Stephen Evanchik's GncGeneralSelect GObject cleanup patch:
+	* src/gnome-utils/gnc-general-select.h:
+          Removed #include <glib-object.h>
+          Added #include <glib.h>
+          Added private member 'disposed' to GNCGeneralSelect
+	* src/gnome-utils/gnc-general-select.c:
+          Converted the following functions to use GObject:
+                gnc_general_select_get_type,
+                gnc_general_select_class_init
+          Added gnc_general_select_dispose function that handles
+          child widget destruction
+
+2004-12-15  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/register/register-gnome/gnucash-item-edit.c
+	(create_popup_toggle): realize popup-arrow widget so it gets
+	displayed; correct tyop in "field" name.
+
+2004-12-15  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/register/register-gnome/gnucash-item-edit.c
+	(gnc_item_edit_set_cursor_pos): Re-add
+	text-selection-via-mouse-drag support [still buggy in multiple
+	ways; see GNOME2_STATUS for updates].
+
+	* GNOME2_STATUS: Update status.
+
+2004-12-14  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/business/business-gnome/business-gnome.scm
+	(business-report-function): Change business-report menu path for
+	reporting ui updates.
+
+2004-12-05  Derek Atkins  <derek at ihtfp.com>
+
+	New Account Dialog bug fix from Stephen Evanchik:
+	* src/gnome/glade/account.glade:
+	  - Made Accounts h-scroll box policy automatic.
+	  - Reordered the containing table to two rows, one column
+
+	* configure.in:
+	  change the version number to 1.99 to make it different than HEAD.
+
+2004-12-04  Derek Atkins  <derek at ihtfp.com>
+
+	Fix some deprecated functions:
+	* src/gnome-utils/gnc-gnome-utils.c:
+	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
+	* src/business/business-gnome/dialog-date-close.c:
+	  gnome_pixmap_new_from_file -> gtk_image_new_from_file
+	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
+	* src/business/business-gnome/dialog-invoice.c:
+	  gnome_unconditional_pixmap_file -> gnome_program_locate_file
+	  gnome_pixmap_load_file -> gtk_image_new_from_file
+
+2004-11-30  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome-utils/Makefile.am:
+	  Add DESTDIR to the install hooks
+	* src/gnome/gnc-plugin-page-account-tree.c: Fix spelling of "Account"
+
+2004-10-31  Derek Atkins  <derek at ihtfp.com>
+
+	Heath Martin's x86_64 patch:
+	* lib/egg/egg-menu-merge.c:
+	  change a gint to a gsize
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	  use GINT_TO_POINTER() instead of a direct cast.
+
+	* src/engine/gnc-budget-cat.c:
+	* src/gnome/dialog-budget-workbench.c:
+	  Fixes for ISO C90.  Fixes bug #153472.
+
+2004-08-05  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/gnc-budget*:
+	* src/gnome/*budget*:
+	* src/gnome/glade/budget.glade:
+	* src/gnome-utils/gnc-budget*:
+	  Darin Willits' initial budget code.  Still not fully functional
+	  but the basic UI is there.  See the GNOME2_STATUS for additional
+	  information.
+
+2004-07-20  Derek Atkins <derek at ihtfp.com>
+
+	* lib/egg/eggtoolbar.c
+	  Priit Laes' patch for C90 compliance (only the g2 portion).
+
+2004-07-06  David Hampton  <hampton at employees.org>
+
+	* various files: Merge in changes to HEAD from 2004-05-02
+	  (gnome2-merge-8) through yesterday (gnome2-merge-9).
+
+2004-06-13  Derek Atkins  <derek at ihtfp.com>
+
+	* configure.in: add support for gtkhtml-3.1, remove src/experimental
+	* src/Makefile.am: remove experimental subtree
+	* src/app-file/gncmod-app-file.c: don't need gnc-mdi-utils.h
+	* src/gnome/gnc-window.c: register the gnc-mdi progress handler
+	* src/gnome-utils/gnc-mdi-utils.[ch]: add a progress handler
+	  that gets set by the gnc-window code (just like in gnc-file)
+	  to remove a circular dependency.
+
+2004-05-31  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_set_fwd_button),
+	(gnc_plugin_page_report_set_back_button): forw/back action sensitivity
+	(gnc_plugin_page_report_*_cb): Provide functional backing
+	[forw/back/reload/stop/export/options/print].
+
+2004-05-31  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report-ui.xml: Add
+	report UI decl.
+
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_init),
+	(gnc_plugin_page_report_merge_actions),
+	(gnc_plugin_page_report_unmerge_actions): Create and [un]merge report
+	Actions + toolbar items on page-transitions.
+
+2004-05-31  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome/top-level.c (gnc_html_register_url_cb): Modify to
+	handle hyperlinks better.
+
+	* src/engine/qofbook.c (qof_book_get_entity_by_guid): Add generic
+	GUID lookup [without entity-type being known] to handle historical
+	code.
+
+2004-05-30  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/gnome-utils/gnc-mdi-utils.c (gnc_mdi_show_progress): Proxy
+	progress-display call through to gnc-window code.
+	(gnc_ui_get_toplevel): Re-implement gnc_ui_get_toplevel in a
+	less-correct but valid way.
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_create_widget): Set the top-level window
+	so progress-render calls work during report render-time.
+
+2004-05-24  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome/dialog-new-user.c:
+	* src/gnome/gnc-embedded-window.c:
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome-utils/dialog-transfer.c:
+	* src/gnome-utils/gnc-query-list.c:
+	  Vitaly Lipatov's C-construct patch --
+	  During compiling CVS version of gnucash (tag gnucash-gnome2-dev)
+	  I have found some mistakes makes error with GCC compiler.
+
+	* lib/egg/Makefile.am: don't define *_DISABLE_DEPRECATED when
+	  building libegg.  It causes a build failure on FC2 with
+	  Gnome-2.6/Gtk-2.4 because some Gtk-2.2 functions have been
+	  deprecated.  Oops!
+
+2004-05-15  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report.c
+	(gnc_plugin_page_report_class_init): Add 'report_id'
+	object-property for page-c'tor.
+	(gnc_plugin_page_report_setup): Setup the page's report at creation time so
+	we can get the correct tab labels.
+
+	* src/gnome-utils/gnc-mdi-utils.c (gnc_mdi_show_progress): Weaken
+	assertion while code isn't fully changed over, yet.
+	(gnc_ui_get_toplevel): Comment out b0rken MDI-related code.
+
+2004-05-05  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/window-report.h: Comment interface with
+	recon about usage in the source tree.
+
+	* src/report/report-gnome/gnc-plugin-page-report.c: Copy
+	window-report.c implementation over to here, rename, and get
+	somewhat working again. At this point, report-menu invocations
+	result in a tab being created, and displaying the error message.
+
+2004-05-05  David Hampton  <hampton at employees.org>
+
+	Fixes from Christian Neumair <chris at gnome-de.org>.
+
+	* src/gnome/dialog-new-user.c:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/glade/account.glade:
+	* src/gnome/glade/newuser.glade:
+	* src/gnome-utils/dialog-transfer.[ch]:
+	* src/gnome-utils/transfer.glade: HIGify several dialogs.
+
+2004-05-05  Derek Atkins  <derek at ihtfp.com>
+
+	* lib/egg/egg-menu-merge.c:
+	  we don't have a "ui" so dont notify ourself when merging.
+	* src/gnome-utils/gnc-menu-extensions.scm:
+	  Use empty strings instead of #f for menu items so we don't
+	  cause problems later where we expect to get an actual string.
+	* src/report/report-gnome/report-gnome.scm:
+	  Make sure we actually have a menu-path list!
+
+2004-05-03  David Hampton  <hampton at employees.org>
+
+	Fixes from Christian Neumair <chris at gnome-de.org>.
+
+	* src/gnome-search/search-date.c: Fix a crash.
+
+	* src/gnome-utils/gnc-tree-model-account.c: Fix memory leaks.
+
+	* src/register/register-gnome/gnucash-sheet.c: Fix popup menu.
+
+2004-05-02  David Hampton  <hampton at employees.org>
+
+	* various files: Merge in changes to HEAD from 2004-03-03
+	  (gnome2-merge-7) through today (gnome2-merge-8).
+
+	* src/business/business-core/Makefile.am:
+	* src/business/business-gnome/Makefile.am:
+	* src/import-export/binary-import/Makefile.am: Work around
+	  problems with libltdl3.
+
+	* src/import-export/hbci/druid-hbci-initial.c: Eliminate a couple
+	  of compiler warning messages.
+
+2004-05-02  Joshua Sled  <jsled at asynchronous.org>
+
+	* src/report/report-gnome/gnc-plugin-page-report.[ch]: Plugin-Page
+	  for a report instance; yet to be finished.
+
+	* src/report/report-gnome/report-gnome.scm
+	  (gnc:add-report-template-menu-items): Update menu path
+	  constructors to have the correct gnome2-ui-merging menu path
+	  value.
+
+	* src/gnome-utils/gnc-menu-extensions.[ch]: Partially-completed
+	  changes for using the menu/UI merging code for setting up
+	  extensions menu.
+
+	* src/gnome-utils/gnc-html.[ch]: Revert gtkhtml2 changes; restoring
+	  gtkhtml1 version of the gnc-html.c code allows compatability
+	  with gtkhtml3.
+
+	* src/gnome/ui/gnc-main-window-ui.xml: Add testing MiscAction,
+	  MiscTestAction.
+
+	* src/gnome/gnc-main-window.c (gnc_main_window_cmd_test): Add test
+	  menu item for GtkHtml3-window display.
+	* src/gnome/gnc-main-window.c (gnc_main_window_setup_window): Add
+	  testing code to merge/display menu item, call the
+	  extensions_menu setup routine.
+
+	* configure.in (DB_LIBS): move from gtkhtml2 to gtkhtml3.
+
+	* lib/egg/egg-menu-merge.c (egg_menu_merge_add_ui):
+	  Merge egg_menu_merge_add_ui from gtk-2.4.0 GtkUIManager.
+
+2004-04-10  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-desc.h: add a comment about
+	  the callback functions.
+	* src/import-export/Makefile.am: remove duplicate files, add
+	  import format gnome provider.
+	* src/import-export/gnc-import-format-gnome.c: add a new format
+	  provider to let the user choose a date or numeric format.
+	* src/import-export/import-provider-format.glade:  glade file
+	  for the format provider
+
+	* src/import-export/Makefile.am: add missing header file to noinst list
+	* src/import-export/gnc-import-desc-format.[ch]: callbacks should
+	  take a GNCImportFormatCB*.
+	* src/import-export/gnc-import-format-gnome.c: fix a couple bugs.
+	  - make sure we only include available choices.
+	  - send the right callback.
+	* src/import-export/gncmod-generic-import.c: register the format provider
+	* src/import-export/qif-import/Makefile.am: include and link against
+	  generic import library (for test druid)
+	* src/import-export/qif-import/gnc-druid-test.c: add "format" provider
+	  to druid test
+
+2004-03-05  Tomas Cernaj  <tcernaj at gmx.de>
+
+	* src/register/register-gnome/gnucash-grid.c:
+	  Fix bug in the grid's update method: Called
+	  gnome_canvas_item_request_update() while updating.
+
+2004-03-04  Tomas Cernaj  <tcernaj at gmx.de>
+
+	* src/register/register-gnome/gnucash-cursor.c:
+	* src/register/register-gnome/gnucash-cursor.h:
+	* src/register/register-gnome/gnucash-grid.c:
+	* src/register/register-gnome/gnucash-grid.h:
+	* src/register/register-gnome/gnucash-header.h:
+	* src/register/register-gnome/gnucash-sheet.c:
+	* src/register/register-gnome/gnucash-sheet.h:
+	  Convert to new GType-/GObject-System.
+
+2004-02-09  Derek Atkins  <derek at ihtfp.com>
+
+	* src/import-export/Makefile.am: added new 'format' provider desc
+	* src/import-export/gnc-import-format-cb.[ch]:
+	  Callback object for the import format provider
+	* src/import-export/gnc-import-desc-format.[ch]:
+	  Descriptor for the Import Format Provider, used to choose
+	  Date and Number formats.
+
+2004-02-08  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-desc-file.c:
+	* src/app-utils/gnc-druid-provider-desc-multifile.c:
+	  don't need to cast to the superclass -- just use it directly
+	* src/gnome-utils/Makefile.am:
+	  add multifile sources and glade file
+	* src/gnome-utils/gnc-druid-provider-file-gnome.c:
+	  Call the next_cb with the proper argument (no clue why the compiler
+	  didn't catch this before)
+	* src/gnome-utils/gnc-druid-provider-multifile-gnome.[ch]:
+	* src/gnome-utils/druid-provider-multifile.glade:
+	  Added code and glade file to implement the multifile provider
+	* src/gnome-utils/gncmod-gnome-utils.c:
+	  Register the file and multifile providers
+	* src/import-export/qif-import/gnc-druid-test.c:
+	  Add the file and multifile providers to the druid test
+
+	* src/app-utils/gnc-druid-provider-desc-edge.c:
+	  don't need to cast to the cuperclass -- just use it directly.
+
+	* src/app-utils/gnc-druid-provider-desc/file.[ch]:
+	  add a history_id as a separate member for where to store
+	  file choice history
+	* src/gnome-utils/gnc-druid-provider-file-gnome.c:
+	  use new history_id member
+	* src/import-export/qif-import/gnc-druid-test.c:
+	  set file history_id
+
+	* src/gnome-utils/gnc-druid-gnome.c: remove debugging printfs
+
+	* src/app-utils/gnc-druid.[ch]:
+	  Make sure the jump code CAN allow a recursive jump originating
+	  and ending in the same provider.  Put a counter around the
+	  jump function to make sure we don't walk the tree while we're
+	  jumping.  This will let the last jump win correctly.
+	* src/gnome-utils/gnc-druid-provider-multifile-gnome.c
+	  handle prev-page properly by not allowing you to jump
+	  back while you have any files in the list.
+
+2004-02-07  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-desc-file.[ch]:
+	  Add 'glob' option (should we glob the filename?)
+	  Add a forward pointer to the multifile if we allow multiple file selection
+	* src/app-utils/gnc-druid-provider.c:
+	  Change the class functions so that children don't need to override
+	  all the page-movement functions if they don't need to do so.
+	* src/app-utils/gnc-druid.c:  handle jump_to_provider properly
+	* src/gnome-utils/Makefile.am: added file-chooser provider
+	* src/gnome-utils/gnc-druid-provider-edge-gnome.[ch]:
+	  use basic-gobject framework to reduce the code size
+	  remove non-necessary overrides
+	  remove non-ncessary definitions
+	* src/gnome-utils/gnc-druid-provider-file-gnome.[ch]:
+	  Add a new provider that allows the user to select a file.
+
+2004-01-29  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-*.[ch]:
+	  - move the remove_file() method from the MultiFile to the File Provider
+	  - add a returned gpointer this_file to the file provider callback.
+
+2004-01-23  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/Makefile.am:
+	  Add new multifile provider descriptor
+	* src/app-utils/gnc-druid-provider-desc-multifile.[ch]:
+	  New multi-file provider descriptor
+
+2004-01-22  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/Makefile.am:
+	  Add basic gobject header.
+	* src/app-utils/gnc-basic-gobject.h: provide some macros to
+	  simplify some general gobject creation, for example simple
+	  objects with just a get_type() and new() methods.
+	* src/app-utils/gnc-druid-cb.h:
+	  need to include gnc-druid-provider.h directly
+	* src/app-utils/gnc-druid-cb.c:
+	  implement in terms of the new gnc-gobject macros
+	* src/app-utils/gnc-druid-provider.c:
+	* src/app-utils/gnc-druid-provider-desc.c:
+	* src/app-utils/gnc-druid-provider-desc-edge.c:
+	  implement in terms of the new gnc-gobject macros
+	* src/app-utils/gnc-druid-provider-desc.h:
+	  re-add the various callback routines in terms of a new typedef
+	* src/app-utils/gnc-druid-provider.h:
+	  need to include gnc-druid-provider-desc.h directly
+	* src/import-export/Makefile.am:
+	  Add new files to implement the format-chooser provider framework.
+	* src/import-export/import-prov-desc-format.[ch]:
+	* src/import-export/import-prov-format-cb.[ch]:
+
+	* src/app-utils/Makefile.am:
+	  add new-file druid provider (and callback)
+	* src/app-utils/gnc-druid-provider-desc-file.[ch]:
+	  provider descriptor for enter-file provider
+	* src/app-utils/gnc-druid-provider-file-cb.[ch]:
+	  provider callback for enter-file provider
+
+2004-01-20  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-desc.h: add a pointer to the
+	  provider created from this descriptor.
+	* src/app-utils/gnc-druid-provider.c: set the provider pointer
+	  in the descriptor object.
+	* src/app-utils/gnc-druid.[ch]:
+	  - add pointer to the current provider list node.
+	  - add API to specifically jump to a particular provider
+	  - restructure code to reduce duplication
+	* src/import-export/import-parse.h: add GNCIF_NONE
+
+2004-01-16  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome-utils/gnc-druid-gnome.[ch]: move the next/prev signals to
+	  the pages.  Add a cancel callback to the pages (the druid's main
+	  cancel callback is never called).  Now we get our signals
+	  correct.  Save a reference to the window so we can destroy it..
+	  Use gtk_widget_destroy() instead of g_object_unref().
+	* src/import-export/qif-import/gnc-druid-test.[ch]: add some code
+	  to test the new druid framework.  Build's a test druid.
+	* src/import-export/qif-import/Makefile.am: build new test code
+	* src/import-export/qif-import/gnc-plugin-qif-import*: hook in
+	  the new druid test code; add a new menu item to test the druid.
+
+2004-01-14  Derek Atkins  <derek at ihtfp.com>
+
+	* src/app-utils/gnc-druid-provider-desc-edge.[ch]: add api to
+	  build the provider-desc in one function.
+	* src/app-utils/gnc-druid-provider.[ch]: remove get_pages API;
+	  the sub-class should just insert the list of pages and let
+	  us deal with it.  Also added a last_page() method.
+	* src/app-utils/gnc-druid.c: make sure to delete the providers
+	  when we shut down.
+	* src/gnome-utils/gnc-druid-gnome*.h: move the definition of the
+	  gnome UI to a header that actually get's installed as opposed to
+	  an internal header.
+	* src/gnome-utils/gnc-druid-provider-edge-gnome.[ch]: Implement
+	  a gnome-druid edge-page (first/last page in the druid).  Probably
+	  still need to hook into the next/prev buttons.
+
+	* gnc-druid.[ch]: add gnc_druid_{next,prev}_page() APIs to choose the
+	  default next/previous page in the druid.  This will automatically
+	  walk through the providers to find the next real page.
+	* gnc-druid-gnome.c: hook in handlers for "next" and "back" signals
+	  for default page moves.  This should allow us to constantly keep
+	  track of the current provider.
+
+2004-01-13  Derek Atkins  <derek at ihtfp.com>
+
+	* configure.in: pull in gobject with glib
+	* src/app-utils/Makefile.am: add the gnc-druid files
+	* src/app-utils/gnc-druid*: an abstract druid creation framework.
+
+	* src/app-utils/Makefile.am: add the edge provider description.
+	* src/app-utils/gnc-druid-provider-desc-edge.*: provider descriptor
+	  for edge pages (the first and last page of the druid).
+	* src/app-utils/gnc-druid*:
+	  - add class macros
+	  - add a title to the basic provider desc and clean it up.
+
+	* src/gnome-utils/Makefile.am: add preliminary gnome gnc-druid impl.
+	* src/gnome-utils/gnc-druid-gnome.[ch]:  gnome implementation of gnc-druid
+	* src/app-utils/gnc-druid*:
+	  - move the provider-building into the generic class and add an
+	    "append_provider" method to the druid class.  Use that when
+	    building the druid.
+	  - add a ui_type to the druid class and use that when building providers.
+
+	* src/app-utils/gnc-druid-provider.[ch]: add get_pages() class method.
+	  (I decided I don't need a special gnc-druid-provider-gnome just to
+	   add a get_pages method, as everything would need it anyways).
+	* src/gnome-utils/gnc-druid-gnome.c: use the get_pages() method
+	  to actually build the druid.
+
+	* src/gnome-utils/gncmod-gnome-utils.c: register the gnome-druid and
+	  edge provider.
+
+2004-01-06  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/qofinstance.c: revert fix from 01-01, because it's wrong.
+	  Fix the actual problem, all the ...ReturnGUID() #define's which
+	  don't check that it's passed a NULL value.
+	* src/engine/Transaction.h:
+	* src/engine/Account.h:
+	  Fix ...ReturnGUID() to check whether it was passed a NULL object
+	  and, if so, return the null GUID instead of crashing.
+	* src/business/business-core/gncCustomer.h:
+	* src/business/business-core/gncEmployee.h:
+	* src/business/business-core/gncInvoice.h:
+	* src/business/business-core/gncJob.h:
+	* src/business/business-core/gncTaxTable.h:
+	* src/business/business-core/gncVendor.h:
+	  Fix ...RetGUID() to check whether it was passed a NULL object
+	  and, if so, return the null GUID instead of crashing.
+
+2004-01-01  Derek Atkins  <derek at ihtfp.com>
+
+	* src/engine/qofinstance.c: return a "valid" GUID even if passed a NULL
+	  object, because lots of code assumes you can get a guid all the time.
+	  So, just return guid_null() instead of NULL.  Fixes a SEGV.
+
+2003-12-13  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/gnc-tree-view-commodity.c:
+	* src/gnome-utils/gnc-tree-view-price.c: Update sorting functions.
+
+2003-11-30  David Hampton  <hampton at employees.org>
+
+	* lib/egg/eggtreemodelfilter.c: Fixes from upstream.
+
+	* src/engine/qofsession.[ch]:
+	* src/gnome/gnc-main-window.c:
+	* src/app-file/gnc-file.c: Add support for callback hooks when a
+	session is closed.
+
+	* src/app-utils/gnc-ui-util.[ch]: Expose a previously internal
+	function for getting account balances.
+
+	* configure.in:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-gconf-utils.[ch]:
+	* src/gnome-utils/gnc-gnome-utils.c:  Add some utility functions.
+
+	* src/gnome-utils/gnc-tree-model-account.[ch]:
+	* src/gnome-utils/gnc-tree-view-account.c:
+	* src/gnome-utils/gnc-tree-view-common.[ch]:
+	* src/scm/main-window.scm: Extract basic view manipulation
+	functions into a separate file.  Clean up code and regularize
+	naming scheme.  Add a new column.
+
+	* src/engine/gnc-pricedb.[ch]: Add a couple of functions.
+
+	* configure.in:
+	* src/gnome/dialog-commodities.c:
+	* src/gnome/dialog-price-edit-db.c:
+	* src/gnome/glade/commodities.glade:
+	* src/gnome/glade/price.glade:
+	* src/gnome/schemas/*:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-tree-model-commodity.[ch]:
+	* src/gnome-utils/gnc-tree-model-price.[ch]: Convert the
+	commodities and prices dialog over to the gtk2 based MVC system.
+
+	* src/report/Makefile.am:
+	* src/report/report-gnome/dialog-style-sheet.c:
+	* src/report/report-gnome/gw-report-gnome-spec.scm:
+	* src/report/report-gnome/report.glade: Rework the stylesheets
+	dialog to make it easier to implement in gtk2.
+
+	* src/report/stylesheets/Makefile.am:
+	* src/report/stylesheets/gnc-plugin-stylesheets-ui.xml:
+	* src/report/stylesheets/gnc-plugin-stylesheets.[ch]:
+	* src/report/stylesheets/gncmod-stylesheets.c:
+	* src/scm/main.scm: Install stylesheet menus using the new plugin
+	system.
+
+2003-11-28  David Hampton  <hampton at employees.org>
+
+	* src/engine/gnc-commodity.c: Clarify variable names in data
+	strutures.  Promote the commodity namespace to a externally
+	visible opaque object.  Make commodities and namespaces Qof
+	Instances.  Add more events related to commodities and namespaces.
+	Require the book when creating a new commodity.
+
+	* <bunch-o-files>: Update to provide the book when creating a new
+	commodity.
+
+2003-11-08  David Hampton  <hampton at employees.org>
+
+	* src/app-file/gnc-file.c: Give immediate feedback when the user
+	clicks on the quit button.
+
+	* src/engine/gnc-event.c: Protect the generate_event function from
+	a handler unregistering itself during a callback.
+
+	* src/gnome-utils/dialog-account.c: Don't access the account tree
+	model directly.  Use the view functions no new functionality can
+	easily be added to the view.
+
+	* src/gnome-utils/dialog-options.c: Clean up after the main
+	preferences dialog is closed.
+
+	* src/gnome-utils/gnc-date-edit.c:
+	* src/gnome-utils/gnc-date-format.c:
+	* src/gnome-utils/gnc-dense-cal.c:
+	* src/gnome-utils/gnc-general-select.c:
+	* src/gnome-utils/gtkselect.c: Convert some destroy functions to
+	finalize functions.  Destroy can be called multiple times in gtk2.
+
+2003-11-01  David Hampton  <hampton at employees.org>
+
+	* src/gnome/druid-hierarchy.c:
+	* src/gnome-utils/dialog-account.c:
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Collapse knowledge
+	of the account tree model layering into one place.
+
+2003-10-26  David Hampton  <hampton at employees.org>
+
+	* src/gnome/druid-stock-split.c:
+	* src/gnome-utils/dialog-transfer.c:
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Simplify the way
+	filters are applied to an account tree view.
+
+	* src/gnome/gnc-plugin-page-register.c: Start the "double line"
+	menu item in the correct state.
+
+	* src/gnome/dialog-tax-info.c:
+	* src/gnome/glade/tax.glade: Get "Tax Options" working in the g2
+	port.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/glade/acctperiod.glade:
+	* src/gnome/ui/gnc-main-window-ui.xml: Add the "Close Books" menu
+	item.
+
+	* src/engine/qofid.[ch]: Fix another crash caused by qof changes.
+
+2003-10-25  David Hampton  <hampton at employees.org>
+
+	* src/gnome-utils/dialog-account.[ch]:
+	* src/gnome/gnc-plugin-page-account-tree.c: Fix problems with the
+	modal form of the edit account dialog.  Make AccountWindow an
+	internal data structure. No-one uses it anyway.
+
+	* src/gnome-utils/gnc-icons.c: Register our icons as stock icons.
+
+	* src/gnc-ui.h:
+	* src/gnome/dialog-commodities.c:
+	* src/gnome-utils/commodity.glade:
+	* src/gnome-utils/dialog-account.c:
+	* src/gnome-utils/dialog-commodity.c: The GNC_RESPONSE_xxx names
+	should match the GNC_STOCK_xxx names.
+
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Function to add a
+	new column to an account tree to display kvp data.
+
+	* src/import-export/generic-import.glade:
+	* src/import-export/qif-import/qif.glade: Put back the GtkCLists
+	that the glade upgrade tool removed.  Update for gtk2 dialogs.
+
+	* src/import-export/import-account-matcher.c: Use the account tree widget. Update for
+	gtk2 dialogs.
+
+	* src/import-export/import-format-dialog.c:
+	* src/import-export/import-main-matcher.c:
+	* src/import-export/import-match-picker.c:
+	* src/import-export/qif-import/dialog-account-picker.c: Update for
+	gtk2 dialogs.
+
+	* src/import-export/mt940:
+	* src/import-export/ofx: Install menus using the new plugin
+	system.  Cleanup some gnome2 errors.
+
+	* src/gnome/druid-stock-split.c: Fix a couple crashes.  Remove
+	debugging.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Flush the tree when a
+	visibility filter is applied.  Prevents unwanted nodes from
+	appearing.
+
+2003-10-24  David Hampton  <hampton at employees.org>
+
+	* lots of files: Sync up at the gnome2-merge-4 tag.
+
+2003-10-23  David Hampton  <hampton at employees.org>
+
+	* src/engine/Group.c: Send an event when two accounts are merged.
+
+	* src/gnome-utils/gnc-tree-model-account.c: Add debugging.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Handle an attempt to
+	select the NULL account.
+
+2003-10-20  David Hampton  <hampton at employees.org>
+
+	* src/app-file/gnome/gnc-file-dialog.c: Rewrite using the new
+	gtk_dialog_run function.
+
+	* src/gnome/gnc-main-window.c: Fix the code for creating a new
+	window and moving the current notebook tab to it.
+
+	* src/gnome-utils/dialog-options.c: Bug fixes related to use of
+	GtkTextView widget.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/ui/gnc-main-window-ui.xml:
+	* src/scm/main-window.scm:
+	* src/scm/main.scm: Migrate the "File->Properties" menu item to g2.
+
+2003-10-19  David Hampton  <hampton at employees.org>
+
+	* src/engine/gnc-trace.[ch]: Add a new module for HBCI.
+
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/gnc-plugin-page-account-tree.[ch]:
+	* src/gnome-utils/gnc-gnome-utils.[ch]: Add signals for a new page
+	being added to a window, and for a change of the current page.
+	Add a signal when an account is selected.  Extract common
+	functions.  Expose a function.
+
+	* src/gnome/gnc-plugin-page.[ch]: Add a new function for accessing
+	the name of a plugin page.
+
+	* src/import-export/hbci: Install menus using the new plugin
+	system.  Cleanup some gnome2 errors.
+
+	* configure.in:
+	* src/gnome/gnc-plugin-account-tree.c:
+	* src/gnome/gnc-plugin-file-history.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-plugin-register.c:
+	* src/gnome-utils/gnc-tree-model-account.c:
+	* src/gnome-utils/gnc-tree-view-account.c:
+	* src/import-export/hbci/gnc-plugin-hbci.c:
+	* src/import-export/qif-import/druid-qif-import.c: Configure time
+	option to dump reference counts when gnucash exits.
+
+	* src/import-export/log-replay: Install menu item using the new
+	plugin system.
+
+2003-10-18  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/gnc-ui-util.h:
+	* src/gnome-utils/gnc-tree-model-account.[ch]:
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Add support for the
+	"placeholder" column.
+
+	* src/gnome-utils/gnc-tree-model-example-account.c: Iters are
+	persistent. Mark them as such.
+
+	* src/gnome-utils/gnc-tree-model-selection.c: Bug fixes.
+
+	* src/gnome/druid-hierarchy.c: Overhaul.
+
+	* src/gnome/glade/account.glade: Minor tweaks for druid overhaul.
+
+
+2003-10-17  David Hampton  <hampton at employees.org>
+
+	* src/register/register-gnome/gnucash-sheet.c: Can now enter text
+	in the register.  Fix auto-completion.  Fix selection of a
+	transaction a/o cell when using the mouse.  Use gtk2 functions
+	instead of deprecated gtk1 functions.
+
+	* src/register/register-gnome/gnucash-grid.c: Any cell being
+	edited should use normal text.  Italic text is only for help
+	items.
+
+2003-10-12  David Hampton  <hampton at employees.org>
+
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome/gnc-embedded-window.[ch]: Always provide a parent
+	window. Split the accelerators out into a separate argument.
+
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-window.[ch]: Add an interface for accessing the
+	status bar and progress bar, regardless of whether the window is a
+	main window or an embedded window.
+
+	* src/gnome/gnc-embedded-window.c:
+	* src/gnome/gnc-main-window.c: Implement the new window interface.
+
+	* src/gnome/gnc-plugin-page-register.c: Use the new window
+	interface to update the status bar when moving through the
+	register.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-plugin-page.[ch]: Update status bar code to handle
+	multiple windows, and to track page switches within a window.
+
+	* src/app-file/gncmod-app-file.c:
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-file-history.c:
+	* src/gnome/gnc-window.[ch]:
+	* src/gnome-utils/gnc-mdi-utils.c: Get the progress bar working.
+
+2003-10-11  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/gnc-plugin-business.[ch]:
+	* src/gnome/gnc-plugin-account-tree.[ch]:
+	* src/gnome/gnc-plugin-manager.c:
+	* src/gnome/gnc-plugin-register.[ch]:
+	* src/gnome/gnc-plugin.[ch]:
+	* src/import-export/qif-import/gnc-plugin-qif-import.[ch]: Derive
+	the GncPlugin widget from a GObject instead of a GInterface.
+	Collapse common functions into the base GncPlugin class.
+
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-plugin-file-history.[ch]:
+	* src/gnome/ui/Makefile.am:
+	* src/gnome/ui/gnc-plugin-file-history-ui.xml: Implement file
+	history for new window plugin system.
+
+	* src/app-file/gnc-file-history.h:
+	* src/app-file/gnome/Makefile.am:
+	* src/app-file/gnome/gnc-file-history.c:
+	* src/gnome/top-level.c:
+	* src/gnome/window-main.c:
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/ui/gnc-main-window-ui.xml: Changes for new file history
+	plugin.
+
+2003-10-10  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin-page.[ch]: Support a list of books
+	referenced by each page.
+
+	* src/gnome/gnc-main-window.c: Track installed pages on a
+	per-window basis.  Require all installed pages to specify what
+	books they reference.  Add an event handler to close pages when
+	books are deleted.
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c: Specify books in use by
+	the page.
+
+2003-10-09  David Hampton  <hampton at employees.org>
+
+	* src/engine/FreqSpec.c:
+	* src/engine/test/test-freq-spec.c:
+	* src/gnome-utils/gnc-dense-cal.c: Use new glib names for several
+	functions.
+
+2003-10-07  David Hampton  <hampton at employees.org>
+
+	* src/business/business-gnome/Makefile.am:
+	* src/business/business-gnome/gnc-plugin-business.c:
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-embedded-window.c:
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/gnc-plugin-*.c:
+	* src/gnome/window-acct-tree.c:
+	* src/gnome-utils/gnc-gnome-utils.[ch]:
+	* src/gnome-utils/gnc-icons.c:
+	* src/import-export/qif-import/Makefile.am:
+	* src/import-export/qif-import/gnc-plugin-qif-import.c:
+	* src/report/report-gnome/Makefile.am: Collapse code for ui
+	filename lookup/loading/error checking.
+
+2003-10-06  David Hampton  <hampton at employees.org>
+
+	* src/register/register-gnome/gnucash-style.c: Fix color bleed
+	past end of the register.
+
+	* src/gnome/gnc-split-reg.c: Fix register sizing problems.  Minor
+	cleanup of widget packing.
+
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/gnc-embedded-window.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/glade/sched-xact.glade: Minor cleanup of widget
+	packing.
+
+	* src/scm/path.scm: Update config file names for new version
+	number.
+
+2003-09-30  David Hampton  <hampton at employees.org>
+
+	* src/engine/Query.[ch]:
+	* src/engine/qofquery.[ch]:
+	* src/engine/qofquerycore.[ch]: Add code to extract the date terms
+	from a query.
+
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-embedded-window.[ch]: New support for an embedded
+	'window'.  This 'window' can only show a single plugin page.
+	Perfect for the embedded registers in the scheduled transaction
+	dialogs.
+
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/glade/register.glade:
+	* src/gnome/ui/gnc-main-window-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml: Flesh out the new
+	register gui code.
+
+	* src/gnome/dialog-print-check.[ch]:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/dialog-sxsincelast.c:
+	* src/gnome/top-level.c:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/glade/sched-xact.glade:
+	* src/gnome/ui/Makefile.am:
+	* src/gnome/ui/gnc-plugin-page-sxregister-ui.xml:
+	* src/gnome/ui/gnc-sxed-to-create-window-ui.xml:
+	* src/gnome/ui/gnc-sxed-window-ui.xml: Use the new register gui
+	code.
+
+	* src/gnome/gnc-plugin-page.h:
+	* src/gnome/gnc-main-window.[ch]: Track all installed pages.
+	Don't try to installed a page that is already present.  Just
+	select the existing page and raise the appropriate window to the
+	top.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Intelligently
+	determine the parent window value.
+
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml: Move a menu
+	entry.
+
+	* src/gnome-utils/gnc-query-list.c: Fix missing functionality.
+
+	* src/register/register-gnome/gnucash-item-edit.c: Fix a crash.
+
+	* src/gnome/gnc-split-reg.[ch]:
+	* src/gnome/window-register.[ch]: Remove some no-longer-used code.
+
+	* src/gnome/gnc-plugin-account-tree.[ch]:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/scm/main-window.scm: Automatically open the account tree
+	page at startup.
+
+2003-09-28  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.[ch]:
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/gnc-plugin-page.[ch]: Derive the GncPluginPage widget
+	from a GObject instead of a GInterface.
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Double clicking an
+	account in the account tree now opens it.  Handle the new gtk2
+	'popup-menu' signal.
+
+	* src/register/register-gnome/gnucash-sheet.c: Use the new glib2
+	methods to create objects.
+
+2003-09-27  David Hampton  <hampton at employees.org>
+
+	* lib/egg/egg-action-group.[ch]:
+	* lib/egg/egg-radio-action.[ch]:
+	* src/business/business-gnome/gnc-plugin-business.c:
+	* src/gnome/gnc-main-window.[ch]:
+	* src/gnome/gnc-plugin-account-tree.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-plugin-register.c:
+	* src/gnome/window-acct-tree.c:
+	* src/import-export/qif-import/gnc-plugin-qif-import.c: Track
+	changes to 'actions' in gtk 2.4.
+
+2003-09-21  David Hampton  <hampton at employees.org>
+
+	* lib/egg/egg-menu-merge.c: Back port "smart separators" from the
+	gtk 2.4 code.
+
+	* src/gnome-utils/gnc-tree-model-account.[ch]: Check that a new
+	account belongs to the account tree being displayed by this
+	widget.  It may belong in the scheduled transaction account tree.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page.[ch]: Add a new variable to the plugin
+	pages to hold a pointer to the enclosing window.
+
+2003-09-20  David Hampton  <hampton at employees.org>
+
+	* src/gnome/dialog-scheduledxaction.c: Eliminate run time
+	errors. Still need to convert over to new ui to share code with
+	the register again.
+
+	* src/gnome/druid-loan.c:
+	* src/gnome/glade/sched-xact.glade: Fix up druid for changes in
+	GnomeDruid between gnome1 and gnome2.
+
+	* src/gnome-utils/gnc-dense-cal.c: Use deprecated routine to
+	prevent this code from crashing.  Still need to be converted to
+	use pango routines.
+
+	* src/gnome-utils/gnc-account-sel.c: Don't unregister the event
+	handler twice.
+
+	* src/gnome-utils/dialog-utils.c:
+	* src/gnome-utils/gnc-html.c: Work around gcc 3.3.1 brokenness.
+
+2003-09-19  David Hampton  <hampton at employees.org>
+
+	* configure.in:
+	* src/gnome-utils/gnc-dir.h.in: Tweak a few directory locations.
+
+	* src/gnc-ui.h:
+	* src/business/business-gnome/dialog-*.c:
+	* src/gnome/dialog-new-user.c:
+	* src/gnome/dialog-print-check.c:
+	* src/gnome/dialog-scheduledxaction.c:
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/top-level.c:
+	* src/gnome/window-main.c:
+	* src/gnome/window-reconcile.c:
+	* src/gnome/window-register.c:
+	* src/gnome/glade/Makefile.am:
+	* src/gnome-search/dialog-search.c:
+	* src/gnome-utils/dialog-account.c:
+	* src/gnome-utils/dialog-commodity.c:
+	* src/gnome-utils/print-session.c:
+	* src/import-export/qif-import/druid-qif-import.c:
+	* src/report/report-gnome/window-report.c: Use the gnome2 help
+	browser.
+
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-gnome-utils.c: Update to use the gnome2
+	initialization routine.
+
+	* src/gnome-utils/dialog-utils.[ch]:
+	* src/gnome-utils/druid-utils.c:
+	* src/gnome-utils/gnc-gnome-utils.[ch]:
+	* src/gnome-utils/gnc-splash.c: Migrate functions.  Use the gnome2
+	file locate functionality.
+
+	* src/gnome-utils/gnc-icons.c: Collapse common code into a function.  Use
+	the gnome2 file locate functionality.
+
+	* src/app-utils/gnc-component-manager.c:
+	* src/engine/gnc-event.c: Start ids with the number one.  Allows
+	zero to be used to indicate that a id is not set.
+
+	* src/gnome-utils/gnc-tree-view-account.c: Fix reference counting
+	on the filter model.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Destroy account tree
+	page when the corresponding session is closed.
+
+2003-09-18  David Hampton  <hampton at employees.org>
+
+	* lots of files: Sync up at the gnome2-merge-3 tag.
+
+2003-09-16  David Hampton  <hampton at employees.org>
+
+	* lib/egg/egg-menu-merge.[ch]: Back port the GTK2.4 UI description
+	language.
+
+	* src/business/business-gnome/ui/gnc-plugin-business-ui.xml:
+	* src/gnome/ui/gnc-main-window-ui.xml:
+	* src/gnome/ui/gnc-plugin-account-tree-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
+	* src/gnome/ui/gnc-plugin-page-register-ui.xml:
+	* src/gnome/ui/gnc-plugin-register-ui.xml:
+	* src/import-export/qif-import/gnc-plugin-qif-import-ui.xml:
+	Switch to the new UI description language.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c: Check the error return
+	value after calling the menu-merge routines.
+
+2003-09-13  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-main-window.c: Collapse common functions into one.
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/gnc-plugin-page.[ch]: Add new vector for getting the
+	window title.  The tab_name vector no loner returns a const
+	string.
+
+	* src/gnome/gnc-main-window.c: Always bring a new page to the top
+	of the stack.  Remove unused code.
+
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.[ch]:
+	* src/gnome/gnc-plugin-register.c: Can now open arbitrary account
+	registers.
+
+	* src/gnome/gnc-main-window.c: Track all open windows.  If a
+	caller tries to open a new page but doesn't specify where, use the
+	first window available (which should be the initial window).
+
+	* src/gnome-search/search.glade: Expand the dialog properly.
+
+	* src/gnome/dialog-find-transactions.c:
+	* src/gnome/gnc-plugin-page-register.[ch]: Open a new page for
+	search results.
+
+2003-09-09  David Hampton  <hampton at employees.org>
+
+	* src/gnome-search/dialog-search.c:
+	* src/gnome-search/gnc-general-search.c:
+	* src/business/business-gnome/dialog-xxx.c:
+	* src/business/business-gnome/glade/xxx.glade:
+	* src/business/dialog-tax-table/dialog-tax-table.c:
+	* src/business/dialog-tax-table/tax-tables.glade: Some
+	gnome_dialog to gtk_dialog updates. Move signal information into
+	glade.
+
+2003-09-07  David Hampton  <hampton at employees.org>
+
+	* src/gnome/gnc-plugin.c: Make the plugin widget destructor
+	function optional.
+
+	* src/business/business-gnome/business-gnome.scm:
+	* src/business/business-gnome/businessmod-gnome.c:
+	* src/business/business-gnome/gnc-plugin-business.[ch]:
+	* src/business/business-gnome/ui/gnc-plugin-business-ui.xml:
+	Migrate the main business menu from g1 style to g2 style.
+
+2003-09-06  David Hampton  <hampton at employees.org>
+
+	* lib/egg/eggtreemodelfilter.c: Couple of bug fixes related to
+	using a virtual root.
+
+	* configure.in:
+	* src/engine/guid.c: Convert from pthreads to glib2 threads.
+
+	* src/gnome-utils/misc-gnome-utils.c: Remove conditional g1/g2
+	compilation.
+
+	* src/engine/Group.c:
+	* src/engine/gnc-event.[ch]: Add ADD/REMOVE events for updating
+	the account tree model.
+
+	* src/gnome-search/search-*.c:
+	* src/gnome-search/gnc-general-search.c: Convert from gtk_object
+	style object initialization to g_object style initialization.
+
+	* src/gnome-search/dialog-search.c: Convert from a GnomeDialog to
+	a GtkDialog.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Add back menu
+	sensitivity bases on whether an account is selected.
+
+	* src/gnome-utils/gnc-tree-model-account.[ch]:
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Rework/clean the
+	code.  Add features needed by the code that embeds a
+	gnc-tree-view-account into a window.  I.E. Filters, pseudo
+	top-level account, etc.  Add documentation.
+
+	* src/business/business-gnome/dialog-payment.c:
+	* src/business/dialog-tax-table/dialog-tax-table.c:
+	* src/gnome-search/search-account.c:
+	* src/gnome/dialog-tax-info.c:
+	* src/gnome-utils/dialog-account.c:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/dialog-transfer.c:
+	* src/gnome-utils/transfer.glade:
+	Convert to the new gtktreeview based account tree code.
+
+	* src/gnome-utils/dialog-transfer.c: Get this working for both the
+	case where it is run as a modal dialog (e.g. reconcile) and the
+	case where it is thrown up on the screen and forgotten
+	(e.g. transfer).
+
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-plugin-page.[ch]: Add another function to the
+	plugin interface for deleting the ui widget.  Allows the page to
+	destroy/release anything it needs to.
+
+	* src/gnome/gnc-plugin-page-register.c:
+	* src/gnome/gnc-split-reg.c: Correctly clean up when closing a
+	register.
+
+2003-09-01  David Hampton  <hampton at employees.org>
+
+	* configure.in:
+	* src/gnome-utils/print-session.[ch]: Tony Watts'
+	<tjawatts at totalise.co.uk> fix for compiling with either
+	libgnomeprint 2.0 or 2.2.
+
+2003-08-23  David Hampton  <hampton at employees.org>
+
+	* src/scm/main.scm: Set next version number to 2.0.
+
+	* src/app-util/gnc-ui-util.[ch]: Make a couple of functions public.
+
+	* src/business/business-gnome/business-options-gnome.c:
+	* src/gnome/window-acct-tree.c:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome-utils/dialog-options.h:
+	* src/gnome-utils/gnome-utils.scm:
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/report/report-gnome/dialog-column-view.c:
+	* src/report/report-gnome/dialog-style-sheet.c:
+	* src/report/report-gnome/window-report.c: Collapse common option
+	dialog handling. Tweak args to option dialog creation. Use
+	g_signal_connect to set up signal handlers.
+
+	* src/gnome-utils/preferences.glade: New file to create structure of
+	an options dialog.
+
+	* src/report/report-gnome/report.glade: Make the stylesheets
+	dialog look like a standard gnome2 dialog.
+
+	* src/gnome/druid-stock-split.c:
+	* src/gnome/glade/account.glade:
+	* src/gnome/glade/stocks.glade:
+	* src/gnome-utils/dialog-account.c: Use the new account tree view
+	widget.
+
+	* src/gnome-utils/druid-utils.[ch]: Correct the druid colors and
+	watermarks for gnome2.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Make the options
+	dialog work. Add more features back.
+
+	* src/gnome-utils/Makefile.am: New gnc-tree-view-account.[ch] files.
+
+	* src/gnome-utils/gnc-tree-model-account.[ch]: Flesh out the model
+	to include all the necessary columns.  Make it look like the
+	original account tree.
+
+	* src/gnome-utils/gnc-tree-view-account.[ch]: Common view code for
+	all users of the gnc-tree-model-account.c file.
+
+2003-08-18  David Hampton  <hampton at employees.org>
+
+	* macros/compiler-flags.m4: Add back detailed compile time checks.
+	* various: Fix compile time warnings.
+
+2003-08-15  David Hampton  <hampton at employees.org>
+
+	* src/app-utils/global-options.c: Prevent a crash if there's no
+	callback attached to a register.  This case should only occur
+	during the g2 transition.
+
+	* src/gnome/gnc-plugin-page-register.c: Add short labels for the
+	toolbar actions. Do more register initialization.
+
+	* src/gnome/window-register.c: Need the casts to G_OBJECT. Put
+	them back.
+
+	* src/register/register-gnome/gnucash-date-picker.c:
+	* src/register/register-gnome/gnucash-grid.c:
+	* src/register/register-gnome/gnucash-header.c:
+	* src/register/register-gnome/gnucash-item-edit.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	* src/register/register-gnome/gnucash-style.c: Fix some run time
+	warnings. Tweak the pango layout code so all the register bits are
+	visible.
+
+2003-08-10  David Hampton  <hampton at employees.org>
+
+	* lib/egg/egg-action.c: Fix problem connecting toolbar actions and
+	switching a proxy between actions.
+
+	* lib/egg/egg-menu-merge.c: Make popup menus work.  Remove some
+	debug messages.
+
+	* src/gnc-ui.h:
+	* src/gnome/druid-stock-split.[ch]:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/window-acct-tree.c:
+	* src/gnome/window-register.c: Pass a parent window pointer to the
+	stock druid creation routines.
+
+	* src/gnome/gnc-splash.[ch]:
+	* src/gnome-utils/gnc-splash.[ch]: Move this code to the
+	gnome-utils directory.
+
+	* src/gnome/gnc-plugin-page-account-tree.c: Fix various problems.
+
+	* src/engine/gnc-commodity.c:
+	* src/gnome/dialog-commodities.c:
+	* src/gnome/glade/commodities.glade:
+	* src/gnome-utils/gnc-tree-model-commodity.c:
+	* src/gnome-utils/gnc-tree-model-commodity.h: Enhance the
+	commodity selection dialog.  Now does the right thing when
+	commodities are added or deleted.
+
+	* src/app-file/gnc-file.c: Tear down the splash screen before
+	presenting an error.  Use new gnome2 button order.
+
+	* All dialog-*.c and *.glade files: First pass at converting to
+	Gnome 2 HIG for button order.  Convert gnome1 dialogs to gtk2
+	dialogs. Set the function to activate the default button the
+	gnome2 way (was editable_enters).  Remove some code not needed in
+	gnome2 widget setup.
+
+2003-08-08  David Hampton  <hampton at employees.org>
+
+	* lots of files: Sync up at the gnome2-merge-2 tag.
+
+	* acconfig.h:
+	* macros/autogen.sh:
+	* macros/gnome-guile-checks.m4: Make autoheader stop complaining.
+
+	* all glade files: Run through glade-2 to update syntax and
+	formatting.  The conversion tool and glade-2 itself don't produce
+	the same output.
+
+
+2003-07-16  David Hampton  <hampton at employees.org>
+
+	* most every file: Sync up at the gnome2-merge-1 tag.
+
+2003-06-17  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome/gw-gnc-spec.scm: return the Totd symbol to its
+	  original name
+
+2003-06-14  gettextize  <bug-gnu-gettext at gnu.org>
+
+	* Makefile.am (EXTRA_DIST): Add config.rpath.
+
+2003-06-13  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Cleanup build system.
+	* Makefile.am:
+	* acconfig.h:
+	* autogen.sh:
+	* configure.in:
+	* lib/egg/Makefile.am:
+	* src/app-file/Makefile.am:
+	* src/app-file/gnome/Makefile.am:
+	* src/app-utils/Makefile.am:
+	* src/backend/file/Makefile.am:
+	* src/business/business-core/file/Makefile.am:
+	* src/business/business-gnome/Makefile.am:
+	* src/business/business-ledger/Makefile.am:
+	* src/business/business-utils/Makefile.am:
+	* src/business/dialog-tax-table/Makefile.am:
+	* src/engine/Makefile.am:
+	* src/gnome-search/Makefile.am:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome/Makefile.am:
+	* src/import-export/Makefile.am:
+	* src/import-export/binary-import/Makefile.am:
+	* src/import-export/hbci/Makefile.am:
+	* src/import-export/ofx/Makefile.am:
+	* src/import-export/qif-import/Makefile.am:
+	* src/network-utils/Makefile.am:
+	* src/optional/swig/Makefile.am:
+	* src/register/ledger-core/Makefile.am:
+	* src/register/register-core/Makefile.am:
+	* src/register/register-gnome/Makefile.am:
+	* src/report/report-gnome/Makefile.am:
+	* src/gnome/ui/Makefile.am:
+
+	Port register to GNOME 2. Replace GdkFont stuff by PangoLayout.
+	Replace gtk_type by g_type, gtk_args by gtk_set/get_property, gtk_signal
+	by g_signal.
+	* src/register/register-gnome/combocell-gnome.c: (select_item_cb),
+	(change_item_cb), (activate_item_cb), (key_press_item_cb),
+	(combo_disconnect_signals), (combo_connect_signals),
+	(block_list_signals), (unblock_list_signals),
+	(gnc_combo_cell_gui_destroy), (gnc_combo_cell_destroy),
+	(gnc_append_string_to_list), (gnc_combo_cell_modify_verify),
+	(gnc_combo_cell_gui_realize), (gnc_combo_cell_gui_move),
+	(popup_set_focus), (popup_get_width), (gnc_combo_cell_enter),
+	(gnc_combo_cell_leave):
+	* src/register/register-gnome/datecell-gnome.c: (date_picked_cb),
+	(key_press_item_cb), (gnc_date_cell_realize), (gnc_date_cell_move),
+	(gnc_date_cell_enter), (gnc_date_cell_leave):
+	* src/register/register-gnome/gnucash-cursor.c:
+	(gnucash_item_cursor_draw):
+	* src/register/register-gnome/gnucash-grid.c: (draw_cell),
+	(gnucash_grid_init):
+	* src/register/register-gnome/gnucash-grid.h:
+	* src/register/register-gnome/gnucash-header.c:
+	(gnc_header_update), (gnc_header_draw),
+	(gnc_header_request_redraw), (gnc_header_realize),
+	(gnc_header_unrealize), (gnc_header_finalize),
+	(gnc_header_reconfigure), (gnc_header_set_header_rows),
+	(gnc_header_point), (pointer_on_resize_line), (find_resize_col),
+	(gnc_header_resize_column), (gnc_header_auto_resize_column),
+	(gnc_header_event), (gnc_header_get_property),
+	(gnc_header_set_property), (gnc_header_init),
+	(gnc_header_class_init), (gnc_header_get_type),
+	(gnc_header_realized), (gnc_header_new):
+	* src/register/register-gnome/gnucash-header.h:
+	* src/register/register-gnome/gnucash-item-edit.c:
+	(gnc_item_edit_get_pixel_coords), (gnc_item_edit_draw_info),
+	(gnc_item_edit_free_draw_info_members), (gnc_item_edit_draw),
+	(gnc_item_edit_point), (gnc_item_edit_event),
+	(gnc_item_edit_get_toggle_offset), (gnc_item_edit_update),
+	(gnc_item_edit_realize), (gnc_item_edit_unrealize),
+	(gnc_item_edit_focus_in), (gnc_item_edit_focus_out),
+	(gnc_item_edit_reset_offset), (gnc_item_edit_init), (queue_sync),
+	(gnc_item_edit_redraw), (entry_changed), (gnc_item_edit_dispose),
+	(gnc_item_edit_finalize), (gnc_item_edit_set_cursor_pos),
+	(entry_event), (gnc_item_edit_set_editor),
+	(gnc_item_edit_configure), (gnc_item_edit_claim_selection),
+	(gnc_item_edit_cut_copy_clipboard), (gnc_item_edit_cut_clipboard),
+	(gnc_item_edit_copy_clipboard), (gnc_item_edit_paste_clipboard),
+	(gnc_item_edit_paste_primary), (gnc_item_edit_show_popup_toggle),
+	(gnc_item_edit_hide_popup_toggle), (key_press_popup_cb),
+	(gnc_item_edit_popup_toggled), (block_toggle_signals),
+	(unblock_toggle_signals), (connect_popup_toggle_signals),
+	(disconnect_popup_toggle_signals), (gnc_item_edit_get_property),
+	(gnc_item_edit_set_property), (gnc_item_edit_class_init),
+	(gnc_item_edit_get_type), (gnc_item_edit_new),
+	(gnc_item_edit_new_list), (gnc_item_edit_new_date_picker),
+	(gnc_item_edit_show_popup), (gnc_item_edit_hide_popup),
+	(gnc_item_edit_set_popup), (gnc_item_edit_set_has_selection),
+	(gnc_item_edit_selection_clear), (gnc_item_edit_selection_get),
+	(gnc_item_edit_selection_received):
+	* src/register/register-gnome/gnucash-item-edit.h:
+	* src/register/register-gnome/gnucash-item-list.c:
+	(gnc_item_list_clear), (gnc_item_list_append),
+	(gnc_item_list_select), (gnc_item_list_show_selected),
+	(gnc_item_list_sort), (gnc_item_list_autosize),
+	(gnc_item_list_init), (gnc_item_list_button_event),
+	(gnc_item_list_key_event), (gnc_item_list_class_init),
+	(gnc_item_list_get_type), (tree_view_selection_changed),
+	(gnc_item_list_new):
+	* src/register/register-gnome/gnucash-item-list.h:
+	* src/register/register-gnome/gnucash-scrolled-window.c:
+	(gnc_scrolled_window_get_type), (gnc_scrolled_window_new),
+	(gnc_scrolled_window_class_init), (gnc_scrolled_window_init):
+	* src/register/register-gnome/gnucash-scrolled-window.h:
+	* src/register/register-gnome/gnucash-sheet.c:
+	(gnucash_sheet_hide_editing_cursor),
+	(gnucash_sheet_modify_current_cell), (gnucash_sheet_size_allocate),
+	(gnucash_sheet_focus_in_event), (gnucash_sheet_focus_out_event),
+	(gnucash_sheet_start_editing_at_cursor), (gnucash_motion_event),
+	(gnucash_button_release_event), (gnucash_button_press_event),
+	(gnucash_register_cut_clipboard),
+	(gnucash_register_copy_clipboard),
+	(gnucash_register_paste_clipboard),
+	(gnucash_sheet_clipboard_event), (gnucash_sheet_direct_event),
+	(gnucash_sheet_key_press_event), (gnucash_sheet_col_max_width),
+	(gnucash_sheet_set_scroll_region), (gnucash_sheet_table_load),
+	(gnucash_sheet_selection_clear), (gnucash_sheet_selection_get),
+	(gnucash_sheet_selection_received), (gnucash_sheet_new),
+	(gnucash_register_new):
+	* src/register/register-gnome/gnucash-sheet.h:
+	* src/register/register-gnome/gnucash-style.c:
+	(set_dimensions_pass_one), (set_dimensions_pass_two),
+	(gnucash_style_init):
+	* src/register/register-gnome/gnucash-style.h:
+	* src/register/ledger-core/dialog-dup-trans.c:
+	(gnc_dup_trans_dialog_create), (gnc_dup_trans_dialog):
+	* src/gnome/glade/register.glade:
+	* src/gnome/ui/gnc-main-window-ui.xml:
+	* src/gnome/window-register.c: (gnc_register_date_window),
+	(regWindowLedger), (gnc_register_setup_menu_widgets),
+	(gnc_register_insert_cloned_toolbar_elt):
+
+
+	Rename GNCTreeModel to GncTreeModel like all the other classes.
+	* src/gnome-utils/gnc-tree-model-account.c:
+	(gnc_tree_model_account_get_type),
+	(gnc_tree_model_account_class_init), (gnc_tree_model_account_init),
+	(gnc_tree_model_account_finalize),
+	(gnc_tree_model_account_dispose), (gnc_tree_model_account_new),
+	(gnc_tree_model_account_set_root),
+	(gnc_tree_model_account_get_account),
+	(gnc_tree_model_account_set_toplevel),
+	(gnc_tree_model_account_get_toplevel),
+	(gnc_tree_model_account_get_iter_from_account),
+	(gnc_tree_model_account_get_iter),
+	(gnc_tree_model_account_get_path),
+	(gnc_tree_model_account_get_value),
+	(gnc_tree_model_account_iter_next),
+	(gnc_tree_model_account_iter_children),
+	(gnc_tree_model_account_iter_has_child),
+	(gnc_tree_model_account_iter_n_children),
+	(gnc_tree_model_account_iter_nth_child),
+	(gnc_tree_model_account_iter_parent),
+	(gnc_tree_model_account_refresh):
+	* src/gnome-utils/gnc-tree-model-account.h:
+	* src/gnome-utils/gnc-tree-model-example-account.c:
+	(gnc_tree_model_example_account_get_type),
+	(gnc_tree_model_example_account_class_init),
+	(gnc_tree_model_example_account_init),
+	(gnc_tree_model_example_account_finalize),
+	(gnc_tree_model_example_account_new),
+	(gnc_tree_model_example_account_set_accounts),
+	(gnc_tree_model_example_account_get_account),
+	(gnc_tree_model_example_account_get_flags),
+	(gnc_tree_model_example_account_get_column_type),
+	(gnc_tree_model_example_account_get_iter),
+	(gnc_tree_model_example_account_get_path),
+	(gnc_tree_model_example_account_get_value),
+	(gnc_tree_model_example_account_iter_next),
+	(gnc_tree_model_example_account_iter_children),
+	(gnc_tree_model_example_account_iter_nth_child):
+	* src/gnome-utils/gnc-tree-model-example-account.h:
+	* src/gnome-utils/dialog-account.c: (gnc_account_window_create),
+	(gnc_ui_new_account_window_internal), (gnc_ui_edit_account_window):
+	* src/gnome-utils/dialog-transfer.c:
+	(gnc_xfer_dialog_show_inc_exp_visible_cb),
+	(gnc_xfer_dialog_fill_tree_view), (gnc_xfer_dialog_create),
+	(gnc_transfer_dialog_get_selected_account),
+	(gnc_transfer_dialog_set_selected_account):
+	* src/gnome/druid-hierarchy.c: (update_account_balance),
+	(account_types_tree_view_prepare),
+	(on_choose_account_types_prepare),
+	(account_types_selection_changed), (select_all_clicked),
+	(clear_all_clicked), (get_selected_account_list),
+	(balance_cell_data_func), (on_final_account_prepare):
+	* src/gnome/window-acct-tree.c: (gnc_acct_tree_window_new):
+
+	Port dialogs to GNOME 2. Replace GtkCList by GtkTreeView.
+	Replace gtk_type by g_type, gtk_args by gtk_set/get_property, gtk_signal
+	by g_signal.
+	* src/gnome/dialog-commodities.c:
+	(gnc_commodities_dialog_get_selected),
+	(gnc_commodities_dialog_response), (edit_clicked),
+	(remove_clicked), (add_clicked),
+	(gnc_commodities_dialog_selection_changed),
+	(show_currencies_toggled), (gnc_commodities_dialog_filter_func),
+	(gnc_commodities_dialog_create), (refresh_handler):
+	* src/gnome/glade/commodities.glade:
+	* src/gnome-utils/gnc-tree-model-commodity.[ch]
+	* src/gnome/dialog-fincalc.c: (connect_fincalc_menu_item),
+	(close_handler), (gnc_ui_fincalc_dialog_create):
+	* src/gnome/dialog-tax-info.c: (gnc_tax_info_set_changed),
+	(gnc_tax_info_dialog_get_current_accounts),
+	(gnc_tax_info_dialog_account_filter_func), (gui_to_accounts),
+	(select_subaccounts_clicked), (gnc_tax_info_dialog_response),
+	(tax_info_show_income_accounts), (gnc_tax_info_update_accounts),
+	(gnc_tax_info_income_cb), (gnc_tax_info_dialog_create),
+	(close_handler), (refresh_handler), (gnc_tax_info_dialog):
+	* src/gnome/glade/tax.glade:
+
+	Add window type to the ui plugin system and update plugins.
+	Add icon to the about dialog
+	* src/gnome/gnc-main-window.c: (gnc_main_window_open_page),
+	(gnc_main_window_close_page), (gnc_main_window_class_init),
+	(gnc_main_window_add_plugin), (gnc_main_window_switch_page),
+	(gnc_main_window_change_current_page),
+	(gnc_main_window_plugin_added), (gnc_main_window_plugin_removed),
+	(gnc_main_window_cmd_file_open_new_window),
+	(gnc_main_window_cmd_help_about):
+	* src/gnome/gnc-plugin-account-tree.c:
+	(gnc_plugin_account_tree_add_to_window),
+	(gnc_plugin_account_tree_remove_from_window):
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	(gnc_plugin_page_account_tree_create_widget),
+	(gnc_plugin_page_account_tree_unmerge_actions),
+	(gnc_plugin_page_account_tree_get_icon):
+	* src/gnome/gnc-plugin-page.c: (gnc_plugin_page_get_icon),
+	(gnc_plugin_page_get_plugin_name), (gnc_plugin_page_get_uri),
+	(gnc_plugin_page_inserted), (gnc_plugin_page_removed),
+	(gnc_plugin_page_selected), (gnc_plugin_page_unselected):
+	* src/gnome/gnc-plugin-page.h:
+	* src/gnome/gnc-plugin.c: (gnc_plugin_add_to_window),
+	(gnc_plugin_remove_from_window):
+	* src/gnome/gnc-plugin.h:
+	* src/import-export/qif-import/gnc-plugin-qif-import.c:
+	(gnc_plugin_qif_import_add_to_window),
+	(gnc_plugin_qif_import_remove_from_window):
+
+	Fix window type of splash screen. Add support for startup-notification.
+	* src/gnome/gnc-splash.c: (gnc_show_splash_screen):
+	* src/gnome/gnucash.desktop.in:
+	* src/gnome/top-level.c: (gnc_gui_init),
+	(gnc_configure_file_be_compression):
+
+2003-06-11  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Add Jimmac's icons (http://jimmac.musichall.cz/i.php3?ikony=69).
+	* src/pixmaps/Makefile.am:
+	* src/pixmaps/account-16.png
+	* src/pixmaps/account.png
+	* src/pixmaps/appicon.png
+	* src/pixmaps/delete-account-16.png
+	* src/pixmaps/delete-account.png
+	* src/pixmaps/edit-account-16.png
+	* src/pixmaps/edit-account.png
+	* src/pixmaps/open-account-16.png
+	* src/pixmaps/open-account.png
+
+2003-05-30  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+        Move egg to lib.
+	* configure.in:
+	* lib/Makefile.am:
+        * lib/egg
+	* src/gnome-utils/Makefile.am:
+	* src/import-export/qif-import/Makefile.am:
+
+	* src/gnome-utils/gnc-dense-cal.c: Fix some Gtk 2 incompatibilty problems.
+        (gnc_dense_cal_class_init), (gnc_dense_cal_init):
+
+	Create a new tip of the day dialog.
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-totd-dialog.[ch]:
+	* src/gnome/glade/Makefile.am:
+	* src/gnome/glade/totd.glade:
+	* src/gnome/gw-gnc-spec.scm:
+	* src/gnome/window-main.c: (gnc_main_window_totd_cb):
+	* src/scm/tip-of-the-day.scm:
+
+	Replace GnomeDialog by GtkDialog.
+	* src/gnome/dialog-price-edit-db.c: (prices_response),
+	(remove_old_clicked), (gnc_prices_dialog_create), (close_handler):
+
+	Fix a bug (multiple tabs) in the main window.
+	* src/gnome/gnc-main-window.c: (gnc_main_window_close_page),
+	(gnc_main_window_setup_window), (gnc_main_window_switch_page),
+	(gnc_main_window_cmd_help_totd):
+
+2003-05-27  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	* configure.in: Requires gtk+-2.0 >= 2.2 and libgnomeui-2.0 >= 2.2
+
+	Replace gtk_signal_connect by g_signal_connect and GnomeDialog by
+	GtkDialog
+	* src/gnome/dialog-price-editor.c: (pedit_dialog_response),
+	(connect_type_menu_item), (gnc_price_pedit_dialog_create),
+	(close_handler):
+	* src/gnome/glade/price.glade:
+
+2003-05-26  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Use different actions for different windows so that it is very easy
+	to use more than one main window. This fixes some 'Hacks' in the previous
+	plugin implementation and provides more features for the plugins.
+	The plugins are fixed and 'open in a new window' is implemented.
+	* src/gnome/gnc-main-window.c: (gnc_main_window_open_page),
+	(gnc_main_window_merge_actions), (gnc_main_window_unmerge_actions),
+	(gnc_main_window_get_action_group), (gnc_main_window_init),
+	(gnc_main_window_finalize), (gnc_main_window_add_plugin),
+	(gnc_main_window_plugin_added), (gnc_main_window_plugin_removed),
+	(gnc_main_window_cmd_file_open_new_window):
+	* src/gnome/gnc-main-window.h:
+	* src/gnome/gnc-plugin-manager.c: (gnc_plugin_manager_add_plugin),
+	(gnc_plugin_manager_remove_plugin),
+	(gnc_plugin_manager_get_plugin), (gnc_plugin_manager_init),
+	(gnc_plugin_manager_finalize):
+	* src/gnome/gnc-plugin-manager.h:
+	* src/gnome/gnc-plugin.c: (gnc_plugin_add_to_window),
+	(gnc_plugin_remove_from_window):
+	* src/gnome/gnc-plugin.h:
+	* src/gnome/gnc-plugin-account-tree.c:
+	(gnc_plugin_account_tree_new), (gnc_plugin_account_tree_init),
+	(gnc_plugin_account_tree_plugin_init),
+	(gnc_plugin_account_tree_add_to_window),
+	(gnc_plugin_account_tree_remove_from_window),
+	(gnc_plugin_account_tree_create_page),
+	(gnc_plugin_account_tree_cmd_new_account_tree):
+	* src/gnome/gnc-plugin-account-tree.h:
+	* src/gnome/top-level.c: (gnc_gui_init):
+	* src/import-export/qif-import/gnc-plugin-qif-import.c:
+	(gnc_plugin_qif_import_get_type), (gnc_plugin_qif_import_new),
+	(gnc_plugin_qif_import_plugin_init),
+	(gnc_plugin_qif_import_add_to_window),
+	(gnc_plugin_qif_import_remove_from_window),
+	(gnc_plugin_qif_import_cmd_new_qif_import):
+	* src/import-export/qif-import/gnc-plugin-qif-import.h:
+
+2003-05-26  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Move the plugin handling from the main window into the
+	new plugin manager.
+	* src/gnome/Makefile.am:
+	* src/gnome/gnc-plugin-manager.[ch]:
+	* src/gnome/gnc-main-window.c: (gnc_main_window_add_plugin),
+	(gnc_main_window_setup_window),
+	(gnc_main_window_change_current_page),
+	(gnc_main_window_plugin_added), (gnc_main_window_plugin_removed):
+	* src/gnome/gnc-main-window.h:
+	* src/gnome/top-level.c: (gnc_gui_init):
+
+	Add scrub commands to the account tree page and implement
+	most of the commands.
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	(gnc_plugin_page_account_tree_cmd_open_account),
+	(gnc_plugin_page_account_tree_cmd_open_subaccounts),
+	(delete_account_helper),
+	(gnc_plugin_page_account_tree_cmd_delete_account),
+	(gnc_plugin_page_account_tree_cmd_view_options),
+	(gnc_plugin_page_account_tree_cmd_reconcile),
+	(gnc_plugin_page_account_tree_cmd_transfer),
+	(gnc_plugin_page_account_tree_cmd_stock_split),
+	(gnc_plugin_page_account_tree_cmd_scrub),
+	(gnc_plugin_page_account_tree_cmd_scrub_sub),
+	(gnc_plugin_page_account_tree_cmd_scrub_all):
+	* src/gnome/ui/gnc-plugin-page-account-tree-ui.xml:
+
+	Use the new ui plugin system for the QIF import druid.
+	* src/import-export/qif-import/Makefile.am:
+	* src/import-export/qif-import/druid-qif-import.c:
+	(gnc_ui_qif_import_create_plugin):
+	* src/import-export/qif-import/druid-qif-import.h:
+	* src/import-export/qif-import/gncmod-qif-import.c:
+	(libgncmod_qif_import_LTX_gnc_module_init):
+	* src/import-export/qif-import/gnc-plugin-qif-import.[ch]:
+	* src/import-export/qif-import/gnc-plugin-qif-import-ui.xml:
+
+2003-05-25  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Add some libegg files to the repository.
+	* configure.in:
+	* src/gnome-utils/egg:
+
+	Start to create a replacement for gnome-mdi.
+	* src/gnome/gnc-main-window.c:
+	* src/gnome/gnc-main-window.h:
+	* src/gnome/gnc-plugin-page.c:
+	* src/gnome/gnc-plugin-page.h:
+	* src/gnome/gnc-plugin.c:
+	* src/gnome/gnc-plugin.h:
+	* src/gnome/ui
+	* src/gnome/Makefile.am:
+	* src/gnome/mainwindow-account-tree.c: (select_account_callback):
+	* src/gnome/top-level.c: (gnc_gui_init):
+	* src/gnome/window-acct-tree.c:
+	(gnc_acct_tree_window_set_sensitives),
+	(gnc_acct_tree_window_add_sensitive),
+	(gnc_acct_tree_window_find_popup_item),
+	(gnc_acct_tree_view_labeler), (gnc_acct_tree_view_destroy),
+	(gnc_acct_tree_view_refresh), (gnc_acct_tree_view_new),
+	(gnc_acct_tree_window_create_child),
+	(gnc_main_window_open_accounts),
+	(gnc_acct_tree_window_toolbar_open_cb),
+	(gnc_acct_tree_window_toolbar_edit_cb),
+	(gnc_acct_tree_window_toolbar_add_account_cb),
+	(delete_account_helper), (gnc_acct_tree_window_delete_common),
+	(gnc_acct_tree_window_toolbar_delete_account_cb),
+	(gnc_acct_tree_find_account_from_gncmdi),
+	(gnc_acct_tree_window_menu_open_subs_cb),
+	(gnc_acct_tree_window_menu_edit_cb),
+	(gnc_acct_tree_window_menu_reconcile_cb),
+	(gnc_acct_tree_window_menu_transfer_cb),
+	(gnc_acct_tree_window_menu_stock_split_cb),
+	(gnc_acct_tree_window_menu_add_account_cb),
+	(gnc_acct_tree_window_menu_delete_account_cb),
+	(gnc_acct_tree_window_menu_scrub_cb),
+	(gnc_acct_tree_window_menu_scrub_sub_cb),
+	(gnc_acct_tree_window_menu_scrub_all_cb),
+	(gnc_acct_tree_window_menu_open_cb),
+	(gnc_acct_tree_window_activate_cb),
+	(gnc_acct_tree_window_configure), (gnc_euro_change),
+	(gnc_acct_tree_window_create_toolbar),
+	(gnc_acct_tree_window_create_menu),
+	(gnc_acct_tree_window_select_cb),
+	(gnc_acct_tree_window_get_current_account),
+	(gnc_acct_tree_window_options_new), (gnc_acct_tree_window_destroy),
+	(gnc_acct_tree_button_press_cb), (gnc_acct_tree_window_new),
+	(gnc_acct_tree_window_get_widget),
+	(gnc_acct_tree_window_get_options), (gnc_acct_tree_window_get_id),
+	(gnc_options_dialog_apply_cb), (gnc_options_dialog_help_cb),
+	(gnc_options_dialog_close_cb),
+	(gnc_acct_tree_window_toolbar_options_cb),
+	(gnc_acct_tree_tweak_menu),
+	(gnc_acct_tree_window_cmd_open_account),
+	(gnc_acct_tree_window_cmd_open_subaccounts),
+	(gnc_acct_tree_window_cmd_edit_account),
+	(gnc_acct_tree_window_cmd_reconcile),
+	(gnc_acct_tree_window_cmd_transfer),
+	(gnc_acct_tree_window_cmd_stock_split),
+	(gnc_acct_tree_window_cmd_new_account),
+	(gnc_acct_tree_window_cmd_delete_account),
+	(gnc_acct_tree_window_cmd_view_options):
+	* src/gnome/window-main.c:
+	* src/gnome/window-main.h:
+	* src/scm/main-window.scm:
+
+	Start to convert the acct-tree into a new gnucash plugin.
+	* src/gnome/gnc-plugin-account-tree.c:
+	* src/gnome/gnc-plugin-account-tree.h:
+	* src/gnome/gnc-plugin-page-account-tree.c:
+	* src/gnome/gnc-plugin-page-account-tree.h:
+
+	Add a GtkTreeModel for TreeModelAccountTypes.
+	* src/gnome-utils/gnc-tree-model-account-types.c
+	* src/gnome-utils/gnc-tree-model-account-types.h
+
+	* src/gnome-utils/Makefile.am: Add new files to the Makefile.
+
+	* src/gnome-utils/dialog-account.c: Some small account dialog fixes.
+	(gnc_account_window_create),
+	(gnc_ui_new_account_window_internal), (gnc_ui_edit_account_window):
+
+	Fix the commodity dialog. (Replace GnomeDialog by GtkDialog,
+	GtkSignal by GSignal, etc).
+	* src/gnome-utils/commodity.glade:
+	* src/gnome-utils/dialog-commodity.c: (select_modal_callback),
+	(gnc_ui_commodity_set_help_callback),
+	(gnc_ui_select_commodity_modal_full),
+	(gnc_ui_select_commodity_modal), (select_commodity_close),
+	(gnc_ui_select_commodity_create), (g_strcmp),
+	(gnc_ui_update_commodity_picker),
+	(gnc_ui_select_commodity_destroy),
+	(gnc_ui_select_commodity_response_cb),
+	(gnc_ui_select_commodity_namespace_changed_cb),
+	(gnc_ui_update_namespace_picker), (gnc_ui_namespace_picker_ns),
+	(commodity_close), (gnc_ui_new_commodity_create),
+	(gnc_ui_edit_commodity_create), (new_modal_callback),
+	(gnc_ui_new_commodity_modal_full), (gnc_ui_new_commodity_modal),
+	(gnc_ui_edit_commodity_modal), (gnc_ui_commodity_destroy),
+	(gnc_ui_commodity_ok_cb), (gnc_ui_commodity_help_cb),
+	(gnc_ui_commodity_cancel_cb):
+	* src/gnome-utils/dialog-commodity.h:
+
+	Fix the transfer dialog. (Replace GnomeDialog by GtkDialog,
+	GtkSignal by GSignal, GncAccountTree by GtkTreeModel etc).
+	* src/gnome-utils/dialog-transfer.c:
+	(gnc_xfer_dialog_update_price), (gnc_xfer_dialog_toggle_cb),
+	(gnc_xfer_dialog_set_price_auto),
+	(gnc_xfer_dialog_curr_acct_activate),
+	(price_amount_radio_toggled_cb),
+	(gnc_xfer_dialog_reload_quickfill),
+	(gnc_xfer_dialog_from_tree_selection_changed_cb),
+	(gnc_xfer_dialog_to_tree_selection_changed_cb),
+	(gnc_xfer_dialog_show_inc_exp_visible_cb),
+	(gnc_xfer_dialog_fill_tree_view), (gnc_parse_error_dialog),
+	(gnc_xfer_dialog_quickfill), (gnc_xfer_description_insert_cb),
+	(common_post_quickfill_handler),
+	(gnc_xfer_description_key_press_cb),
+	(gnc_xfer_description_button_release_cb),
+	(gnc_xfer_dialog_update_conv_info), (gnc_xfer_amount_update_cb),
+	(gnc_xfer_update_to_amount), (gnc_xfer_price_update_cb),
+	(gnc_xfer_date_changed_cb), (gnc_xfer_to_amount_update_cb),
+	(gnc_xfer_dialog_select_from_account),
+	(gnc_xfer_dialog_select_to_account),
+	(gnc_xfer_dialog_select_from_currency),
+	(gnc_xfer_dialog_select_to_currency),
+	(gnc_xfer_dialog_lock_account_tree),
+	(gnc_xfer_dialog_lock_from_account_tree),
+	(gnc_xfer_dialog_lock_to_account_tree),
+	(gnc_xfer_dialog_hide_from_account_tree),
+	(gnc_xfer_dialog_hide_to_account_tree),
+	(gnc_xfer_dialog_is_exchange_dialog), (gnc_xfer_dialog_set_amount),
+	(gnc_xfer_dialog_set_description), (gnc_xfer_dialog_set_memo),
+	(gnc_xfer_dialog_set_num), (gnc_xfer_dialog_set_date),
+	(gnc_xfer_dialog_set_exchange_rate), (gnc_xfer_dialog_response_cb),
+	(gnc_xfer_dialog_close_cb), (gnc_xfer_dialog_create),
+	(close_handler), (gnc_xfer_dialog), (gnc_xfer_dialog_close),
+	(gnc_xfer_dialog_set_title),
+	(gnc_xfer_dialog_set_information_frame_label),
+	(gnc_xfer_dialog_set_account_frame_label),
+	(gnc_xfer_dialog_set_from_account_frame_label),
+	(gnc_xfer_dialog_set_to_account_frame_label),
+	(gnc_xfer_dialog_set_from_show_button_active),
+	(gnc_xfer_dialog_set_to_show_button_active),
+	(gnc_xfer_dialog_add_user_specified_button),
+	(gnc_xfer_dialog_toggle_currency_frame), (find_xfer),
+	(gnc_xfer_dialog_run_until_done),
+	(gnc_xfer_dialog_quickfill_to_account),
+	(gnc_transfer_dialog_get_selected_account),
+	(gnc_transfer_dialog_set_selected_account):
+	* src/gnome-utils/dialog-transfer.h:
+	* src/gnome-utils/transfer.glade:
+
+	Fix GncDateEdit. (Replace GtkSignal by GSignal and backport
+	some GnomeDateEdit fixes)
+	* src/gnome-utils/gnc-date-edit.c: (day_selected),
+	(key_press_popup), (position_popup), (set_time), (fill_time_popup),
+	(gnc_date_edit_class_init), (gnc_date_edit_destroy),
+	(date_accel_key_press), (create_children):
+	* src/gnome-utils/gnc-date-edit.h:
+
+2003-05-25  Christian Stimming  <stimming at tuhh.de>
+
+	* src/gnome-utils/gnc-tree-model-example-account.c,
+	src/backend/file/sixtp-dom-parsers.c,
+	src/backend/file/sixtp-utils.c,
+	src/backend/file/test/test-dom-converters1.c,
+	src/backend/file/test/test-string-converters.c,
+	src/calculation/fin.c, src/engine/GNCId.c src/engine/QueryCore.c,
+	src/engine/gnc-engine-util.c src/engine/guid.c,
+	src/engine/test/test-commodities.c, src/network-utils/gnc-gpg.c:
+	Fix signed/unsigned comparison warnings in gcc3.3.
+
+2003-05-22  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	* src/gnome-utils/dialog-account.c:
+	Fix 'Notes' TextView.
+	Fix selection of parent/base accounts.
+	(gnc_account_to_ui),
+	(gnc_ui_to_account), (gnc_account_window_create),
+	(gnc_ui_new_account_window_internal), (gnc_ui_edit_account_window):
+	* src/gnome-utils/gnc-tree-model-account.c:
+	Fix virtual toplevel-account.
+	Add notification for account changes.
+	(gnc_tree_model_account_class_init), (gnc_tree_model_account_init),
+	(gnc_tree_model_account_dispose), (gnc_tree_model_account_new),
+	(gnc_tree_model_account_set_toplevel),
+	(gnc_tree_model_account_get_iter),
+	(gnc_tree_model_account_iter_next),
+	(gnc_tree_model_account_iter_n_children),
+	(gnc_tree_model_account_iter_nth_child),
+	(gnc_tree_model_account_iter_parent), (account_row_inserted),
+	(gnc_tree_model_account_refresh_handler),
+	(gnc_tree_model_account_refresh):
+	* src/gnome/druid-hierarchy.c:
+	Disable test example accounts.
+	(account_types_tree_view_prepare):
+
+2003-05-20  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	* src/gnome-utils/Makefile.am:
+	Add src/file/backend to the INCLUDE dirs.
+
+	* src/gnome-utils/dialog-account.c:
+	Replace GncAccountTree by GtkTreeView and GNCTreeModelAccount.
+	Replace gtk_signal_connect by g_signal_connect.
+	Replace GncDateEdit by GnomeDateEdit (probably a temporary fix).
+	Replace GnomeDialog by GtkDialog
+
+	(gnc_ui_to_account),
+	(gnc_finish_ok), (extra_change_verify), (gnc_edit_account_ok),
+	(gnc_new_account_ok), (gnc_account_window_response_cb),
+	(gnc_account_type_list_create), (gnc_account_window_create),
+	(get_ui_fullname), (close_handler),
+	(gnc_ui_new_account_window_internal),
+	(gnc_ui_new_accounts_from_name_with_defaults),
+	(gnc_ui_edit_account_window), (gnc_ui_refresh_account_window):
+
+	Add support for a virtual toplevel account into the account
+	tree model.
+	* src/gnome-utils/gnc-tree-model-account.c:
+	(gnc_tree_model_account_init), (gnc_tree_model_account_set_root),
+	(gnc_tree_model_account_set_toplevel),
+	(gnc_tree_model_account_get_toplevel),
+	(gnc_tree_model_account_get_iter_from_account),
+	(gnc_tree_model_account_get_iter),
+	(gnc_tree_model_account_get_path),
+	(gnc_tree_model_account_iter_next),
+	(gnc_tree_model_account_iter_children),
+	(gnc_tree_model_account_iter_has_child),
+	(gnc_tree_model_account_iter_n_children),
+	(gnc_tree_model_account_iter_nth_child),
+	(gnc_tree_model_account_iter_parent), (account_row_inserted):
+	* src/gnome-utils/gnc-tree-model-account.h:
+
+	Remove '#if 0' from druid-hierarchy.c and
+	update the account glade file (replace GtkCList/Tree by GtkTreeView)
+	* src/gnome/druid-hierarchy.c:
+	* src/gnome/glade/account.glade:
+
+
+2003-05-19 TomF changes for gnucash-gnome2-dev, 18th batch
+	* src/gnome/dialog-tax-info.c:
+	  Replace broken gtk_text_set_word_wrap (GTK_TEXT (text), TRUE);
+	  by gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
+
+	  Changes made by Jan Arne Petersen  <jpetersen at uni-bonn.de>:
+	* src/gnome/druid-hierarchy.c:
+	  include "gnc-tree-model-account.h", "gnc-tree-model-example-account.h"
+	  Replace deprecated GTK_TREE by GTK_TREE_VIEW; Clear by using
+          gtk_tree_store_clear(GTK_TREE_STORE(gtk_tree_view_get_model()));
+
+	  Replace GTK_SIGNAL_FUNC by G_CALLBACK
+	  gtk_object_set_data by g_object_set_data
+	  Replace gtk_signal_connect by g_signal_connect
+	  Rewrite on_final_account_tree_placeholder_toggled to use:
+	  Replace gtk_signal_handler_block_by_func
+	  by g_signal_handlers_block_by_func,
+ 	  gtk_signal_handler_unblock_by_func by
+	  g_signal_handlers_unblock_by_func,
+	  Replace update_account_balance (GtkCTree *ctree, GtkCTreeNode *node)
+	  by update_account_balance (GNCTreeModelAccount *model,
+		 GtkTreeIter *iter).  In update_account_balance:
+	  Replace gtk_ctree_node_get_row_data
+	  by gnc_tree_model_account_get_account,
+	  gnc_amount_edit_get_amount, xaccAccountGetPlaceholder,
+	  gnc_numeric_zero_p
+
+	  Replace gtk_ctree_node_set_text by
+	  gtk_tree_model_get_path, gtk_tree_model_row_changed,
+	  gtk_tree_path_free (path);
+
+	  Use: GtkTreeView, GtkTreeSelection, GtkTreeModel, GtkTreeIter
+ 	  GTK_TREE_VIEW (hierarchy_get_widget ()), gtk_tree_view_get_selection,
+	  gtk_ctree_node_nth (ctree, GTK_CLIST()),
+	  gtk_tree_selection_get_selected, update_account_balance,
+	  GNC_TREE_MODEL_ACCOUNT, g_object_set_data, G_OBJECT,
+	  GSList, get_example_account_list, GncExampleAccount, Account,
+	  g_new0, gnc_get_current_book, xaccMallocAccountGroup
+
+	  Rewrite account_types_tree_view_prepare,
+	  on_choose_account_types_prepare,
+	  account_types_selection_changed, select_all_clicked,
+	  clear_all_clicked, get_selected_account_list,
+	  balance_cell_data_func, on_final_account_tree_placeholder_toggled,
+	  on_final_account_tree_selection_changed
+
+	  Commented out: struct FinalInsertData_struct,
+	  generate_account_titles, free_account_titles,
+	  add_to_ctree_final_account, insert_final_accounts
+
+	  Rewrite on_final_account_prepare to use:
+	  GtkTreeView, GNCTreeModelAccount, GtkTreeSelection, GtkCellRenderer,
+	  GtkTreeViewColumn, g_object_get_data, gnc_tree_model_account_new,
+	  gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (model));
+	  g_object_unref, gtk_tree_view_get_selection,
+	  gtk_tree_selection_set_mode, g_signal_connect, G_CALLBACK,
+	  gtk_cell_renderer_text_new, gtk_tree_view_column_new_with_attributes,
+	  gtk_tree_view_append_column, gtk_tree_view_column_new_with_attributes,
+	  gtk_cell_renderer_toggle_new, g_object_set,
+	  gtk_tree_view_column_set_cell_data_func, g_object_set_data,
+	  GNC_TREE_MODEL_ACCOUNT, gtk_tree_view_get_model,
+	  gnc_suspend_gui_refresh, gnc_tree_model_account_set_root,
+	  delete_our_final_group, get_selected_account_list,
+	  hierarchy_merge_groups, gnc_tree_model_account_set_root,
+	  gtk_tree_view_expand_all
+
+	  Rewrite on_final_account_tree_selection_changed to use:
+	  GtkTreeModel, GtkTreeIter, gboolean, Account, GNCAmountEdit,
+	  GNCPrintAmountInfo, gnc_numeric, GtkWidget,
+	  gtk_tree_selection_get_selected, get_balance_editor,
+	  gnc_amount_edit_gtk_entry, gtk_entry_set_text,
+	  gtk_widget_set_sensitive, gnc_tree_model_account_get_account,
+	  get_final_balance, gnc_reverse_balance, gnc_numeric_neg,
+	  gnc_account_print_info, gnc_amount_edit_set_print_info,
+	  gnc_amount_edit_set_fraction , block_amount_changed,
+	  gnc_amount_edit_set_amount (balance_edit, balance),
+	  gnc_numeric_zero_p, unblock_amount_changed
+
+
+2003-05-19  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	Fix some nome-mdi problems:
+	* src/gnome-utils/gnc-mdi-utils.c: (gnc_mdi_child_changed_cb),
+	(gnc_mdi_new), (gnc_app_set_title):
+	* src/gnome/window-acct-tree.c: (gnc_acct_tree_view_labeler),
+	(gnc_acct_tree_view_new), (gnc_main_window_open_accounts),
+	(gnc_acct_tree_find_account_from_gncmdi),
+	(gnc_acct_tree_window_new):
+	* src/gnome/window-main.c: (gnc_main_window_get_mdi_child),
+	(gnc_main_window_add_child_cb), (gnc_main_window_add_view_cb),
+	(gnc_main_window_new), (gnc_main_window_dispatch_cb),
+	(gnc_main_window_file_close_cb):
+
+	Replace some gtk_signal and gtk_type methods by g_signal and g_type
+	methods:
+	* src/gnome-utils/gnc-amount-edit.c: (gnc_amount_edit_class_init),
+	(gnc_amount_edit_init), (gnc_amount_edit_changed),
+	(gnc_amount_edit_new):
+	* src/gnome/dialog-commodities.c: (response_cb),
+	(gnc_commodities_dialog_create), (close_handler):
+	* src/gnome/dialog-new-user.c: (gnc_ui_new_user_dialog):
+	* src/gnome/glade/commodities.glade:
+
+	Add GtkTreeModel for Accounts and ExampleAccounts:
+	* src/gnome-utils/Makefile.am:
+	* src/gnome-utils/gnc-tree-model-account.c
+	* src/gnome-utils/gnc-tree-model-account.h
+	* src/gnome-utils/gnc-tree-model-example-account.c
+	* src/gnome-utils/gnc-tree-model-example-account.h
+
+2003-05-18  Derek Atkins  <derek at ihtfp.com>
+
+	* macros/autogen.sh: comment out intltoolize and libtoolize again
+
+2003-05-17  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	* configure.in: Add Makefile.in to AC_OUTPUT targets.
+	* macros/autogen.sh: Add a AM_GLIB_GNU_GETTEXT section to generate a po/Makefile.in.in file.
+
+2003-05-16  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+
+	* configure.in: Add gnucash.desktop, and gnucash.keys to the AC_OUTPUT targets.
+
+	In the following:
+	- Replace gtk_signal by g_signal
+	- Replace GNOME_DOCK by BONOBO_DOCK
+	- Fix wrong gtk_toolbar_new calls
+	- Replace some GTK_OBJECTs by G_OBJECTs
+	- Remove useless GOBJECT_DESTROYED calls
+	- Fix some GType declarations.
+	* src/business/business-gnome/business-gnome-utils.c:
+	(gnc_fill_account_select_combo), (add_menu_item),
+	(make_generic_optionmenu):
+	* src/business/business-gnome/dialog-billterms.c: (make_menu),
+	(new_billterm_dialog), (gnc_ui_billterms_window_new):
+	* src/business/business-gnome/dialog-date-close.c:
+	(gnc_dialog_dates_acct_parented):
+	* src/business/business-gnome/dialog-invoice.c:
+	(gnc_invoice_window_create_popup_menu),
+	(gnc_invoice_update_job_choice), (gnc_invoice_update_proj_job),
+	(gnc_invoice_update_window), (gnc_invoice_new_window),
+	(gnc_invoice_window_new_invoice):
+	* src/business/business-gnome/dialog-payment.c:
+	(new_payment_window):
+	* src/business/business-gnome/dialog-vendor.c:
+	(gnc_vendor_name_changed_cb):
+
+	In the following:
+	Convert the glade files to Glade 2.0 (with libglade-convert)
+	* src/business/business-gnome/glade/billterms.glade:
+	* src/business/business-gnome/glade/customer.glade:
+	* src/business/business-gnome/glade/date-close.glade:
+	* src/business/business-gnome/glade/employee.glade:
+	* src/business/business-gnome/glade/invoice.glade:
+	* src/business/business-gnome/glade/job.glade:
+	* src/business/business-gnome/glade/order.glade:
+	* src/business/business-gnome/glade/payment.glade:
+	* src/business/business-gnome/glade/vendor.glade:
+	* src/business/dialog-tax-table/tax-tables.glade:
+	* src/business/business-gnome/search-owner.c:
+	* src/gnome-utils/commodity.glade:
+	* src/gnome-utils/exchange-dialog.glade:
+	* src/gnome-utils/transfer.glade:
+	* src/gnome/glade/commodities.glade:
+	* src/gnome/glade/fincalc.glade:
+	* src/gnome/glade/help.glade:
+	* src/gnome/glade/newuser.glade:
+	* src/gnome/glade/price.glade:
+	* src/gnome/glade/print.glade:
+	* src/gnome/glade/progress.glade:
+	* src/gnome/glade/register.glade:
+	* src/gnome/glade/stocks.glade:
+	* src/gnome/glade/tax.glade:
+	* src/gnome/glade/userpass.glade:
+	* src/import-export/binary-import/binary-import.glade:
+	* src/import-export/generic-import.glade:
+	* src/import-export/hbci/glade/hbci.glade:
+	* src/import-export/hbci/glade/hbcipass.glade:
+	* src/import-export/ofx/ofx.glade:
+	* src/import-export/qif-import/qif.glade:
+	* src/report/report-gnome/report.glade:
+
+	In the following:
+	- Replace gtk_signal by g_signal
+	- Replace GNOME_DOCK by BONOBO_DOCK
+	- Fix wrong gtk_toolbar_new calls
+	- Replace some GTK_OBJECTs by G_OBJECTs
+	- Remove useless GOBJECT_DESTROYED calls
+	- Fix some GType declarations.
+	(gnc_search_owner_get_type), (gnc_search_owner_class_init),
+	(gnc_search_owner_finalize), (set_owner_widget),
+	(type_option_changed), (add_type_menu_item), (make_type_menu),
+	(how_option_changed), (add_how_menu_item), (make_how_menu):
+	* src/business/dialog-tax-table/dialog-tax-table.c:
+	(add_menu_item), (make_menu), (new_tax_table_dialog),
+	(gnc_ui_tax_table_window_new):
+	* src/gnome-utils/dialog-options.c: (gnc_options_register_stocks):
+	* src/gnome-utils/dialog-utils.c:
+	(gnc_glade_autoconnect_full_func):
+	* src/gnome/dialog-new-user.c: (gnc_ui_new_user_dialog),
+	(gnc_ui_new_user_cancel_dialog):
+	* src/gnome/reconcile-list.c: (gnc_reconcile_list_get_type),
+	(gnc_reconcile_list_new), (gnc_reconcile_list_init),
+	(gnc_reconcile_list_class_init), (gnc_reconcile_list_toggle_row),
+	(gnc_reconcile_list_toggle), (gnc_reconcile_list_select_row),
+	(gnc_reconcile_list_unselect_row), (gnc_reconcile_list_finalize),
+	(gnc_reconcile_list_get_needed_height),
+	(gnc_reconcile_list_get_num_splits),
+	(gnc_reconcile_list_get_current_split),
+	(gnc_reconcile_list_refresh),
+	(gnc_reconcile_list_reconciled_balance),
+	(gnc_reconcile_list_commit), (gnc_reconcile_list_postpone),
+	(gnc_reconcile_list_unselect_all), (gnc_reconcile_list_changed),
+	(gnc_reconcile_list_set_sort_order):
+	* src/gnome/reconcile-list.h:
+	* src/gnome/window-reconcile.c: (gnc_recn_create_menu_bar),
+	(gnc_recn_create_tool_bar), (recnWindowWithBalance):
+	* src/gnome/window-register.c: (gnc_register_setup_menu_widgets),
+	(gnc_register_set_read_only):
+	* src/import-export/binary-import/druid-commodity.c:
+	(make_commodity_druid_page):
+	* src/import-export/import-main-matcher.c:
+	(gnc_gen_trans_list_new):
+	* src/import-export/import-match-picker.c: (init_match_picker_gui):
+	* src/import-export/qif-import/druid-qif-import.c:
+	(gnc_ui_qif_import_loaded_files_prepare_cb),
+	(gnc_ui_qif_import_load_another_cb),
+	(gnc_ui_qif_import_default_acct_back_cb), (make_qif_druid_page):
+
+2003-05-15  Jan Arne Petersen  <jpetersen at uni-bonn.de>
+	* TODO: Remove 15 th batch task
+	* configure.in: Add pkgconfig checks for libgnomeprintui, gal and setenv, putenv checks
+	* src/app-file/gnome/gnc-file-history.c: (gnc_history_update_menu):
+	* src/backend/file/sixtp.c: (sixtp_sax_get_entity_handler): replace CHAR with xmlChar
+	* src/backend/file/sixtp.h: replace CHAR with xmlChar
+	* src/gnome-search/Makefile.am: add GNOME_PRINT_CFLAGS and GNOME_PRINT_LIBS
+
+	In the following:
+	- Fix wrong gtk_signal_new, gtk_signal_connect method-calls
+	- Replace GNOME_DOCK with BONOBO_DOCK
+	- Fix wrong gtk_toolbar_new calls
+	- Replace gtkhtml-1.0 with gtk-html 2.0
+	- Replace some GTK_OBJECTs with G_OBJECTs
+	- Remove useless GOBJECT_DESTROYED calls
+	- Fix some GType declarations.
+	- Convert some *.glade files to glade 2.0.
+	* src/gnome-search/dialog-search.c:
+	(gnc_search_dialog_result_clicked),
+	(gnc_search_dialog_init_result_list),
+	(gnc_search_dialog_display_results), (remove_element),
+	(attach_element), (option_activate), (search_clear_criteria),
+	(get_element_widget), (gnc_search_dialog_add_criterion),
+	(gnc_search_dialog_init_widgets),
+	(gnc_search_dialog_connect_on_close):
+	* src/gnome-search/gnc-general-search.c:
+	(gnc_general_search_class_init), (create_children),
+	(gnc_general_search_set_selected):
+	* src/gnome-search/search-account.c: (gnc_search_account_get_type),
+	(gnc_search_account_class_init), (gnc_search_account_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search-boolean.c: (gnc_search_boolean_get_type),
+	(gnc_search_boolean_class_init), (gnc_search_boolean_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search-core-type.c:
+	(gnc_search_core_type_get_type), (gnc_search_core_type_class_init),
+	(gnc_search_core_type_init), (gnc_search_core_type_finalize),
+	(gnc_search_core_type_new), (gnc_search_core_type_editable_enters),
+	(gnc_search_core_type_grab_focus), (gnc_search_core_type_validate),
+	(gnc_search_core_type_clone), (gnc_search_core_type_get_widget),
+	(gnc_search_core_type_get_predicate),
+	(gnc_search_core_type_new_type_name), (validate), (grab_focus),
+	(editable_enters), (gnc_search_core_register_type), (init_table),
+	(gnc_search_core_initialize), (gnc_search_core_finalize):
+	* src/gnome-search/search-core-type.h:
+	* src/gnome-search/search-date.c: (gnc_search_date_get_type),
+	(gnc_search_date_class_init), (gnc_search_date_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search-double.c: (gnc_search_double_get_type),
+	(gnc_search_double_class_init), (gnc_search_double_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search-int64.c: (gnc_search_int64_get_type),
+	(gnc_search_int64_class_init), (gnc_search_int64_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search-numeric.c: (gnc_search_numeric_get_type),
+	(gnc_search_numeric_class_init), (gnc_search_numeric_finalize),
+	(how_option_changed), (option_changed), (add_menu_item),
+	(make_how_menu), (make_option_menu), (gncs_get_widget):
+	* src/gnome-search/search-reconciled.c:
+	(gnc_search_reconciled_get_type),
+	(gnc_search_reconciled_class_init),
+	(gnc_search_reconciled_finalize), (option_changed),
+	(toggle_changed), (add_menu_item), (make_menu), (make_toggle):
+	* src/gnome-search/search-string.c: (gnc_search_string_get_type),
+	(gnc_search_string_class_init), (gnc_search_string_finalize),
+	(option_changed), (add_menu_item), (make_menu), (gncs_get_widget):
+	* src/gnome-search/search.glade:
+	* src/gnome-utils/dialog-utils.c: (gnc_option_menu_set_one_item),
+	(gnc_option_menu_init_w_signal), (gnc_glade_autoconnect_full_func):
+	* src/gnome-utils/dialog-utils.h:
+	* src/gnome-utils/druid-utils.h:
+	* src/gnome-utils/gnc-account-sel.c: (gnc_account_sel_get_type),
+	(gnc_account_sel_class_init), (gnc_account_sel_init),
+	(gnc_account_sel_new), (gnc_account_sel_finalize),
+	(gnc_account_sel_dispose),
+	(gnc_account_sel_set_new_account_ability),
+	(gnc_account_sel_set_new_account_modal):
+	* src/gnome-utils/gnc-account-sel.h:
+	* src/gnome-utils/gnc-account-tree.c: (gnc_account_tree_get_type),
+	(gnc_account_tree_new), (gnc_account_tree_init),
+	(gnc_account_tree_class_init), (gnc_account_tree_set_view_info),
+	(gnc_account_tree_get_view_info),
+	(gnc_account_tree_expand_account),
+	(gnc_account_tree_toggle_account_expansion),
+	(gnc_account_tree_expand_all), (gnc_account_tree_set_view_filter),
+	(gnc_account_tree_set_selectable_filter),
+	(gnc_account_tree_finalize), (gnc_account_tree_dispose):
+	* src/gnome-utils/gnc-account-tree.h:
+	* src/gnome-utils/gnc-amount-edit.c: (gnc_amount_edit_get_type),
+	(gnc_amount_edit_class_init):
+	* src/gnome-utils/gnc-amount-edit.h:
+	* src/gnome-utils/gnc-currency-edit.c:
+	(gnc_currency_edit_get_type), (gnc_currency_edit_class_init),
+	(gnc_currency_edit_init):
+	* src/gnome-utils/gnc-currency-edit.h:
+	* src/gnome-utils/gnc-date-delta.c: (gnc_date_delta_get_type),
+	(gnc_date_delta_class_init):
+	* src/gnome-utils/gnc-date-delta.h:
+	* src/gnome-utils/gnc-frequency.c: (gnc_frequency_get_type),
+	(gnc_frequency_class_init):
+	* src/gnome-utils/gnc-frequency.h:
+	* src/gnome-utils/gnc-general-select.c: (create_children):
+	* src/gnome-utils/gnc-html-history.c: (gnc_html_history_append):
+	* src/gnome-utils/gnc-html.c: (gnc_html_parse_url), (http_allowed),
+	(https_allowed), (gnc_network_allowed), (gnc_html_http_request_cb),
+	(gnc_html_start_request), (gnc_html_load_to_stream),
+	(gnc_html_link_clicked_cb), (gnc_html_request_url_cb),
+	(gnc_html_object_requested_cb), (gnc_html_on_url_cb),
+	(gnc_html_set_base_cb), (gnc_html_submit_cb), (gnc_html_open_scm),
+	(gnc_html_show_data), (gnc_html_show_url), (gnc_html_reload),
+	(gnc_html_new), (html_cancel_helper), (gnc_html_cancel),
+	(gnc_html_destroy), (gnc_html_set_urltype_cb),
+	(gnc_html_set_load_cb), (gnc_html_set_flyover_cb),
+	(gnc_html_set_button_cb), (gnc_html_export), (gnc_html_print),
+	(gnc_html_get_history), (gnc_html_get_widget),
+	(gnc_html_register_object_handler),
+	(gnc_html_unregister_object_handler):
+	* src/gnome-utils/gnc-html.h:
+	* src/gnome-utils/gnc-mdi-utils.c: (gnc_mdi_show_progress),
+	(gnc_mdi_child_find_menu_item), (gnc_mdi_child_find_toolbar_item),
+	(gnc_mdi_child_changed_cb), (gnc_mdi_has_apps),
+	(gnc_mdi_create_child_toolbar):
+	* src/gnome-utils/gnc-menu-extensions.c:
+	(gnc_create_extension_info), (cleanup_extension_info),
+	(gnc_add_c_extension):
+	* src/gnome-utils/gtkselect.c: (gtk_select_get_pos):
+	* src/gnome-utils/gw-gnome-utils-spec.scm:
+	* src/gnome-utils/print-session.c: (gnc_print_session_create),
+	(gnc_print_session_print), (gnc_print_session_render),
+	(gnc_print_session_preview):
+	* src/gnome-utils/print-session.h:
+	* src/gnome-utils/search-param.c: (gnc_search_param_get_type),
+	(gnc_search_param_class_init), (gnc_search_param_finalize),
+	(gnc_search_param_clone), (gnc_search_param_set_param_path),
+	(gnc_search_param_override_param_type),
+	(gnc_search_param_get_param_path),
+	(gnc_search_param_get_converters),
+	(gnc_search_param_get_param_type), (gnc_search_param_set_title),
+	(gnc_search_param_set_justify), (gnc_search_param_type_match):
+	* src/gnome-utils/search-param.h:
+	* src/gnome-utils/window-help.c:
+	(gnc_help_window_search_button_cb):
+	* src/gnome/dialog-print-check.c:
+	(gnc_ui_print_check_dialog_create):
+	* src/gnome/dialog-scheduledxaction.c: (gnc_sxed_check_changed),
+	(gnc_sxed_check_consistent), (gnc_sxed_save_sx),
+	(gnc_sxed_get_widgets), (schedXact_editor_populate),
+	(gnc_sxed_update_cal):
+	* src/gnome/dialog-sxsincelast.c: (reminders_prep), (created_prep),
+	(obsolete_prep), (auto_create_prep), (to_create_prep),
+	(add_reminders_to_gui), (add_dead_list_to_gui):
+	* src/gnome/dialog-tax-info.c:
+	* src/gnome/druid-hierarchy.c:
+	* src/gnome/druid-loan.c: (gnc_loan_druid_get_widgets):
+	* src/gnome/glade/account.glade:
+	* src/gnome/glade/sched-xact.glade:
+	* src/gnome/gnc-splash.c: (gnc_show_splash_screen):
+	* src/gnome/gnc-split-reg.c: (gsr_create_popup_menu):
+	* src/gnome/mainwindow-account-tree.c:
+	(gnc_mainwin_account_tree_class_init),
+	(gnc_mainwin_account_tree_get_type):
+	* src/gnome/reconcile-list.c: (gnc_reconcile_list_init),
+	(gnc_reconcile_list_class_init),
+	(gnc_reconcile_list_get_needed_height):
+	* src/gnome/window-acct-tree.c: (gnc_acct_tree_view_new):
+	* src/gnome/window-main-summarybar.c:
+	(gnc_main_window_summary_new):
+	* src/gnome/window-main.c: (gnc_main_window_app_created_cb),
+	(gnc_main_window_flip_summary_bar_cb), (gnc_main_window_about_cb):
+	* src/network-utils/gnc-http.c: (gnc_http_new):
+	* src/register/register-gnome/combocell-gnome.c:
+	(combo_disconnect_signals), (combo_connect_signals):
+	* src/register/register-gnome/datecell-gnome.c:
+	(date_picker_disconnect_signals), (date_picker_connect_signals):
+	* src/register/register-gnome/gnucash-color.c:
+	(gnucash_color_alloc), (gnucash_color_alloc_gdk),
+	(gnucash_color_alloc_name), (gnucash_color_argb_to_gdk),
+	(gnucash_color_init):
+	* src/register/register-gnome/gnucash-date-picker.c:
+	(gnc_date_picker_class_init):
+	* src/register/register-gnome/gnucash-grid.c:
+	(gnucash_grid_update):
+	* src/register/register-gnome/gnucash-item-edit.c:
+	(item_edit_draw_info), (item_edit_destroy),
+	(item_edit_set_cursor_pos), (item_edit_claim_selection),
+	(item_edit_cut_copy_clipboard), (item_edit_selection_get),
+	(item_edit_selection_received):
+	* src/register/register-gnome/gnucash-item-edit.h:
+	* src/register/register-gnome/gnucash-item-list.c:
+	(gnc_item_list_class_init):
+	* src/register/register-gnome/gnucash-sheet.c:
+	(gnucash_sheet_modify_current_cell), (gnucash_sheet_insert_cb),
+	(gnucash_sheet_delete_cb), (gnucash_sheet_check_grab),
+	(gnucash_button_press_event), (gnucash_sheet_direct_event),
+	(gnucash_sheet_key_press_event):
+	* src/register/register-gnome/table-gnome.c:
+	(gnc_table_save_state):
+	* src/report/report-gnome/dialog-column-view.c:
+	(gnc_column_view_edit_options):
+	* src/report/report-gnome/window-report.c:
+	(gnc_report_window_view_new):
+
+
+2003-05-15 TomF changes for gnucash-gnome2-dev, 15th batch
+	* src/gnome/druid-stock-split.c: gnc_stock_split_druid_create:
+	  Use gnome_druid_page_edge functions instead of gnc_druid
+	  Replace gnc_get_gdk_imlib_image by 	gdk_pixbuf_new_from_file
+	* src/gnome-utils/druid-utils.c, src/gnome-utils/druid-utils.h:
+	  Remove functions with < 2 callers:
+	  gnc_druid_set_logo_image,
+	  gnc_druid_set_watermark_image, gnc_druid_set_title_image
+
+	  In the following, use new gnome_druid function names.
+	* src/gnome-utils/druid-utils.c: gnc_druid_set_colors:
+	* src/import-export/qif-import/druid-qif-import.c
+
+
+2003-05-12 TomF changes for gnucash-gnome2-dev, 14th batch
+	* TODO: Added items for conversion to Pango,
+	  druid, GnomeMDI
+	* src/gnome-utils/dialog-utils.c:
+	  Change fontdesc to font_desc
+	  glade_xml_new (fname, root, NULL): Use NULL for default domain.
+	* src/gnome-utils/dialog-utils.h:
+	  Enable gnc_get_mdi_mode
+
+	  In the following, use GTK_CLASS_TYPE macro
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/mainwindow-account-tree.c
+	* src/gnome/reconcile-list.c:
+	* src/gnome-search/gnc-general-search.c
+	* src/gnome-utils/gnc-account-tree.c
+	* src/gnome-utils/gnc-date-delta.c
+	* src/gnome-utils/gnc-date-edit.c
+	* src/gnome-utils/gnc-frequency.c
+	* src/gnome-utils/gnc-general-select.c
+	* src/register/register-gnome/gnucash-date-picker
+	* src/register/register-gnome/gnucash-item-list
+	* src/register/register-gnome/gnucash-sheet.c
+
+	  In the following, use the 2.0 compatability function
+	  gdk_font_from_description instead of the 2.2 compatability function
+	  gdk_font_from_description_for_display to correct error in 13th batch.
+	  Replace deprecated:
+    	  gtk_editable_claim_selection( GTK_EDITABLE by
+	  gtk_old_editable_claim_selection( GTK_OLD_EDITABLE
+	* src/gnome-utils/dialog-transfer.c:
+	* src/gnome-utils/dialog-utils.c:
+	* src/register/register-gnome/gnucash-item-edit.c:
+	* src/gnome-utils/gnc-dense-cal.c:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome/reconcile-list.c:
+	* src/gnome/dialog-totd.c:
+	* src/gnome/dialog-tax-info.c:
+	* src/gnome/dialog-price-edit-db.c:
+	* src/gnome/dialog-commodities.c:
+
+2003-05-02  Christian Stimming  <stimming at tuhh.de>
+
+	* configure.in: Add pkg-config test for libgnomeui-2.0.
+	* src/import-export/hbci/*.c: Port hbci import module to Gnome2,
+	sourcecode compiles now. Copy changes from HEAD branch.
+
+2003-05-02 TomF changes for gnucash-gnome2-dev, 13th batch
+	* src/gnome-utils/dialog-options.c:
+	  Replace deprecated gdk_font_from_description by
+	  gdk_font_from_description_for_display
+	  #include <gdk/gdk.h>
+
+
+	  In the following:
+	  Replace x->font by gdk_font_from_description_for_display(
+		gdk_display_get_default(),x->font_desc)
+	  to account for style field restructure.
+	* src/gnome-utils/dialog-utils.c:
+	* src/register/register-gnome/gnucash-item-edit.c:
+	* src/gnome-utils/gnc-dense-cal.c:
+	* src/gnome-utils/dialog-transfer.c:
+	* src/gnome-utils/dialog-options.c:
+	* src/gnome/reconcile-list.c:
+	* src/gnome/dialog-totd.c:
+	* src/gnome/dialog-tax-info.c:
+	* src/gnome/dialog-price-edit-db.c:
+	* src/gnome/dialog-commodities.c:
+
+
+	  In the following:
+	  Replace object_class->g_type by GTK_CLASS_TYPE(object_class)
+	  to use macro instead of inherited field reference.
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/gnc-split-reg.c:
+	* src/gnome/mainwindow-account-tree.c:
+	* src/gnome/mainwindow-account-tree.c:
+	* src/gnome/mainwindow-account-tree.c:
+	* src/gnome/reconcile-list.c:
+	* src/gnome/reconcile-list.c:
+	* src/gnome-search/gnc-general-search.c:
+	* src/gnome-utils/gnc-account-tree.c:
+	* src/gnome-utils/gnc-account-tree.c:
+	* src/gnome-utils/gnc-date-delta.c:
+	* src/gnome-utils/gnc-date-delta.c:
+	* src/gnome-utils/gnc-date-edit.c:
+	* src/gnome-utils/gnc-date-edit.c:
+	* src/gnome-utils/gnc-dense-cal.c:
+	* src/gnome-utils/gnc-frequency.c:
+	* src/gnome-utils/gnc-general-select.c:
+	* src/register/register-gnome/gnucash-date-picker.c:
+	* src/register/register-gnome/gnucash-date-picker.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	* src/register/register-gnome/gnucash-item-list.c:
+	* src/register/register-gnome/gnucash-sheet.c:
+	* src/register/register-gnome/gnucash-sheet.c:
+	* src/register/register-gnome/gnucash-sheet.c:
+
+
+
+
+
+2003-04-29 TomF changes for gnucash-gnome2-dev, 12th batch
+	* src/gnome-utils/gnc-date-edit.c:gnc_date_edit_class_init:
+	  Replace object_class->type by object_class->g_type
+	  to reflect change in GtkObjectClass
+	  Delete call of deprecated  gtk_object_class_add_signals
+	* src/gnome-utils/gnc-date-edit.c:date_accel_key_press
+	  Change declare to G_CONST_RETURN char *string;
+	  to reflect change in gtk_entry_get_text
+	* src/business/business-gnome/search-owner.c:gnc_search_owner_class_init:
+	  Delete call of deprecated  gtk_object_class_add_signals
+	* src/gnome/gnc-split-reg.c:gnc_split_reg_get_type:
+	  GtkObjectClass *object_class; Replace object_class->type by
+	  object_class->g_type to reflect change in GtkObjectClass
+	  Delete call of deprecated  gtk_object_class_add_signals
+	* src/gnome/mainwindow-account-tree.c:gnc_mainwin_account_tree_class_init:
+	  Replace object_class->type by object_class->g_type to
+	  reflect change in GtkObjectClass
+	  Delete call of deprecated  gtk_object_class_add_signals
+	* src/gnome/reconcile-list.c:gnc_reconcile_list_class_init
+	  Replace object_class->type by object_class->g_type to
+	  reflect change in GtkObjectClass
+	  Delete call of deprecated  gtk_object_class_add_signals
+
+	  In the following:
+	  Delete call of deprecated  gtk_object_class_add_signals
+	  Replace object_class->type by object_class->g_type to
+	  reflect change in GtkObjectClass
+	* src/gnome-search/gnc-general-search.c:gnc_general_search_class_init:
+	* src/gnome-utils/gnc-account-tree.c:gnc_account_tree_class_init:
+	* src/gnome-utils/gnc-date-delta.c:gnc_date_delta_class_init:
+	* src/gnome-utils/gnc-dense-cal.c: gnc_dense_cal_class_init:
+	* src/gnome-utils/gnc-frequency.c:  gnc_frequency_class_init:
+	* src/gnome-utils/gnc-general-select.c:gnc_general_select_class_init:
+	* src/register/register-gnome/gnucash-item-list.c:  gnc_item_list_class_init:
+	* src/register/register-gnome/gnucash-sheet.c:gnucash_register_class_init:
+
+
+	  In the following, Delete call of deprecated gtk_object_class_add_signals
+	* src/gnome-search/search-account.c:gnc_search_account_class_init:
+	* src/gnome-search/search-boolean.c:gnc_search_boolean_class_init:
+	* src/gnome-search/search-core-type.c:gnc_search_core_type_class_init:
+	* src/gnome-search/search-date.c:gnc_search_date_class_init:
+	* src/gnome-search/search-double.c: gnc_search_double_class_init:
+	* src/gnome-search/search-int64.c:gnc_search_int64_class_init:
+	* src/gnome-search/search-numeric.c:gnc_search_numeric_class_init:
+	* src/gnome-search/search-string.c:gnc_search_string_class_init:
+	* src/gnome-utils/gnc-account-sel.c:gnc_account_sel_class_init:
+	* src/gnome-utils/gnc-amount-edit.c:gnc_amount_edit_class_init:
+	* src/gnome-utils/search-param.c: gnc_search_param_class_init:
+
+
+	  In the following,
+	  Change declare to const char *
+	  to reflect change in gtk_entry_get_text
+	* src/app-file/gnome/gnc-file-dialog.c:store_filename:
+	* src/business/business-gnome/business-gnome-utils.c:
+	  gnc_fill_account_select_combo:
+	* src/business/business-gnome/dialog-billterms.c:get_int, new_billterm_ok_cb:
+	* src/business/business-gnome/dialog-customer.c:
+	  gnc_customer_name_changed_cb:
+	* src/business/business-gnome/dialog-employee.c:
+	  gnc_employee_name_changed_cb:
+	* src/business/business-gnome/dialog-invoice.c:  gnc_invoice_id_changed_cb:
+	* src/business/business-gnome/dialog-job.c: gnc_job_name_changed_cb:
+	* src/business/business-gnome/dialog-payment.c:  gnc_payment_ok_cb:
+	* src/business/dialog-tax-table/dialog-tax-table.c:new_tax_table_ok_cb:
+	* src/gnome/dialog-print-check.c:   entry_to_double:
+	* src/gnome-search/search-string.c:  entry_changed:
+	* src/gnome-utils/dialog-transfer.c:
+	  gnc_xfer_dialog_quickfill,gnc_xfer_dialog_ok_cb:
+	* src/gnome-utils/window-help.c:  gnc_help_window_search_button_cb:
+	* src/import-export/binary-import/druid-commodity.c:
+	  gnc_ui_commodity_druid_comm_check_cb
+	* src/import-export/qif-import/druid-qif-import.c:
+	  gnc_ui_qif_import_load_file_next_cb,
+	  gnc_ui_qif_import_convert, gnc_ui_qif_import_comm_check_cb,
+	  gnc_ui_qif_import_default_acct_next_cb:
+	* src/report/report-gnome/dialog-style-sheet.c:  gnc_style_sheet_new_cb:
+
+	* TODO:
+	  Is deprecated gtk_object_class_add_signals handled correctly?
+
+
+2003-04-26 TomF changes for gnucash-gnome2-dev, 11th batch
+	* src/gnome-utils/cursors.c:
+	  Fix incorrect g_list_free.
+
+	* src/gnome/window-main.c,
+	* src/gnome-utils/gnc-mdi-utils.c,
+	* src/app-file/gnome/gnc-file-history.c:
+	  Replace calls of deprecated gtk_container_get_toplevels by
+	  gtk_window_list_toplevels
+
+	* src/gnome-utils/dialog-options.c:
+	  Move gnc_options_register_stocks call to gnc_options_ui_initialize,
+	  to be called just once for all stock items at module initialization.
+	  Remove include gtk/gtktextview.h.  It is included under gnome.h
+	* src/gnome-search/dialog-search.c: attach_element,
+	  gnc_search_dialog_init_widgets:
+	  Replace deprecated gnome_stock_new_with_icon, gnome_pixmap_button
+	  by gtk_button_new_from_stock
+	* src/gnome-utils/gnc-date-edit.c: select_clicked:
+	  Remove inactivated block referencing deprecated gnome_stock_cursor_new
+
+
+2003-04-26 TomF changes for gnucash-gnome2-dev, 11th batch
+
+	* src/gnome-utils/cursors.c:
+	  Fix incorrect g_list_free.
+
+	* src/gnome/window-main.c,
+	* src/gnome-utils/gnc-mdi-utils.c,
+	* src/app-file/gnome/gnc-file-history.c:
+          Replace calls of deprecated gtk_container_get_toplevels by
+	  gtk_window_list_toplevels
+
+	* src/gnome-utils/dialog-options.c:
+	  Move gnc_options_register_stocks call to gnc_options_ui_initialize,
+	  to be called just once for all stock items at module initialization.
+	  Remove include gtk/gtktextview.h.  It is included under gnome.h
+	* src/gnome-search/dialog-search.c: attach_element,
+	  gnc_search_dialog_init_widgets:
+	  Replace deprecated gnome_stock_new_with_icon, gnome_pixmap_button
+	  by gtk_button_new_from_stock
+	* src/gnome-utils/gnc-date-edit.c: select_clicked:
+	  Remove inactivated block referencing deprecated gnome_stock_cursor_new
+
+
+2003-04-02 TomF changes for gnucash-gnome2-dev, 10th batch
+	* src/gnome-utils/dialog-account.c
+	  Change declares of name to const gchar.
+	* src/gnome-utils/dialog-account-pick.c
+	  Parentheses around assignment in expression
+	* src/gnome-utils/dialog-commodity.c
+	  Change declare of fullname to const gchar
+	* src/gnome-utils/dialog-options.c
+	  Replace "if (!GTK_OBJECT_DESTROYED(xxx))" by "if (!container)"
+	  to remove deprecated macro
+	  Replace call of gnome_stock_button by call to new function
+	  gnc_options_register_stocks
+	  Replace deprecated gtk_text* functions by gtk_text_view*
+	  Change style->font to gdk_font_from_description(style->font_desc)
+	  Change style->klas->xthickness to style->xthickness
+	* src/gnome-utils/dialog-options.h
+	  Prototype for gnc_options_register_stocks
+	* TODO : Started categorized todo list for internal work items
+
+
+2003-04-01 TomF changes for gnucash-gnome2-dev, 9th batch
+
+	* src/gnome-utils/gnc-html.h
+	  Replace gtkhtml/gtkhtml.h by libgtkhtml/gtkhtml.h
+	  Delete declare of gnc_html_register_object_handler	(FIXME)
+	  Delete typedef of GncHTMLObjectCB			(FIXME)
+	* src/gnome-utils/dialog-account.c
+	  cast assignment statements to char *
+
+	  In the following, replace glib macro wrappers GTK_CHECK*
+	  by G_TYPE_CHECK* and remove {BEGIN,END}_GNOME_DECLS
+
+	* src/gnome-utils/gnc-amount-edit.h
+	* src/gnome-utils/gnc-general-select.h
+	* src/gnome-search/gnc-general-search.h
+	* src/gnome-utils/gnc-account-sel.h
+	* src/gnome-utils/gnc-currency-edit.h
+	* src/gnome-utils/gnc-date-delta.h
+	* src/gnome-utils/gnc-date-edit.h
+	* src/gnome-utils/gnc-frequency.h
+
+
+2003-04-01  Derek Atkins  <derek at ihtfp.com>
+
+	* remove TomF's comments from files in batch 7; the
+	  ChangeLog is sufficient.
+
+2003-03-16 TomF changes for gnucash-gnome2-dev, 8th batch
+
+	* src/gnome-utils/cursors.c
+	  Replace calls of deprecated gtk_container_get_toplevels by
+	  gtk_window_list_toplevels
+
+2003-03-14 TomF changes for Gnome-2 branch, 7th batch
+
+	  Change gtk_*_ref to g_object_ref, same for unref,
+	  to replace deprecated functions in the following files.
+
+	* src/business/business-gnome/dialog-billterms.c
+	* src/gnome/dialog-price-edit-db.c
+	* src/gnome/gnc-split-reg.c
+	* src/gnome/window-register.c
+	* src/gnome-utils/dialog-options.c
+	* src/gnome-utils/dialog-transfer.c
+	* src/gnome-utils/dialog-utils.c				    *
+	* src/gnome-utils/gnc-account-tree.c
+	* src/gnome-utils/dialog-utils.c
+	* src/gnome-utils/gnc-html.c
+	* src/gnome-utils/gnc-mdi-utils.c
+	* src/gnome-utils/gtkselect.c
+	* src/gnome-utils/print-session.c
+	* src/gnome-utils/window-help.c
+	* src/gnome-search/dialog-search.c
+	* src/import-export/hbci/hbci-interaction.c
+	* src/import-export/hpci/hbci-progressmon.c
+	* src/register/register-gnome/combocell-gnome.c
+	* src/register/register-gnome/datecell-gnome.c
+	* src/register/register-gnome/gnucash-sheet.c
+	* src/register/register-gnome/table-gnome.c
+	* src/report/report-gnome/dialog-style-sheet.c
+
+2003-03-12 TomF changes for Gnome-2 branch, 6th batch
+
+	* src/network-utils/test/Makefile.am:
+	  Add libgncmod-engine.la to fix undefined ref to `gnc_should_log'
+ 	* src/backend/net/NetIO.c: Remove include ghttp.h
+ 	  to bypass missing ghttp.  The functions were already disabled.
+
+2003-03-12  Derek Atkins  <derek at ihtfp.com>
+
+	* src/gnome/Makefile.am: remove GHTTP_CFLAGS
+
+	* configure.in: can't use AM_PATH_GDK_PIXBUF; that's a gnome-1
+	  feature and doesn't work for gnome2
+
+2003-03-11  Derek Atkins  <derek at ihtfp.com>
+
+	* configure.in: get the configure script to actually attempt to do
+	  something real in terms of gnome-print, gdk-pixbuf, and guppi.
+
+2003-03-11 TomF changes for Gnome-2 branch, 5th batch
+
+	* src/network-utils/Makefile.am: add src/engine to allow
+	  including gnc-engine-util.h
+	* src/network-utils/gnc-http.c: Disable all functions to bypass
+	  missing ghttp.
+	  Include "gnc-engine-util.h" to allow PERR warnings.
+	  Use long if 0 to make it easy to go back to the original to
+	  start developing a ghttp replacement.
+          Declare variable "module" to make the PERR warnings work.
+
+	Added by warlord:
+	* src/network-utils/Makefile.am: remove GHTTP references
+
+2003-03-09 TomF changes for Gnome-2 branch, 4th batch
+
+	* src/gnome-utils/dialog-utils.h: Disabled declarations of
+	  functions not used in QuickFill to bypass missing typedef
+	  for GdkImlibImage
+	* Next make problems are in:
+	    cursors.c, in function `gnc_set_busy_cursor'
+	    references to ghttp in gnc-http.c
+
+2003-03-09 TomF changes for Gnome-2 branch
+
+	* configure.in: Disabled gnome-print.  Added LIBGUPPI.
+	  AM_PATH_LIBGLADE  replaced by PKG_CHECK_MODULES
+	  Disabled gtkhtml check
+	* gnome.m4:  Fixed use of wrong gnome2 names introduced 2/27
+
+2003-03-02 TomF changes for Gnome-2 branch
+
+	* configure.in: Change GNOME_XML_CHECK call to GNOME_XML2_CHECK
+	  to fix wrong libxml library in gcc calls.
+          Move AS_SCRUB_INCLUDE call to macros/gnome-xml-check.m4
+	  Commented out the po/Makefile lines in AC_OUTPUT calls to bypass
+	  "not found" errors
+	* macros/autogen.sh: Commented out gettextize lines to bypass
+	  "not found" errors
+	  might want to change the gettextize to glib-gettextize
+	* macros/gnome-xml-check.m4: changed macro name to GNOME_XML2_CHECK
+	  Changed xml to xml2; changed GNOME-CONFIG to PKG-CONFIG
+	  Moved AS_SCRUB_INCLUDE call from configure.in
+	  This .m4 file was not in the Gnome-2 branch, so it has to be
+	  added in cvs.  I don't know how it got dropped.
+	* src/engine/gnc-associate-account.c: Fixed gcc warning messages.
+	* Currently, make fails at gnc-gpg.c, and there is an unknown text
+	  file: src/network-utils/gnc-gpg.loT
+
+2003-02-27   Derek Atkins  <derek at ihtfp.com>
+
+	* re-add macros/gnome.m4 for GNOME_INIT
+	* configure.in: re-add call to GNOME_INIT
+
+2003-02-18 TomF changes for Gnome-2 branch
+
+	* autogen.sh: Use Gnome2 libraries
+	* configure.in: Initial changes to make autogen.sh work and have
+	  make use the correct glib_2_0.  Many changes still needed for
+	  make to complete without errors.
+	* acconfig.h: Use GETTEXT_PACKAGE
+
+2003-02-15  Derek Atkins  <derek at ihtfp.com>
+
+	* Start changes for Gnome-2.
+	* remove macros/gnome*.m4, so we can use gnome's installed versions.
+
+
+-=-=-=- cvs gnome2 branch ChangeLog is above this line -=-=-=-
+
+
 2005-10-26  Christian Stimming  <stimming at tuhh.de>
 
 	* po/eu.po: Add Basque translation by Mikel Olasagasti
@@ -79,7 +6416,7 @@
 
 2005-04-14  David Hampton  <hampton at employees.org>
 
-	* src/engine/iso-4217-currencies.scm: 
+	* src/engine/iso-4217-currencies.scm:
 	* src/engine/gnc-commodity.c: Update the Bulgarian Lev and add the
 	Malagasy Ariary.
 
@@ -149,7 +6486,7 @@
 	* src/engine/qof_book_merge.c: Fix double free of the targetList
 	entities that cause xaccGroupGetNumSubAccounts to generate a
 	segmentation fault.
-	* src/engine/kvp_frame.c: 
+	* src/engine/kvp_frame.c:
 	* src/engine/kvp_frame.h:
 	Add kvp_value_to_bare_string to
 	generate strings without debug information.
@@ -201,7 +6538,7 @@
 	  qof_book_merge_param_as_string output strings that are
 	  compatible with QSF: using false instead of FALSE in string
 	  output and using the QSF_XSD_TIME for the datestrings.
-	
+
 	* src/engine/Account.c:
 	  - updated implementation of qofAccountSetParent().
 
@@ -209,7 +6546,7 @@
 	* src/engine/Transaction.c:
 	  Add the transaction guid to some error warning messages.
 	  Fixes #165571.
-	
+
 2005-01-29  Derek Atkins  <derek at ihtfp.com>
 
 	David Montenegro's patch for bugs #95551, #124367.
@@ -254,7 +6591,7 @@
 
 	* src/app-utils/gnc-ui-util.c: Modify tax option code to load
 	tax-de_DE module in the appropriate locale.
-	
+
 	* src/report/locale-specific/us/gncmod-locale-reports-us.c,
 	de_DE.scm: Add scheme module for locale-report/us
 	resp. locale-report/de_DE again because it seems to be required.
@@ -303,7 +6640,7 @@
 	otherwise the conventional U.S. ones. This is the easiest method
 	to allow other (non-U.S.) tax categories to be selected in the
 	accounts' tax settings.
-	
+
 	* src/report/locale-specific/us/taxtxf-de_DE.scm: Add Tax report
 	for de_DE locale. If the current locale begins with de_DE, the new
 	German tax report will be loaded, otherwise the conventional
@@ -437,7 +6774,7 @@
 2004-10-30  Christian Stimming  <stimming at tuhh.de>
 
 	* doc/README.HBCI: Updated HBCI readme.
-	
+
 	* src/import-export/hbci/hbci-interaction.c: Fix problems with
 	user messages.
 
@@ -453,7 +6790,7 @@
 	  qof_book_merge.c
 	  qof_book_merge.h
 	  test-book-merge.c test routine
-	  New Account Hierarchy druid 
+	  New Account Hierarchy druid
 	  Sundry adjustments to QOF support.
 	  Tweaks to several Makefile.am files to support new files.
 	  Tweaks to window-main.c to support new menu item
@@ -678,7 +7015,7 @@
 2004-07-04  Derek Atkins  <derek at ihtfp.com>
 
 	* acinclude.m4: create a SCANF_QD_CHECK and make sure both
-	  that and SCANF_LLD_CHECK are "long long" constant-safe 
+	  that and SCANF_LLD_CHECK are "long long" constant-safe
 	* configure.in: use the new SCANF_QD_CHECK and use it
 	  earlier in the configuration.
 
@@ -775,7 +7112,7 @@
 	* src/scm/paths.scm: create gnc:current-saved-reports, as
 	  the file to store saved reports from cstim.  Autoload the
 	  saved-reports file at startup (after config.user/config.auto
-	  is loaded).	  
+	  is loaded).
 	* src/scm/main.scm: export gnc:current-saved-reports
 
 2004-05-29  Derek Atkins  <derek at ihtfp.com>
@@ -1006,9 +7343,9 @@
 
 2004-02-07  Joshua Sled  <jsled at asynchronous.org>
 
-	* src/gnome/dialog-scheduledxaction.c (editor_ok_button_clicked): 
-	* src/gnome-utils/gnc-frequency.c (gnc_frequency_save_state): 
-	* src/backend/file/gnc-freqspec-xml-v2.c (fs_none_handler): 
+	* src/gnome/dialog-scheduledxaction.c (editor_ok_button_clicked):
+	* src/gnome-utils/gnc-frequency.c (gnc_frequency_save_state):
+	* src/backend/file/gnc-freqspec-xml-v2.c (fs_none_handler):
 	* src/engine/FreqSpec.c (xaccFreqSpecGetFreqStr):
 	Adding "NONE" as an allowable FreqSpec [Bug#103968].
 
@@ -1064,7 +7401,7 @@
 
 	* configure.in, macros/openhbci2.m4: Add checking for new
 	openhbci2 library.
-	
+
 	* src/import-export/hbci/ all files: Switch HBCI code to the new
 	openhbci2 library. Should be working, but needs further testing.
 
@@ -1108,11 +7445,11 @@
 	* src/app-utils/global-options.h: add gnc_lookup_date_option()
 	  function
 	* src/app-utils/gnc-ui-util.c:
-	* src/app-utils/gnc-ui-util.h: add 
+	* src/app-utils/gnc-ui-util.h: add
 	  gnc_ui_account_get_balance_in_currency() function
 	* src/app-utils/prefs.scm: add preferences for summarybar
 	* src/engine/Account.c:
-	* src/engine/Account.h: add 
+	* src/engine/Account.h: add
 	  xaccAccountConvertBalanceToCurrencyAsOfDate() function
 	* src/gnome/window-main-summarybar.c: summarybar can now display
 	  a grand total of all commodities, profits of a period of time
@@ -1165,7 +7502,7 @@
 	* src/business/business-core/gncVendor.h:
 	  Fix ...RetGUID() to check whether it was passed a NULL object
 	  and, if so, return the null GUID instead of crashing.
-	
+
 	* README.cvs: make it even more explicit that you should not run configure
 	* src/engine/Makefile.am: remove the circular dependency I added earlier
 	* src/engine/gw-engine-spec.scm: don't include gnc-engine-util.h (it's
@@ -1191,11 +7528,11 @@
 	* src/engine/test/Makefile.am: add test-link, make libgw-engine
 	  depend on libgncmod-engine
 	* src/engine/test/test-link.c: add a source-file to test-link
-	
+
 	* src/engine/test-core/test-engine-stuff.c: don't test double
 	  KVPs, on the theory that they will soon be deprecated.
 	Fixes #127315
-	
+
 	* src/engine/test-core/test-engine-stuff.c: random queries only
 	  get up to 3 terms, not 4
 	* src/app-utils/test/test-scm-query-string.c: loop the test 1000
@@ -1431,9 +7768,9 @@
 	  - don't kill ourself if we're asked to set the value to our own value.
 
 	Description of the problem from Nigel:
-	
+
 	The problem is that the SX formula_cell stuff calls (via an
-	intermediate step) 
+	intermediate step)
 
 	gnc_basic_cell_set_value_internal (BasicCell *cell, const char *value)
 
@@ -1443,7 +7780,7 @@
 	g_free() writes memory management stuff in the first few bytes of the
 	value). This is what trashes the debit/credit value in the SX register
 	entry.
-	
+
 2003-08-29  David Hampton  <hampton at employees.org>
 
 	* src/engine/Account.c: Fix bug in computing cleared balance.  The
@@ -1479,21 +7816,21 @@
 
     * src/backend/postgres/table-audit.sql: Moved bookGuid in
       gncPriceTrail to be the second column.
-      
+
     * src/backend/postgres/table-create.sql: Moved bookGuid in
       gncPrice to be the second column.
 
     * src/backend/postgres/upgrade.c: (re)Added transaction control
       to each upgrade function.  Also, the following fixes came out
       of regression testing:
-    - add_multiple_book_support():  Removed the "NOT NULL" from the 
+    - add_multiple_book_support():  Removed the "NOT NULL" from the
       ADD COLUMN statements, and placed them in an ALTER TABLE...SET
       NULL construct.  The original is not supported in Postgresql
       and fails to execute.
     - Changed the stpcpy() to use g_strdup_printf() instead, for dynamic
       query assembly.
     - Made a few cosmetic changes to comparisons for readability.
-    
+
 2003-08-10  David Hampton  <hampton at employees.org>
 
 	* src/gnome/gnc-splash.[ch]:
@@ -1523,7 +7860,7 @@
       message argument to the internationalization format.
     - Changed the pgendUpgradeDB() call to come after a commit--the
       upgrade process uses its own transaction handling (now).
-      
+
     * src/backend/postgres/checkpoint.c:
     * src/backend/postgres/gncquery.c:
     * src/backend/postgres/gncquery.h:
@@ -1531,16 +7868,16 @@
     * src/backend/postgres/txnmass.c:
     * src/backend/postgres/events.c: Changed all the gncEntry
       references to gncSplit, and entryGuid to splitGuid.
-      
+
     * src/backend/postgres/functions.sql: Changed the TIMESTAMP args
       to TIMESTAMP WITH TIME ZONE args, and gncEntry args to gncSplit.
-    
+
     * src/backend/postgres/putil.c: Added the execQuery() function
     - sendQuery(): Added internationalization to the
       qof_backend_set_message() call.
 
     * src/backend/postgres/putil.h: Added the execQuery() prototype.
-    
+
     * src/backend/postgres/table-create.sql:
     * src/backend/postgres/table-audit.sql: Changed all the TIMESTAMP
       types to TIMESTAMP WITH TIME ZONE.  Change all the gncEntry refs
@@ -1687,7 +8024,7 @@
 	Fixes #117657
 
 2003-07-26  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/import-account-matcher.c: Fix bug #105293
 
 2003-07-23  Derek Atkins  <derek at ihtfp.com>
@@ -1768,7 +8105,7 @@
 2003-07-09  Christian Stimming  <stimming at tuhh.de>
 
 	* README: Added remark about gnucash-docs.
-	
+
 	* src/import-export/hbci/druid-hbci-initial.c: Clarify the part of
 	the HBCI setup about potentially adding HBCI accounts manually.
 
@@ -1839,7 +8176,7 @@
 
 	* src/app-utils/gnc-helpers.c: Update for changes in accessing
 	quote source information.
-	
+
 	* src/gnome-utils/commodity.glade:
 	* src/gnome-utils/dialog-commodity.c: Reorganize the dialog for
 	selection price quote information.
@@ -1901,7 +8238,7 @@
 	* src/gnome-utils/gnc-account-sel.c:
 	  change to match the new event API.  Remove the need for
 	  xaccGUIDType(), which means we no longer get the g_warning.
-	
+
 	* src/backend/postgres/events.c:
 	* src/business/business-core/gncAddress.c:
 	* src/business/business-core/gncAddress.h:
@@ -1943,7 +8280,7 @@
 	* src/scm/price-quotes.scm: Don't print the "handling-request"
 	messages when getting stock quotes. #110687
 
-	* src/report/report-system/html-document.scm: 
+	* src/report/report-system/html-document.scm:
 	* src/report/report-system/html-text.scm: Correctly quote
 	attribute values. #115244
 
@@ -1987,8 +8324,8 @@
 	limited strictly to currencies.
 
 	* src/gnome-utils/gnc-commodity-edit.c:
-	* src/import-export/binary-import/druid-commodity.c: 
-	* src/import-export/import-commodity-matcher.c: 
+	* src/import-export/binary-import/druid-commodity.c:
+	* src/import-export/import-commodity-matcher.c:
 	* src/import-export/qif-import/druid-qif-import.c: Updated for new
 	commodity dialog argument.
 
@@ -2089,7 +8426,7 @@
 	has been marked read-only.
 
 	* src/engine/Transaction.h: Documentation.
-	
+
 	* src/engine/Transaction.c: Create a couple of new functions by
 	extracting common code from existing functions.  New functions to
 	clone Splits and Transactions.  New debug functions to dump Splits
@@ -2103,12 +8440,12 @@
 	* src/engine/test/test-transaction-voiding.c: Add code to un-void
 	a transaction and check that all the values are restored to their
 	original state.
-	
+
 	* src/engine/test/test-transaction-reversal.c: Add a new test to
 	test the code that clones and reverses transactions.
 
-	* src/engine/Account.c: 
-	* src/backend/postgres/test/test-db.c: 
+	* src/engine/Account.c:
+	* src/backend/postgres/test/test-db.c:
 	* src/backend/file/test/test-xml-transaction.c: Changed function args.
 
 2003-06-15  Derek Atkins  <derek at ihtfp.com>
@@ -2332,9 +8669,9 @@
 	Fixes #113769.
 
 2003-05-29  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/engine/TransLog.c: Now log the transaction notes field (kvp actually).
-	* src/engine/kvp_frame.h: Docs 
+	* src/engine/kvp_frame.h: Docs
 	* src/import-export/log-replay/gnc-log-replay.c: Actually make it work:) Thanks Derek for pointing me to the private headers.  Support the new note field.
 
 2003-05-29  Christian Stimming  <stimming at tuhh.de>
@@ -2351,17 +8688,17 @@
 	  - use TRUE/FALSE, not true/false.
 
 2003-05-28  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/import-settings.c: Revert previous gettext macro addition.
-	* src/engine/TransLog.c,h: Change the log format to use GUID instead of 
+	* src/engine/TransLog.c,h: Change the log format to use GUID instead of
 	  C pointers and to use ISO8601 instead of proprietary format.
-	
-	* src/engine/gnc-numeric.h 
+
+	* src/engine/gnc-numeric.h
 	* src/import-export/import-match-map.c: Doxygen update
 
 	* configure.in
-	* src/scm/main.scm 
-	* src/import-export/Makefile.am 
+	* src/scm/main.scm
+	* src/import-export/Makefile.am
 	* src/import-export/log-replay/*: New log replay module.  This
 	  ALMOST works, except I forgot you can't set the GUID of
 	  gnucash's objects, and thus completely screwed up on the
@@ -2415,10 +8752,10 @@
 
 2003-05-26  Chris Lyttle  <chris at wilddev.net>
 
-	* src/scm/main.scm: Change stable version to 1.8.4 
+	* src/scm/main.scm: Change stable version to 1.8.4
 
 2003-05-26  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/import-settings.c: Fix pref page define to the
 	  proper page, should fix the problem of all prefs being ignored.
 	  Also make strings in the lookup code translatable so that the
@@ -2434,7 +8771,7 @@
 	    Just using gh_listify is wrong and causes a crash.
 	  - fix a bug that crashes gnucash if you remove the last entry
 	    and then add another entry.
-	
+
 	* src/business/business-reports/aging.scm:
 	  - Deal with the case where the first transaction found for a
 	    particular company is a payment (it used to just ignore it!
@@ -2486,10 +8823,10 @@
 	  This is an interim fix for #99574, at least until we can
 	  centralize the functionality.
 
-	* src/business/business-utils/business-prefs.scm: make the 
+	* src/business/business-utils/business-prefs.scm: make the
 	  Bill Due Days option selectable based on the setting of
 	  Notify Bills Due?
-	
+
 2003-05-23  Derek Atkins  <derek at ihtfp.com>
 
 	* src/gnome-utils/dialog-options.c: don't let the user do anything
@@ -2516,7 +8853,7 @@
 
 	* src/import-export/ofx/test/test-link.c: fix the test program
 	  to make sure it links on many weird platforms.
-	
+
 2003-05-22  Derek Atkins  <derek at ihtfp.com>
 
 	* src/business/business-reports/owner-report.scm:  Better fix for 108731
@@ -2533,7 +8870,7 @@
 	  Use the correct columns when printing the Gain column, don't
 	  reuse the same column as profit; we want to report different
 	  values.  Fixes #113096.
-	
+
 2003-05-21  Derek Atkins  <derek at ihtfp.com>
 
 	* src/report/standard-reports/advanced-portfolio.scm:
@@ -2546,7 +8883,7 @@
 	  This means the aging information will always be acurate through the
 	  end date (even if all the invoices and payments are not displayed).
 	  Fixes #108731.
-	
+
 2003-05-20  Derek Atkins  <derek at ihtfp.com>
 
 	* src/scm/printing/print-check.scm: some finer adjustments on
@@ -2558,7 +8895,7 @@
 	  without slib installed.
 	* configure.in: all the new gwrap check macro
 	  Fixes #113218
-	
+
 2003-05-19  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/QueryNew.[ch]: add gncQueryGetBooks() API to return
@@ -2604,7 +8941,7 @@
 	* src/engine/guid.c:
 	* src/engine/kvp-util.c:
 	  Fixes for 64-bit architectures.  Fixes bug #113231.
-	
+
 2003-05-18  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/gnc-lot.[ch]: add LOT_IS_CLOSED and LOT_BALANCE
@@ -2619,7 +8956,7 @@
 
 2003-05-16  David Hampton  <hampton at employees.org>
 
-	* src/gnome/window-main.c: 
+	* src/gnome/window-main.c:
 	* src/gnome-utils/gnc-mdi-utils.c:
 	* src/gnome-utils/gnc-mdi-utils.h: Fix the "View xxxbar" menu
 	items to track properly when a new data file is opened. #99598
@@ -2642,10 +8979,10 @@
 	* src/gnome-utils/gnc-query-list.c: we can't use a reversed list
 	  and prepend() because then we're always adding row 0 so the
 	  saved checkmarks fail.  So, use the slow way and use 'append()'.
-	
+
 2003-05-12  David Hampton  <hampton at employees.org>
 
-	* src/quotes/finance-quote-check.in: 
+	* src/quotes/finance-quote-check.in:
 	* src/quotes/update-finance-quote.in: Add HTML::Parser to the list
 	of items checked/installed. #104197
 
@@ -2672,10 +9009,10 @@
 	* src/gnome-search/dialog-search.c: Convert to use the new
 	  GNCQueryList to display the search results.
 	Fixes #106035
-	
+
 2003-05-11  David Hampton  <hampton at employees.org>
 
-	* src/gnome/dialog-commodities.c: 
+	* src/gnome/dialog-commodities.c:
 	* src/app-utils/prefs.scm: Remember the state of the "show
 	currencies" check box from one time to the next.
 
@@ -2720,9 +9057,9 @@
 	* src/engine/Scrub.c:
 	* src/engine/Scrub.h: Migrate price quote information when reading
 	in the data file.
-	
+
 	* src/app-utils/gnc-helpers.c:
-	* src/app-utils/gnc-helpers.h:	
+	* src/app-utils/gnc-helpers.h:
 	* src/app-utils/gw-app-utils-spec.scm:
 	* src/engine/gw-engine-spec.scm:
 	* src/scm/price-quotes.scm: The code to get quotes from F::Q now
@@ -2738,10 +9075,10 @@
 	* src/engine/Account.h: Deprecated a couple of functions.
 	Continue existing hack of automatically marking cross currency
 	accounts for automatic quote retrieval.
-	
+
 	* src/backend/file/io-gncbin-r.c: Update for the new names of
 	deprecated functions.
-	
+
 	* src/import-export/import-commodity-matcher.c: Update for changed
 	calling conventions.
 
@@ -2820,7 +9157,7 @@
 	* src/import-export/qif-import/druid-qif-import.c: Consolidate all
 	the tests for an ISO 4217 commodity into a pair of functions.  Use
 	these functions throughout the code.
-	
+
 2003-04-26  David Hampton  <hampton at employees.org>
 
 	* src/backend/file/gnc-commodity-xml-v2.c: Consolidate duplicate
@@ -2854,7 +9191,7 @@
 	* src/import-export/qif-import/qif-file.scm: Don't try to
 	  parse values that begin "..." because it is clearly not
 	  valid (regardless of the locale).  Fixes #109868.
-	
+
 2003-04-18  Herbert Thoma  <herbie at hthoma.de>
 
 	* src/engine/Account.c: move currency conversion to gnc-pricedb.c
@@ -2882,7 +9219,7 @@
 
 	* src/import-export/hbci/druid-hbci-initial.c,
 	src/import-export/hbci/hbci-interaction.c: Adapt to latest changes
-	in OpenHBCI CVS. 
+	in OpenHBCI CVS.
 
 2003-04-14  Christian Stimming  <stimming at tuhh.de>
 
@@ -2924,7 +9261,7 @@
 	  comparison between signed and unsigned and
 	  dereferencing type-punned pointer will break strict-aliasing rules
 	  fixes #110320
-	
+
         * src/engine/gnc-pricedb-p.h
         * src/engine/gnc-pricedb.c
         * src/engine/gnc-pricedb.h:
@@ -2949,7 +9286,7 @@
 	* src/gnome-search/search-date.c: Evaluate the date during
 	  get_predicate() in case the user just "hit return" (and the
 	  auto-evaluate didn't happen).  Fixes bug #106444.
-	
+
 2003-04-04  Derek Atkins  <derek at ihtfp.com>
 
 	* src/report/standard-report/transaction.scm: symbols are not
@@ -2964,17 +9301,17 @@
 	  (fixes debian bug #186188)
 
 2003-04-03  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/import-commodity-matcher.c: Fix debian bug #187061
 	Crash during import of investment accounts.
 
 2003-04-02  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* po/POTFILES.in,
 	src/import-export/ofx/Makefile.am,
 	src/import-export/ofx/ofx.glade: Remove obsolete ofx.glade
 	* po/fr.po: Update french translation again, 200 more messages handled
-	
+
 2003-04-01  Derek Atkins  <derek at ihtfp.com>
 
 	* src/business/business-core/gncEntry.h:  Move the definitions
@@ -3018,7 +9355,7 @@
 	* src/business/business-reports/aging-report.scm:
 	  Fix a couple strings to improve comments when owners and accounts
 	  are missing.  Direct the user to select them in the report options.
-	
+
 2003-04-01  Christian Stimming  <stimming at tuhh.de>
 
 	* src/report/report-system/options-utilities.scm: Fix missing i18n
@@ -3038,7 +9375,7 @@
 	off this data table instead of explicitly coding each field.  Add
 	new fields in the account tree window for present, cleared,
 	reconciled, and future minimum balances.  #95628
-	
+
 	* src/gnome-utils/dialog-account.c: Update for changes to function
 	parameters.
 
@@ -3048,7 +9385,7 @@
 	* src/engine/gnc-pricedb.h: new function
 	gnc_pricedb_lookup_latest_any_currency, return any available
 	prices for given commodity regardless of currency
-	
+
 	* src/app-utils/gnc-ui-util.c: do a "two stage" price lookup in
 	gnc_ui_convert_balance_to_currency if no price for the commodity
 	is found in the requested currency, then look for prices in any
@@ -3076,7 +9413,7 @@
 
 2003-03-23  Christian Stimming  <stimming at tuhh.de>
 
-	* src/import-export/hbci/hbci-interaction.c (GNCInteractor_hide): 
+	* src/import-export/hbci/hbci-interaction.c (GNCInteractor_hide):
 	Fix close-on-finished checkbutton.
 
 	* src/import-export/hbci/hbci-progressmon.c: Add descriptions of
@@ -3153,7 +9490,7 @@
 	Derek's fix for a crash when opening the Pref's dialog when using
 	guile-1.6.1.  Lost when converting to the scheme scm_xxx
 	interface.
-	
+
 2003-03-13  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/Makefile.am: make sure to add INTLLIBS in case
@@ -3173,7 +9510,7 @@
 	  the Account Separator option was moved to the Accounts page --
 	  reference is correctly.
 	Fixes #106673
-	
+
 2003-03-11  Derek Atkins  <derek at ihtfp.com>
 
 	* src/scm/main-window.scm:  turn off the report-total by default
@@ -3231,13 +9568,13 @@
 	  create an "employee report"
 	* src/business/business-utils/business-prefs.scm:
 	  save the voucher register width
-	Implements RFE #90371	
-	
+	Implements RFE #90371
+
 	* src/gnome-utils/gnc-account-sel.c:
 	  If the nameList == NULL then add a blank line, to make sure
 	  the selector list is really empty, rather than defaulting to all of
 	  the accounts in the tree if there are none matching.
-	
+
 2003-03-09  Derek Atkins  <derek at ihtfp.com>
 
 	* src/business/business-core/gncEmployee.[ch]: added APIs to
@@ -3296,7 +9633,7 @@
 	  add _some_ employee support.  Still doesn't contain the code
 	  to display an employee-owned invoice (expense voucher).
 	* src/business/business-utils/business-options.scm:
-	  create an employee option type	  
+	  create an employee option type
 	* src/business/business-core/gncInvoice.c:
 	* src/business/business-core/gncOwner.[ch]:
 	* src/business/business-core/file/gnc-owner-xml-v2.c:
@@ -3322,7 +9659,7 @@
 
 2003-02-26  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	* src/import-export/import-backend.c: 
+	* src/import-export/import-backend.c:
 	-Disable -3 punishment for transactions which have an online ID.  This punished credit card transfer yet added no tangible benefit.
 
 2003-02-22  Derek Atkins  <derek at ihtfp.com>
@@ -3354,10 +9691,10 @@
 	  "--enable-gui" to "--disable-gui", because the default is
 	  enabled.  Also changed "--enable-error-on-warning" for the
 	  same reason.
-	
+
 2003-02-18  David Hampton  <hampton at employees.org>
 
-	* acconfig.h: 
+	* acconfig.h:
 	* configure.in: Export the guile version number so it can be used
 	in the code.  Add new variable for conditionally including the
 	SRFI directory when doing 'make check'.  Should be null when using
@@ -3395,7 +9732,7 @@
 
 	* src/gnome-utils/gnc-account-tree.c:
 	  auto resize balance and total columns
-	
+
 2003-02-15  Derek Atkins  <derek at ihtfp.com>
 
 	* src/import-export/qif-import/qif-file.scm:
@@ -3416,7 +9753,7 @@
 
 2003-02-14  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	* src/import-export/import-backend.c: 
+	* src/import-export/import-backend.c:
 	-Remove unused code.
 	-Fix "destination account written to the matchmap even when
 	 autoselected" bug.
@@ -3453,7 +9790,7 @@
 	* src/gnome-utils/gnc-account-tree.c:
 	* src/gnome/window-acct-tree.c:
 	* src/scm/main-window.scm:
-	  recycle ACCOUNT_BALANCE_EURO and ACCOUNT_TOTAL_EURO account tree 
+	  recycle ACCOUNT_BALANCE_EURO and ACCOUNT_TOTAL_EURO account tree
 	  columns to display balance resp. total in default report currency
 
 	* src/import-export/import-backend.c: in
@@ -3468,7 +9805,7 @@
 
 2003-02-10  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	* src/import-export/import-backend.c,h: 
+	* src/import-export/import-backend.c,h:
 	* src/import-export/import-main-matcher.c: Apply most of cmorgan's
 	  patch for iterative destination account matching.  Optionally
 	  restricting to the transactions after the one being edited still
@@ -3480,7 +9817,7 @@
 
 	* src/import-export/import-main-matcher.c: freeze/thaw the clist
 	  around the iterator to ease the visual affects.
-	
+
 2003-02-09  Chris Lyttle  <chris at wilddev.net>
 
 	* rpm/gnucash.spec.in: fix info file not found.
@@ -3494,7 +9831,7 @@
   	* src/register/ledger-core/split-register-model.c
 	  Don't PERR() if we have no account -- this prevents annoying
 	  messages when handling multi-currency txns in the GL.  Note:
-	  all GL txns are displayed in the locale currency (if possible).	
+	  all GL txns are displayed in the locale currency (if possible).
 	* src/register/ledger-core/split-register.c
 	  AUTO_LEDGER and JOURNAL register types _ARE_ expanded -- return
 	  TRUE, not FALSE.
@@ -3508,7 +9845,7 @@
 	  as non-visible so the ledger get's sized properly
 	* src/gnome/dialog-scheduledxaction.c: resize the cal after the
 	  dialog is shown, so it get's sized properly.
-	
+
 	Move some files around in preparation for re-factoring the
 	reconcile-list code:
 	* src/gnome-search/Makefile.am: removed search-param.[ch]
@@ -3537,10 +9874,10 @@
 
 	* src/business/business-utils/Makefile.am: make scm-links so you
 	  can run gnucash from within the build tree
-	
+
 2003-02-04  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	* src/import-export/import-backend.c: Add heuristic for duplicate matching by check number.  
+	* src/import-export/import-backend.c: Add heuristic for duplicate matching by check number.
 	* doc/README.OFX: Update
 
 2003-02-04  Derek Atkins  <derek at ihtfp.com>
@@ -3549,7 +9886,7 @@
 	  to make sure the numbers are reflected appropriately.
 	* src/import-export/qif-import/qif-objects.scm: add a neg? value to
 	  a qif-split; use this when converting the split-amount.
-	Fixes bug #105179	
+	Fixes bug #105179
 
 2003-02-03  Derek Atkins  <derek at ihtfp.com>
 
@@ -3568,7 +9905,7 @@
 	  dates.
 
 	* src/scm/main.scm: fix "development version" message in head
-	
+
 2003-02-02  Chris Lyttle  <chris at wilddev.net>
 
 	* configure.in: change to 1.9.0 version
@@ -3582,8 +9919,8 @@
 
 	* doc/README.OFX: I've quickly put together some docs for the ofx module and transaction matching.  Also includes a FAQ. Not perfect, but should closebug 99478.
 	* doc/Makefile.am: Add README.OFX
-	* src/import-export/ofx/README: Remove obsolete file.  
-	
+	* src/import-export/ofx/README: Remove obsolete file.
+
 2003-02-02  Derek Atkins <derek at ihtfp.com>
 
 	* configure.in: re-enable -Werror, make sure it only is used with GCC,
@@ -3616,20 +9953,20 @@
 	* po/POTFILES.in:
 	* src/import-export/Makefile.am:
 	  Removed gnc-gen-transaction.[ch] "properly" for the dist.
-	
+
 2003-02-01  Benoit Grégoire  <bock at step.polymtl.ca>
 
 	* src/import-export/gnc-ofx-import.c: No longer assume that transaction with type OFX_OTHER are investement transactions.  Fixes bug reported by Rik harris.
-	* src/import-export/import-main-matcher.c: Fix unrelated display bug with balanced (typically investement) transactions.  
-	
+	* src/import-export/import-main-matcher.c: Fix unrelated display bug with balanced (typically investement) transactions.
+
 2003-02-02  Christian Stimming  <stimming at tuhh.de>
 
 	* configure.in: Disable error-on-warning by default because this
 	seriously breaks quite a number of configure tests. May be enabled
 	again for the development branch, but definitely not for
 	end-users.
-	
-	* configure.in: Fix libofx test. 
+
+	* configure.in: Fix libofx test.
 
 	* src/import-export/hbci/gnc-hbci-utils.c, po/de.po: Recognize
 	even more error codes from OpenHBCI. Yes, I know this breaks
@@ -3641,7 +9978,7 @@
 	* src/import-export/import-utilities.c: Build on Nigel's patch.
 	This hopefully permanently closes
 	http://bugzilla.gnome.org/show_bug.cgi?id=101705.
-	
+
 	* src/import-export/Makefile.am: No longuer compile Christian's
 	old matcher.
 
@@ -3695,7 +10032,7 @@
 
 	* src/register/ledger-core/split-register-module.c: only set ReadOnly
 	  status for Invoices, not Payments.  Fixes #105032
-	
+
 2003-02-01  Derek Atkins  <derek at ihtfp.com>
 
 	* src/gnome/window-register.c: fix the query code to use the correct
@@ -3732,7 +10069,7 @@
 
 	* src/gnome-utils/gnc-menu-extensions.c: dgettext() and gettext()
 	  return const char*.
-	
+
 2003-01-30  Derek Atkins  <derek at ihtfp.com>
 
 	* po/np.po -- add the proper "Plural" header so it builds again.
@@ -3749,9 +10086,9 @@
 	  the caller to set the default choice on "use-subaccounts", and
 	  change the cash-flow report to default to 'no'.  This will make
 	  sure that "Assets:A/P" is not included (since it shouldn't be).
-	
+
 2003-01-29  Matthew Vanecek <mevanecek at yahoo.com>
-	
+
 	* src/backend/postgres/Makefile.am: Changed the .sql.c target to
 	not echo the beginning and ending quotes.  This is part of the
 	gcc 3.x compatibility changes.
@@ -3763,7 +10100,7 @@
 	- (pgend_book_load_poll): added a gnc_session_set_book() call so that
 	  the session would have the correct book loaded (i.e., the book
 	  that's stored in the DB).
-	
+
 	* src/backend/postgres/*.sql: Enclosed each line in a set of
 	quotes "..".  The "multi-line literals" were causing compile errors
 	for gcc 3.x.
@@ -3806,13 +10143,13 @@
 	  connection to store in DbInfo.
 	- (test_raw_query): Added a call to gncQueryPrint() if
 	  gnc_should_log(MOD_TEST, GNC_LOG_DETAIL)
-	
+
 2003-01-29  Herbert Thoma  <herbie at hthoma.de>
 
 	* src/report/standard-reports/cash-flow.scm: only asset accounts
 	  are in the default account selection, tables use normal-row
 	  and alternate-row
-	
+
 2003-01-28  Derek Atkins  <derek at ihtfp.com>
 
 	* configure.in -- fix the PG test to deal properly with non-standard
@@ -3857,7 +10194,7 @@
 	we must let it through; fixes Bug#103955.
 
 	* src/backend/file/gnc-schedxaction-xml-v2.c
-	(gnc_schedXaction_dom_tree_create): Make output of the 
+	(gnc_schedXaction_dom_tree_create): Make output of the
 	deferred-instance last-date node optional on it's validity.
 
 	* src/gnome/dialog-sxsincelast.c (cancel_check): Change assertion
@@ -3921,12 +10258,12 @@
 	* src/business/business-gnome/glade/*.glade -- fix a tooltip to
 	  let the user know that they can (should?) leave the ID blank
 	  so the system will choose one for them.
-	
+
 2003-01-21  David Hampton  <hampton at employees.org>
 
 	* src/quotes/finance-quote-helper.in: Fix problem getting quotes
 	from trustnet.
-	
+
 2003-01-21  Derek Atkins  <derek at ihtfp.com>
 
 	* configure.in: be more liberal in the use of AS_SCRUB_INCLUDE
@@ -3960,7 +10297,7 @@
 
 	* src/app-utils/test/test-scm-query-string.c -- fix a memory leak
 	  in the test.
-	
+
 2003-01-19  John Pierce <john at killterm.org>
 
 	* doc/Makefile.am
@@ -4048,7 +10385,7 @@
 
 	* configure.in -- scrub the CFLAGS for postgres, as per Roland Roberts'
 	  report.
-	
+
 2003-01-18  Derek Atkins  <derek at ihtfp.com>
 
 	* src/business/business-core/gncTaxTable.[ch]: add functions to
@@ -4102,7 +10439,7 @@
 	  'invoice' portion anymore, so we don't need references to user
 	  name and user address preferences.  This removes the "User Info"
 	  page from the Global Preferences.
-	
+
 2003-01-16  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/commodity-table.scm: move gnc:commodity-is-currency? here
@@ -4121,7 +10458,7 @@
 	* qif-merge-groups.scm: Limit matches against only the accounts in
 	  the old group, so we don't match against ourselves.  This should
 	  limit the matches to only "reasonable" matches, and should fix #102463
-	
+
 2003-01-15  David Hampton  <hampton at employees.org>
 
 	* configure.in: Remove restriction on guile versions > 1.4.
@@ -4189,7 +10526,7 @@
 
 	* src/business/business-ledger/gncEntryLedgerLoad.c: add code to
 	  "show_range()" which should fix the page-up/page-down problem.
-	
+
 2003-01-14  Derek Atkins  <derek at ihtfp.com>
 
 	* src/engine/QueryNew.h: add QUERY_PARAM_ACTIVE
@@ -4208,7 +10545,7 @@
 
 	* src/gnome-search/dialog-search.c -- grey out the button if it
 	  has no meaning for this particular search-type.
-	
+
 2003-01-13  David Hampton  <hampton at employees.org>
 
 	* src/engine/engine-helpers.c: Make the gnc_scm_to_gint64()
@@ -4241,7 +10578,7 @@
 
 	* src/import-export/import-utilities.c -- applied Nigel Titley's
 	  patch for #101705
-	
+
 2003-01-12  Derek Atkins  <derek at ihtfp.com>
 
 	* src/app-utils/global-options.[ch]: add gnc_default_report_currency()
@@ -4304,13 +10641,13 @@
 	* src/engine/QueryCore.c: fix the algorithm to compute equality
 	  of numerics so it copes with numbers in the "wrong" order.
 	  Fixed bug #103341
-	
+
 2003-01-12  David Hampton  <hampton at employees.org>
 
 	* macros/openhbci.m4: Scrub hbci include paths to prevent gcc 3.x
 	compile errors.
 
-	* src/app-utils/option-util.c: 
+	* src/app-utils/option-util.c:
 	* src/app-utils/global-options.c: Add support for setting a string
 	option.
 
@@ -4361,7 +10698,7 @@
 	  wrap gncEntryGetBillTaxTable()
 	* src/business/business-reports/invoice.scm: only set the "taxable"
 	  value to 'T' if the value is true AND we've got an actual tax table.
-	
+
 2003-01-11  David Hampton  <hampton at employees.org>
 
 	* src/app-utils/gnc-ui-util.c: The "reverse balance" preference
@@ -4376,7 +10713,7 @@
 	  modifications, which had an unfortunate interaction with old
 	  debugging code, causing the score to be reversed, and making the
 	  matcher mostly unusable.
-	
+
 2003-01-09  Derek Atkins  <derek at ihtfp.com>
 
 	* src/register/ledger-core/split-register-model.c:
@@ -4395,7 +10732,7 @@
 
 	* src/business/business-core/gncInvoice.c: actually apply
 	  a payment to the proper transfer account.  Fixes bug #102893
-	
+
 2003-01-08  Christian Stimming  <stimming at tuhh.de>
 
 	* po/ru.po: Updated very complete (!) Russian translation by
@@ -4437,7 +10774,7 @@
 
 	* intl-scm/Makefile.am: applied John's patch to build guile-strings.c
 	  properly.
-	
+
 2003-01-05  Chris Lyttle  <chris at wilddev.net>
 
 	* configure.in: release 1.7.7
@@ -4454,21 +10791,21 @@
       Fix for non-srcdir builds.
 
     * src/app-utils/Makefile.am:
-    * src/business/business-core/Makefile.am: 
+    * src/business/business-core/Makefile.am:
     * src/business/dialog-tax-table/Makefile.am:
     * src/gnome/Makefile.am:
     * src/gnome-search/Makefile.am:
     * src/gnome-utils/Makefile.am:
     * src/business/business-gnome/Makefile.am:
-    * src/gnc-module/Makefile.am: 
+    * src/gnc-module/Makefile.am:
       Removed unneeded depends, they interfere with the auto-generated ones.
 
-    * src/gnc-module/test/mod-bar/Makefile.am: 
-    * src/gnc-module/test/mod-baz/Makefile.am: 
+    * src/gnc-module/test/mod-bar/Makefile.am:
+    * src/gnc-module/test/mod-baz/Makefile.am:
     * src/gnc-module/test/mod-foo/Makefile.am:
     * src/gnc-module/test/misc-mods/Makefile.am:
       Don't install test modules.
-        
+
     * src/backend/postgres/Makefile.am:
       Fixed auto-generation of sources out of srcdir.
       Moved auto-generation sources all to BUILT_SOURCES to generate
@@ -4489,21 +10826,21 @@
 
 2002-1-6  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/import-backend.c: Give a much higher importance
-	the date heuristics.   Exact date now worth +3, date within 
-	MATCH_DATE_THRESHOLD worth +2, and dates outside 
-	MATCH_DATE_NOT_THRESHOLD (now set to 25) are worth -100. 
-	The side effect it that any transaction outside a 25 day 
+	the date heuristics.   Exact date now worth +3, date within
+	MATCH_DATE_THRESHOLD worth +2, and dates outside
+	MATCH_DATE_NOT_THRESHOLD (now set to 25) are worth -100.
+	The side effect it that any transaction outside a 25 day
 	range can't be matched at all.
 	-Disable skipping transactions which already have an online id
-	during matching, untill a fix for the "transfer between two 
+	during matching, untill a fix for the "transfer between two
 	accounts" bug is properly fixed.
 	* src/import-export/generic-import.scm:
-	* src/import-export/import-settings.c:	
+	* src/import-export/import-settings.c:
 	-Disable EDIT action enabling, (it won't be complete for 1.8.0).
 	-Fix typos reported by Bill Wohler.
 	-Adjust default ADD and RECONCILE threshold to account for above
 	change.
-	
+
 2003-01-05  David Hampton  <hampton at employees.org>
 
 	* src/app-utils/gnc-component-manager.c: New functions for
@@ -4545,12 +10882,12 @@
 	* src/backend/file/io-example-account.c: fix a logic bug
 	* accounts/C/acctchrt_common.gnucash-xea: don't start selected
 	* accounts/C/acctchrt_checkbook.gnucash-xea: provide a simple checkbook
-	
+
 2003-01-04  David Hampton  <hampton at employees.org>
 
-	* src/backend/file/gnc-account-xml-v2.c: 
-	* src/backend/file/gnc-book-xml-v2.c: 
-	* src/backend/file/io-gncxml-v2.c: 
+	* src/backend/file/gnc-account-xml-v2.c:
+	* src/backend/file/gnc-book-xml-v2.c:
+	* src/backend/file/io-gncxml-v2.c:
 	* src/backend/file/io-utils.c:
 	* src/backend/file/test/test-xml-account.c: Don't export lots.
 
@@ -4586,7 +10923,7 @@
 	  all the time, instead of only in registers that needed to be corrected.
 	  Fix the code to only apply the multi-currency changes to the correct
 	  register types (e.g., NOT stock registers).  Fixes 102549.
-	
+
 2003-01-03  David Hampton  <hampton at employees.org>
 
 	* src/gnome/druid-hierarchy.c:
@@ -4635,7 +10972,7 @@
 
 	* src/backend/postgres/upgrade.c: Changed the "ALTER TABLE table
 	ADD COLUMN..." statements to conform to the current Postgres
-	implementation (and SQL 92) standard by putting the DEFAULT 
+	implementation (and SQL 92) standard by putting the DEFAULT
 	modifier in a separate ALTER statement.	 This was reported by
 	Christopher B. Browne.
 
@@ -4744,12 +11081,12 @@
 	* src/scm/command-line.scm: change the message to let people know that
 	  the rpc-server command-line option only works if gnucash was compiled
 	  with rpc enabled.
-	
+
 2002-12-30  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/hbci/druid-hbci-initial.c
 	* src/import-export/hbci/gnc-hbci-utils.c:
 	Fix a bunch of "warning: deprecated use of label at end of
-	compound statement" in gcc3 in select statements (added 
+	compound statement" in gcc3 in select statements (added
 	semicolons after default: so that I don't break anything,
 	but it should probably output an error instead).
 
@@ -4765,7 +11102,7 @@
 	* src/backend/postgres/upgrade.c: Changed all the DATETIME
 	SQL data types to TIMESTAMP.  DATETIME will not be in Postgresql
 	as of 7.3.
-	
+
 	* src/backend/postgres/functions.sql: Changed all the DATETIME
 	types in the DDL to TIMESTAMP.
 
@@ -4779,7 +11116,7 @@
 
 	* src/app-utils/prefs.scm, src/app-utils/global-options.c: Rename
 	"Default currency" option to "New Account default currency" since
-	*everybody* asks about that one.  Was reported in #102043, 
+	*everybody* asks about that one.  Was reported in #102043,
 	#100466, #99364, #87729.
 
 	* src/business/business-gnome/dialog-invoice.c
@@ -4816,7 +11153,7 @@
 
 	* src/bin/test/Makefile.am:
 	* src/doc/Makefile.am:
-	* src/import-export/hbci/Makefile.am: 
+	* src/import-export/hbci/Makefile.am:
 	* src/import-export/ofx/Makefile.am: Get 'make distcheck' working again.
 
 2002-12-28  Christian Stimming  <stimming at tuhh.de>
@@ -4859,7 +11196,7 @@
 	clueless software mismanagement.
 
 	* macros/autogen.sh: Enable -Werror for all builds.
-	
+
 
 	* src/app-file/gnc-file.c: Add missing error message.
 
@@ -4881,7 +11218,7 @@
 
 	* src/scm/price-quotes.scm: Add some additional checking.
 
-	
+
 	* src/gnome-utils/dialog-transfer.c: Change logic to multiply by
 	the exchange rate instead of divide.  Look for both both forward
 	and reverse currency quotes in the pricedb. Attempt to install
@@ -4894,7 +11231,7 @@
 
 	* src/register/ledger-core/split-register-control.c: Remove
 	function call to obsolete routine.
-	
+
 	* src/engine/gnc-pricedb.c:
 	* src/engine/gw-engine-spec.scm: Added a new function
 	(gnc_pricedb_lookup_day) to retrieve a price quote from a certain
@@ -4945,8 +11282,8 @@
 	* src/register/ledger-core/split-register-p.h:
 	* src/register/ledger-core/split-register.c: Add place to save the
 	list of splits used to fill the register.
-	
-	* src/register/ledger-core/split-register-load.c: 
+
+	* src/register/ledger-core/split-register-load.c:
 	If there is a transaction pending when updating the register, use
 	the saved list so that the transaction is guaranteed to remain in
 	the register until the user finishes editing it. Otherwise,
@@ -4998,7 +11335,7 @@
 
 2002-12-15  David Hampton  <hampton at employees.org>
 
-	* src/report/standard-reports/advanced-portfolio.scm: 
+	* src/report/standard-reports/advanced-portfolio.scm:
 	* src/report/standard-reports/portfolio.scm: Add an option for
 	changing the number of decimal places used in the shares
 	column. #87164
@@ -5045,7 +11382,7 @@
 
 	* src/gnome/glade/sched-xact.glade: Clarified some text, removed
 	unused widgets.
-	
+
 	* src/app-utils/gnc-ui-util.c (xaccSPrintAmount): Added useful comment.
 
 	* src/gnome/druid-loan.c (ld_create_sxes): Re-written; now a much
@@ -5078,7 +11415,7 @@
 	* src/engine/gw-kvp-spec.scm: use gslist-of where needed
 
 	NOTE: As of now you ABSOLUTELY REQUIRE G-WRAP >= 1.3.3
-	
+
 2002-12-11  David Hampton  <hampton at employees.org>
 
 	* src/gnc-ui.h: New help URLs for Wilddev.
@@ -5109,7 +11446,7 @@
 	  you change the date or an account after typing in a number it will
 	  over-write your change with the nearest pricedb entry.
 	  Fixed Bug #100284.
-	
+
 2002-12-11  Christian Stimming  <stimming at tuhh.de>
 
 	* accounts/el_GR/acctchrt_common.gnucash-xea: Greek account
@@ -5125,8 +11462,8 @@
 
 2002-12-10  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/*: Add user pref to allow HBCI users
-	to select if they want Christian's matcher or mine.  
-	Update OFX readme.   
+	to select if they want Christian's matcher or mine.
+	Update OFX readme.
 	Update column width in account-picker.
 
 2002-12-09  Christian Stimming  <stimming at tuhh.de>
@@ -5139,21 +11476,21 @@
 	* src/gnome/window-acct-tree.c: Disallow the deletion of accounts
 	  with ReadOnly Transactions in them.  You must first "delete" the
 	  RO Txns before you delete the account.  Fix for bug# 100727 (although
-	  it requires invoice unposting to work).	 
+	  it requires invoice unposting to work).
 
 2002-12-9  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/import-main-matcher.c:
-	* src/import-export/generic-import.glade: Change colors, remove 
+	* src/import-export/generic-import.glade: Change colors, remove
 	imbalance column and put it's info into the "Select action column",
-	 when appropriate.  Change many strings after discussion with 
+	 when appropriate.  Change many strings after discussion with
 	Wilddev.
 
 2002-12-8  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/import-account-matcher.c,h: Add param to 
+	* src/import-export/import-account-matcher.c,h: Add param to
 	 gnc_import_select_account():
 	@param ok_pressed A pointer to gboolean.  If non-NULL, whether or
     	not the picker dialog was closed by the user pressing ok will be
-    	stored in the parameter.  If no dialog was created by the  
+    	stored in the parameter.  If no dialog was created by the
     	gnc_import_select_account() call, TRUE is always returned.
 	* src/import-export/ofx/gnc-ofx-import.c: Fix for above change.
 	* src/import-export/gnc-gen-transaction.c: Take advantage of
@@ -5163,19 +11500,19 @@
 	taken" column.
 
 2002-12-8  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/import-backend.c: Make the auto-balance 
-	split have the correct amount in all cases by using 
+	* src/import-export/import-backend.c: Make the auto-balance
+	split have the correct amount in all cases by using
 	xaccTransGetImbalance() instead of the first split's value.
 	* src/import-export/import-account-matcher.c:
-	-Performance improvements in the display code, and skipping 
+	-Performance improvements in the display code, and skipping
 	lookup of the kvp frame when not needed.
 	-Expand the tree when a subaccount is selected
 	-Remove redundant selection lookup.
-	
+
 2002-12-08  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/engine/SchedXaction.h: Doxygen-related changes.
-	
+
 	* src/register/ledger-core/split-register-layout.c
 	(gnc_split_register_layout_add_cells): Change F(DEBT|CRED)_CELL
 	types to FORMULA_CELL from QUICKFILL_CELL.
@@ -5184,7 +11521,7 @@
 	(libgncmod_register_gnome_LTX_gnc_module_init): Add
 	formulacell-gnome override to gnc_register setup.
 
-	* src/register/register-core/formulacell.c: 
+	* src/register/register-core/formulacell.c:
 	* src/register/register-gnome/formulacell-gnome.c: Filled in a
 	long-thought of idea for a formula cell: can contain text unlike a
 	pricecell, but doesn't really want to do auto-complete like a
@@ -5221,20 +11558,20 @@
 	Range" window more intuitive by moving a button.
 
 	* src/scm/main.scm: Tweak the file name normalization code.
-	
+
 2002-12-7  Benoit Grégoire  <bock at step.polymtl.ca>
-	
-	* src/import-export/generic-import.glade:  Add user instructions, 
+
+	* src/import-export/generic-import.glade:  Add user instructions,
 	get rid of apply button.
-	* src/import-export/import-main-matcher.c: Speed optimizations, 
-	implement import status notification with background color.  
+	* src/import-export/import-main-matcher.c: Speed optimizations,
+	implement import status notification with background color.
 	Clarify strings.
 
-	Note:  The matcher is now feature complete, except for manual 
+	Note:  The matcher is now feature complete, except for manual
 	transaction editing.  (More optimizations and code review still
 	to be done)  I am awaiting comments about the matcher UI and
 	and investment transaction importing.
-	
+
 2002-12-07  David Hampton  <hampton at employees.org>
 
 	* src/app-utils/gnc-ui-util.c: Consolidate all knowledge about
@@ -5277,7 +11614,7 @@
 	    pop up the dialog, and what to put into it.
 	  - add an error dialog for corner cases where we want to force
 	    the user to expand the txn in order to get proper conversions.
-	
+
 	* src/register/ledger-core/split-register-model-save.c:
 	  - export "split_needs_amount()" for use elsewhere
 	  - fix the logic in handling debcred changes, in particular for
@@ -5296,16 +11633,16 @@
 	  gnc_commodity_equal(), because the average user doesn't need
 	  to know why commodities are not equal.
 
-2002-12-07  Benoit Grégoire  <bock at step.polymtl.ca>	
+2002-12-07  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	More Doxygenification.  Created an Engine module, and a 
+	More Doxygenification.  Created an Engine module, and a
 	Deprecated list.  Unfortunately, unless we turn on EXTRACT_ALL
-	(not very practical currently) not all functions will appear 
-	unless they are all documented. 
-	* src/engine/Transaction.h: More Doxygenification	
+	(not very practical currently) not all functions will appear
+	unless they are all documented.
+	* src/engine/Transaction.h: More Doxygenification
 	* src/engine/Account.h: Doxygenify
 	* src/doc/doxygen.cfg.in: Minor config change.
-	
+
 2002-12-07  Christian Stimming  <stimming at tuhh.de>
 
 	* configure.in: Require openhbci 0.9.4 for HBCI version choosing.
@@ -5335,12 +11672,12 @@
 	header entry.
 
 2002-12-06  Benoit Grégoire  <bock at step.polymtl.ca>
-	
-	* src/import-export/ofx/gnc-ofx-import.c:  Do the "right" 
+
+	* src/import-export/ofx/gnc-ofx-import.c:  Do the "right"
 	thing for setting split amount and value.
 	* src/import-export/import-main-matcher.c: Cosmetic
 	improvements for balance display and window resizing.
-	* All other affected files:  Doxygenify everything.  Take a 
+	* All other affected files:  Doxygenify everything.  Take a
 	look, run make doc, and open src/doc/html/index.html
 
 2002-12-06  Derek Atkins  <derek at ihtfp.com>
@@ -5349,63 +11686,63 @@
 	  by _value_ -- ALWAYS.
 
 	* po/nl.po -- don't use msgid_plural -- it fails to work.
-		
+
 2002-12-06  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/import-backend.c:  Fix for gcc2
 
 2002-12-06  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	Huge patch, this is the new generic import 
+	Huge patch, this is the new generic import
 	architecture/transaction matcher.  Many old
 	files were renamed, split or deleted.
-	
-	* src/engine/Transaction.c,h: 
-	- Add a DxaccSplitSetAmount function, 
-	- Fix a bug in xaccSplitsComputeValue (Split values were 
-	sometimes being summed, which is illogical) that caused 
+
+	* src/engine/Transaction.c,h:
+	- Add a DxaccSplitSetAmount function,
+	- Fix a bug in xaccSplitsComputeValue (Split values were
+	sometimes being summed, which is illogical) that caused
 	xaccTransGetImbalance to sometimes return incorrect values.
 	Somebody please review this.  Playing in the engine during
 	freeze isn't ideal.
-	
-	* src/import-export/import-backend.c,h: There is now a 
+
+	* src/import-export/import-backend.c,h: There is now a
 	real backend, completely independent of the GUI.
 
 	* src/import-export/gnc-gen-transaction.c: This is Christian's
-	old matcher, I tried to maintain compatibility, but couldn't 
-	really test.  Please note that there is some code 
-	simplification that could be done there now that there is a 
+	old matcher, I tried to maintain compatibility, but couldn't
+	really test.  Please note that there is some code
+	simplification that could be done there now that there is a
 	clean backend, and that some values passed between the functions
 	might no longer have any effect.
-	
-	* src/import-export/ofx/gnc-ofx-import.c:  Update for new 
-	matcher.  Use the currency reported by libofx and 
-	xaccSpiltSetBaseValue when adding a banking/credit card 
+
+	* src/import-export/ofx/gnc-ofx-import.c:  Update for new
+	matcher.  Use the currency reported by libofx and
+	xaccSpiltSetBaseValue when adding a banking/credit card
 	transaction.
 
 	* src/import-export/import-account-matcher.c,h: This is a
 	very generic and flexible account matcher/picker.
-	
+
 	* src/import-export/import-commodity-matcher.c,h: This is
 	a generic commodity matcher/picker.
 
-	* src/import-export/import-main-matcher.c,h: This is the 
+	* src/import-export/import-main-matcher.c,h: This is the
 	main transaction matcher GUI. It's mostly feature complete
 	and should be fairly stable, but probably leaks memory.
-	
+
 	* src/import-export/import-match-map.c,h: Derek Atkin's
 	generic string/account matching infrastructure.
-	
-	* src/import-export/import-match-picker.c,h:  This is the 
-	interface to pick a matching transaction.  It has been 
+
+	* src/import-export/import-match-picker.c,h:  This is the
+	interface to pick a matching transaction.  It has been
 	completely ripped from the backend.
-	
+
 	* src/import-export/import-settings.c,h:  All user
-	settings (or compiled-in settings) are now abstracted in 
+	settings (or compiled-in settings) are now abstracted in
 	an opaque structure with getter functions.
 
 	* src/import-export/import-utilities.c:	These are utility
-	functions to help import module writers. 
+	functions to help import module writers.
 
 2002-12-06  Christian Stimming  <stimming at tuhh.de>
 
@@ -5423,7 +11760,7 @@
 
 	* src/register/ledger-core/split-register-model-save.c -- Handle
 	  the case where only the exchrate changed.  Actually change it!
-	
+
 2002-12-06  David Hampton  <hampton at employees.org>
 
 	* src/quotes/finance-quote-helper.in: Add an additional module to
@@ -5434,7 +11771,7 @@
 2002-12-05  Derek Atkins  <derek at ihtfp.com>
 
 	* src/gnome-search/Makefile.am: add GDK_PIXBUF_CFLAGS because
-	  it is pulled in by gtkhtml, which is pulled in from window-help.	  
+	  it is pulled in by gtkhtml, which is pulled in from window-help.
 
 	* revert patch -- not needed.  Oops.
 
@@ -5451,7 +11788,7 @@
 	  set the "price" and the latter will set a (as of yet unused) flag.
 	* src/register/ledger-core/split-register-control.c: Don't pop up
 	  the exchange dialog when it is not needed, even when requested.
-	
+
 2002-12-04  David Hampton  <hampton at employees.org>
 
 	* src/quotes/finance-quote-helper.in (schemify_quote): Allow stock
@@ -5483,7 +11820,7 @@
 	  deal with broken QIF files that give broken bang-fields.  In
 	  particular, handle the case where it supplies "!Type Bank"
 	  instead of "!Type:Bank"
-	
+
 2002-12-03  Derek Atkins  <derek at ihtfp.com>
 
 	* src/register/ledger-core/split-register-control.c:
@@ -5501,7 +11838,7 @@
 	  this all.
 
 	  Closed bug # 97690
-	
+
 2002-12-03  David Hampton  <hampton at employees.org>
 
 	* src/scm/main.scm ((gnc:account-file-to-load)): Normalize the
@@ -5544,7 +11881,7 @@
 	* src/doc/doxygen.cfg: Removed.
 	* src/doc/doxygen.cfg.in: New file.
 
-	* src/gnome/gnc-split-reg.c (gsr_default_delete_handler): 
+	* src/gnome/gnc-split-reg.c (gsr_default_delete_handler):
 	Convert the delete dialogs to follow the existing gnucash standard
 	where the cancel button is the rightmost button in the dialog box.
 	#98291
@@ -5582,16 +11919,16 @@
 	* src/register/ledger-core/split-register-control.c:
 	  fill in the "exchange dialog" with entries from the current split/trans
 	  change the API to allow a menu-item to pop up the exchange dialog
-	
+
 2002-12-02  Chris Lyttle  <chris at wilddev.net>
-	
+
 	* src/doc/Makefile.am: fix for failure when building rpm
 
 2002-12-02  Chris Lyttle  <chris at wilddev.net>
 
 	* NEWS: update to new version 1.7.4
 	* configure.in: update to new version 1.7.4
-	
+
 2002-12-01  David Hampton  <hampton at employees.org>
 
 	* src/engine/Transaction.c (xaccTransOrder): The sort on the
@@ -5627,14 +11964,14 @@
 
 	* src/gnome-utils/gnc-menu-extensions.[hc]: Added
 	gnc_gnome_app_insert_menus to work around i18n problems with stock
-	gnome menus. This is now also used from window-acct-tree.c. 
+	gnome menus. This is now also used from window-acct-tree.c.
 
 2002-12-01  Derek Atkins <derek at ihtfp.com>
 
 	* move QuickFill and dialog-transfer into gnome-utils
 
 	* business-ledger/gncEntryLedger.c -- delay setting *new = FALSE until
-	  just before we call the "new account" dialog.	  
+	  just before we call the "new account" dialog.
 
 	* src/gnome-utils/dialog-transfer -- update the dialog to enable
 	  and "exchange dialog" -- limited use from the register.  This is
@@ -5647,7 +11984,7 @@
 	  (mostly).  Call out to the exchange (transfer) dialog when you
 	  create a split to an account different than the transaction
 	  currency.  This is a partial fix for 97690.
-	
+
 2002-12-01  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/app-utils/gnc-helpers.c (g_date_equals, g_date_hash): Added
@@ -5670,12 +12007,12 @@
 	  longer requires the pricedb for printing split values.  This will
 	  display all transactions in the currency of the current account,
 	  regardless of the number of splits in the transaction.
-	  
+
 2002-11-30  Herbert Thoma  <herbie at hthoma.de>
 
 	* src/report/standard-reports/cash-flow.scm: Added new option
 	for output formating, make the output "nicer"
- 
+
 2002-11-30  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/hbci/gnc-hbci-getbalance.c: More graceful
@@ -5721,7 +12058,7 @@
 	* src/report/report-system/report.scm: Move the busy cursor logic
 	so that it removes the busy cursor even after a report error.
 
-	* src/report/locale-specific/us/taxtxf.scm: 
+	* src/report/locale-specific/us/taxtxf.scm:
 	* src/report/standard-reports/transaction.scm: Provide progress updates
 	while creating reports. #94280
 
@@ -5745,7 +12082,7 @@
 	importer window.
 
 2002-11-27  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* Makefile.am configure.in src/doc/Makefile.am
 	src/doc/doxygen.cfg src/doc/doxygen_main_page.c: Added doxygen
 	documentation support, and integrated it into the build system.
@@ -5754,9 +12091,9 @@
 	tree will be included in the documentation if it follows doxygen
 	conventions.  The doc created in src/doc/html.  Doxygen is now
 	required for make dist.
-	
-	* src/import-export/:  Enable doxygen documentation.	
-	
+
+	* src/import-export/:  Enable doxygen documentation.
+
 2002-11-27  Christian Stimming  <stimming at tuhh.de>
 
 	* accounts/pt_BR/*: Added Brazilian Portugese account templates by
@@ -5777,7 +12114,7 @@
 	* src/report/report-system/html-utilities.scm:
 	* src/report/report-system/report-utilities.scm:
 	* src/report/report-system/report.scm:
-	* src/report/standard-reports/*.scm: 
+	* src/report/standard-reports/*.scm:
 	* src/business/business-reports/*.scm: Provide progress updates
 	while creating reports. #94280
 
@@ -5793,32 +12130,32 @@
 	  GUI events when building the template trans -- to make sure
 	  that refreshes don't happen until after the txn is inserted.
 	FIXES bug #99563
-	  
+
 2002-11-26  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/Transaction-matcher.c:
 	More code cleanup -- use getter functions instead of direct
 	structure access to make potential file split easier.
-	
+
 	* src/import-export/gnc-gen-transaction.[hc]
 	(gnc_gen_trans_get_fuzzy_amount): Add functions to get/set the
 	fuzzy amount matching threshold, so that this feature can be used
 	from gnc-ofx-import.c.
 
 2002-11-25  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/hbci/gnc-hbci-gettrans.c: Remove 
+	* src/import-export/hbci/gnc-hbci-gettrans.c: Remove
 	#include "gnc-generic-import.h"
 
 2002-11-25  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/Account-matcher.[c,h]: Minor changes to make
 	the matcher more generic:  Improved text handling, default account
-	support, enable account description, disable showing Online ID 
+	support, enable account description, disable showing Online ID
 	column if online_id isn't specified in the function call.
 	* src/import-export/generic-import.glade: Adjust text for above 		changes.
 	* src/import-export/gnc-gen-transaction.c:  Use the more feature		 complete Account-matcher.h from the generic import module instead
 	 of dialog-account-pick.h.  Christian, tell me you didn't implement
-	a fourth account picker from scratch. 
-	* src/import-export/ofx/gnc-ofx-import.c: Adapt text to 
+	a fourth account picker from scratch.
+	* src/import-export/ofx/gnc-ofx-import.c: Adapt text to
 	Account-matcher changes.
 
 2002-11-24  Joshua Sled  <jsled at asynchronous.org>
@@ -5829,14 +12166,14 @@
 	* src/gnome/dialog-scheduledxaction.c (putSchedXactionInDialog):
 	Don't double-free dates; fixes Bug#99452.
 
-	* src/gnome/gnc-split-reg.c (gnc_split_reg_jump_to_split) 
-	(gnc_split_reg_jump_to_split_amount, gnc_split_reg_record) 
-	(gsr_emit_include_date_signal): 
+	* src/gnome/gnc-split-reg.c (gnc_split_reg_jump_to_split)
+	(gnc_split_reg_jump_to_split_amount, gnc_split_reg_record)
+	(gsr_emit_include_date_signal):
 	* src/gnome/window-register.c (gnc_register_include_date_adapter):
 	Add back in support for including a date in the range
 	limited/viewed by the window-register.
-	
-	* src/gnome/gnc-split-reg.c (gnc_split_reg_get_read_only) 
+
+	* src/gnome/gnc-split-reg.c (gnc_split_reg_get_read_only)
 	* src/gnome/window-register.c (regWindowLedger): Change manner of
 	setting window-title in read-only-register case so the
 	gnc-split-reg isn't changing the window-titles of windows it has
@@ -5873,14 +12210,14 @@
 	  is not the same as the current account commodity.
 	* src/gnome/dialog-transfer.c -- Make sure the exchange rate stays
 	  a decimal number instead of converting to a fraction.
-	
+
 2002-11-24  David Hampton  <hampton at employees.org>
 
-	* src/app-file/gncmod-app-file.c: 
+	* src/app-file/gncmod-app-file.c:
 	* src/gnome-utils/gnc-mdi-utils.c:
 	* src/gnome-utils/gnc-mdi-utils.h: Rename the
 	gnc_mdi_file_percentage function to gnc_mdi_show_progress.
-	
+
 	* src/gnome-utils/gw-gnome-utils-spec.scm: Wrap the
 	gnc_mdi_show_progress function so it is accessible from scheme.
 
@@ -5893,10 +12230,10 @@
 	* src/app-utils/prefs.scm (gnc:make-number-range-option): Fix
 	wording of pref-widget hints; fixes Bug#99389.
 
-	* src/gnome/glade/sched-xact.glade: 
-	* src/gnome/dialog-sx-from-trans.c: 
-	* src/gnome/druid-loan.c (gnc_ui_sx_loan_druid_create): 
-	* src/gnome-utils/gnc-frequency.c (gnc_frequency_init): 
+	* src/gnome/glade/sched-xact.glade:
+	* src/gnome/dialog-sx-from-trans.c:
+	* src/gnome/druid-loan.c (gnc_ui_sx_loan_druid_create):
+	* src/gnome-utils/gnc-frequency.c (gnc_frequency_init):
 	* src/gnome/dialog-scheduledxaction.c
 	(gnc_ui_scheduled_xaction_editor_dialog_create):
 	GnomeDateEdit -> GNCDateEdit; Fixes Bug#99357.
@@ -5914,10 +12251,10 @@
 
 	* src/backend/postgres/PostgresBackend.c: Added messages.h to support
 	string internationalization.
-	
-	* src/backend/postgres/PostgresBackend.c (pgend_session_begin): 
+
+	* src/backend/postgres/PostgresBackend.c (pgend_session_begin):
 	an xaccBackendSetMessage() call was missing the Backend argument.
-	
+
 2002-11-23  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/hbci/gnc-hbci-gettrans.c: Use the new generic
@@ -5934,7 +12271,7 @@
 	between different possible duplicate matches.
 	(matchmap_find_destination): Add automatic destination guessing
 	and learning, based on the GncImportMatchMap.
-	
+
 	* po/POTFILES.in, de.po: Updated translations.
 
 	* src/engine/Account.h, src/import-export/gnc-import-match-map.h:
@@ -5947,7 +12284,7 @@
 	reconciliation window. Only set those the user identified as
 	reconciled. #95639
 
-	* src/register/ledger-core/gnc-ledger-display.c (refresh_handler): 
+	* src/register/ledger-core/gnc-ledger-display.c (refresh_handler):
 	If there is a current split, then ensure that the transaction
 	containing that split stays in the register.  This will make the
 	transaction being edited stay in the register until you move to
@@ -5959,7 +12296,7 @@
 	current split have been cleared, then delete this split. #98139
 	(gnc_split_register_old_split_empty_p): New function.
 
-	* src/engine/Account.c (xaccTransFixSplitDateOrder): 
+	* src/engine/Account.c (xaccTransFixSplitDateOrder):
 	(xaccTransFixSplitDateOrder): Prevent this routine from causing a
 	recursive call to itself.
 
@@ -5970,13 +12307,13 @@
 	* src/gnome/glade/register.glade: Update help menu items. #99169
 
 	* src/gnome/window-register.c (gnc_register_toolbar_cb): Remove
-	unused routine.	
+	unused routine.
 
 	* src/import-export/qif-import/qif-merge-groups.scm: Add a new
 	progress box for a function that takes forever and a day to
 	complete.
 
-	* src/import-export/qif-import/qif-to-gnc.scm: 
+	* src/import-export/qif-import/qif-to-gnc.scm:
 	* src/import-export/qif-import/qif-file.scm: Mark progress box
 	strings for i18n.
 
@@ -6021,19 +12358,19 @@
 
 	* README/README.cvs -- update to reference how to "properly" use
 	  autogen.sh
-	
+
 2002-11-21  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/Transaction-matcher.c: Tweak the matching
 	heuristics.
 	-Memo and description heuristics now both have a very primitive
 	fuzzy match worth +1:  Only the first half of the string is compared.
 	The rationale is that this will allow the matcher to skip the
-	transaction number sometimes appended after the description by 
-	some banks. 
+	transaction number sometimes appended after the description by
+	some banks.
 	* src/import-export/ofx/gnc-ofx-import.c:  Transaction memo is
-	always written in the split's memo. 
+	always written in the split's memo.
 	* src/doc/user-prefs-howto.txt:  Add new file, by Christian Stimming.
-	
+
 2002-11-21  Benoit Grégoire  <bock at step.polymtl.ca>
 	* src/import-export/generic-import.scm: New file, contains user
 	prefs for the Transaction matcher:
@@ -6043,8 +12380,8 @@
 	* src/import-export/Makefile.am: Add generic-import.scm
 	* src/import-export/Transaction-matcher.c:
 	-Use the new user prefs.
-	-Change the name of the actions to hopefully reflect better the 
-	action that will be taken.  RECONCILE is now CLEAR, and IGNORE is 
+	-Change the name of the actions to hopefully reflect better the
+	action that will be taken.  RECONCILE is now CLEAR, and IGNORE is
 	now SKIP.
 	-Disable numeric scoring.
 
@@ -6072,15 +12409,15 @@
 
 	* NEWS: update to new version 1.7.3
 	* configure.in: update to new version 1.7.3
-	
+
 2002-11-18  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/Transaction-matcher.c: Remove constant length 
-	strings and replace with moving pointers.  I wish _("string") 
+	* src/import-export/Transaction-matcher.c: Remove constant length
+	strings and replace with moving pointers.  I wish _("string")
 	could be used as a could initializer like "string" can...
 
 2002-11-17  Joshua Sled  <jsled at asynchronous.org>
 
-	* src/gnome/dialog-sxsincelast.c: 
+	* src/gnome/dialog-sxsincelast.c:
 	* src/gnome/dialog-scheduledxaction.c:
 	Use printGDate() when we need to print dates; fixes Bug#96477.
 
@@ -6116,7 +12453,7 @@
 	* configure.in: Add support for gtkhtml 1.1.
 
 	* various: Clean up compilation warnings.
-	
+
 	* src/gnome/window-reconcile.c: Fix a couple of functions that
 	were illegally casting pointers to the wrong type.  Use the new
 	gnc_split_reg_xxx functions instead of the old gnc_register_xxx
@@ -6139,13 +12476,13 @@
 2002-11-17  Matthew Vanecek <mevanecek at yahoo.com>
 	* src/backend/postgres/putil.c: Added needed header files to the c
 	file.
-	
+
 	* src/backend/postgres/PostgresBackend.c (pgend_session_begin): Added
 	xaccBackendSetMessage for an unknown mode or for a bad connection.
 
 	* src/engine/Backend.c (xaccBackendGetMessage): Allow function to
 	return null if Backend->error_msg is NULL.
-	
+
 	* src/engine/Account.c (xaccAccountCommitEdit): Handle a NULL return
 	from xaccBackendGetMessage().
 
@@ -6153,7 +12490,7 @@
 	error message onto the session error message (instead of NULL), if
 	it exists.  If it's just a warning message (denoted by having a
 	message, but ERR_BACKEND_NO_ERR is set), pop up a dialog.
-	
+
 2002-11-16  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_draw_to_buffer):
@@ -6212,12 +12549,12 @@
 	(regWindowAccGroup): Only return the GNCSplitReg, not the whole
 	regData.  Fixes a bunch of existing and potential crashes.
 
-	* src/gnome/window-main.c (gnc_main_window_gl_cb): 
+	* src/gnome/window-main.c (gnc_main_window_gl_cb):
 	* src/gnome/window-acct-tree.c
-	(gnc_acct_tree_window_toolbar_open_cb) 
-	(gnc_acct_tree_window_menu_open_subs_cb) 
-	(gnc_acct_tree_window_menu_open_cb) 
-	(gnc_acct_tree_window_activate_cb): 
+	(gnc_acct_tree_window_toolbar_open_cb)
+	(gnc_acct_tree_window_menu_open_subs_cb)
+	(gnc_acct_tree_window_menu_open_cb)
+	(gnc_acct_tree_window_activate_cb):
 	* src/gnome/top-level.c (gnc_html_register_url_cb):
 	Modify to not necessarily expect a RegWindow for creation of a
 	ledger view.  Fixes a bunch of existing and potential crashes.
@@ -6227,7 +12564,7 @@
 
 2002-11-14  David Hampton  <hampton at employees.org>
 
-	* src/register/ledger-core/split-register.c: 
+	* src/register/ledger-core/split-register.c:
 	(gnc_split_register_get_account_by_name): Fix register update bug.
 
 2002-11-14  Joshua Sled  <jsled at asynchronous.org>
@@ -6245,8 +12582,8 @@
 	recent serious register crashes.
 
 	* src/gnome/dialog-scheduledxaction.c
-	(scheduledxaction_editor_dialog_destroy): 
-	* src/gnome/dialog-sxsincelast.c (sxsincelast_destroy): 
+	(scheduledxaction_editor_dialog_destroy):
+	* src/gnome/dialog-sxsincelast.c (sxsincelast_destroy):
 	Close the ledger_display on window teardown.  Fixes sx-related
 	register crashes.
 
@@ -6259,39 +12596,39 @@
 	used to be stored under no.po but that is no longer.
 
 2002-11-13  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/Transaction-matcher.c: 
+	* src/import-export/Transaction-matcher.c:
 	-Don't show match with probability less than 1, so we don't
 	end up showing the whole account.
 	-Fix crash when importing a transaction twice
-	-Copy the online id to the reconciled transaction, so the 
+	-Copy the online id to the reconciled transaction, so the
 	match will be remembered.
 	-Do not consider transaction with an online_id kvp frame as
-	potential match, as they have previously been downloaded 
+	potential match, as they have previously been downloaded
 	online.
 	-Steal a better pixmap from gnome drop down menu.
 
 2002-11-13  Benoit Grégoire  <bock at step.polymtl.ca>
 
-	* src/import-export/ofx/gnc-ofx-import.c: MAJOR improvement to 
+	* src/import-export/ofx/gnc-ofx-import.c: MAJOR improvement to
 	investment support.  All transactions created from an investment
-	account are now already balanced.  Explicitly support Dividend 
-	Reinvestment transactions which will now directly create a 
-	income account -> stock account transaction, and Income 
+	account are now already balanced.  Explicitly support Dividend
+	Reinvestment transactions which will now directly create a
+	income account -> stock account transaction, and Income
 	transactions which will directly create a
 	income account -> cash account transaction.
-	Support memorizing the income account association.  Several 
+	Support memorizing the income account association.  Several
 	stock account can use the same income account if desired.
-	
+
 	* src/import-export/Transaction-matcher.c: Various bug fixes.
 
 	* src/import-export/Account-matcher.c and
 	src/import-export/gnc-generic-import.h: Support a new mode
 	of operation for the account matcher to allow selection of
-	an account without touching the online_id kvp frame. 
+	an account without touching the online_id kvp frame.
 	Currently used for income account selection or creation.
 
-	* src/import-export/generic-import.glade: Set default size 
-	to a more reasonable 800x600, since the Auto Shrink trick 
+	* src/import-export/generic-import.glade: Set default size
+	to a more reasonable 800x600, since the Auto Shrink trick
 	doesn't work for everyone.
 
 2002-11-12  Derek Atkins  <derek at ihtfp.com>
@@ -6308,7 +12645,7 @@
 	  change the readonly message to point to unposting invoices
 	  NOTE: This just adds the icon and some new strings..  Functionality
 	  to be added soon.
-	
+
 2002-11-12  David Hampton  <hampton at employees.org>
 
 	* src/register/ledger-core/split-register-control.c
@@ -6340,25 +12677,25 @@
 	accounts.  (gnc_split_register_get_account): Call the new function
 	to get the additional checks.  This solves #92157.
 
-	* src/business/business-ledger/gncEntryLedger.c: 
+	* src/business/business-ledger/gncEntryLedger.c:
 	* src/business/business-ledger/gncEntryLedgerControl.c: Implement
 	the equivalent fixes for the business ledger.
 
 2002-11-12  Benoit Grégoire  <bock at step.polymtl.ca>
-	* src/import-export/Transaction-matcher.c: Fix previous patch.  
+	* src/import-export/Transaction-matcher.c: Fix previous patch.
 	gcc 3.2 is too forgiving...
 
 	* src/import-export/Transaction-matcher.c: Dynamically generate
 	a pixmap to display match confidence graphically.
 
-	* src/import-export/ofx/gnc-ofx-import.c: Fix call to 
+	* src/import-export/ofx/gnc-ofx-import.c: Fix call to
 	g_strdup_printf in Christian's 2002-11-03 translation patch.
 
 	* src/import-export/Transaction-matcher.c
-	* src/import-export/generic-import.glade: First round of 
-	transaction matcher UI changes.  Create a pseudo-widget in first 
+	* src/import-export/generic-import.glade: First round of
+	transaction matcher UI changes.  Create a pseudo-widget in first
 	column to select the action to be taken with the transaction.
-	
+
 2002-11-12  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome/dialog-sxsincelast.c
@@ -6433,7 +12770,7 @@
 	  dialog.
 	* gnome/Makefile.am -- remove dependency on qif-import library.
 	* src/makefile.am -- re-order import-export after gnome
-	
+
 	* engine/Transaction.c -- allow deletion of a non-connected Splits
 	  (fixes a SEGV problem)
 
@@ -6457,7 +12794,7 @@
 	* gnome/window-reconcile.c: re-enable the 'jump to blank'
 	* gnome/window-register.c: re-enable the 'jump to blank' by calling into
 	  the split-reg's implementation.
-	  fixes bug #97680 
+	  fixes bug #97680
 
 2002-11-06  Christian Stimming  <stimming at tuhh.de>
 
@@ -6483,7 +12820,7 @@
 	(gncInvoicePostToAccount): Mark as read-only transactions that are
 	generated from an invoice.
 
-	* src/gnome/gnc-split-reg.c (gsr_default_delete_handler): 
+	* src/gnome/gnc-split-reg.c (gsr_default_delete_handler):
 	(gsr_default_reinit_handler): Honor the read-only setting on a
 	transaction.
 
@@ -6496,7 +12833,7 @@
 	* /src/report/standard-reports/cash-flow.scm: new report
 	which shows inflow and outflow of money to a set of accounts
 
-	* src/report/standard-reports/standard-reports.scm: add 
+	* src/report/standard-reports/standard-reports.scm: add
 	cash-flow.scm to gncscmmod_DATA
 
 2002-11-04  Derek Atkins  <derek at ihtfp.com>
@@ -6513,7 +12850,7 @@
 
 	* src/business/business-reports/invoice.scm: fix some strings
 	  "Invoice Terms" -> "Billing Terms"
-	
+
 2002-11-03  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome/dialog-sxsincelast.c: Use GNCSplitReg over
@@ -6562,7 +12899,7 @@
 
 	* business/business-ledger/gncEntryLedgerLoad.c -- set the account
 	  completion character for the account cells.  Fixes bug #97098
-	
+
 2002-11-03  Christian Stimming  <stimming at tuhh.de>
 
 	* src/gnome/dialog-sxsincelast.c, src/gnome/window-main.c,
@@ -6592,7 +12929,7 @@
 
 	* import-export/ofx/gnc-ofx-import.c: use gnc_timespec_to_iso8601_buff() instead of strftime()
 	* import-export/ofx/gncmod-ofx-import.c: "remove" two unused variables
-	
+
 2002-10-28  Christian Stimming  <stimming at tuhh.de>
 
 	* intl-scm/xgettext.scm: Add the file name of scheme files to
@@ -6618,8 +12955,8 @@
 
 2002-10-28  David Hampton  <hampton at employees.org>
 
-	* src/gnome-utils/gnc-html.c: 
-	* src/gnome/Makefile.am: 
+	* src/gnome-utils/gnc-html.c:
+	* src/gnome/Makefile.am:
 	* src/gnome/top-level.c (gnc_gui_init): Disable the gnucash
 	network code.
 
@@ -6641,7 +12978,7 @@
 	* gncInvoice.c -- implement GetTotal() -- fixes #96833
 
 	* invoice.glade -- add "View->SummaryBar" item to turn it off.
-	
+
 2002-10-27  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/hbci/*.c: add #include config.h for correct
@@ -6679,7 +13016,7 @@
 
 	* accounts/fr_FR/*: Frederic Lespez's fixes for the
 	French account templates.
-	
+
 	* src/import-export/qif-import/druid-qif-import.c: Add a working
 	directory for the qif-import code; defaults to user homedir. Use
 	the working directory in the file selection dialog and track any
@@ -6725,7 +13062,7 @@
 	the auto-create transactions if there are only auto-create,
 	no-notify SXes as a result of the since-last-run-dialog
 	invocation; fixes bug #96944.
-	
+
 	* src/gnome/dialog-sxsincelast.c (sxsincelast_populate): Changed
 	return-value from sxsincelast_populate to reflect all the possible
 	conditions, allowing...
@@ -6748,7 +13085,7 @@
 
 	* src/import-export/hbci/gnc-hbci-utils.c: Cache the created
 	HBCI_API for subsequent calls. Will also cache the user's
-	password. Also, make more meaningful error handling. 
+	password. Also, make more meaningful error handling.
 
 	* src/import-export/hbci/dialog-daterange.[hc]: Add a dialog
 	asking for the date range of transactions to retrieve.
@@ -6768,7 +13105,7 @@
 	* src/register/register-gnome/gnucash-sheet.c: Remove no longer
 	used function from first pass at the placeholder account code.
 
-	* src/gnc-ui.h: 
+	* src/gnc-ui.h:
 	* src/gnome/window-main.c: Add a new help menu item for Wilddev and
 	rename another one. #96821
 
@@ -6779,7 +13116,7 @@
 	for the one attached to the current register. This is now called
 	the "reinitialize" function. (Fixes 85904).
 
-	* src/register/ledger-core/split-register.h: 
+	* src/register/ledger-core/split-register.h:
 	* src/register/ledger-core/split-register-p.h: Make
 	gnc_split_register_get_current_trans_split() a public function.
 
@@ -6811,7 +13148,7 @@
 
 	* gnc-backend-file.c: make sure a file HAS a date before actually
 	  removing it.  Otherwise you will remove a foo.xac file by accident.
-	
+
 2002-10-22  Derek Atkins  <derek at ihtfp.com>
    Fix a bunch of compiler warnings:
 	* Transaction-matcher.c: use "=" not "==" to set a variable
@@ -6859,12 +13196,12 @@
 	* src/import-export/Trasaction-matcher.c: Fix compiler warnings.
 	* src/import-export/ofx/gnc-ofx-import.c: Give the user more information
 	  for account creation.
-	
+
 2002-10-20  Derek Atkins  <derek at ihtfp.com>
 	* configure.in -- remove -Wno-uninitialized -Wno-unused, in preparation
 	  for the "new g-wrap" which should output code that wont cause these
 	  warnings.
-	
+
 	* gnc-vendor-xml-v2.c, test-customer.c, test-vendor.c -- fix compiler
 	  warnings.
 	* dialog-options.c -- remove unused variable
@@ -6875,7 +13212,7 @@
 	  the modules.
 	  Also had to remove -Werror from hbci/Makefile.am due to darn cc
 	  warnings about order of includes.
-	
+
 2002-10-20  Benoit Grégoire  <bock at step.polymtl.ca>
 	* Investment transactions now create two accounts, one is for the stock,
 	  the other is the account defined by the FI, where the cash is swapped.
@@ -6912,7 +13249,7 @@
 	  the account-sel option.
 	* business/business-reports/*.scm -- change to using the new account-sel
 	  option type.  Fixes bug #96137
-	
+
 2002-10-19  Christian Stimming  <stimming at tuhh.de>
 
 	* po/POTFILES.in: Update potfile.in for upcoming translations.
@@ -6931,15 +13268,15 @@
 	  value and tax cells.
 
 	* Matthew Vanecek's gncQueryPrint() patch
-	
+
 2002-10-18  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* Implement a working commodity matcher for the generic import
 	module.
 	* src/gnome-utils/dialog-commodity.c,.h: Extend the API to allow
 	the user to be told what he is trying to match, and to fill in
 	default values for new commodities
-	* Use the new matcher in the ofx module.  The latest libofx CVS 
+	* Use the new matcher in the ofx module.  The latest libofx CVS
 	is needed.
 
 2002-10-17  Derek Atkins <derek at ihtfp.com>
@@ -6986,7 +13323,7 @@
 
 	* gnc-ledger-display.c -- fix a memory leak (you need to g_list_free()
 	  the returned list from xaccGroupGetSubAccounts(), according to the docs)
-	
+
 2002-10-16  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/app-utils/gnc-exp-parser.c (gnc_exp_parser_parse): This
@@ -7005,7 +13342,7 @@
 
 	* fix call to pgend_trans_rollback_edit()
 	* fix call to pgend_trans_commit_edit()
-	
+
 2002-10-15  Derek Atkins  <derek at ihtfp.com>
 	* Christian Krause's dialog-utils patch for style
 
@@ -7014,7 +13351,7 @@
 	  Fixes bug 94648.
 
 	* src/engine/engine-helpers.c: fix a compiler warning
-	
+
 2002-10-15  David Hampton  <hampton at employees.org>
 
 	* src/gnome-utils/dialog-utils.c (gnc_handle_date_accelerator): Be
@@ -7057,12 +13394,12 @@
 	  adjust those values based on the commodity.
 
 	* src/backend/file/test/test-file-stuff.c -- don't spew so much
-	
+
 	* src/test-core and src/engine/test-core should not be added to
 	  the gnucash-build-env (noinst_ is a static library)
 
 	* add library directories for "make check"
-	
+
 2002-10-14  Chris Lyttle  <chris at wilddev.net>
 
 	* src/import-export/Makefile.am: fix make dist breakage
@@ -7075,7 +13412,7 @@
 	* configure.in: change to version 1.7.1
 	* AUTHORS: moved Benoit to main developers
 	* NEWS: added section for 1.7.1 release.
-	
+
 2002-10-13  David Hampton  <hampton at employees.org>
 
 	* src/scm/printing/print-check.scm: The check printing setup
@@ -7141,10 +13478,10 @@
 	gnc-session.c. #94551
 
 2002-10-09  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/Account-matcher.c: Change "Account ID" text
-	to "Full account ID" and make it translatable. 
-	* src/import-export/ofx/gnc-ofx-import.c: Use the new account 
+	to "Full account ID" and make it translatable.
+	* src/import-export/ofx/gnc-ofx-import.c: Use the new account
 	name field of LibOFX to help the user identify the account.
 	Starting now, until further notice you 	need LibOFX CVS available
 	at http://sourceforge.net/cvs/?group_id=61170 to build the
@@ -7153,7 +13490,7 @@
 2002-10-08  Derek Atkins  <derek at ihtfp.com>
 	* books do not need to generate events
 	* however they should generate destroy events
-	
+
 2002-10-07  Derek Atkins  <derek at ihtfp.com>
 	* Rename "print invoice" to "printable invoice"
 
@@ -7161,12 +13498,12 @@
 
 	* created the backend-api document
 	* removed the old Query code (bug #94318)
-	
+
 2002-10-07  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/hbci/druid-hbci-initial.c: Fix and activate
 	the initialization functions again; therefore, the HBCI subsystem
-	is now open for testing (requires openhbci-CVS as of Oct 03). 
+	is now open for testing (requires openhbci-CVS as of Oct 03).
 
 	* src/import-export/hbci/hbci-interaction.[hc]: Close button
 	hides, not destroys.
@@ -7233,7 +13570,7 @@
 	function to check all descendants of an account to see if any of
 	them is a placeholder account.
 
-	* src/gnome/window-register.c (gnc_reg_get_placeholder): 
+	* src/gnome/window-register.c (gnc_reg_get_placeholder):
 	(regWindowDetermineReadOnly): New routines for determining if a
 	register contains a placeholder account, and putting up a nice
 	dialog about it.
@@ -7262,7 +13599,7 @@
 
 2002-10-05  David Hampton  <hampton at employees.org>
 
-	* src/engine/gnc-engine-util.c (gnc_set_xxx_message): 
+	* src/engine/gnc-engine-util.c (gnc_set_xxx_message):
 	(gnc_send_gui_xxx): New routines that let the engine display gui
 	warning/error messages.  The callbacks must be initialized by the
 	gui layer.
@@ -7283,7 +13620,7 @@
 2002-10-05  Derek Atkins <derek at ihtfp.com>
 	* Fix the autoconf-2.13/2.52/2.53 problems -- Gnucash should now
 	  work on all versions of auto-tools, although it now requires GnuMake.
-	
+
 	* configure.in -- just pass LIBOBJS directly to the Makefile; pass
 	  a sed script that uses '$U' (which is a 2.53ism, but works right
 	  on 2.13) to the Makefile.
@@ -7300,7 +13637,7 @@
 	* use the checkbox cell in the EntryLedger
 
 	* make the Invoiced? cell mutable under limited conditions
-	
+
 2002-10-03  Christian Stimming  <stimming at tuhh.de>
 
 	* src/import-export/hbci/gnc-hbci-gettrans.[hc]: Separate the
@@ -7343,7 +13680,7 @@
 	(based on the work of Martijn van Oosterhout and portfolio.scm
 	by Robert Merkel)
 
-	* src/report/standard-reports/standard-reports.scm: add 
+	* src/report/standard-reports/standard-reports.scm: add
 	advanced-portfolio.scm to gncscmmod_DATA
 
 	* doc/build-suse.txt: updated for GnuCash 1.7
@@ -7371,7 +13708,7 @@
 
 	* src/gnc-test-env: define LTDL_LIBRARY_PATH
 	* src/bin/overrides/gnucash-build-env: fix trailing whitespace bug
-	
+
 2002-09-29  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/backend/file/io-gncxml-v2.c
@@ -7397,7 +13734,7 @@
 	import. Requires OpenHBCI CVS update.
 
 2002-09-29  Benoit Grégoire  <bock at step.polymtl.ca>
-	
+
 	* src/import-export/Transaction-matcher.c: Fix	segfault when
 	importing into a gnucash account which has no splits.
 
@@ -7405,7 +13742,7 @@
 	commodity autoselection.
 
 2002-09-28  Derek Atkins  <derek at ihtfp.com>
-	
+
 	* fix g-wrap testing in configure to work with an existing config.cache
 
 2002-09-26  David Hampton  <hampton at employees.org>
@@ -7414,13 +13751,13 @@
 
 	* doc/Makefile.am: Automatically update the date and version
 	number in the man pages.
-	
+
 	* src/app-file/gnc-file.c(gnc_post_file_open): Change the button
 	labels to be even more explicit.
-	
+
 	* src/report/standard-reports/balance-sheet.scm: Use the report
 	name from the options instead of a hard coded report title.
-	
+
 2002-09-26  Benoit Grégoire  <bock at step.polymtl.ca>
 
 	* src/import-export/ofx/gnc-ofx-import.c: The default commodity
@@ -7432,7 +13769,7 @@
 	* src/import-export/Account-matcher.c, gnc-generic-import.h:
 	-Fix the new_account_default_type parameter of
 	gnc_import_select_account() not selecting default type properly.
-	-Add auto_create parameter to gnc_import_select_account().  
+	-Add auto_create parameter to gnc_import_select_account().
 	If this parameter is 0 and the function is called, it will silently
 	return NULL if no matching account is found, instead of asking the
 	user to select or create an account.
@@ -7531,17 +13868,17 @@
 	percentage done number out to the session code, and a callback for
 	the session code to pass this percentage out to the caller's gui
 	display function.
-	
+
 	* src/app-file/gnc-file-p.h:
 	* src/app-file/gnc-file.c (gnc_file_set_pct_handler): Add a file
 	handler "percent done" routine that can be installed.
-	
+
 	* src/app-file/gnc-file.c (gnc_post_file_open) (gnc_file_save):
 	Call the file handler routine pre/post file read/write, and pass
 	the handler into the backend so that it can report percentage
 	complete.
 
-	* src/app-file/gnc-file.c (gnc_file_export_file): 
+	* src/app-file/gnc-file.c (gnc_file_export_file):
 	New export function.  This is the upper half of the exporting
 	function.  This is designed similar to the read/write routines.
 
@@ -7553,7 +13890,7 @@
 	* src/backend/file/io-example-account.c
 	(gnc_write_example_account):New calling arguments.  Add counters.
 	Invoke the percentage done callback where appropriate.
-	
+
 	* src/backend/file/io-gncxml-v2.c (add_schedXaction_local)
 	(run_callback) (write_xxx): New calling arguments.  Add counters.
 	Invoke the percentage done callback where appropriate.
@@ -7564,7 +13901,7 @@
 	(gnc_book_write_accounts_to_xml_filehandle_v2): Remember count of
 	items to process. (gnc_book_write_accounts_to_xml_file_v2): Other
 	part of the lower half of the exporting function.
-	
+
 	* src/backend/file/io-utils.c (write_account_group)
 	(write_accounts):New calling arguments.  Add counters.  Invoke the
 	percentage done callback where appropriate.
@@ -7573,7 +13910,7 @@
 	* src/backend/rpc/RpcBackend.c:
 	* src/enfine/Backend.c:
 	Initialize the new pointers in the backend data structure.
-	
+
 	* src/gnome/window-main.c (gnc_main_window_file_export_cb):
 	The file export function was moved into gnc-file.c.
 
@@ -7582,7 +13919,7 @@
 	session read/write hooks here because of the new callback. Keeps
 	scheme out of the main session sources.
 
-	* src/engine/gnc-session.c (gnc_session_load): 
+	* src/engine/gnc-session.c (gnc_session_load):
 	(gnc_session_save): Added a callback for percentage done.
 	(gnc_session_export): New export function. This is the middle of
 	the exporting function.  This is designed similar to the
@@ -7597,7 +13934,7 @@
 
 	* src/scm/main.scm: I18n new splash screen strings. Destroy splash
 	screen after loading data file.
-	
+
 2002-09-16  Derek Atkins  <derek at ihtfp.com>
 	Fix bug #91413 -- Add TaxTable defaults to Customers and Vendors
 
@@ -7638,7 +13975,7 @@
 	  subtotals properly on the current-line.
 
 	* configure.in -- die during configure if g-wrap version is wrong
-	
+
 2002-09-15  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_mark): Fix
@@ -7661,7 +13998,7 @@
 	  stages of the startup.
 
 	Font Problems
-	
+
 	* src/gnome/top-level.c (gnc_gui_init): Exit gracefully if the
 	register fonts can't be loaded.
 
@@ -7685,16 +14022,16 @@
 	  clearly separate the "bill" and "invoice" data.
 	* business-core/gw-business-core-spec.scm -- change scheme API
 	  to match the new gncEntry API
-	
+
 	* business-core/gncInvoice.c -- use new gncEntry API.  If posting
 	  a bill, set the invoice-price on each "billable" item.
 
 	* business-gnome/business-prefs.scm -- duplicate the Taxincluded
 	  preference into Invoice Taxincluded and Bill Taxincluded.
-	
+
 	* business-gnome/dialog-invoice.c -- use proper Price (Invoice
 	  Price or Bill Price) when sorting by price.
-	
+
 	* business-ledger/gncEntryLedgerP.h -- add "is_invoice" flag
 	* business-ledger/gncEntryLedger.c -- set is_invoice at creation
 	* business-ledger/gncEntryLedgerLayout.c -- add TaxTable columns to Bills
@@ -7735,7 +14072,7 @@
 
 	* src/gnome/window-main.c: Added a prefix to the call that
 	installs menu extensions.
-	
+
 	* src/business/business-gnome/dialog-invoice.c:
 	* src/gnome/window-register.c: Now installs any menu extensions
 	available for the window.
@@ -7757,7 +14094,7 @@
 	* src/report/report-system/html-style-info.scm
 	(gnc:default-html-gnc-monetary-renderer): Add new workaround to
 	display the Euro symbol correctly in gtkhtml.
-	
+
 2002-08-28  Derek Atkins <derek at ihtfp.com>
 	* Update README to mention g-wrap 1.3.2 (instead of 1.1.9)
 	* Update ltmain.sh with a (commented-out) patch to maybe cope
@@ -7811,7 +14148,7 @@
 	* src/import-export/hbci/*: much more HBCI work. Ini-Letter of
 	user can already be printed. However no information is *sent* to
 	the bank or saved to disk so far, so everybody can play around as
-	you like. 
+	you like.
 
 2002-08-14  Joachim Breitner <mail at joachim-breitner.de>
 
@@ -7836,7 +14173,7 @@
 
 2002-08-11  David Hampton  <hampton at employees.org>
 
-	* acinclude.m4: 
+	* acinclude.m4:
 	* configure.in: Add upper bounds checking on the versions of
 	guile and g-wrap.
 
@@ -7937,7 +14274,7 @@
 
 	* src/import-export/hbci/*: More work on HBCI support (HBCI data
 	is now actually stored in book's and account's kvp frames).
-	
+
 	* src/import-export/gnc-generic-import.h: Clarified docs.
 
 	* src/engine/kvp_frame.h: Clarified doc about kvp_value_get_string
@@ -8046,7 +14383,7 @@
 
 	* src/gnome/dialog-sx-from-trans.c (sxftd_compute_sx): Create SXes
 	with an appropriate initial instance-count value.
-	
+
 	* src/gnome/dialog-scheduledxaction.c
 	(schedXact_editor_populate): Create SXes with an appropriate
 	initial instance-count value.
@@ -8054,7 +14391,7 @@
 	* src/engine/SchedXaction.[ch]: Added support for an
 	instance-count, in order to support an implicit 'i' [of N]
 	variable to SX formula/function processing.
-	
+
 	* src/engine/SX-ttinfo.c (gnc_ttsplitinfo_free): Made the
 	ttsplitinfo_free'ing a bit safer.
 
@@ -8071,7 +14408,7 @@
 	(test_parser): Added tests for string params to functions.
 
 	* ChangeLog: Added entry I forgot from last time.
-	
+
 	* src/app-utils/gnc-exp-parser.c (func_op): Added support for
 	typed parameters to functions; params are either numerics or
 	strings.  Result of function is now parsed correctly.
@@ -8113,18 +14450,18 @@
 
 	* src/gnome/druid-loan.[ch]: Added; Initial implementation of
 	Gnome Druid for setting up loan-repayment Scheduled Transactions.
-	
+
 	* src/doc/loans.txt: Added; notes about how loans will be dealt
 	with in GnuCash.
-	
+
 	* src/gnome/glade/sched-xact.glade: Added loan-druid.
-	
+
 	* src/gnome/window-main.c (gnc_main_window_create_menus): Added
 	'Mortgage/Loan Repayment Setup' Druid invocation menu item.
 
 	* src/scm/fin.scm: Added. Implementations of 'ipmt', 'ppmt', 'pmt'
 	and supporting code.
-	
+
 	* src/app-utils/test/test-exp-parser.c (test_parser): Added tests
 	for functions-in-expressions.  Added [passed] test for Conrad's
 	bug.
@@ -8153,7 +14490,7 @@
 	* implement "Default Project" in the Bill register to enter a
 	  default Bill-to customer/job.  It's only visible on Bills, not
 	  Invoices.
-	
+
 2002-07-09  Derek Atkins  <derek at ihftp.com>
 
 	* "global-replace for-each-in-order for-each" because the former
@@ -8183,7 +14520,7 @@
 	  at a workable point now.
 	* dialog-invoice: call the BILL vs. INVOICE entry-ledger based
 	  on the invoice owner.
-	
+
 2002-07-08  Derek Atkins  <derek at ihtfp.com>
 
 	* kvp-option-registry.scm: create a registry of kvp-options
@@ -8193,7 +14530,7 @@
 	* option-util: add option_db_changed() function
 	* business-gnome.scm: add "File -> File Preferences" menu item
 	  which is the kvp-option dialog for the Book.
-	* business-prefs.scm: register a kvp-option generator for gnc:id-book 
+	* business-prefs.scm: register a kvp-option generator for gnc:id-book
 	* gnc-book: add gnc_book_kvp_changed() function
 	* gw-engine-spec.scm: wrap gnc_book_kvp_changed
 	* dialog-options.c: only call the SCM apply_cb if the optiondb
@@ -8214,7 +14551,7 @@
 	  <gnc:Session*> instead of a string.
 	* binary-import.scm: fix the book-opened-hook.
 	* main-window.scm: fix the book-opened/closed-hook calls
-	* main.scm: fix the book-opened/closed-hook calls	  
+	* main.scm: fix the book-opened/closed-hook calls
 
 	* gw-app-utils-spec.scm: wrap <gnc:OptionDB*>, option_db_new,
 	  option_db_destroy()
@@ -8223,27 +14560,27 @@
 	  kvp before saving it.
 	* business-gnome.scm: add code to test the kvp option-dialog
 	* kvp-scm.c: fix the delete_at_path() function to actually work right.
-	* dialog-options: create a function (and support routines) to 
+	* dialog-options: create a function (and support routines) to
 	  use SCM apply_cb and close_cb callback functions:
 	  options_dialog_set_callbacks()
 	* gw-gnome-utils-spec.scm: wrap <gnc:OptionWin*>, options_dialog_new(),
 	  options_dialog_destroy(), options_dialog_build_contents(), and
 	  options_dialog_set_callbacks()
-	
+
 2002-07-06  Derek Atkins  <derek at ihtfp.com>
 
 	* gw-kvp-spec.scm: wrap kvp_slot_set_slot_path_gslist(),
 	  kvp_slot_get_slot_path_gslist(), and gnc_book_get_slots()
 
 	* kvp-scm: create gnc_kvp_frame_delete_at_path() and wrap it.
-	  This function will clear a sub-tree out of a kvp_frame.	  
+	  This function will clear a sub-tree out of a kvp_frame.
 
 	* kvp-scm: implement KVP_TYPE_FRAME kvp-values
 
 	* gw-engine-spec.scm: wrap gnc_session_get_url(), in preparation
 	  for changing the book-opened-hook and book-closed-hook
 	  prototypes.
-	
+
 2002-07-05  Derek Atkins  <derek at ihtfp.com>
 
 	* gw-engine-spec.scm: wrap gnc_lot_get_split_list
@@ -8251,7 +14588,7 @@
 
 	* invoice.scm: add the ability to show the payments applied to
 	  the invoice
-	
+
 2002-07-04  Derek Atkins  <derek at ihtfp.com>
 
 	* option-util.c: add gnc_option_get_option_data() function
@@ -8272,7 +14609,7 @@
 	  invoice a visible option on the general page; deal with "printing"
 	  un-posted invoices.
 	* receivables.scm: remove code I don't need
-	
+
 2002-07-03  Derek Atkins  <derek at ihtfp.com>
 
 	* moved receivable and payable aging reports to business-reports;
@@ -8292,7 +14629,7 @@
 	bunch of the business reports.  wrap gncOwnerCopy().
 
 	* fix the "Create Test Data" extension
-	
+
 2002-07-03  Christian Stimming  <stimming at tuhh.de>
 
 	* src/gnome/druid-hierarchy.c (gnc_get_ea_locale_dir): If current
@@ -8338,17 +14675,17 @@
 	* dialog-options: Limit account-list by types.
 
 	* Update payables and receivables reports to limit account types.
-	
+
 2002-07-01  Derek Atkins  <derek at ihtfp.com>
 
 	* business-gnome/dialog-invoice.c: make all my callbacks
 	non-static; remove the toolbar creation code.
 	* business-gnome/glade/invoice.glade: create the toolbar in glade.
-	
+
 2002-07-01  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome/dialog-scheduledxaction.c:
-	* src/gnome/dialog-sxsincelast.c: 
+	* src/gnome/dialog-sxsincelast.c:
 	* src/app-utils/prefs.scm: Added options/code-support for
 	saving/restoring sizes of SX-related windows.  Fixes bug 86007.
 
@@ -8383,7 +14720,7 @@
 	(xaccSchedXactionGetInstanceAfter): Fixed bug in
 	number-of-occurrence instance-state processing.
 
-	* src/register/ledger-core/gnc-regwidget.c: 
+	* src/register/ledger-core/gnc-regwidget.c:
 	* src/gnome/dialog-schedxaction.c:
 	* src/gnome/dialog-sxsincelast.c:
 	* src/engine/SchedXaction.[ch]:
@@ -8398,7 +14735,7 @@
 	* fix the business XML to use symbolic names for enums (instead of
 	their integer values).  This is an incompatible change -- old
 	business XML objects will not load properly.
-	
+
 2002-06-29  David Hampton  <hampton at employees.org>
 
 	* configure.in:
@@ -8462,10 +14799,10 @@
 	* src/import-export/ofx/gncmod-ofx-import.c:
 	* src/import-export/ofx/ofx-import.scm: Benoit Gregoire's changes
 	to make the OFX import module build its own menu item at runtime.
-	
-	* src/gnome-utils/gnc-mdi-utils.c: 
-	* src/gnome/dialog-price-edit-db.c: 
-	* src/gnome/window-acct-tree.c: 
+
+	* src/gnome-utils/gnc-mdi-utils.c:
+	* src/gnome/dialog-price-edit-db.c:
+	* src/gnome/window-acct-tree.c:
 	* src/gnome/window-main.c: Fix parameter names in documentation.
 
 2002-06-23  Joshua Sled  <jsled at asynchronous.org>
@@ -8516,7 +14853,7 @@
 
 	* .../business-gnome/business-prefs.scm: move the business
 	preferences (default option creation) to its own scheme file.
-	
+
 2002-06-20  David Hampton  <hampton at employees.org>
 
 	* src/engine/Transaction.[ch]: New function
@@ -8543,20 +14880,20 @@
 	[variable-containing] transaction. Inform the user if they try to
 	create an auto-create transaction which has variables, as this is
 	not allowed.
-	
+
 
 2002-06-18  David Hampton  <hampton at employees.org>
 
 	* src/gnome/window-main.c: Make a couple of functions globally
 	visible.
-	
+
 	* src/gnome/window-register.c:
 	* src/gnome/glade/register.glade: Reorganize the menus in the
 	register window.  Convert the register window over to a glade
 	based window using glade_xml_signal_autoconnect.  Rename a bunch
 	of short named function to the form gnc_register_xxx to insure
 	uniqueness.
-	
+
 2002-06-16  Derek Atkins   <derek at ihtfp.com>
 
 	* Refactor a lot of the business code.  Move the tax-table dialog
@@ -8594,7 +14931,7 @@
 	* business-gnome.scm: add the Tax Table gui; rename the 'Invoice'
 	option page to "Business".  Fix dialog-invoice to use the new
 	option name.
-	
+
 2002-06-11  David Hampton  <hampton at employees.org>
 
 	* src/gnome/druid-stock-split.c: Add automatic focusing on a
@@ -8679,7 +15016,7 @@
 	document.
 
 	Fix a Transaction Void bug.
-	
+
 	Fix a few bugs in test code.
 
 2002-06-04  David Hampton  <hampton at employees.org>
@@ -8708,7 +15045,7 @@
 	* src/gnome-utils/print-session.[ch]:
 	* src/scm/printing/print-check.scm: Eliminate warning messages
 	while printing.
-	
+
 2002-05-27  Derek Atkins   <derek at ihtfp.com>
 
 	* src/app-utils/option-util.c: Add a function to reset all the gui
@@ -8732,7 +15069,7 @@
 	* app-utils.scm: export the new radiobutton option creators
 	* prefs.scm: change the Account Separator to a radiobutton; move
 	to its own page
-	
+
 2002-05-26  Derek Atkins   <derek at ihtfp.com>
 
 	* src/gnome-util/dialog-options.[ch]: Create an option-type
@@ -8741,7 +15078,7 @@
 	type == blah blah..." code and use the new options-type database.
 	New options require the implementation of three functions,
 	set_widget(), set_value(), and get_value().
-	
+
 2002-05-24  Derek Atkins   <derek at ihtfp.com>
 
 	* src/engine/GNCId.c: Implement xaccForeachEntity() as a which
@@ -8755,7 +15092,7 @@
 	* gnc-engine.c: call the registration functions for Splits,
 	Transactions, Accounts, and Books to enable searching using the
 	new search subsystem.
-	
+
 2002-05-23  David Hampton  <hampton at employees.org>
 
 	* src/gnome/reconcile-list.c: Encapsulate all list sorting logic
@@ -8787,7 +15124,7 @@
 
 	* libc/Makefile.am: Use LIBLTOBJS instead of LIBOBJS.
 
-	* src/backend/file/sixtp-utils.c (string_to_gint64): 
+	* src/backend/file/sixtp-utils.c (string_to_gint64):
 	(string_to_gint32): (string_to_timespec_nsecs): Work around bugs
 	in Mac OS X version of sscanf.
 
@@ -8800,7 +15137,7 @@
 2002-05-14  David Hampton  <hampton at employees.org>
 
 	* configure.in (AC_CANONICAL_HOST): Remove redundant command.
-	
+
 	* Makefile.am (ACLOCAL_AMFLAGS): New variable required by gettext
 	0.11.
 
@@ -8829,7 +15166,7 @@
 
 	returned lost invoice functionality: open the invoice-register
 	window when you 'ok' a new invoice.
-	
+
 2002-05-09   Derek Atkins   <derek at ihtfp.com>
 
 	Fixed dialog-order.  Should now complain less during compilation.
@@ -8902,7 +15239,7 @@
 	specified for next time.
 
 	* src/app-utils/prefs.scm:
-	* src/engine/date.c: 
+	* src/engine/date.c:
 	* src/gnome/top-level.c (gnc_configure_date_format): Change the
 	default date format to be the user's LOCALE setting.
 
@@ -8937,11 +15274,11 @@
 	callback routine, not all calls.
 
 	* src/gnome/dialog-commodities.c:
-	* src/gnome/dialog-fincalc.c: 
+	* src/gnome/dialog-fincalc.c:
 	* src/gnome/dialog-price-editor.c:
 	* src/import-export/qif-import/druid-qif-import.c: Show_handler()
 	routine now returns T/F.
-	
+
 	* src/business/business-gnome/dialog-employee.c:
 	* src/business/business-gnome/dialog-job.c:
 	* src/business/business-gnome/dialog-order.c:
@@ -8994,10 +15331,10 @@
 	* src/register/ledger-core/gnc-regwidget.c:
 	* src/register/ledger-core/split-register-control.c:
 	* src/register/ledger-core/split-register-model.c:
-	* src/register/ledger-core/split-register.c 
+	* src/register/ledger-core/split-register.c
 	* src/report/report-gnome/window_report.c: Move string formatting
 	logic into the gnc_xxx_dialog routines.
-	
+
 	* src/scm/price-quotes.scm: Include gw-gnome-utils module.
 	(gnc:book-add-quotes book): Move string formatting logic into the
 	gnc_xxx_dialog routines.
@@ -9052,7 +15389,7 @@
 	* src/gnome/window-reconcile.c (gnc_ui_reconcile_window_raise):
 	* src/gnome/window-register.c (gnc_register_raise):
 		(gnc_register_show_date_window):
-	* src/gnome-utils/dialog-options.c (gnc_show_options_dialog): 
+	* src/gnome-utils/dialog-options.c (gnc_show_options_dialog):
 	* src/register/ledger-core/gnc-regwidget.c (gnc_register_raise):
 	* src/report/report-gnome/dialog-column-view.c:
 	* src/report/report-gnome/window-report.c
@@ -9076,7 +15413,7 @@
 	(show_handler): New routine.
 	(gnc_ui_qif_import_druid_make):Convert to use the new logic for
 	raising windows.
-	
+
 2002-04-17  Joshua Sled  <jsled at asynchronous.org>
 
 	* src/gnome/dialog-scheduledxaction.c
@@ -9141,7 +15478,7 @@
 
 	* src/gnome/druid-stock-split.c(-account_currency_filter):
 	Removed.
-	
+
 	* src/gnome/druid-stock-split.c(gnc_stock_split_druid_create): On
 	the "Cash In Lieu" page of the druid, remove the filter on which
 	accounts can be selected.
@@ -9151,16 +15488,16 @@
 	* make-gnucash-patch.in: Make sure the 'manifest' argument is a
 	fully specified pathname before passing it off to the makepatch
 	program.
-		
+
 	* src/gnome/dialog-transfer.c: Additional support for
 	"placeholder" accounts.
-	
+
 	* src/gnome/druid-hierarchy.c: Additional support for
 	"placeholder" accounts.
-	
+
 	* src/gnome/druid-stock-split.c: Additional support for
 	"placeholder" accounts.
-	
+
 	* src/gnome/glade/account.glade: Additional support for
 	"placeholder" accounts.
 
@@ -9168,10 +15505,10 @@
 
 	* src/dialog-account/dialog-account.c: Initial support for
 	"placeholder" accounts.
-	
+
 	* src/engine/Account.c: Initial support for "placeholder"
 	accounts.
-	
+
 	* src/engine/Account.h: Initial support for "placeholder"
 	accounts.
 
@@ -9247,7 +15584,7 @@
 
 	* src/engine/gnc-engine.c: initialize the object registration and
 	QueryNew subsystems.
-	
+
 	* first revision of the "QueryNew" interface.  Note that the
 	interface is not complete -- in fact, the API will be changing
 	this afternoon, but I wanted a baseline (working) system checked
@@ -9291,7 +15628,7 @@
 
 	* configure.in: switch to check and only install the srfis we
 	need. do the same for guile-www.
-	(AM_PATH_GWRAP): require g-wrap 1.3.2. 
+	(AM_PATH_GWRAP): require g-wrap 1.3.2.
 	(CFLAGS): add -Wno-uninitialized and -Wno-unused to accommodate
 	g-wrap issues.
 	(GNUCASH_ENGINE_LIBS): remove libgw-glib -- now provided by g-wrap.
@@ -9330,7 +15667,7 @@
 	(gnc:get-match-commodity-splits): quit using gnc:glist->list --
 	new g-wrap eliminates need.
 
-	* src/report/report-gnome/window-report.c: 
+	* src/report/report-gnome/window-report.c:
 	g-wrap-runtime-guile.h -> g-wrap-wct.h
 
 	* src/report/report-gnome/dialog-column-view.c:
@@ -9758,7 +16095,7 @@
 
 	* src/bin/overrides/gnucash-build-env.in: add report-gnome to
 	test-env.  Change envt vars to reflect new scheme:
-	GNC_CONFIG_PATH, GNC_SHARE_PATH, and GNC_DOC_PATH. 
+	GNC_CONFIG_PATH, GNC_SHARE_PATH, and GNC_DOC_PATH.
 
 	* src/backend/postgres/test/test-db.c
 	(db_file_url): find the postgres communication socket directory
@@ -9964,10 +16301,10 @@
 
 2001-12-05  Bill Gribble  <grib at billgribble.com>
 
-	* use AM_PATH_LIBGLADE instead of gnome-config for libglade paths 
+	* use AM_PATH_LIBGLADE instead of gnome-config for libglade paths
 
-	* add --disable-gui option to configure.in and reshuffle 
-	src/Makefile.am to not build gui code if it's used. 
+	* add --disable-gui option to configure.in and reshuffle
+	src/Makefile.am to not build gui code if it's used.
 
 2001-12-04  Rob Browning  <rlb at defaultvalue.org>
 
@@ -10182,21 +16519,21 @@
 
 	* src/bin/overrides/.cvsignore: new file.
 
-	* src/bin/gnucash.in: removed. 
+	* src/bin/gnucash.in: removed.
 
-	* src/bin/gnucash-make-guids.in: removed. 
+	* src/bin/gnucash-make-guids.in: removed.
 
-	* src/bin/gnucash-run-script.in: removed. 
+	* src/bin/gnucash-run-script.in: removed.
 
 	* src/bin/guile.in: moved to src/bin/overrides.
 
-	* src/bin/gnucash-env.in: moved to src/bin/overrides. 
+	* src/bin/gnucash-env.in: moved to src/bin/overrides.
 
 	* src/import-export/qif-import/Makefile.am (.scm-links): new target.
 
-	* src/gnome/gnucash.h: removed. 
+	* src/gnome/gnucash.h: removed.
 
-	* src/gnome/gnucash.c.in: removed. 
+	* src/gnome/gnucash.c.in: removed.
 
 	* src/gnome/i18n.h.in: moved to src/app-utils.
 
@@ -10469,7 +16806,7 @@
 
 2001-11-13  Robert Graham Merkel <rgmerk at mira.net>
 
-	* src/gnc-module/Makefile.am: libgw-gnc-module.la needs 
+	* src/gnc-module/Makefile.am: libgw-gnc-module.la needs
           to be linked to libgncmodule.la
 
 2001-11-12  Rob Browning  <rlb at defaultvalue.org>
@@ -10638,7 +16975,7 @@
 
 	* src/gnome/glade/sched-xact.glade: Added as-yet-unused Start
 	Date widgets to make-from-transaction dialog.
-	
+
 	* src/gnome/dialog-sx-from-trans.c (sxftd_add_template_trans): Use
 	the user-friendly amount formating instead of a stringified
 	gnc_numeric.  Copies the account data over into the template
@@ -10674,7 +17011,7 @@
 	confederation of multiple dialogs to the strong central authority
 	of a GnomeDruid-based since-last-run UI.  Renamed '_'-led
 	functions.
-	
+
 	* src/gnome/glade/sched-xact.glade: Fixed a non-unique-name
 	problem between the GnomeNumberEntry "end_nentry" and it's
 	GtkEntry "end_nentry".  Added Druid-based Since-Last-Run dialog.
@@ -10878,7 +17215,7 @@
 
 	* src/engine/engine.scm: added use-modules.
 
-	* src/app-utils/guile-util.h: 
+	* src/app-utils/guile-util.h:
 	(gnc_depend): deleted.
 	(gnc_scm_lookup): new prototype.
 
@@ -11183,7 +17520,7 @@
 
 	* src/guile/.cvsignore: add gw-gnc.scm.
 
-	* src/gnome-utils/test/Makefile.am 
+	* src/gnome-utils/test/Makefile.am
 	(CFLAGS): move INCLUDES bits to CFLAGS.
 
 	* src/gnome-utils/Makefile.am
@@ -11262,7 +17599,7 @@
 	* src/calculation/Makefile.am
 	(CFLAGS): move INCLUDES bits to CFLAGS.
 
-	* src/backend/rpc/Makefile.am: 
+	* src/backend/rpc/Makefile.am:
 	(CFLAGS): move INCLUDES bits to CFLAGS.
 
 	* src/backend/postgres/test/Makefile.am
@@ -11373,7 +17710,7 @@
 
 2001-10-08  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/engine/test/test-transaction-voiding.c (run_test): remove 
+	* src/engine/test/test-transaction-voiding.c (run_test): remove
 	diagnostic stuff needed for initial debugging, fix bug in test.
 
 	* src/engine/Transaction.c: removed transaction void debugging
@@ -11398,7 +17735,7 @@
 
 2001-10-03  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* */Makefile.am: changes for automake 1.5 compatibility (still not 
+	* */Makefile.am: changes for automake 1.5 compatibility (still not
 	perfect).
 
 	* configure.in: changes for automake 1.5 compatibility
@@ -11487,7 +17824,7 @@
 	refresh as a callback.
 
 	* src/gnome/window-register.c: fix menu names and help strings
-	
+
 	* src/backend/file/gnc-schedxaction-xml-v2.c
 	(gnc_schedXaction_end_handler): open account for editing
 	before destroying it.
@@ -11605,7 +17942,7 @@
 
 	* src/engine/GNCId.h: changed include guards to fix in with policy.
 
-	* src/engine/SchedXaction.{ch}: added function to turn structures in 
+	* src/engine/SchedXaction.{ch}: added function to turn structures in
 	SX-ttinfo.c into real template trans, fixed bugs.
 
 	* src/engine/kvp-doc.txt: updated docs.
@@ -11615,7 +17952,7 @@
 	* src/gnome/dialog-commodity.h: fixed include guards (previously, name
 	started with underscore).
 
-	* src/gnome/window-register.c: added code to let user activate 
+	* src/gnome/window-register.c: added code to let user activate
 	SX-from-trans dialog
 
 2001-08-25  Christian Stimming  <stimming at tuhh.de>
@@ -11698,10 +18035,10 @@
 	link line.
 
 	* src/guile/Makefile.am: remove file-utils.[ch] &
-	argv-list-encoders.[ch] 
+	argv-list-encoders.[ch]
 
 	* src/gnome/Makefile.am (SUBDIRS): add file-utils.[ch] &
-	argv-list-encoders.[ch] 
+	argv-list-encoders.[ch]
 
 2001-08-16  Bill Gribble  <grib at billgribble.com>
 
@@ -11717,23 +18054,23 @@
 	* src/report/utility-reports: non-financial reports
 
 	* src/report/locale-specific: reports that only apply to specific
-	locales. 
+	locales.
 
 	* src/report/stylesheet: report style sheet definitions
 
 2001-08-16  James LewisMoss  <jimdres at mindspring.com>
 
 	* src/guile/argv-list-converters.c (print_argv): remove unused
-	function. 
+	function.
 
 2001-08-16  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/engine/FreqSpec.c: Take out day and month name arrays - use 
+	* src/engine/FreqSpec.c: Take out day and month name arrays - use
 	strftime instead.  i18n Date formatting.  Replace magic numbers.
 
 	* src/gnome/glade/sched-xact.glade: Add "select all" and "unselect all"
 	buttons to obsolete-sx dialog.
-	
+
 	* src/gnome/dialog-sxsincelast.c: Remove string literals and magic
 	numbers.  (freq_type_to_string) remove.  (_create_transactions_on):
 	catch errors a bit better. (sx_obsolete_row_{un}sel): remove unnecessary
@@ -11752,7 +18089,7 @@
 
 2001-08-15  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/engine/SchedXaction.c(xaccSchedXactionFree): fix 
+	* src/engine/SchedXaction.c(xaccSchedXactionFree): fix
 	bug.
 
 	* src/gnome/dialog-sxsincelast.c: add "obsolete
@@ -11761,7 +18098,7 @@
 	* src/gnome/glade/sched-xact.glade: add obsolete SX dialog
 	stuff.
 
-	* src/scm/report-utilities.scm (gnc:amount->string): fix 
+	* src/scm/report-utilities.scm (gnc:amount->string): fix
 	bug.
 
 2001-08-14  James LewisMoss  <jimdres at mindspring.com>
@@ -11848,8 +18185,8 @@
 
 2001-08-08  Bill Gribble  <grib at billgribble.com>
 
-	* fix Makefile.am in various places to clean up libtool 
-	problems.  These changes may still need fine tuning to make 
+	* fix Makefile.am in various places to clean up libtool
+	problems.  These changes may still need fine tuning to make
 	everything work with both libtool 1.4 and 1.3.5
 
 2001-08-08  Dave Peticolas  <dave at krondo.com>
@@ -11914,8 +18251,8 @@
 	* unfinished new QIF import/export module (the old one's still
 	there and still works)
 
-	* really too many files touched to get into it.  
-	
+	* really too many files touched to get into it.
+
 2001-08-06  Dave Peticolas  <dave at krondo.com>
 
 	* src/register/table-html.[ch]: remove
@@ -11987,7 +18324,7 @@
 	* src/engine/SchedXaction.{ch}: modified indenting to 2 spaces.
 
 	* src/engine/SchedXaction.{ch}: Added member for recording if
-	SX has changed since last save. 
+	SX has changed since last save.
 	(xaccSchedXactionSetDirtyness) provide API for modifying that field.
 	All setter functions changed to set member appropriately.
 	(xaccSchedXactionSetSlot, XaccSchedXactionGetSlot): New functions
@@ -12010,7 +18347,7 @@
 2001-07-30  James LewisMoss  <jimdres at mindspring.com>
 
 	* src/engine/Query.c: move test code to a test-queries in test
-	directory. 
+	directory.
 
 	* src/engine/io-gncbin-r.c: remove #if 0'ed code.
 
@@ -12044,7 +18381,7 @@
 
 	* src/engine/SchedXaction.{ch}: Store template account in the
 	SchedXaction structure, get rid of splitlist from structure.
-	
+
 	* src/engine/gnc-schedxaction-xml-v2.c: replaced tag literals
 	with #define'd constants.
 	(gnc_schedXaction_dom_tree_create, sx_templ_act_handler): added
@@ -12055,10 +18392,10 @@
 2001-07-27  James LewisMoss  <jimdres at mindspring.com>
 
 	* src/engine/gnc-schedxaction-xml-v2.c: remove include of removed
-	file. 
+	file.
 
 	* src/engine/gnc-freqspec-xml-v2.c: remove include of removed
-	file. 
+	file.
 
 	* src/engine/gnc-pricedb-xml-v1.c: remove include of
 	sixtp-writers.h and remove func xml_add_gnc_pricedb (no longer
@@ -12067,14 +18404,14 @@
 	remove include of removed file.
 
 	* src/engine/io-gncxml-v1.c: move v1 kvp parser code to this
-	file. 
+	file.
 
 	* src/engine/sixtp-parsers.h: remove old v1 parser decls to
-	io-gncxml-v1.c 
+	io-gncxml-v1.c
 
 	* src/engine/gnc-schedxaction-xml-v2.c
 	(gnc_schedXaction_dom_tree_create): remove usage of
-	xml_add_gint32. 
+	xml_add_gint32.
 
 2001-07-26  James LewisMoss  <jimdres at mindspring.com>
 
@@ -12084,7 +18421,7 @@
 2001-07-26  Robert Graham Merkel  <rgmerk at mira.net>
 
 	* src/engine/SchedXaction.c (xaccSchedTransactionInit):
-	change declaration to static, uncommented g_free usage.  
+	change declaration to static, uncommented g_free usage.
 
 	* src/engine/SchedXaction.c: Moved a couple of functions
 	about.
@@ -12098,7 +18435,7 @@
 
 2001-07-25  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/engine/SchedXaction.c 
+	* src/engine/SchedXaction.c
 	(sxprivtransactionListMapDelete): renamed function.
 
 2001-07-24  Robert Graham Merkel  <rgmerk at mira.net>
@@ -12237,12 +18574,12 @@
 
 2001-07-13  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/scm/report/payables.scm: New file - an 
+	* src/scm/report/payables.scm: New file - an
 	"Accounts payable by creditor" report.
 
 	* src/scm/date-utilities.scm: Added a couple
 	more datedeltas.
-	
+
 	* src/scm/Makefile.am: update for new file.
 
 2001-07-12  Dave Peticolas  <dave at krondo.com>
@@ -12448,7 +18785,7 @@
 	backend arg directly.
 
 	* src/engine/BackendP.h (struct _backend ): add Backend arg to
-	book_begin. 
+	book_begin.
 
 	* src/engine/rpc/RpcBackend.c (rpcendInit): use xaccInitBackend to
 	set everything in the backend to default values.
@@ -12516,7 +18853,7 @@
 	* src/gnome/gnc-schedxaction-xml-v2.c: Support for new
 	SchedXaction options [create/remind-days-in-advance; auto-create,
 	notify-on-creation].
-	
+
 	* src/gnome/dialog-scheduledxaction.c (putSchedXactionInClist):
 	Fix for next-occurrence processing.
 
@@ -12583,11 +18920,11 @@
 2001-07-05  Robert Graham Merkel  <rgmerk at mira.net>
 
 	* doc/sgml/C/xacc-depreciation.sgml: Minor updates.
-	
+
 	* doc/sgml/C/xacc-price-sources.sgml: Updated for 1.6
 
 	* doc/sgml/C/image/ticker-{a,b}.png: Removed.
-	
+
 	* src/gnome/druid-qif-import.c: fix syntax bug.
 
 	* doc/sgml/C/image/<lots.png>: new and updated screenshots.
@@ -12598,14 +18935,14 @@
 
 2001-07-04  Bill Gribble  <grib at billgribble.com>
 
-	* src/gnome/druid-qif-import.c: fix cut-n-paste error in 
-	default_acct_back handler; fixes bug #106.  
+	* src/gnome/druid-qif-import.c: fix cut-n-paste error in
+	default_acct_back handler; fixes bug #106.
 
-	* src/gnome/glade/qif.glade: add some explanatory text about 
+	* src/gnome/glade/qif.glade: add some explanatory text about
 	what the "back" button does where it's not obvious
 
 	* (later) actually fix #106... first patch didn't do it
-	
+
 2001-07-04  Dave Peticolas  <dave at krondo.com>
 
 	* Makefile.am: add gnc-glossary.txt to the dist
@@ -12826,17 +19163,17 @@
 
 2001-06-19  Bill Gribble  <grib at billgribble.com>
 
-	* src/scm/qif-import/qif-parse.scm: convert to gnc-numeric when 
+	* src/scm/qif-import/qif-parse.scm: convert to gnc-numeric when
 	parsing, using string length as the precision
 
-	* src/scm/qif-import/qif-to-gnc.scm: use gnc-numeric 
+	* src/scm/qif-import/qif-to-gnc.scm: use gnc-numeric
 	math routines where necessary
-	 
-	* src/scm/qif-import/qif-file.scm: pass an equality test 
+
+	* src/scm/qif-import/qif-file.scm: pass an equality test
 	predicate to check-and-parse-fields
 
-	* src/scm/report/*: fix module reports to use-modules on 
-	srfi-1 and slib where needed. 
+	* src/scm/report/*: fix module reports to use-modules on
+	srfi-1 and slib where needed.
 
 2001-06-19  Dave Peticolas  <dave at krondo.com>
 
@@ -12849,8 +19186,8 @@
 	* src/scm/qif-import/qif-objects.scm: initialize fields to ""
 	rather than #f
 
-	* src/scm/qif-import/qif-to-gnc.scm: fix cut-n-paste error 
-	
+	* src/scm/qif-import/qif-to-gnc.scm: fix cut-n-paste error
+
 2001-06-19  Dave Peticolas  <dave at krondo.com>
 
 	* src/gnome/dialog-scheduledxaction.c: use C comments. fix warning
@@ -12865,7 +19202,7 @@
 	(gnc_transaction_end_handler): use dom_tree_to_transaction.
 
 	* src/engine/gnc-account-xml-v2.c (gnc_account_end_handler): use
-	dom_tree_to_account. 
+	dom_tree_to_account.
 
 2001-06-18  Rob Browning  <rlb at cs.utexas.edu>
 
@@ -12916,11 +19253,11 @@
 
 	* src/scm/depend.scm (gnc:depend): add optional timing facility.
 
-	* src/gnome/gnc-frequency.c: fixed some type problems. 
+	* src/gnome/gnc-frequency.c: fixed some type problems.
 
-	* src/gnome/dialog-scheduledxaction.c: fixed some type problems. 
+	* src/gnome/dialog-scheduledxaction.c: fixed some type problems.
 
-	* src/gnome/dialog-nextrun.c: fixed some type problems. 
+	* src/gnome/dialog-nextrun.c: fixed some type problems.
 
 2001-06-18  Dave Peticolas  <dave at krondo.com>
 
@@ -13069,7 +19406,7 @@
 2001-06-15  James LewisMoss  <jimdres at mindspring.com>
 
 	* src/engine/gnc-book.c (gnc_book_write_to_file): remove useless
-	line. 
+	line.
 	(make_backup): new func for duplicate functionality
 	(copy_file): new func to copy file.
 	(gnc_book_backup_file): use make_backup
@@ -13158,8 +19495,8 @@
 
 2001-06-13  Bill Gribble  <grib at billgribble.com>
 
-	* src/sc/qif-import/qif-guess-map.scm: fix bug in 
-	account name guessing 
+	* src/sc/qif-import/qif-guess-map.scm: fix bug in
+	account name guessing
 
 2001-06-13  Herbert Thoma <herbie at hthoma.de>
 
@@ -13236,7 +19573,7 @@
 2001-06-10  Christian Stimming  <stimming at tuhh.de>
 
 	* de.po: updated German translation.
-	
+
 	* configure.in, doc/sgml/Makefile.am, doc/sgml/de_DE/*: Added
 	German translation of a few manual pages, including a Whats-New
 	table for the translated words.
@@ -13252,8 +19589,8 @@
 	* src/scm/report/welcome-to-gnucash.scm: fix bug in "welcome to
 	gnucash" report
 
-	* src/gnome/dialog-column-view.c: remove printout 
-	
+	* src/gnome/dialog-column-view.c: remove printout
+
 2001-06-09  Dave Peticolas  <dave at krondo.com>
 
 	* configure.in: fix bug
@@ -13340,7 +19677,7 @@
 
 2001-06-08  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* doc/sgml/C/xacc-file-operations.sgml, xacc-quickstart.sgml, 
+	* doc/sgml/C/xacc-file-operations.sgml, xacc-quickstart.sgml,
 	xacc-regwin.sgml: updates and corrections.
 
 2001-06-07  Dave Peticolas  <dave at krondo.com>
@@ -13404,7 +19741,7 @@
 
 2001-06-07  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* doc/sgml/C/xacc-regwin.sgml: Chris "Wilddev" Lyttle's 
+	* doc/sgml/C/xacc-regwin.sgml: Chris "Wilddev" Lyttle's
 	register documentation update.
 
 	* doc/sgml/C/image/MakeFile.am, autosplitledger.png,
@@ -13419,7 +19756,7 @@
 
 	* doc/examples/reg_doc_example.xac: add register doc
 	example file.
-	
+
 	* AUTHORS: added Chris Lyttle.
 
 	* src/scm/help-topics-index.scm: Updates to reflect doc work.
@@ -13494,7 +19831,7 @@
 	* doc/sgml/C/xacc-txf-export.sgml: wrap content in sect1.
 
 	* doc/sgml/C/xacc-txf-export-anomalies.sgml: wrap content in
-	sect1. 
+	sect1.
 
 	* doc/sgml/C/xacc-txf-categories.sgml: wrap content in sect1.
 
@@ -13507,7 +19844,7 @@
 	* doc/sgml/C/xacc-regwin-kbd.sgml: wrap content in sect1.
 
 	* doc/sgml/C/xacc-regwin.sgml: remove sectionness of first
-	section. 
+	section.
 
 	* doc/sgml/C/xacc-quickstart.sgml: remove sect1.  promote sect2's
 	to sect1's.
@@ -13525,7 +19862,7 @@
 	* doc/sgml/C/xacc-net-worth-barchart.sgml: remove section title.
 
 	* doc/sgml/C/xacc-multicolumn-view-reports.sgml: remove section
-	title. 
+	title.
 
 	* doc/sgml/C/xacc-mainwin.sgml: wrap content in sect1.
 
@@ -13533,15 +19870,15 @@
 	to sect1's.
 
 	* doc/sgml/C/xacc-income-expense-piecharts.sgml: remove section
-	title. 
+	title.
 
 	* doc/sgml/C/xacc-income-expense-barcharts.sgml: remove section
-	title. 
+	title.
 
 	* doc/sgml/C/xacc-gnucash-web-browser.sgml: remove section title.
 
 	* doc/sgml/C/xacc-gnome-mdi.sgml: remove first section's
-	sectionness. 
+	sectionness.
 
 	* doc/sgml/C/xacc-dateinput.sgml: remove section title.
 
@@ -13552,15 +19889,15 @@
 	section.
 
 	* doc/sgml/C/xacc-common-report-options.sgml: remove section
-	title. 
+	title.
 
 	* doc/sgml/C/xacc-commodity.sgml: insert section around
-	everything. 
+	everything.
 
 	* doc/sgml/C/xacc-balancesheet.sgml: remove section title.
 
 	* doc/sgml/C/xacc-balancereport.sgml: insert section around
-	everything. 
+	everything.
 
 	* doc/sgml/C/xacc-depreciation.sgml: remove sectionness of first
 	bit.  leave para's as top level.
@@ -13573,10 +19910,10 @@
 	* doc/sgml/C/xacc-newacctwin.sgml: remove section title.
 
 	* doc/sgml/C/xacc-asset-liability-piecharts.sgml: remove section
-	title. 
+	title.
 
 	* doc/sgml/C/xacc-asset-liability-barcharts.sgml: remove section
-	title.  
+	title.
 
 	* doc/sgml/C/xacc-accountedit.sgml: Remove title for section so
 	"Editing an Account" doesn't appear twice.
@@ -13642,7 +19979,7 @@
 	string_to_gint64 rather than string_to_integer.
 
 	* src/engine/sixtp-utils.c: (string_to_gint64) return FALSE if the
-	content is NULL. 
+	content is NULL.
 
 	* src/engine/gnc-commodity-xml-v2.c (set_commodity_value): use
 	string_to_gint64 rather than string_to_integer.
@@ -13671,7 +20008,7 @@
 	spell check by other translators.
 
 	* po/gnc-glossary.txt: Four more entries added, that's it for now.
-	
+
 2001-06-02  Dave Peticolas  <dave at krondo.com>
 
 	* src/gnome/top-level.c (gnc_ui_start_event_loop): remove
@@ -13754,7 +20091,7 @@
 
 2001-06-01  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/scm/commodity-utilities.scm: exchange functions 
+	* src/scm/commodity-utilities.scm: exchange functions
 	now return unchanged quantity if the two currencies are
 	identical.
 
@@ -13868,7 +20205,7 @@
 
 	* src/scm/tip-list.scm: edited some tips after consultation with
 	Robert Graham Merkel.
-	
+
 	* po/sv.po: by Pablo Saratxaga <pablo at mandrakesoft.com>: changed
 	DOS end of lines to Unix end of lines.
 
@@ -13960,7 +20297,7 @@
 	* src/gnc-ui.h: add new help file
 
 2001-05-25  Robert Graham Merkel  <rgmerk at mira.net>
-	
+
 	* src/scm/report/average-balance.scm: catch all-zero-data
 	case, display warning message rather than let the graphing
 	code catch it.
@@ -13996,7 +20333,7 @@
 	* doc/sgml/C/xacc-quickstart.sgml: New file, new user
 	documentation.
 
-	* doc/sgml/C/xacc-features.sgml: New file, describing 
+	* doc/sgml/C/xacc-features.sgml: New file, describing
 	the features of GnuCash.
 
 	* doc/sgml/C/Makefile.am: update for new files.
@@ -14009,7 +20346,7 @@
 
 	* po/pt_PT.po: Duarte Loreto's updated translation.
 
-	* src/scm/prefs.scm, options-utilities.scm: fix string. 
+	* src/scm/prefs.scm, options-utilities.scm: fix string.
 
 2001-05-23  Rob Browning  <rlb at cs.utexas.edu>
 
@@ -14065,11 +20402,11 @@
 2001-05-21  Robert Graham Merkel  <rgmerk at mira.net>
 
 	* doc/sgml/C/xacc-whats-new.sgml: New file.
-	
+
 	* doc/sgml/C/xacc-multicolumn-view-reports.sgml: preliminary
 	description.
 
-	* doc/sgml/C/xacc-report.sgml, xacc-balancesheet.sgml, 
+	* doc/sgml/C/xacc-report.sgml, xacc-balancesheet.sgml,
 	xacc-asset-liability-piecharts.sgml : more updates.
 
 	* src/scm/tip-list.scm: more tips.
@@ -14160,7 +20497,7 @@
 
 	* doc/sgml/C/Makefile.am: add new file.
 
-	* doc/sgml/C/gnucash.sgml, xacc-gnome-mdi.sgml, 
+	* doc/sgml/C/gnucash.sgml, xacc-gnome-mdi.sgml,
 	xacc-asset-liability-piecharts.sgml: more updated/new content.
 
 	* ChangeLog: fix wrong path in (my) previous changelog
@@ -14182,10 +20519,10 @@
 
 2001-05-16  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/scm/html-utilities.scm ((gnc:html-make-empty-data-warning)): 
+	* src/scm/html-utilities.scm ((gnc:html-make-empty-data-warning)):
 	update message.
 
-	* doc/sgml/C/{gnucash.sgml, xacc-account-summary.sgml, 
+	* doc/sgml/C/{gnucash.sgml, xacc-account-summary.sgml,
 	xacc-asset-liability-barcharts.sgml, xacc-reports.sgml}: more new
 	material.
 
@@ -14229,13 +20566,13 @@
 	* src/scm/srfi/srfi-1.r5rs.scm: merged to lib/srfi/srfi-1.scm.
 
 	* src/scm/srfi/srfi-1.unclear.scm: merged to lib/srfi/srfi-1.scm.
-	
+
 	* src/scm/srfi/srfi-19.scm: moved to lib/srfi.
-	
+
 	* src/scm/srfi/srfi-8.guile.scm: merged to lib/srfi/srfi-8.scm.
-	
+
 	* src/scm/srfi/srfi-8.scm: merged to lib/srfi/srfi-8.scm.
-	
+
 	* src/scm/utilities.scm (flatten): improved via grib's version.
 
 	* src/scm/text-export.scm: use srfis as modules.
@@ -14414,11 +20751,11 @@
 
 2001-05-12  Bill Gribble  <grib at billgribble.com>
 
-	* src/gnome/dialog-options.c: fix destructor bug 
+	* src/gnome/dialog-options.c: fix destructor bug
 
 	* src/gnome/window-report.c: add options dialog to edited list
-	even if opened by a URL click. 
-	
+	even if opened by a URL click.
+
 	* src/gnome/window-main.c: handle close of last window safely.
 	Still don't save MDI info correctly with WM close, though.
 
@@ -14484,7 +20821,7 @@
 
 2001-05-12  Robert Graham Merkel  <rgmerk at mira.net>
 
-	* src/scm/main-window.scm: create .gnucash if it doesn't exist 
+	* src/scm/main-window.scm: create .gnucash if it doesn't exist
 	when saving a book config file.
 
 2001-05-11  Dave Peticolas  <dave at krondo.com>
@@ -14511,7 +20848,7 @@
 
 	* src/scm/main-window.scm: force-output when saving param files.
 	otherwise they don't get written until program exit, which can
-	cause problems.  Add newlines to acct tree output. 
+	cause problems.  Add newlines to acct tree output.
 
 2001-05-11  Dave Peticolas  <dave at krondo.com>
 
@@ -14551,7 +20888,7 @@
 	Doesn't really work on my system ATM.  I'll follow up on it.
 
 	* src/gnome/window-main.c: move save/restore forms out of gnome
-	MDI config string.  rename some functions. 
+	MDI config string.  rename some functions.
 
 	* src/gnome/window-report.c: save the initial report in a window
 	for special treatment.  It's the one that gets saved and restored,
@@ -14564,22 +20901,22 @@
 	file named after the book in the directory ~/.gnucash/books.
 
 	* src/scm/options.scm: run option-changed callbacks in the order
-	they were added.  Add gnc:options-touch to dirty the options 
-	without changing anything. 
+	they were added.  Add gnc:options-touch to dirty the options
+	without changing anything.
 
 	* src/scm/report.scm: add new optional fields for the
 	define-report form: 'options-cleanup-cb and 'options-changed-cb.
 	'options-cleanup-cb is called before book save to allow you to
 	clean up any mess that you don't want saved.  'options-changed-cb
 	is called after any report option is changed.  Both are optional.
-	
+
 	Also get rid of the concept of 'display-lists' for reports and
-	let the displays update themselves with callbacks.  Get rid of 
-	parents and children for the reports. 
+	let the displays update themselves with callbacks.  Get rid of
+	parents and children for the reports.
 
 	* src/scm/report/view-column.scm: revamp to handle options
 	processing, saving, and rendering better.
-	
+
 2001-05-10  James LewisMoss  <jimdres at mindspring.com>
 
 	* src/scm/main.scm ((gnc:main)): remove the main window startup
@@ -14588,7 +20925,7 @@
 	* src/engine/sql/PostgresBackend.c (pgendGetAllAccountKVP): same
 	as below.
 
-	* src/engine/rpc/RpcUtils.c (rpcend_build_gncacctlist): 
+	* src/engine/rpc/RpcUtils.c (rpcend_build_gncacctlist):
 	xaccGroupForEachAccountDeeply -> xaccGroupForEachAccount(...TRUE)
 	(rpcend_build_gncacct_verslist): same.
 
@@ -14907,8 +21244,8 @@
 	removed, replaced by new C function.
 
 	* src/scm/report/*.scm: added checks for "no-accounts-selected".
-		
-	* src/scm/report/average-balance-2.scm: New (temporary) file. 
+
+	* src/scm/report/average-balance-2.scm: New (temporary) file.
 	The average balance report with a rewritten calculation engine.
 
 	* src/scm/report/register.scm: Modified to use global styles
@@ -15003,7 +21340,7 @@
 	income-expense-graph.scm and net-worth-timeseries.scm.
 
 	* src/scm/report/*.scm: adapt to changed gnc:make-report-anchor.
-	
+
 	* src/scm/html-utilities.scm (gnc:make-report-anchor):
 	gnc:report-add-child-by-id! is now used inside here. API changed.
 
@@ -15050,7 +21387,7 @@
 	styles.
 
 	* src/scm/html-table.scm:(gnc:html-table-prepend-row/markup!)  fix
-	bug.  
+	bug.
 
 	* src/scm/report/balance-sheet.scm: use new global row styles.
 
@@ -15067,7 +21404,7 @@
 	* src/gnome/dialog-column-view.c: change to single-parent model
 
 	* src/gnome/top-level.c: don't do MID state saving and restoring
-	here... do it in the book save/load hooks. 
+	here... do it in the book save/load hooks.
 
 	* src/gnome/window-main.c: the configstring stored in MDI is now a
 	Scheme form which restores the window state.  save/restore it.
@@ -15078,9 +21415,9 @@
 	* src/scm/main-window.scm: new file.  get the main-window
 	save/restore functions out of prefs.scm
 
-	* src/scm/report/scm: only one parent per report; write save 
+	* src/scm/report/scm: only one parent per report; write save
 	routines to save all parents and children.
-	
+
 2001-04-24  Dave Peticolas  <dave at krondo.com>
 
 	* src/gnome/window-register.c: add additional warnings when
@@ -15208,13 +21545,13 @@
 	* src/gnome/dialog-column-view.c: maintain the report window
 	edited list when closing dialog.  raise an existing edit dialog.
 
-	* src/gnome/gnc-html.c: make sure we know about options editors 
+	* src/gnome/gnc-html.c: make sure we know about options editors
 	launched from gnc-options: urls
 
 	* src/gnome/window-report.c: numerous changes to improve handling
 	of options dialogs.
-	
-	* src/scm/report.scm: new function, gnc:report-edit-options.  	
+
+	* src/scm/report.scm: new function, gnc:report-edit-options.
 
 2001-04-20  Dave Peticolas  <dave at krondo.com>
 
@@ -15231,16 +21568,16 @@
 
 2001-04-19  Bill Gribble  <grib at billgribble.com>
 
-	* src/gnome/top-level.c: add call to skeleton "welcome" report 
+	* src/gnome/top-level.c: add call to skeleton "welcome" report
 	if user has not run 1.5/1.6 before
 
-	* src/scm/html-document.scm: changes to make sure styles are 
-	set for component reports in multicolumn view 
+	* src/scm/html-document.scm: changes to make sure styles are
+	set for component reports in multicolumn view
 
 	* src/scm/report.scm: clean up rendering with/without headers
 
 	* src/scm/report/stylesheet-plain.scm: get rid of <center> tag
-	on <body> 
+	on <body>
 
 	* src/scm/report/welcome-to-gnucash.scm: new report and function
 	to set up welcome to gnucash report
@@ -15284,7 +21621,7 @@
 
 	* src/gnome/dialog-options.c: don't destroy options dialog twice.
 
-	* src/gnome/window-main.c: hopefully last MDI fixes; rearrange 
+	* src/gnome/window-main.c: hopefully last MDI fixes; rearrange
 	menu and replace "New Window" with "Move to New Window."
 
 2001-04-18  Dave Peticolas  <dave at krondo.com>
@@ -15357,7 +21694,7 @@
 
 2001-04-17  Bill Gribble  <grib at billgribble.com>
 
-	* fixes to MDI bugs: only one param editor for accounts and 
+	* fixes to MDI bugs: only one param editor for accounts and
 	reports, make sure reports reference and created children
 
 	* new report: 'Frame URL'.  Give it an URL and it will display the
@@ -15448,13 +21785,13 @@
 
 2001-04-13  Bill Gribble  <grib at billgribble.com>
 
-	* Bug fixes and a couple of new features for MDI stuff.  
+	* Bug fixes and a couple of new features for MDI stuff.
 
 	* src/scm/prefs.scm: new option to set MDI mode (prefs/general)
 
 	* src/gnome/{window-acct-tree.c,window-report.c,window-main.c}:
-	bug fixes to handle runtime MDI mode changes.  
-	
+	bug fixes to handle runtime MDI mode changes.
+
 2001-04-13  Dave Peticolas  <dave at krondo.com>
 
 	* src/scm/report/*: update several reports to use
@@ -15518,9 +21855,9 @@
 	* src/scm/prefs/scm: acct tree prefs are treated differently (one
 	options obj per acct tree) and are auto-saved and restored.
 
-	* src/scm/report.scm: report options are auto saved and restored. 
+	* src/scm/report.scm: report options are auto saved and restored.
 
-	* src/scm/html-style-sheet.scm: so are style sheets. 
+	* src/scm/html-style-sheet.scm: so are style sheets.
 
 2001-04-12  James LewisMoss  <jimdres at mindspring.com>
 
@@ -15544,7 +21881,7 @@
 2001-04-12  Christian Stimming  <stimming at tuhh.de>
 
 	* src/scm/report/account-piecharts.scm: Added menu tips, menu
-	names. Use Reportname option for report title. Added an explanatory 
+	names. Use Reportname option for report title. Added an explanatory
 	text (only for devel info, will be removed again in some weeks).
 
 2001-04-12  Robert Graham Merkel  <rgmerk at mira.net>
@@ -15562,7 +21899,7 @@
 	new function.
 
 	* src/scm/report/transaction-report.scm: use above changes to sort
-	and optionally display full account names.  Fix unrelated bugs with 
+	and optionally display full account names.  Fix unrelated bugs with
 	sorting options.
 
 2001-04-11  Dave Peticolas  <dave at krondo.com>
@@ -15607,7 +21944,7 @@
 	function.
 
 	* src/scm/options.scm (gnc:options-copy-values): New function.
-	
+
 	* src/scm/report/account-piecharts.scm: Added anchors to yet other
 	reports on the slices of the pie. Simplified creation of other
 	report's options.
@@ -15616,7 +21953,7 @@
 	other report's options.
 
 	* src/scm/report/report-list.scm: Renamed file.
-	
+
 	* src/scm/report/account-piecharts.scm: Renamed to this filename
 	(used to be: income-or-expense-pie.scm). Introduced some more
 	generality such that this file also has an asset and a liability
@@ -15735,7 +22072,7 @@
 2001-04-06  Rob Browning  <rlb at cs.utexas.edu>
 
 	* src/scm/process.scm (gnc:run-sub-process): some process control
-	fixes seen on guile-devel.	
+	fixes seen on guile-devel.
 
 2001-04-06  Dave Peticolas  <dave at krondo.com>
 
@@ -15780,7 +22117,7 @@
 	* src/test/test-xml-account.c: genericify all over.
 
 	* src/test/gnc-test-stuff.c (test_load_file): use new generic
-	interface. 
+	interface.
 	(test_files_in_dir): same.
 
 	* src/engine/io-gncxml-v2.h (struct sixtp_global_data_v2_struct):
@@ -15789,7 +22126,7 @@
 	* src/engine/io-gncxml-v2.c (gnc_counter_end_handler): same as below.
 	(generic_callback): new func for generic callback.
 	(gnc_book_load_from_xml_file_v2): use new generic callback
-	mechanism. 
+	mechanism.
 
 	* src/engine/gnc-transaction-xml-v2.c
 	(gnc_transaction_end_handler): same as below.
@@ -15913,7 +22250,7 @@
 
 	* src/scm/report/pnl.scm: modify for changed arguments to
 	gnc:build-html-account-table.
-	
+
 2001-04-02  Dave Peticolas  <dave at krondo.com>
 
 	* Makefile.am: add po/README
@@ -15964,7 +22301,7 @@
 2001-03-31  Christian Stimming  <stimming at tuhh.de>
 
 	* src/scm/html-utilities.scm (gnc:html-build-acct-table): fix
-	horizontal line width if foreign currencies are shown.  
+	horizontal line width if foreign currencies are shown.
 
 2001-03-31  James LewisMoss  <jimdres at mindspring.com>
 
@@ -15988,7 +22325,7 @@
 	comment out load debug info.
 
 	* src/test/test-real-data.sh (EXIT_VALUE): don't run on a
-	directory. 
+	directory.
 
 	* src/test/gnc-test-stuff.c (test_files_in_dir): rename vars
 	file_count -> argc, files -> argv to be more accurate.
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/Makefile.am,v
retrieving revision 1.61
retrieving revision 1.62
diff -LMakefile.am -LMakefile.am -u -r1.61 -r1.62
--- Makefile.am
+++ Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = intl  m4  macros doc lib src intl-scm po rpm accounts
+SUBDIRS = doc lib src intl-scm po rpm accounts
 
 docdir = ${GNC_DOC_INSTALL_DIR}
 
@@ -33,9 +33,7 @@
 # Don't list any directories or you'll get *everything*, including the
 # CVS dirs.
 
-EXTRA_DIST = config.rpath  \
-  .cvsignore \
-  ChangeLog.1 \
+EXTRA_DIST = ChangeLog.1 \
   HACKING \
   README.patches \
   gnucash.lsm \
@@ -43,7 +41,12 @@
   gnucash-config.in \
   make-gnucash-patch.in \
   make-gnucash-potfiles.in \
-  po/.cvsignore \
+  macros/aqbanking.m4 \
+  macros/as-scrub-include.m4 \
+  macros/autogen.sh \
+  macros/compiler-flags.m4 \
+  macros/gnome-guile-checks.m4 \
+  macros/legacy_macros.m4 \
   po/README \
   po/glossary/da.po \
   po/glossary/de.po \
@@ -94,7 +97,7 @@
         # make sure etags.files is up to date.
 	${MAKE} -f Makefile.TAGS etags.files
         # now use the contents of etags.files to re-make TAGS if needed.
-	${MAKE} -f Makefile.TAGS etags
+	${MAKE} -f Makefile.TAGS TAGS
 
 else
 
@@ -109,7 +112,7 @@
         # make sure etags.files is up to date.
 	${MAKE} -f Makefile.TAGS etags.files
         # now use the contents of etags.files to re-make TAGS if needed.
-	${MAKE} -f Makefile.TAGS ctags
+	${MAKE} -f Makefile.TAGS tags
 
 else
 
@@ -120,7 +123,7 @@
 
 .PHONY: etags ctags
 
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I macros -I m4
 
 .PHONY: doc
 doc:
--- acinclude.m4
+++ /dev/null
@@ -1,4387 +0,0 @@
-# libtool macros, so we can make sure we know what version we're getting 
-
-# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
-## Copyright 1996, 1997, 1998, 1999, 2000, 2001
-## Free Software Foundation, Inc.
-## Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 46 AC_PROG_LIBTOOL
-
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])
-
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
-dnl
-
-_LT_AC_PROG_ECHO_BACKSLASH
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
-  fi
-  ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE(libtool-lock,
-  [  --disable-libtool-lock  avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_SAVE
-     AC_LANG_C
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_RESTORE])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
-  # recent cygwin and mingw systems supply a stub DllMain which the user
-  # can override, but on older systems we have to supply one
-  AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
-    [AC_TRY_LINK([],
-      [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
-      DllMain (0, 0, 0);],
-      [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
-  case $host/$CC in
-  *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
-    # old mingw systems require "-dll" to link a DLL, while more recent ones
-    # require "-mdll"
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mdll"
-    AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
-      [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
-    CFLAGS="$SAVE_CFLAGS" ;;
-  *-*-cygwin* | *-*-pw32*)
-    # cygwin systems need to pass --dll to the linker, and not link
-    # crt.o which will require a WinMain at 16 definition.
-    lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
-  esac
-  ;;
-  ])
-esac
-
-_LT_AC_LTCONFIG_HACK
-
-])
-
-# AC_LIBTOOL_HEADER_ASSERT
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
-[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
-    [lt_cv_func_assert_works],
-    [case $host in
-    *-*-solaris*)
-      if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
-        case `$CC --version 2>/dev/null` in
-        [[12]].*) lt_cv_func_assert_works=no ;;
-        *)        lt_cv_func_assert_works=yes ;;
-        esac
-      fi
-      ;;
-    esac])
-
-if test "x$lt_cv_func_assert_works" = xyes; then
-  AC_CHECK_HEADERS(assert.h)
-fi
-])# AC_LIBTOOL_HEADER_ASSERT
-
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)
-])# _LT_AC_CHECK_DLFCN
-
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-irix*)
-  symcode='[[BCDEGRST]]'
-  ;;
-solaris* | sysv5*)
-  symcode='[[BDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
-  symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
-  # Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
-
-  # Check to see that the pipe works correctly.
-  pipe_works=no
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
-  if AC_TRY_EVAL(ac_compile); then
-    # Now try to grab the symbols.
-    nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
-      # Try sorting and uniquifying the output.
-      if sort "$nlist" | uniq > "$nlist"T; then
-	mv -f "$nlist"T "$nlist"
-      else
-	rm -f "$nlist"T
-      fi
-
-      # Make sure that we snagged all the symbols we need.
-      if egrep ' nm_test_var$' "$nlist" >/dev/null; then
-	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
-
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  save_LIBS="$LIBS"
-	  save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$no_builtin_flag"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$save_LIBS"
-	  CFLAGS="$save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
-    fi
-  else
-    echo "$progname: failed program was:" >&AC_FD_CC
-    cat conftest.$ac_ext >&5
-  fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
-  else
-    lt_cv_sys_global_symbol_pipe=
-  fi
-done
-])
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  global_symbol_to_cdecl=
-  global_symbol_to_c_name_address=
-else
-  global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
-  global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
-fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-# ---------------------------------
-AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[# Find the correct PATH separator.  Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
-  UNAME=${UNAME-`uname 2>/dev/null`}
-  case X$UNAME in
-    *-DOS) lt_cv_sys_path_separator=';' ;;
-    *)     lt_cv_sys_path_separator=':' ;;
-  esac
-  PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
-# _LT_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-			      [AC_DIVERT_PUSH(NOTICE)])
-_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
-
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string="`eval $cmd`") 2>/dev/null &&
-       echo_test_string="`eval $cmd`" &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
-
-  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$save_ifs"
-
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
-
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
-
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
-
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_unknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
-
-# AC_LIBTOOL_DLOPEN_SELF
-# -------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
-
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
-
-  *)
-    AC_CHECK_FUNC([shl_load],
-          [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-            [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-	        [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-	          [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-	            [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
-
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
-  fi
-
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
-    save_LDFLAGS="$LDFLAGS"
-    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
-
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
-    ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
-
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
-
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
-
-AC_DEFUN([_LT_AC_LTCONFIG_HACK],
-[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-if test x"$host" != x"$build"; then
-  ac_tool_prefix=${host_alias}-
-else
-  ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
-  fi
-  ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
-    ;;
-  *)
-    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([for objdir])
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-AC_MSG_RESULT($objdir)
-##
-## END FIXME
-
-
-## FIXME: this should be a separate macro
-##
-AC_ARG_WITH(pic,
-[  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
-pic_mode="$withval", pic_mode=default)
-test -z "$pic_mode" && pic_mode=default
-
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-AC_CACHE_VAL(lt_cv_prog_cc_pic,
-[ lt_cv_prog_cc_pic=
-  lt_cv_prog_cc_shlib=
-  lt_cv_prog_cc_wl=
-  lt_cv_prog_cc_static=
-  lt_cv_prog_cc_no_builtin=
-  lt_cv_prog_cc_can_build_shared=$can_build_shared
-
-  if test "$GCC" = yes; then
-    lt_cv_prog_cc_wl='-Wl,'
-    lt_cv_prog_cc_static='-static'
-
-    case $host_os in
-    aix*)
-      # Below there is a dirty hack to force normal static linking with -ldl
-      # The problem is because libdl dynamically linked with both libc and
-      # libC (AIX C++ library), which obviously doesn't included in libraries
-      # list by gcc. This cause undefined symbols with -static flags.
-      # This hack allows C programs to be linked with "-static -ldl", but
-      # not sure about C++ programs.
-      lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_cv_prog_cc_pic='-fno-common'
-      ;;
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_cv_prog_cc_pic='-DDLL_EXPORT'
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	 lt_cv_prog_cc_pic=-Kconform_pic
-      fi
-      ;;
-    *)
-      lt_cv_prog_cc_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for PIC flags for the system compiler.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      lt_cv_prog_cc_wl='-Wl,'
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_cv_prog_cc_static='-Bstatic'
-      else
-	lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
-      lt_cv_prog_cc_wl='-Wl,'
-      lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
-      lt_cv_prog_cc_pic='+Z'
-      ;;
-
-    irix5* | irix6*)
-      lt_cv_prog_cc_wl='-Wl,'
-      lt_cv_prog_cc_static='-non_shared'
-      # PIC (with -KPIC) is the default.
-      ;;
-
-    cygwin* | mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_cv_prog_cc_pic='-DDLL_EXPORT'
-      ;;
-
-    newsos6)
-      lt_cv_prog_cc_pic='-KPIC'
-      lt_cv_prog_cc_static='-Bstatic'
-      ;;
-
-    osf3* | osf4* | osf5*)
-      # All OSF/1 code is PIC.
-      lt_cv_prog_cc_wl='-Wl,'
-      lt_cv_prog_cc_static='-non_shared'
-      ;;
-
-    sco3.2v5*)
-      lt_cv_prog_cc_pic='-Kpic'
-      lt_cv_prog_cc_static='-dn'
-      lt_cv_prog_cc_shlib='-belf'
-      ;;
-
-    solaris*)
-      lt_cv_prog_cc_pic='-KPIC'
-      lt_cv_prog_cc_static='-Bstatic'
-      lt_cv_prog_cc_wl='-Wl,'
-      ;;
-
-    sunos4*)
-      lt_cv_prog_cc_pic='-PIC'
-      lt_cv_prog_cc_static='-Bstatic'
-      lt_cv_prog_cc_wl='-Qoption ld '
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-      lt_cv_prog_cc_pic='-KPIC'
-      lt_cv_prog_cc_static='-Bstatic'
-      if test "x$host_vendor" = xsni; then
-	lt_cv_prog_cc_wl='-LD'
-      else
-	lt_cv_prog_cc_wl='-Wl,'
-      fi
-      ;;
-
-    uts4*)
-      lt_cv_prog_cc_pic='-pic'
-      lt_cv_prog_cc_static='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_cv_prog_cc_pic='-Kconform_pic'
-	lt_cv_prog_cc_static='-Bstatic'
-      fi
-      ;;
-
-    *)
-      lt_cv_prog_cc_can_build_shared=no
-      ;;
-    esac
-  fi
-])
-if test -z "$lt_cv_prog_cc_pic"; then
-  AC_MSG_RESULT([none])
-else
-  AC_MSG_RESULT([$lt_cv_prog_cc_pic])
-
-  # Check to make sure the pic_flag actually works.
-  AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
-  AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
-    AC_TRY_COMPILE([], [], [dnl
-      case $host_os in
-      hpux9* | hpux10* | hpux11*)
-	# On HP-UX, both CC and GCC only warn that PIC is supported... then
-	# they create non-PIC objects.  So, if there were any warnings, we
-	# assume that PIC is not supported.
-	if test -s conftest.err; then
-	  lt_cv_prog_cc_pic_works=no
-	else
-	  lt_cv_prog_cc_pic_works=yes
-	fi
-	;;
-      *)
-	lt_cv_prog_cc_pic_works=yes
-	;;
-      esac
-    ], [dnl
-      lt_cv_prog_cc_pic_works=no
-    ])
-    CFLAGS="$save_CFLAGS"
-  ])
-
-  if test "X$lt_cv_prog_cc_pic_works" = Xno; then
-    lt_cv_prog_cc_pic=
-    lt_cv_prog_cc_can_build_shared=no
-  else
-    lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
-  fi
-
-  AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
-fi
-##
-## END FIXME
-
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
-  AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
-  if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$lt_cv_prog_cc_shlib[[ 	]]" >/dev/null; then :
-  else
-   AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
-    lt_cv_prog_cc_can_build_shared=no
-  fi
-fi
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
-AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
-  lt_cv_prog_cc_static_works=no
-  save_LDFLAGS="$LDFLAGS"
-  LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
-  AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
-  LDFLAGS="$save_LDFLAGS"
-])
-
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
-##
-## END FIXME
-
-
-## FIXME: this should be a separate macro
-##
-# Check to see if options -o and -c are simultaneously supported by compiler
-AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
-AC_CACHE_VAL([lt_cv_compiler_c_o], [
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory.  Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
-  # The compiler can only warn and ignore the option if not recognized
-  # So say no if there are warnings
-  if test -s out/conftest.err; then
-    lt_cv_compiler_c_o=no
-  else
-    lt_cv_compiler_c_o=yes
-  fi
-else
-  # Append any errors to the config.log.
-  cat out/conftest.err 1>&AC_FD_CC
-  lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-])
-compiler_c_o=$lt_cv_compiler_c_o
-AC_MSG_RESULT([$compiler_c_o])
-
-if test x"$compiler_c_o" = x"yes"; then
-  # Check to see if we can write to a .lo
-  AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
-  AC_CACHE_VAL([lt_cv_compiler_o_lo], [
-  lt_cv_compiler_o_lo=no
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -c -o conftest.lo"
-  save_objext="$ac_objext"
-  ac_objext=lo
-  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-    if test -s conftest.err; then
-      lt_cv_compiler_o_lo=no
-    else
-      lt_cv_compiler_o_lo=yes
-    fi
-  ])
-  ac_objext="$save_objext"
-  CFLAGS="$save_CFLAGS"
-  ])
-  compiler_o_lo=$lt_cv_compiler_o_lo
-  AC_MSG_RESULT([$compiler_o_lo])
-else
-  compiler_o_lo=no
-fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-if test "$GCC" = yes; then
-  # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
-  AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
-  echo "int some_variable = 0;" > conftest.$ac_ext
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
-  compiler_rtti_exceptions=no
-  AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
-    # The compiler can only warn and ignore the option if not recognized
-    # So say no if there are warnings
-    if test -s conftest.err; then
-      compiler_rtti_exceptions=no
-    else
-      compiler_rtti_exceptions=yes
-    fi
-  ])
-  CFLAGS="$save_CFLAGS"
-  AC_MSG_RESULT([$compiler_rtti_exceptions])
-
-  if test "$compiler_rtti_exceptions" = "yes"; then
-    no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
-  else
-    no_builtin_flag=' -fno-builtin'
-  fi
-fi
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# See if the linker supports building shared libraries.
-AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# include_expsyms should be a list of space-separated symbols to be *always*
-# included in the symbol list
-include_expsyms=
-# exclude_expsyms can be an egrep regular expression of symbols to exclude
-# it will be wrapped by ` (' and `)$', so one must not match beginning or
-# end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-# as well as any symbol that contains `d'.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-# platforms (ab)use it in PIC code, but their linkers get confused if
-# the symbol is explicitly referenced.  Since portable code cannot
-# rely on this symbol name, it's probably fine to never include it in
-# preloaded symbol tables.
-extract_expsyms_cmds=
-
-case $host_os in
-cygwin* | mingw* | pw32*)
-  # FIXME: the MSVC++ port hasn't been tested in a loooong time
-  # When not using gcc, we currently assume that we are using
-  # Microsoft Visual C++.
-  if test "$GCC" != yes; then
-    with_gnu_ld=no
-  fi
-  ;;
-openbsd*)
-  with_gnu_ld=no
-  ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
-  # If archive_cmds runs LD, not CC, wlarc should be empty
-  wlarc='${wl}'
-
-  # See if GNU ld supports shared libraries.
-  case $host_os in
-  aix3* | aix4* | aix5*)
-    # On AIX, the GNU linker is very broken
-    # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
-    ld_shlibs=no
-    cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
-    ;;
-
-  amigaos*)
-    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-
-    # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-    # that the semantics of dynamic libraries on AmigaOS, at least up
-    # to version 4, is to share data among multiple programs linked
-    # with the same dynamic library.  Since this doesn't match the
-    # behavior of shared libraries on other platforms, we can use
-    # them.
-    ld_shlibs=no
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec='-L$libdir'
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-
-    extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
-      sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
-      test -f $output_objdir/impgen.exe || (cd $output_objdir && \
-      if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
-      else $CC -o impgen impgen.c ; fi)~
-      $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
-    old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
-    # cygwin and mingw dlls have different entry points and sets of symbols
-    # to exclude.
-    # FIXME: what about values for MSVC?
-    dll_entry=__cygwin_dll_entry at 12
-    dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12~
-    case $host_os in
-    mingw*)
-      # mingw values
-      dll_entry=_DllMainCRTStartup at 12
-      dll_exclude_symbols=DllMain at 12,DllMainCRTStartup at 12,DllEntryPoint at 12~
-      ;;
-    esac
-
-    # mingw and cygwin differ, and it's simplest to just exclude the union
-    # of the two symbol sets.
-    dll_exclude_symbols=DllMain at 12,_cygwin_dll_entry at 12,_cygwin_noncygwin_dll_entry at 12,DllMainCRTStartup at 12,DllEntryPoint at 12
-
-    # recent cygwin and mingw systems supply a stub DllMain which the user
-    # can override, but on older systems we have to supply one (in ltdll.c)
-    if test "x$lt_cv_need_dllmain" = "xyes"; then
-      ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
-      ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
-	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
-    else
-      ltdll_obj=
-      ltdll_cmds=
-    fi
-
-    # Extract the symbol export list from an `--export-all' def file,
-    # then regenerate the def file from the symbol export list, so that
-    # the compiled dll only exports the symbol export list.
-    # Be careful not to strip the DATA tag left be newer dlltools.
-    export_symbols_cmds="$ltdll_cmds"'
-      $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
-      sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
-    # If the export-symbols file already is a .def file (1st line
-    # is EXPORTS), use it as is.
-    # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
-	cp $export_symbols $output_objdir/$soname-def;
-      else
-	echo EXPORTS > $output_objdir/$soname-def;
-	_lt_hint=1;
-	cat $export_symbols | while read symbol; do
-	 set dummy \$symbol;
-	 case \[$]# in
-	   2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
-	   *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
-	 esac;
-	 _lt_hint=`expr 1 + \$_lt_hint`;
-	done;
-      fi~
-      '"$ltdll_cmds"'
-      $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
-      $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
-      $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
-      $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-      wlarc=
-    else
-      archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    fi
-    ;;
-
-  solaris* | sysv5*)
-    if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
-      ld_shlibs=no
-      cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-    elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-
-  sunos4*)
-    archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-    wlarc=
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-    else
-      ld_shlibs=no
-    fi
-    ;;
-  esac
-
-  if test "$ld_shlibs" = yes; then
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    case $host_os in
-    cygwin* | mingw* | pw32*)
-      # dlltool doesn't understand --whole-archive et. al.
-      whole_archive_flag_spec=
-      ;;
-    *)
-      # ancient GNU ld didn't support --whole-archive et. al.
-      if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
-	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-	whole_archive_flag_spec=
-      fi
-      ;;
-    esac
-  fi
-else
-  # PORTME fill in a description of your system's linker (not GNU ld)
-  case $host_os in
-  aix3*)
-    allow_undefined_flag=unsupported
-    always_export_symbols=yes
-    archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-    # Note: this linker hardcodes the directories in LIBPATH if there
-    # are no directories specified by -L.
-    hardcode_minus_L=yes
-    if test "$GCC" = yes && test -z "$link_static_flag"; then
-      # Neither direct hardcoding nor static linking is supported with a
-      # broken collect2.
-      hardcode_direct=unsupported
-    fi
-    ;;
-
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-	for ld_flag in $LDFLAGS; do
-	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-	    aix_use_runtimelinking=yes
-	    break
-	  fi
-	done
-      esac
-
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
-
-    # When large executables or shared objects are built, AIX ld can
-    # have problems creating the table of contents.  If linking a library
-    # or program results in "error TOC overflow" add -mminimal-toc to
-    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
-    hardcode_direct=yes
-    archive_cmds=''
-    hardcode_libdir_separator=':'
-    if test "$GCC" = yes; then
-      case $host_os in aix4.[[012]]|aix4.[[012]].*)
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	  strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  hardcode_direct=yes
-	else
-	  # We have old collect2
-	  hardcode_direct=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  hardcode_minus_L=yes
-	  hardcode_libdir_flag_spec='-L$libdir'
-	  hardcode_libdir_separator=
-	fi
-      esac
-
-      shared_flag='-shared'
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	shared_flag='${wl}-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='${wl}-G'
-	else
-	  shared_flag='${wl}-bM:SRE'
-	fi
-      fi
-    fi
-
-    # It seems that -bexpall can do strange things, so it is better to
-    # generate a list of symbols to export.
-    always_export_symbols=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      allow_undefined_flag='-berok'
-      hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
-      archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-    else
-      if test "$host_cpu" = ia64; then
-	hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-	allow_undefined_flag="-z nodefs"
-	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
-      else
-	hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag='${wl}-berok'
-	# This is a bit strange, but is similar to how AIX traditionally builds
-	# it's shared libraries.
-	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
-      fi
-    fi
-    ;;
-
-  amigaos*)
-    archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    # see comment about different semantics on the GNU ld section
-    ld_shlibs=no
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    # hardcode_libdir_flag_spec is actually meaningless, as there is
-    # no search path for DLLs.
-    hardcode_libdir_flag_spec=' '
-    allow_undefined_flag=unsupported
-    # Tell ltmain to make .lib files, not .a files.
-    libext=lib
-    # FIXME: Setting linknames here is a bad hack.
-    archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
-    # The linker will automatically build a .lib file if we build a DLL.
-    old_archive_from_new_cmds='true'
-    # FIXME: Should let the user specify the lib program.
-    old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
-    fix_srcfile_path='`cygpath -w "$srcfile"`'
-    ;;
-
-  darwin* | rhapsody*)
-    case "$host_os" in
-    rhapsody* | darwin1.[[012]])
-      allow_undefined_flag='-undefined suppress'
-      ;;
-    *) # Darwin 1.3 on
-      allow_undefined_flag='-flat_namespace -undefined suppress'
-      ;;
-    esac
-    # FIXME: Relying on posixy $() will cause problems for
-    #        cross-compilation, but unfortunately the echo tests do not
-    #        yet detect zsh echo's removal of \ escapes.
-    archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-    # We need to add '_' to the symbols in $export_symbols first
-    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    whole_archive_flag_spec='-all_load $convenience'
-    ;;
-
-  freebsd1*)
-    ld_shlibs=no
-    ;;
-
-  # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-  # support.  Future versions do this automatically, but an explicit c++rt0.o
-  # does not break anything, and helps significantly (at the cost of a little
-  # extra space).
-  freebsd2.2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-  freebsd2*)
-    archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-  freebsd*)
-    archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  hpux9* | hpux10* | hpux11*)
-    case $host_os in
-    hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
-    *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
-    esac
-    hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator=:
-    hardcode_direct=yes
-    hardcode_minus_L=yes # Not in the search PATH, but as the default
-			 # location of the library.
-    export_dynamic_flag_spec='${wl}-E'
-    ;;
-
-  irix5* | irix6*)
-    if test "$GCC" = yes; then
-      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-    else
-      archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    link_all_deplibs=yes
-    ;;
-
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-    else
-      archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-    fi
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  newsos6)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_direct=yes
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    hardcode_shlibpath_var=no
-    ;;
-
-  openbsd*)
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-    else
-      case "$host_os" in
-      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_libdir_flag_spec='-R$libdir'
-        ;;
-      *)
-        archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
-        hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-        ;;
-      esac
-    fi
-    ;;
-
-  os2*)
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_minus_L=yes
-    allow_undefined_flag=unsupported
-    archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-    old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-    ;;
-
-  osf3*)
-    if test "$GCC" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-    fi
-    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator=:
-    ;;
-
-  osf4* | osf5*)	# as osf3* with the addition of -msym flag
-    if test "$GCC" = yes; then
-      allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-      archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-    else
-      allow_undefined_flag=' -expect_unresolved \*'
-      archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-      $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
-      #Both c and cxx compiler support -rpath directly
-      hardcode_libdir_flag_spec='-rpath $libdir'
-    fi
-    hardcode_libdir_separator=:
-    ;;
-
-  sco3.2v5*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_shlibpath_var=no
-    runpath_var=LD_RUN_PATH
-    hardcode_runpath_var=yes
-    export_dynamic_flag_spec='${wl}-Bexport'
-    ;;
-
-  solaris*)
-    # gcc --version < 3.0 without binutils cannot create self contained
-    # shared libraries reliably, requiring libgcc.a to resolve some of
-    # the object symbols generated in some cases.  Libraries that use
-    # assert need libgcc.a to resolve __eprintf, for example.  Linking
-    # a copy of libgcc.a into every shared library to guarantee resolving
-    # such symbols causes other problems:  According to Tim Van Holder
-    # <tim.van.holder at pandora.be>, C++ libraries end up with a separate
-    # (to the application) exception stack for one thing.
-    no_undefined_flag=' -z defs'
-    if test "$GCC" = yes; then
-      case `$CC --version 2>/dev/null` in
-      [[12]].*)
-	cat <<EOF 1>&2
-
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries.  However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
-*** upgrade to a newer version of GCC.  Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
-EOF
-        no_undefined_flag=
-	;;
-      esac
-    fi
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-    hardcode_libdir_flag_spec='-R$libdir'
-    hardcode_shlibpath_var=no
-    case $host_os in
-    solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-    *) # Supported since Solaris 2.6 (maybe 2.5.1?)
-      whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
-    esac
-    link_all_deplibs=yes
-    ;;
-
-  sunos4*)
-    if test "x$host_vendor" = xsequent; then
-      # Use $CC to link under sequent, because it throws in some extra .o
-      # files that make .init and .fini sections work.
-      archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-    else
-      archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-    fi
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_minus_L=yes
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4)
-    if test "x$host_vendor" = xsno; then
-      archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes # is this really true???
-    else
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-    fi
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4.3*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_shlibpath_var=no
-    export_dynamic_flag_spec='-Bexport'
-    ;;
-
-  sysv5*)
-    no_undefined_flag=' -z text'
-    # $CC -shared without GNU ld will not create a library from C++
-    # object files and a static libstdc++, better avoid it by now
-    archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-    hardcode_libdir_flag_spec=
-    hardcode_shlibpath_var=no
-    runpath_var='LD_RUN_PATH'
-    ;;
-
-  uts4*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  dgux*)
-    archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_libdir_flag_spec='-L$libdir'
-    hardcode_shlibpath_var=no
-    ;;
-
-  sysv4*MP*)
-    if test -d /usr/nec; then
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      runpath_var=LD_RUN_PATH
-      hardcode_runpath_var=yes
-      ld_shlibs=yes
-    fi
-    ;;
-
-  sysv4.2uw2*)
-    archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-    hardcode_direct=yes
-    hardcode_minus_L=no
-    hardcode_shlibpath_var=no
-    hardcode_runpath_var=yes
-    runpath_var=LD_RUN_PATH
-    ;;
-
-  sysv5uw7* | unixware7*)
-    no_undefined_flag='${wl}-z ${wl}text'
-    if test "$GCC" = yes; then
-      archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-    else
-      archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-    fi
-    runpath_var='LD_RUN_PATH'
-    hardcode_shlibpath_var=no
-    ;;
-
-  *)
-    ld_shlibs=no
-    ;;
-  esac
-fi
-AC_MSG_RESULT([$ld_shlibs])
-test "$ld_shlibs" = no && can_build_shared=no
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# Check hardcoding attributes.
-AC_MSG_CHECKING([how to hardcode library paths into programs])
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var"; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$hardcode_shlibpath_var" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-AC_MSG_RESULT([$hardcode_action])
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-##
-## END FIXME
-
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-## FIXME: this should be a separate macro
-##
-# PORTME Fill in your ld.so characteristics
-AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix $libname.a'
-  shlibpath_var=LIBPATH
-
-  # AIX has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}.so$major'
-  ;;
-
-aix4* | aix5*)
-  version_type=linux
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-	if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	     echo ' yes '
-	     echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	  :
-	else
-	  can_build_shared=no
-	fi
-	;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can
-    # not hardcode correct soname into executable. Probably we can
-    # add versioning support to collect2, so additional links can
-    # be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}.so$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
-
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
-  ;;
-
-beos*)
-  library_names_spec='${libname}.so'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
-
-bsdi4*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  export_dynamic_flag_spec=-rdynamic
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
-
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  need_version=no
-  need_lib_prefix=no
-  case $GCC,$host_os in
-  yes,cygwin*)
-    library_names_spec='$libname.dll.a'
-    soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog .libs/$dlname \$dldir/$dlname'
-    postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    ;;
-  yes,mingw*)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
-    sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
-    ;;
-  yes,pw32*)
-    library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
-    ;;
-  *)
-    library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
-
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  # FIXME: Relying on posixy $() will cause problems for
-  #        cross-compilation, but unfortunately the echo tests do not
-  #        yet detect zsh echo's removal of \ escapes.
-  library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
-  soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  ;;
-
-freebsd1*)
-  dynamic_linker=no
-  ;;
-
-freebsd*)
-  objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  *)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
-
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  dynamic_linker="$host_os dld.sl"
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  shlibpath_var=SHLIB_PATH
-  shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-  library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
-  soname_spec='${libname}${release}.sl$major'
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-irix5* | irix6*)
-  version_type=irix
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
-  case $host_os in
-  irix5*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-  dynamic_linker=no
-  ;;
-
-# This must be Linux ELF.
-linux-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
-
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
-    soname_spec='${libname}${release}.so$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
-
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
-
-openbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case "$host_os" in
-    openbsd2.[[89]] | openbsd2.[[89]].*)
-      shlibpath_overrides_runpath=no
-      ;;
-    *)
-      shlibpath_overrides_runpath=yes
-      ;;
-    esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-os2*)
-  libname_spec='$name'
-  need_lib_prefix=no
-  library_names_spec='$libname.dll $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_version=no
-  soname_spec='${libname}${release}.so'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-sco3.2v5*)
-  version_type=osf
-  soname_spec='${libname}${release}.so$major'
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
-  soname_spec='${libname}${release}.so$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
-    soname_spec='$libname.so.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# Report the final consequences.
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case "$host_os" in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-
-aix4*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-##
-## END FIXME
-
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-AC_LIBTOOL_DLOPEN_SELF
-
-## FIXME: this should be a separate macro
-##
-if test "$enable_shared" = yes && test "$GCC" = yes; then
-  case $archive_cmds in
-  *'~'*)
-    # FIXME: we may have to deal with multi-command sequences.
-    ;;
-  '$CC '*)
-    # Test whether the compiler implicitly links with -lc since on some
-    # systems, -lgcc has to come before -lc. If gcc already passes -lc
-    # to ld, don't add -lc before -lgcc.
-    AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-    AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
-    [$rm conftest*
-    echo 'static int dummy;' > conftest.$ac_ext
-
-    if AC_TRY_EVAL(ac_compile); then
-      soname=conftest
-      lib=conftest
-      libobjs=conftest.$ac_objext
-      deplibs=
-      wl=$lt_cv_prog_cc_wl
-      compiler_flags=-v
-      linker_flags=-v
-      verstring=
-      output_objdir=.
-      libname=conftest
-      save_allow_undefined_flag=$allow_undefined_flag
-      allow_undefined_flag=
-      if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-      then
-	lt_cv_archive_cmds_need_lc=no
-      else
-	lt_cv_archive_cmds_need_lc=yes
-      fi
-      allow_undefined_flag=$save_allow_undefined_flag
-    else
-      cat conftest.err 1>&5
-    fi])
-    AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
-    ;;
-  esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-##
-## END FIXME
-
-## FIXME: this should be a separate macro
-##
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  :
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  test -f Makefile && make "$ltmain"
-fi
-
-if test -f "$ltmain"; then
-  trap "$rm \"${ofile}T\"; exit 1" 1 2 15
-  $rm -f "${ofile}T"
-
-  echo creating $ofile
-
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS \
-    AR AR_FLAGS CC LD LN_S NM SHELL \
-    reload_flag reload_cmds wl \
-    pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
-    thread_safe_flag_spec whole_archive_flag_spec libname_spec \
-    library_names_spec soname_spec \
-    RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
-    old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
-    postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
-    old_striplib striplib file_magic_cmd export_symbols_cmds \
-    deplibs_check_method allow_undefined_flag no_undefined_flag \
-    finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
-    global_symbol_to_c_name_address \
-    hardcode_libdir_flag_spec hardcode_libdir_separator  \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
-
-    case $var in
-    reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
-    extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
-
-  cat <<__EOF__ > "${ofile}T"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# ### BEGIN LIBTOOL CONFIG
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# The default C compiler.
-CC=$lt_CC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
-pic_mode=$pic_mode
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
-
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
-
-# Must we lock files when doing compilation ?
-need_locks=$lt_need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# ### END LIBTOOL CONFIG
-
-__EOF__
-
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "${ofile}T"
-
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
-
-  case $host_os in
-  cygwin* | mingw* | pw32* | os2*)
-    cat <<'EOF' >> "${ofile}T"
-      # This is a source program that is used to create dlls on Windows
-      # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-	# This is a source program that is used to create import libraries
-	# on Windows for dlls which lack them. Don't remove nor modify the
-	# starting and closing comments
-# /* impgen.c starts here */
-# /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-#  This file is part of GNU libtool.
-#
-#  This program is free software; you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software
-#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#  */
-#
-# #include <stdio.h>		/* for printf() */
-# #include <unistd.h>		/* for open(), lseek(), read() */
-# #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
-# #include <string.h>		/* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-#      int fd;
-#      int offset;
-# {
-#   unsigned char b[2];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 2);
-#   return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-#     int fd;
-#     int offset;
-# {
-#   unsigned char b[4];
-#   lseek (fd, offset, SEEK_SET);
-#   read (fd, b, 4);
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-#      void *ptr;
-# {
-#   unsigned char *b = ptr;
-#   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-#     int argc;
-#     char *argv[];
-# {
-#     int dll;
-#     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-#     unsigned long export_rva, export_size, nsections, secptr, expptr;
-#     unsigned long name_rvas, nexp;
-#     unsigned char *expdata, *erva;
-#     char *filename, *dll_name;
-#
-#     filename = argv[1];
-#
-#     dll = open(filename, O_RDONLY|O_BINARY);
-#     if (dll < 1)
-# 	return 1;
-#
-#     dll_name = filename;
-#
-#     for (i=0; filename[i]; i++)
-# 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
-# 	    dll_name = filename + i +1;
-#
-#     pe_header_offset = pe_get32 (dll, 0x3c);
-#     opthdr_ofs = pe_header_offset + 4 + 20;
-#     num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-#     if (num_entries < 1) /* no exports */
-# 	return 1;
-#
-#     export_rva = pe_get32 (dll, opthdr_ofs + 96);
-#     export_size = pe_get32 (dll, opthdr_ofs + 100);
-#     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-#     secptr = (pe_header_offset + 4 + 20 +
-# 	      pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-#     expptr = 0;
-#     for (i = 0; i < nsections; i++)
-#     {
-# 	char sname[8];
-# 	unsigned long secptr1 = secptr + 40 * i;
-# 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# 	lseek(dll, secptr1, SEEK_SET);
-# 	read(dll, sname, 8);
-# 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# 	{
-# 	    expptr = fptr + (export_rva - vaddr);
-# 	    if (export_rva + export_size > vaddr + vsize)
-# 		export_size = vsize - (export_rva - vaddr);
-# 	    break;
-# 	}
-#     }
-#
-#     expdata = (unsigned char*)malloc(export_size);
-#     lseek (dll, expptr, SEEK_SET);
-#     read (dll, expdata, export_size);
-#     erva = expdata - export_rva;
-#
-#     nexp = pe_as32 (expdata+24);
-#     name_rvas = pe_as32 (expdata+32);
-#
-#     printf ("EXPORTS\n");
-#     for (i = 0; i<nexp; i++)
-#     {
-# 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-#     }
-#
-#     return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
-    ;;
-  esac
-
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
-
-  mv -f "${ofile}T" "$ofile" || \
-    (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
-  chmod +x "$ofile"
-fi
-##
-## END FIXME
-
-])# _LT_AC_LTCONFIG_HACK
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
-  enable_shared=no
-  # Look at the argument we got.  We use all the common list separators.
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
-  for pkg in $enableval; do
-    if test "X$pkg" = "X$p"; then
-      enable_shared=yes
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
-
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
-  enable_static=no
-  # Look at the argument we got.  We use all the common list separators.
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
-  for pkg in $enableval; do
-    if test "X$pkg" = "X$p"; then
-      enable_static=yes
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-#   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
-#   `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
-  enable_fast_install=no
-  # Look at the argument we got.  We use all the common list separators.
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
-  for pkg in $enableval; do
-    if test "X$pkg" = "X$p"; then
-      enable_fast_install=yes
-    fi
-  done
-  IFS="$ac_save_ifs"
-  ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
-
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
-
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-#   Where MODE is either `yes' or `no'.  If omitted, it defaults to
-#   `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
-
-
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-  /*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-  ?:/*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
-  ;;
-  *)
-  ac_save_MAGIC_CMD="$MAGIC_CMD"
-  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    egrep "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
-
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  MAGIC_CMD="$ac_save_MAGIC_CMD"
-  ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  AC_MSG_RESULT($MAGIC_CMD)
-else
-  AC_MSG_RESULT(no)
-fi
-])
-
-
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])
-
-
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
-	test "$with_gnu_ld" != no && break
-      else
-	test "$with_gnu_ld" != yes && break
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
-
-# AC_PROG_LD_GNU -
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
-  lt_cv_prog_gnu_ld=yes
-else
-  lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
-
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
-
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  ;;
-
-cygwin* | mingw* | pw32*)
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
-
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
-  lt_cv_file_magic_cmd='/usr/bin/file -L'
-  case "$host_os" in
-  rhapsody* | darwin1.[[012]])
-    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
-    ;;
-  *) # Darwin 1.3 on
-    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
-    ;;
-  esac
-  ;;
-
-freebsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
-
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-hpux10.20*|hpux11*)
-  lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libc.sl
-  ;;
-
-irix5* | irix6*)
-  case $host_os in
-  irix5*)
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
-    ;;
-  *)
-    case $LD in
-    *-32|*"-32 ") libmagic=32-bit;;
-    *-n32|*"-n32 ") libmagic=N32;;
-    *-64|*"-64 ") libmagic=64-bit;;
-    *) libmagic=never-match;;
-    esac
-    # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
-    ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-# This must be Linux ELF.
-linux-gnu*)
-  case $host_cpu in
-  alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | arm* | m68k )
-    lt_cv_deplibs_check_method=pass_all ;;
-  *)
-    # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
-  esac
-  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
-  ;;
-
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
-  fi
-  ;;
-
-newos6*)
-  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=/usr/lib/libnls.so
-  ;;
-
-openbsd*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
-  else
-    lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
-  fi
-  ;;
-
-osf3* | osf4* | osf5*)
-  # this will be overridden with pass_all, but let us keep it just in case
-  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
-  lt_cv_file_magic_test_file=/shlib/libc.so
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sco3.2v5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  lt_cv_file_magic_test_file=/lib/libc.so
-  ;;
-
-sysv5uw[[78]]* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
-  case $host_vendor in
-  motorola)
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
-    ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
-    ;;
-  sequent)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
-    ;;
-  sni)
-    lt_cv_file_magic_cmd='/bin/file'
-    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
-    lt_cv_file_magic_test_file=/lib/libc.so
-    ;;
-  esac
-  ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
-
-
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
-    test -z "$ac_dir" && ac_dir=.
-    tmp_nm=$ac_dir/${ac_tool_prefix}nm
-    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
-      # Check to see if the nm accepts a BSD-compat flag.
-      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
-      #   nm: unknown option "B" ignored
-      # Tru64's nm complains that /dev/null is an invalid object file
-      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -B"
-	break
-      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
-	lt_cv_path_NM="$tmp_nm -p"
-	break
-      else
-	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	continue # so that we can try to find one that supports BSD flags
-      fi
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
-
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
-  # These system don't have libm
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, main, LIBM="-lm")
-  ;;
-esac
-])
-
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments.  Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
-# provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
-  esac
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-])
-
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments.  Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!).  If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, main,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  else
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    INCLTDL=
-  fi
-])
-
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
-
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
-
-## ltdl.m4 - Configure ltdl for the target system. -*-Shell-script-*-
-## Copyright (C) 1999-2000 Free Software Foundation, Inc.
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-## General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# serial 2 AC_LIB_LTDL
-
-# AC_LIB_LTDL
-# -----------
-# Perform all the checks necessary for compilation of the ltdl objects
-#  -- including compiler checks and header checks.
-AC_DEFUN(AC_LIB_LTDL,
-[AC_PREREQ(2.13)
-AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([AC_C_CONST])
-AC_REQUIRE([AC_HEADER_STDC])
-AC_REQUIRE([AC_HEADER_DIRENT])
-AC_REQUIRE([AC_LIBTOOL_HEADER_ASSERT])
-AC_REQUIRE([_LT_AC_CHECK_DLFCN])
-AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
-AC_REQUIRE([AC_LTDL_SHLIBEXT])
-AC_REQUIRE([AC_LTDL_SHLIBPATH])
-AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
-AC_REQUIRE([AC_LTDL_OBJDIR])
-AC_REQUIRE([AC_LTDL_DLPREOPEN])
-AC_REQUIRE([AC_LTDL_DLLIB])
-AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
-AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
-AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
-AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
-
-AC_CHECK_HEADERS([errno.h malloc.h memory.h stdlib.h stdio.h ctype.h unistd.h])
-AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
-AC_CHECK_HEADERS([string.h strings.h], break)
-
-AC_CHECK_FUNCS([strchr index], break)
-AC_CHECK_FUNCS([strrchr rindex], break)
-AC_CHECK_FUNCS([memcpy bcopy], break)
-AC_CHECK_FUNCS([memmove strcmp])
-
-])# AC_LIB_LTDL
-
-# AC_LTDL_ENABLE_INSTALL
-# ----------------------
-AC_DEFUN(AC_LTDL_ENABLE_INSTALL,
-[AC_ARG_ENABLE(ltdl-install,
-[  --enable-ltdl-install   install libltdl])
-
-AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
-AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
-])])# AC_LTDL_ENABLE_INSTALL
-
-# AC_LTDL_SYS_DLOPEN_DEPLIBS
-# --------------------------
-AC_DEFUN(AC_LTDL_SYS_DLOPEN_DEPLIBS,
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
-	libltdl_cv_sys_dlopen_deplibs, [dnl
-	# PORTME does your system automatically load deplibs for dlopen()?
-	libltdl_cv_sys_dlopen_deplibs=unknown
-	case "$host_os" in
-	linux*)
-	  libltdl_cv_sys_dlopen_deplibs=yes
-	  ;;
-	netbsd*)
-	  libltdl_cv_sys_dlopen_deplibs=yes
-	  ;;
-	openbsd*)
-	  libltdl_cv_sys_dlopen_deplibs=yes
-	  ;;
-	solaris*)
-	  libltdl_cv_sys_dlopen_deplibs=yes
-	  ;;
-	esac
-])
-if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
- AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1,
-    [Define if the OS needs help to load dependent libraries for dlopen(). ])
-fi
-])# AC_LTDL_SYS_DLOPEN_DEPLIBS
-
-# AC_LTDL_SHLIBEXT
-# ----------------
-AC_DEFUN(AC_LTDL_SHLIBEXT,
-[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
-AC_CACHE_CHECK([which extension is used for shared libraries],
-  libltdl_cv_shlibext,
-[ac_last=
-  for ac_spec in $library_names_spec; do
-    ac_last="$ac_spec"
-  done
-  echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
-libltdl_cv_shlibext=`cat conftest`
-rm -f conftest
-])
-if test -n "$libltdl_cv_shlibext"; then
-  AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
-    [Define to the extension used for shared libraries, say, ".so". ])
-fi
-])# AC_LTDL_SHLIBEXT
-
-# AC_LTDL_SHLIBPATH
-# -----------------
-AC_DEFUN(AC_LTDL_SHLIBPATH,
-[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
-AC_CACHE_CHECK([which variable specifies run-time library path],
-  libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
-if test -n "$libltdl_cv_shlibpath_var"; then
-  AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
-    [Define to the name of the environment variable that determines the dynamic library search path. ])
-fi
-])# AC_LTDL_SHLIBPATH
-
-# AC_LTDL_SYSSEARCHPATH
-# ---------------------
-AC_DEFUN(AC_LTDL_SYSSEARCHPATH,
-[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
-AC_CACHE_CHECK([for the default library search path],
-  libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
-if test -n "$libltdl_cv_sys_search_path"; then
-  case "$host" in
-  *-*-mingw*) pathsep=";" ;;
-  *) pathsep=":" ;;
-  esac
-  sys_search_path=
-  for dir in $libltdl_cv_sys_search_path; do
-    if test -z "$sys_search_path"; then
-      sys_search_path="$dir"
-    else
-      sys_search_path="$sys_search_path$pathsep$dir"
-    fi
-  done
-  AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
-    [Define to the system default library search path. ])
-fi
-])# AC_LTDL_SYSSEARCHPATH
-
-# AC_LTDL_OBJDIR
-# --------------
-AC_DEFUN(AC_LTDL_OBJDIR,
-[AC_CACHE_CHECK([for objdir],
-  libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
-if test -n "$objdir"; then
-  :
-else
-  rm -f .libs 2>/dev/null
-  mkdir .libs 2>/dev/null
-  if test -d .libs; then
-    libltdl_cv_objdir=.libs
-  else
-    # MS-DOS does not allow filenames that begin with a dot.
-    libltdl_cv_objdir=_libs
-  fi
-rmdir .libs 2>/dev/null
-fi])
-AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
-  [Define to the sub-directory in which libtool stores uninstalled libraries. ])
-])# AC_LTDL_OBJDIR
-
-# AC_LTDL_DLPREOPEN
-# -----------------
-AC_DEFUN(AC_LTDL_DLPREOPEN,
-[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
-       libltdl_cv_preloaded_symbols, [dnl
-  if test -n "$global_symbol_pipe"; then
-    libltdl_cv_preloaded_symbols=yes
-  else
-    libltdl_cv_preloaded_symbols=no
-  fi
-])
-if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
-  AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
-    [Define if libtool can extract symbol lists from object files. ])
-fi
-])# AC_LTDL_DLPREOPEN
-
-# AC_LTDL_DLLIB
-# -------------
-AC_DEFUN(AC_LTDL_DLLIB,
-[LIBADD_DL=
-AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
-   [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"],
-[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
-   [Define if you have the libdl library or equivalent.])],
-[AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
-   [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"]
-)])])
-AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
-   [Define if you have the shl_load function.])],
-[AC_CHECK_LIB(dld, shl_load,
-  [AC_DEFINE(HAVE_SHL_LOAD, 1,
-     [Define if you have the shl_load function.])
-   LIBADD_DL="$LIBADD_DL -ldld"])
-])
-AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1,
-  [Define if you have the GNU dld library.])dnl
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
-AC_SUBST(LIBADD_DL)
-
-if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
- LIBS_SAVE="$LIBS"
- LIBS="$LIBS $LIBADD_DL"
- AC_CHECK_FUNCS(dlerror)
- LIBS="$LIBS_SAVE"
-fi
-])# AC_LTDL_DLLIB
-
-# AC_LTDL_SYMBOL_USCORE
-# ---------------------
-AC_DEFUN(AC_LTDL_SYMBOL_USCORE,
-[dnl does the compiler prefix global symbols with an underscore?
-AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-AC_MSG_CHECKING([for _ prefix in compiled symbols])
-AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
-[ac_cv_sys_symbol_underscore=no
-cat > conftest.$ac_ext <<EOF
-void nm_test_func(){}
-int main(){nm_test_func;return 0;}
-EOF
-if AC_TRY_EVAL(ac_compile); then
-  # Now try to grab the symbols.
-  ac_nlist=conftest.nm
-  if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
-    # See whether the symbols have a leading underscore.
-    if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
-      ac_cv_sys_symbol_underscore=yes
-    else
-      if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
-	:
-      else
-	echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
-      fi
-    fi
-  else
-    echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
-  fi
-else
-  echo "configure: failed program was:" >&AC_FD_CC
-  cat conftest.c >&AC_FD_CC
-fi
-rm -rf conftest*
-])
-AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
-])# AC_LTDL_SYMBOL_USCORE
-
-
-# AC_LTDL_DLSYM_USCORE
-# --------------------
-AC_DEFUN(AC_LTDL_DLSYM_USCORE,
-[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
-if test x"$ac_cv_sys_symbol_underscore" = xyes; then
-  if test x"$ac_cv_func_dlopen" = xyes ||
-     test x"$ac_cv_lib_dl_dlopen" = xyes ; then
-	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
-		libltdl_cv_need_uscore, [dnl
-		libltdl_cv_need_uscore=unknown
-                save_LIBS="$LIBS"
-                LIBS="$LIBS $LIBADD_DL"
-		_LT_AC_TRY_DLOPEN_SELF(
-		  libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
-		  [],			     libltdl_cv_need_uscore=cross)
-		LIBS="$save_LIBS"
-	])
-  fi
-fi
-
-if test x"$libltdl_cv_need_uscore" = xyes; then
-  AC_DEFINE(NEED_USCORE, 1,
-    [Define if dlsym() requires a leading underscode in symbol names. ])
-fi
-])# AC_LTDL_DLSYM_USCORE
-
-
-# AC_CHECK_TYPES(TYPES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
-#                [INCLUDES])
-# ---------------------------------------------------------------
-# This macro did not exist in Autoconf 2.13, which we do still support
-ifdef([AC_CHECK_TYPES], [],
-[define([AC_CHECK_TYPES],
-  [AC_CACHE_CHECK([for $1], ac_Type,
-    [AC_TRY_LINK([$4],
-	[if (($1 *) 0)
-	  return 0;
-	if (sizeof ($1))
-	  return 0;],
-	[ac_Type=yes],
-	[ac_Type=no])])
-  if test "x$ac_Type" = xyes; then
-    ifelse([$2], [], [:], [$2])
-  else
-    ifelse([$3], [], [:], [$3])
-  fi])
-])# AC_CHECK_TYPES
-
-
-# AC_LTDL_FUNC_ARGZ
-# -----------------
-AC_DEFUN([AC_LTDL_FUNC_ARGZ],
-[AC_CHECK_HEADERS([argz.h])
-
-AC_CHECK_TYPES([error_t],
-  [],
-  [AC_DEFINE([error_t], [int],
-    [Define to a type to use for \`error_t' if it is not otherwise available.])],
-  [#if HAVE_ARGZ_H
-#  include <argz.h>
-#endif])
-
-AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
-])# AC_LTDL_FUNC_ARGZ
-
-
-# aclocal-include.m4
-# 
-# This macro adds the name macrodir to the set of directories
-# that `aclocal' searches for macros.  
-
-# serial 1
-
-dnl AM_ACLOCAL_INCLUDE(macrodir)
-AC_DEFUN([AM_ACLOCAL_INCLUDE],
-[
-	AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
-
-	test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-
-	for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
-])
-
-dnl g-wrap.m4
-dnl Written by Robert Merkel <rgmerk at mira.net>
-dnl Parts ripped off from guile.m4 and ORBit.m4
-
-dnl check whether we use the old or new guile smobs
-
-AC_DEFUN(AC_GWRAP_CHECK_GUILE,
-[if test x$GUILE = x ; then
-	AC_PATH_PROG(GUILE, guile, no)
- fi
- dnl AC_MSG_WARN(guile is $GUILE)
- if test "${GUILE}" = "no" ; then
-	AC_MSG_ERROR(g-wrap couldn't find guile.)
- fi
- AC_MSG_CHECKING(if g-wrap works)
- $GUILE -c "(set! %load-path (cons \"$1\" %load-path)) (use-modules (g-wrap))"
- status=$?
- if test $status != 0 ; then
-   AC_MSG_ERROR([g-wrap could not run.  Perhaps missing slib?])
- else
-   AC_MSG_RESULT(yes)
- fi
-])
-
-dnl AM_PATH_GWRAP ([MINIMUM-VERSION, MAXIMUM-VERSION, [ACTION-IF-FOUND.
-dnl	           [ACTION-IF-NOT-FOUND]]])
-
-dnl tests for minimum and maximum versions of g-wrap.
-dnl sets G_WRAP_CONFIG and GWRAP_OLD_GUILE_SMOB if needed.
-
-AC_DEFUN(AM_PATH_GWRAP,
-[dnl
-dnl
-dnl
-AC_ARG_WITH(g-wrap-prefix,[ --with-g-wrap-prefix=PFX  Prefix where g-wrap is installed (optional)], 
-    gwrap_prefix="$withval", g_wrap_prefix="")
-
-min_gwrap_version=ifelse([$1], , 1.3.2,$1)
-max_gwrap_version=ifelse([$2], , 99.99.99,$2)
-
-if test x${GUILE} = x ; then
-   AC_PATH_PROG(GUILE, guile, no)
-fi
-
-CHECK_VERSION=yes
-
-dnl if prefix set, then set them explicitly
-if test x${gwrap_prefix} != x ; then
-   G_WRAP_CONFIG=${gwrap_prefix}/bin/g-wrap-config
-else
-
-  AC_PATH_PROG(G_WRAP_CONFIG, g-wrap-config, no)
-  if test x${G_WRAP_CONFIG} = xno ; then
-	CHECK_VERSION=no
-	ifelse([$4], , true , [AC_MSG_WARN(g-wrap-config failed)
-	$4])
-  fi
-fi
-
-version_ok=
-if test x$CHECK_VERSION != xno ; then
-AC_MSG_CHECKING(for g-wrap - ${min_gwrap_version} <= version < ${max_gwrap_version})
-
-gwrap_major_version=`${G_WRAP_CONFIG} --version | \
-	sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-gwrap_minor_version=`${G_WRAP_CONFIG} --version | \
-	sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-gwrap_micro_version=`${G_WRAP_CONFIG} --version | \
-	sed 's/g-wrap-config \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-major_required=`echo ${min_gwrap_version} |\
-        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-minor_required=`echo ${min_gwrap_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-micro_required=`echo ${min_gwrap_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-major_prohibited=`echo ${max_gwrap_version} |\
-        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-minor_prohibited=`echo ${max_gwrap_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-micro_prohibited=`echo ${max_gwrap_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-
-if ${GUILE} -c "(cond ((> ${gwrap_major_version} ${major_required}) (exit 0))\
-	           ((< ${gwrap_major_version} ${major_required}) (exit 1))\
-                   ((> ${gwrap_minor_version} ${minor_required}) (exit 0))\
-		   ((< ${gwrap_minor_version} ${minor_required}) (exit 1))\
-	           ((< ${gwrap_micro_version} ${micro_required}) (exit 1))\
-		   (else (exit 0)))" ; then
-  if ${GUILE} -c "(cond ((> ${gwrap_major_version} ${major_prohibited}) (exit 1))\
-	           ((< ${gwrap_major_version} ${major_prohibited}) (exit 0))\
-                   ((> ${gwrap_minor_version} ${minor_prohibited}) (exit 1))\
-		   ((< ${gwrap_minor_version} ${minor_prohibited}) (exit 0))\
-	           ((< ${gwrap_micro_version} ${micro_prohibited}) (exit 0))\
-		   (else (exit 1)))" ; then
-	version_ok=yes
-  fi
-fi
-
-if test -n "$version_ok"; then
-	AC_MSG_RESULT(yes)
-	ifelse([$3], , true, [$4])
-
-else
-	AC_MSG_RESULT(no)
-	ifelse([$4], , true , [AC_MSG_WARN(gwrap check failed)
-	$4])
-fi
-dnl check version
-fi])
-
-
-
-dnl AM_GUILE_VERSION_CHECK ([MINIMUM-VERSION, MAXIMUM-VERSION, [ACTION-IF-FOUND.
-dnl	           [ACTION-IF-NOT-FOUND]]])
-
-dnl tests for minimum and maximum versions of guile.
-
-AC_DEFUN(AM_GUILE_VERSION_CHECK,
-[
-dnl
-dnl
-
-if test x${GUILE} = x ; then
-   AC_PATH_PROG(GUILE, guile, no)
-fi
-
-version_ok=
-min_guile_version=ifelse([$1], , 1.3,$1)
-max_guile_version=ifelse([$2], , 99.99.99,$2)
-
-AC_MSG_CHECKING(for guile - ${min_guile_version} <= version < ${max_guile_version})
-
-if test x${BUILD_GUILE} != x -a ${BUILD_GUILE} != no ; then
-  guile_version=`${name_build_guile} --version 2>&1`
-  guile_version="$guile_version.0"
-  guile_major_version=`echo $guile_version | \
-	sed 's/.*Guile version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\1/'`
-  guile_minor_version=`echo $guile_version | \
-	sed 's/.*Guile version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\2/'`
-  guile_micro_version=`echo $guile_version | \
-	sed 's/.*Guile version \([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\).*/\3/'`
-
-  major_required=`echo ${min_guile_version} |\
-        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-  minor_required=`echo ${min_guile_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-  micro_required=`echo ${min_guile_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-  major_prohibited=`echo ${max_guile_version} |\
-        sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-  minor_prohibited=`echo ${max_guile_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-  micro_prohibited=`echo ${max_guile_version} |\
-	sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-
-  if ${GUILE} -c "(cond ((> ${guile_major_version} ${major_required}) (exit 0))\
-	           ((< ${guile_major_version} ${major_required}) (exit 1))\
-                   ((> ${guile_minor_version} ${minor_required}) (exit 0))\
-		   ((< ${guile_minor_version} ${minor_required}) (exit 1))\
-	           ((< ${guile_micro_version} ${micro_required}) (exit 1))\
-		   (else (exit 0)))" ; then
-    if ${GUILE} -c "(cond ((> ${guile_major_version} ${major_prohibited}) (exit 1))\
-	           ((< ${guile_major_version} ${major_prohibited}) (exit 0))\
-                   ((> ${guile_minor_version} ${minor_prohibited}) (exit 1))\
-		   ((< ${guile_minor_version} ${minor_prohibited}) (exit 0))\
-	           ((< ${guile_micro_version} ${micro_prohibited}) (exit 0))\
-		   (else (exit 1)))" ; then
-  	version_ok=yes
-    fi
-  fi
-fi
-
-if test -n "$version_ok"; then
-	AC_MSG_RESULT(yes)
-	ifelse([$3], , true, [$4])
-
-else
-	AC_MSG_RESULT(no)
-	ifelse([$4], , true , [AC_MSG_WARN(guile version check failed)
-	$4])
-fi])
-
-
-dnl ##############################
-
-# Configure paths for libguppi
-# stolen without shame from Chris Lahey
-# stolen from Manish Singh again
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl AM_PATH_LIBGUPPI([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for LIBGUPPI, and define LIBGUPPI_CFLAGS and LIBGUPPI_LIBS
-dnl
-AC_DEFUN(AM_PATH_LIBGUPPI,
-[dnl 
-dnl Get the cflags and libraries from the gnome-config script
-dnl
-AC_ARG_WITH(libguppi-prefix,[  --with-libguppi-prefix=PFX   Prefix where libguppi is installed (optional)],
-            libguppi_prefix="$withval", libguppi_prefix="")
-AC_ARG_WITH(libguppi-exec-prefix,[  --with-libguppi-exec-prefix=PFX Exec prefix where libguppi is installed (optional)],
-            libguppi_exec_prefix="$withval", libguppi_exec_prefix="")
-AC_ARG_ENABLE(libguppitest, [  --disable-libguppitest       Do not try to compile and run a test libguppi program],
-		    , enable_libguppitest=yes)
-
-  if test x$libguppi_exec_prefix != x ; then
-     libguppi_args="$libguppi_args --exec-prefix=$libguppi_exec_prefix"
-     if test x${GNOME_CONFIG+set} != xset ; then
-        GNOME_CONFIG=$libguppi_exec_prefix/bin/gnome-config
-     fi
-  fi
-  if test x$libguppi_prefix != x ; then
-     libguppi_args="$libguppi_args --prefix=$libguppi_prefix"
-     if test x${GNOME_CONFIG+set} != xset ; then
-        GNOME_CONFIG=$libguppi_prefix/bin/gnome-config
-     fi
-  fi
-
-  AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
-  min_libguppi_version=ifelse([$1], ,0.1.0,$1)
-  AC_MSG_CHECKING(for libguppi - version >= $min_libguppi_version)
-  no_libguppi=""
-  if test "$GNOME_CONFIG" = "no" ; then
-    no_libguppi=yes
-  else
-    LIBGUPPI_CFLAGS=`$GNOME_CONFIG $libguppiconf_args --cflags gtk libguppi`
-    LIBGUPPI_LIBS=`$GNOME_CONFIG $libguppiconf_args --libs gtk libguppi`
-    AS_SCRUB_INCLUDE(LIBGUPPI_CFLAGS)
-
-    libguppi_major_version=`$GNOME_CONFIG --modversion libguppi | \
-           sed 's/libguppi-\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    libguppi_minor_version=`$GNOME_CONFIG --modversion libguppi | \
-           sed 's/libguppi-\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    libguppi_micro_version=`$GNOME_CONFIG --modversion libguppi | \
-           sed 's/libguppi-\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-
-    if test "x$enable_libguppitest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $LIBGUPPI_CFLAGS"
-      LIBS="$LIBS $LIBGUPPI_LIBS"
-dnl
-dnl Now check if the installed LIBGUPPI is sufficiently new. (Also sanity
-dnl checks the results of gnome-config to some extent
-dnl
-      rm -f conf.libguppitest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libguppi/guppi-version.h>
-
-static char*
-my_strdup (char *str)
-{
-  char *new_str;
-  
-  if (str)
-    {
-      new_str = malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
-  
-  return new_str;
-}
-
-int main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.libguppitest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = my_strdup("$min_libguppi_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_libguppi_version");
-     exit(1);
-   }
-
-   if (($libguppi_major_version != guppi_version_major()) ||
-       ($libguppi_minor_version != guppi_version_minor()) ||
-       ($libguppi_micro_version != guppi_version_micro())) {
-	printf("\n*** 'gnome-config --modversion libguppi' returned %d.%d.%d, but the installed\n", $libguppi_major_version, $libguppi_minor_version, $libguppi_micro_version);
-	printf("*** LIBGUPPI reports its own version as %s.\n\n", guppi_version());
-	printf("*** This probably means that LIBGUPPI is improperly installed.\n");
-	return 1;
-   }	
-
-   if (($libguppi_major_version > major) ||
-      (($libguppi_major_version == major) && ($libguppi_minor_version > minor)) ||
-      (($libguppi_major_version == major) && ($libguppi_minor_version == minor) && ($libguppi_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'gnome-config --modversion libguppi' returned %d.%d.%d, but the minimum version\n", $libguppi_major_version, $libguppi_minor_version, $libguppi_micro_version);
-      printf("*** of libguppi required is %d.%d.%d. If gnome-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If gnome-config was wrong, set the environment variable GNOME_CONFIG\n");
-      printf("*** to point to the correct copy of gnome-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-
-],, no_libguppi=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_libguppi" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$GNOME_CONFIG" = "no" ; then
-       echo "*** The gnome-config script installed by GNOME-LIBS could not be found"
-       echo "*** If libguppi was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the GNOME_CONFIG environment variable to the"
-       echo "*** full path to gnome-config."
-     else
-       if test -f conf.libguppitest ; then
-        :
-       else
-          echo "*** Could not run libguppi test program, checking why..."
-          CFLAGS="$CFLAGS $LIBGUPPI_CFLAGS"
-          LIBS="$LIBS $LIBGUPPI_LIBS"
-          AC_TRY_LINK([
-#include <stdio.h>
-#include <libguppi/guppi-useful.h>
-],      [ return 0; ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding libguppi or finding the wrong"
-          echo "*** version of libguppi. If it is not finding libguppi, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means libguppi was incorrectly installed"
-          echo "*** or that you have moved libguppi since it was installed. In the latter case, you"
-          echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     LIBGUPPI_CFLAGS=""
-     LIBGUPPI_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(LIBGUPPI_CFLAGS)
-  AC_SUBST(LIBGUPPI_LIBS)
-  rm -f conf.libguppitest
-])
-
-AC_DEFUN([LIBGUPPI_CHECK], [
-	AM_PATH_LIBGUPPI(0.35.1,,[AC_MSG_ERROR(libguppi not found)])
-])
-
-AC_DEFUN([LANGINFO_D_FMT_CHECK],
-[
-  AC_CACHE_CHECK([for nl_langinfo and D_FMT], am_cv_langinfo_dfmt,
-    [AC_TRY_LINK([#include <langinfo.h>],
-      [char* cs = nl_langinfo(D_FMT);],
-      am_cv_langinfo_dfmt=yes,
-      am_cv_langinfo_dfmt=no)
-    ])
-  if test $am_cv_langinfo_dfmt = yes; then
-    AC_DEFINE(HAVE_LANGINFO_D_FMT, 1,
-      [Define if you have <langinfo.h> and nl_langinfo(D_FMT).])
-  fi
-])
-
-AC_DEFUN([STRUCT_TM_GMTOFF_CHECK],
-[
-  AC_CACHE_CHECK([for the tm_gmtoff member of struct tm],
-                 am_cv_struct_tm_gmtoff,
-    [AC_TRY_LINK([
-        #include <time.h>
-        #define _GNU_SOURCE
-        #define __EXTENSIONS__
-],
-      [struct tm tm;
-       tm.tm_gmtoff = 0;],
-      am_cv_struct_tm_gmtoff=yes,
-      am_cv_struct_tm_gmtoff=no)
-    ])
-  if test $am_cv_struct_tm_gmtoff = yes; then
-    AC_DEFINE(HAVE_STRUCT_TM_GMTOFF, 1,
-      [Define if you have the tm_gmtoff member of struct tm.])
-  fi
-])
-
-AC_DEFUN([SCANF_LLD_CHECK],
-[
-  AC_CACHE_CHECK([if scanf supports %lld conversions],
-                 am_cv_scanf_lld,
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-
-int main ()
-{
-  long long int d;
-  long long int e;
-
-  d = 0;
-  e =  100000;
-  e *= 100000;
-  if ((sscanf ("10000000000", "%lld", &d) != 1) || (d != e))
-    exit (1);
-
-  exit (0);
-}
-],
-        am_cv_scanf_lld=yes,
-        am_cv_scanf_lld=no))
-  if test $am_cv_scanf_lld = yes; then
-    AC_DEFINE(HAVE_SCANF_LLD, 1,
-      [Define if scanf supports %lld conversions.])
-  fi
-])
-
-AC_DEFUN([SCANF_QD_CHECK],
-[
-  AC_CACHE_CHECK([if scanf supports %qd conversions],
-                 am_cv_scanf_qd,
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-
-int main ()
-{
-  long long int d;
-  long long int e;
-
-  d = 0;
-  e =  100000;
-  e *= 100000;
-  if ((sscanf ("10000000000", "%qd", &d) != 1) || (d != e))
-    exit (1);
-
-  exit (0);
-}
-],
-        am_cv_scanf_qd=yes,
-        am_cv_scanf_qd=no))
-  if test $am_cv_scanf_qd = yes; then
-    AC_DEFINE(HAVE_SCANF_QD, 1,
-      [Define if scanf supports %qd conversions.])
-  fi
-])
Index: AUTHORS
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/AUTHORS,v
retrieving revision 1.91
retrieving revision 1.92
diff -LAUTHORS -LAUTHORS -u -r1.91 -r1.92
--- AUTHORS
+++ AUTHORS
@@ -101,6 +101,7 @@
 Conrad Canterford <conrad at mail.watersprite.com.au> register bug fix
 Bill Carlson <wwc at wwcnet.nu> performance improvements
 David Mar?n Carre?o <davefx at aspl.f2s.com> Spanish translation of account setup.
+Tomas Cernaj <tcernaj at gmx.de> GType consistency changes
 Carol Champagne <carol at io.com> documentation & a patient GUI usability critic
 Nikos Charonitakis <charosn at her.forthnet.gr> Greek translation
 Graham Chapman <grahamc at zeta.org.au> for the xacc-rpts addon package
@@ -170,6 +171,7 @@
 Steven Murdoch <sjmurdoch at bigfoot.com> gnc-prices fix for London exchange
 Jose Carlos Nascimento <joseca at psabs.com> Brazilian Portuguese translation
 Brent Neal <brent at baton.phys.lsu.edu> TIAA-CREF support.
+Christian Neumair <chris at gnome-de.org> Various gnome2 fixes/HIG work.
 Johnny Ernst Nielsen <j.e.nielsen at iname.com> messages Danish translation
 Stefan Nobis <stefan-ml at snobis.de> German translation patch
 Martin Norbäck <d95mback at dtek.chalmers.se> Swedish translation
@@ -178,6 +180,7 @@
 Peter O'Gorman <peter at pogma.com> file i/o patches, Mac OS X patches
 OmNiBuS <webmaster at obsidian.uia.net> web site graphics & content
 Gordon Oliver <gordo at pincoya.com> multiple currency status line patch
+Scott Oonk <s.oonk at comcast.net>, <scott.oonk at gmail.com> utf-8 changes.
 Alan Orndorff <dwarf at solarisresources.com> Solaris packager
 Myroslav Opyr <mopyr at IPM.Lviv.UA> for misc patches
 Laurent P{'e}lecq <laurent.pelecq at wanadoo.fr> i18n patches with gettext
@@ -210,6 +213,7 @@
 Diane Trout <detrout at earthlink.net> scheme QIF import patch
 Richard -Gilligan- Uschold <uschold at cs.ucf.edu> tax report & txf export
 Matthew Vanecek <mevanecek at yahoo.com> for pg_config configure.in patch
+Didier Vidal <didier-devel at 9online.fr> various G2 fixes.
 Richard Wackerbarth <rkw at dataplex.net> patch to gnc-prices, qif import fixes
 Rob Walker <rob at valinux.com> guile and register patches
 Andy Wingo <wingo at pobox.com> income per day-of-week report
Index: README
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/README,v
retrieving revision 1.183
retrieving revision 1.184
diff -LREADME -LREADME -u -r1.183 -r1.184
--- README
+++ README
@@ -163,71 +163,7 @@
 
 The following packages are required to be installed to run GnuCash:
 
-  Gnome 1.4: see www.gnome.org for more information.
-
-  guile: provides main extension language infrastructure, used
-    extensively in GnuCash for initialization & startup. Requires
-    version 1.3.4 or later.  Version 1.4 is noticeably speedier and is
-    recommended if possible.  You can obtain source from
-    ftp://ftp.gnu.org/pub/gnu/guile/guile-1.4.tar.gz
-
-  slib: scheme libraries for guile. Need version slib2c4 or later.
-    You can find source at
-    http://swissnet.ai.mit.edu/ftpdir/scm/slib2d1.zip
-
-  libpng: portable network graphics library. Any version.  You can
-    find the source at
-    ftp://swrinde.nde.swri.edu/pub/png/src/libpng-1.0.9.tar.gz.
-
-  libjpeg: JPEG image handling library. Any version.  Sources can be
-    found at ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz.
-
-  libz: compression library. Any version.  You can find source at
-    http://www.gzip.org/zlib.tar.gz.
-
-  xpm: X Pixmap extension. Any version.  Normally distributed with an
-   X installation.  By default this is part of XFree86 4.0 or better.
-   You can also find this at
-   ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz.
-
-  gnome-libs: version 1.2.0 or higher should work.  The latest
-    version, 1.2.13, is of course recommended. These libraries
-    require numerous other supporting libraries, such as gtk and glib.
-    All of these can be found at ftp.gnome.org.
-
-  gnome-print: any recent version should work, however problems have
-    been reported with 0.28.  This is a part of GNOME as well. Sources
-    at ftp://ftp.gnome.org/pub/GNOME/stable/sources/gnome-print
-
-  gdk-pixbuf: any recent version should work.  This is typically
-   distributed with GNOME.  Sources at
-   ftp://ftp.gnome.org/pub/GNOME/stable/sources/gdk-pixbuf.
-
-  gtkhtml: version 0.8 and later should work. You can obtain the latest
-    version of gtkhtml from Helix Code.  Note that this has changed
-    since 1.4, which used the older gtkxmhtml library.  Sources can be
-    found at ftp://ftp.gnome.org/pub/GNOME/unstable/sources/gtkhtml/.
-
-  guppi: version 0.35.3 should work.  Version 0.35.5 is required for
-   some advanced functionality.  This can be found at
-   ftp://ftp.gnome.org/pub/GNOME/stable/sources/Guppi.  You may need
-   to configure it with `--prefix=/usr' in order for gnucash's
-   `configure' to find the guppi library. Note: Version 0.40.3
-   (released January 2002) has a problem with reversed legends in
-   stacked barcharts. Since Guppi development has halted since that
-   version, we can only provide a source code patch for Guppi 0.40.3
-   that fixes this problem. You find that patch in
-   lib/guppi-legend.patch.
-
-  libgal: any recent version should work.  This is a GNOME related
-   library used by several different programs.  You can find it at
-   ftp://ftp.gnome.org/pub/GNOME/unstable/sources/gal/.
-
-  libdb: Version 1.85 or a compatible version.
-
-The above urls are from June 5, 2001.  Source locations can change,
-but will likely be found near the same place (maybe moved from
-unstable to stable).
+[FIXME; see README.dependencies]
 
 To be able to use certain features of GnuCash, such as reports and
 network stock price downloads, you must have the following packages
@@ -359,9 +295,9 @@
     The second style is the FSSTND, opt-style install.  In this style,
     all of the files are installed under a common subdirectory, often
     in /usr/local/opt, with the binaries going to
-    /usr/local/opt/foo/bin, the libs going to /usr/local/opt/foo/lib,
-    etc.  To request this style of install, just use the
-    --enable-opt-style-install option to ./configure.
+    /usr/local/opt/'packagename'/bin, the libs going to
+    /usr/local/opt/'packagename'/lib, etc.  To request this style of 
+    install, just use the --enable-opt-style-install option to ./configure.
 
 If you only want a particular language installed, you can set the
 LINGUAS environment variable before you run configure. For example,
Index: autogen.sh
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/autogen.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lautogen.sh -Lautogen.sh -u -r1.1 -r1.2
--- autogen.sh
+++ autogen.sh
@@ -14,4 +14,5 @@
     exit 1
 }
 
+USE_GNOME2_MACROS=1
 . $srcdir/macros/autogen.sh
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/doc/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -Ldoc/.cvsignore -Ldoc/.cvsignore -u -r1.3 -r1.4
--- doc/.cvsignore
+++ doc/.cvsignore
@@ -2,3 +2,5 @@
 Makefile.in
 gnucash.1
 gnc-prices.1
+tip_of_the_day.list
+*.tmp
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/doc/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -Ldoc/Makefile.am -Ldoc/Makefile.am -u -r1.15 -r1.16
--- doc/Makefile.am
+++ doc/Makefile.am
@@ -1,8 +1,6 @@
-
-docdir = ${GNC_DOC_INSTALL_DIR}
-
 SUBDIRS = examples
 
+docdir = ${GNC_DOC_INSTALL_DIR}
 doc_DATA = \
   README.francais \
   README.german \
@@ -13,6 +11,9 @@
   gnc-prices.1 \
   gnucash.1
 
+tipsdir = $(GNC_SHAREDIR)
+tips_DATA = tip_of_the_day.list
+
 EXTRA_DIST = \
   .cvsignore \
   ${doc_DATA} \
@@ -30,7 +31,8 @@
   generic_objects.txt \
   gnome-hackers.txt \
   gnc-prices.1.in \
-  gnucash.1.in
+  gnucash.1.in \
+  tip_of_the_day.list.in
 
 ## We borrow guile's convention and use @-...-@ as the substitution
 ## brackets here, instead of the usual @... at .  This prevents autoconf
@@ -52,4 +54,9 @@
 	chmod +x $@.tmp
 	mv $@.tmp $@
 
-DISTCLEANFILES = gnc-prices.1 gnucash.1
+tip_of_the_day.list: tip_of_the_day.list.in
+	gcc -E -P -x c -D'N_(x)=x' -o $@.tmp $<
+	cat -s $@.tmp | sed -e 's/^ *\"\(.*\)\" *$$/\1/m' > $@
+	rm -f $@.tmp
+
+DISTCLEANFILES = gnc-prices.1 gnucash.1 tip_of_the_day.list
--- intl/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.c
-*.h
-*.in
-*.sed
-*.sin
-*.y
-ChangeLog
-Makefile
-VERSION
-config.charset
-locale.alias
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Llib/Makefile.am -Llib/Makefile.am -u -r1.7 -r1.8
--- lib/Makefile.am
+++ lib/Makefile.am
@@ -1,4 +1,7 @@
-
-SUBDIRS = libc guile-www srfi
+if USE_LIBGOFFICE
+SUBDIRS = libc glib26 guile-www srfi
+else
+SUBDIRS = libc glib26 guile-www srfi goffice
+endif
 
 EXTRA_DIST = README guppi-legend.patch
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/lib/libc/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -Llib/libc/Makefile.am -Llib/libc/Makefile.am -u -r1.6 -r1.7
--- lib/libc/Makefile.am
+++ lib/libc/Makefile.am
@@ -2,12 +2,12 @@
 
 # All header files must be listed.
 noinst_HEADERS = \
-  localtime_r.h strptime.h
+  localtime_r.h setenv.h strptime.h
 
 # No sources should be listed.
 libc_missing_la_SOURCES = libc-missing-noop.c
 
-EXTRA_libc_missing_la_SOURCES = localtime_r.c strptime.c
+EXTRA_libc_missing_la_SOURCES = localtime_r.c setenv.c strptime.c
 
 # This will automatically be filled in with the necessary object file
 # names.  Configure does this based upon the AC_REPLACE_FUNCS macros.
Index: ChangeLog
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/m4/ChangeLog,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lm4/ChangeLog -Lm4/ChangeLog -u -r1.2 -r1.3
--- m4/ChangeLog
+++ m4/ChangeLog
@@ -1,3 +1,23 @@
+2003-06-14  gettextize  <bug-gnu-gettext at gnu.org>
+
+	* codeset.m4: New file, from gettext-0.11.4.
+	* gettext.m4: New file, from gettext-0.11.4.
+	* glibc21.m4: New file, from gettext-0.11.4.
+	* iconv.m4: New file, from gettext-0.11.4.
+	* intdiv0.m4: New file, from gettext-0.11.4.
+	* inttypes.m4: New file, from gettext-0.11.4.
+	* inttypes_h.m4: New file, from gettext-0.11.4.
+	* inttypes-pri.m4: New file, from gettext-0.11.4.
+	* isc-posix.m4: New file, from gettext-0.11.4.
+	* lcmessage.m4: New file, from gettext-0.11.4.
+	* lib-ld.m4: New file, from gettext-0.11.4.
+	* lib-link.m4: New file, from gettext-0.11.4.
+	* lib-prefix.m4: New file, from gettext-0.11.4.
+	* progtest.m4: New file, from gettext-0.11.4.
+	* stdint_h.m4: New file, from gettext-0.11.4.
+	* uintmax_t.m4: New file, from gettext-0.11.4.
+	* Makefile.am (EXTRA_DIST): Add the new files.
+
 2002-11-16  gettextize  <bug-gnu-gettext at gnu.org>
 
 	* codeset.m4: New file, from gettext-0.11.1.
--- macros/gnome-pilot.m4
+++ /dev/null
@@ -1,161 +0,0 @@
-dnl
-dnl GNOME_PILOT_HOOK(script if found, fail)
-dnl if fail = "failure", abort if gnome-pilot not found
-dnl
-
-dnl
-dnl 
-
-GNOME_PILOT_CFLAGS=
-GNOME_PILOT_LIBS=
-PISOCK_CFLAGS=
-PISOCK_LIBS=
-
-AC_SUBST(GNOME_PILOT_CFLAGS)
-AC_SUBST(GNOME_PILOT_LIBS)
-AC_SUBST(PISOCK_CFLAGS)
-AC_SUBST(PISOCK_LIBS)
-
-AC_DEFUN([PILOT_LINK_HOOK],[
-	AC_ARG_WITH(pisock,
-	[  --with-pisock            Specify prefix for pisock files],[
-	if test x$withval = xyes; then
-	    dnl Note that an empty true branch is not valid sh syntax.
-	    ifelse([$1], [], :, [$1])
-	else
-	    PISOCK_CFLAGS="-I$withval/include"
-	    incdir="$withval/include"
-	    PISOCK_LIBS="-L$withval/lib -lpisock"
-	    AC_MSG_CHECKING("for existance of $withval/lib/libpisock.so")
-	    if test -r $withval/lib/libpisock.so; then
-		AC_MSG_RESULT("yes")
-	    else
-		AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.")
-	    fi
-	fi
-	])
-
-	if test x$PISOCK_CFLAGS = x; then
-	    AC_CHECK_HEADER(pi-version.h, [incdir="/usr/include"], [
-	    AC_CHECK_HEADER(libpisock/pi-version.h, [PISOCK_CFLAGS="-I/usr/include/libpisock"
-	                                             piversion_include="libpisock/pi-version.h"
-						     incdir="/usr/inlude/libpisock"
-                                                    ], [
-	    AC_CHECK_HEADER($prefix/include/pi-version.h, [PISOCK_CFLAGS="-I$prefix/include/libpisock"
-	                                                   piversion_include="$prefix/include/pi-version.h"
-						           if test x$PISOCK_LIBDIR = x; then
-							      echo Assuming libpisock in $prefix/lib
-							      incdir="$prefix/include"
-							      PISOCK_LIBS="-L$prefix/lib -lpisock"
-                                                           fi							  ],
-	    AC_MSG_ERROR("Unable to find pi-version.h")) 
-	    ])
-	    ])
-	fi
-		
-	if test "x$PISOCK_LIBS" = "x"; then
-		AC_CHECK_LIB(pisock, pi_accept, [ PISOCK_LIBS=-lpisock ], 
-			[ AC_MSG_ERROR("Unable to find libpisock. Try ftp://ryeham.ee.ryerson.ca/pub/PalmOS/.") ])
-	fi
-	
-	AC_ARG_ENABLE(pilotlinktest,
-		[  --enable-pilotlinktest   Test for correct version of pilot-link],
-		[testplversion=$enableval],
-		[ testplversion=yes ]
-	)
-
-	if test x$piversion_include = x; then
-		piversion_include="pi-version.h"
-		pi_version=`cat $incdir/pi-version.h|grep PILOT_LINK_VERSION|sed 's/#define PILOT_LINK_VERSION \([[0-9]]*\)/\1/'`
-		pi_major=`cat $incdir/pi-version.h|grep PILOT_LINK_MAJOR|sed 's/#define PILOT_LINK_MAJOR \([[0-9]]*\)/\1/'`
-		pi_minor=`cat $incdir/pi-version.h|grep PILOT_LINK_MINOR|sed 's/#define PILOT_LINK_MINOR \([[0-9]]*\)/\1/'`
-		pi_patch=`cat $incdir/pi-version.h|grep PILOT_LINK_PATCH|sed 's/#define PILOT_LINK_PATCH \"\(.*\)\"/\1/'`
-	fi
-
-	PILOT_LINK_VERSION="$pi_version.$pi_major.$pi_minor$pi_patch"
-
-	if test x$testplversion = xyes; then
-		AC_MSG_CHECKING(for pilot-link version >= $1)
-		pl_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-		pl_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-		pl_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-		CFLAGS_save="$CFLAGS"
-		CFLAGS="$CFLAGS $PISOCK_CFLAGS"
-		AC_TRY_RUN(
-			[
-			#include <$piversion_include>
-			int main(int argc,char *argv[]) {
-				if (PILOT_LINK_VERSION == $pl_ve) {
-					if (PILOT_LINK_MAJOR == $pl_ma) {
-						if (PILOT_LINK_MINOR >= $pl_mi) {
-							exit(0);
-				       	  	}
-					} else if (PILOT_LINK_MAJOR > $pl_ma) {
-						exit(0);
-					}
-				} else if (PILOT_LINK_VERSION > $pl_ve) {
-					exit(0);
-				}
-				exit(1);
-			}
-			],
-			[AC_MSG_RESULT(yes (found $PILOT_LINK_VERSION))],
-			[AC_MSG_ERROR("pilot-link >= $1 required")],
-			[AC_MSG_WARN("No action taken for crosscompile")]
-		)
-		CFLAGS="$CFLAGS_save"
-	fi
-
-	PISOCK_CFLAGS="$PISOCK_CFLAGS -DGP_PILOT_LINK_VERSION=\\\"$PILOT_LINK_VERSION\\\""
-
-	unset piversion_include
-	unset pi_verion
-	unset pi_major
-	unset pi_minor
-	unset pi_patch
-	unset incdir
-	unset pl_mi
-	unset pl_ma
-	unset pl_ve
-])
-
-AC_DEFUN([PILOT_LINK_CHECK],[
-	PILOT_LINK_HOOK($1,[],nofailure)
-])
-
-AC_DEFUN([GNOME_PILOT_HOOK],[
-	AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
-	AC_CACHE_CHECK([for gnome-pilot environment],gnome_cv_pilot_found,[
-		if test "x$GNOME_CONFIG" = "xno"; then
-			gnome_cv_pilot_found=no
-		else
-			# gnome-config doesn't return a useful error status,
-			# so we check if it outputs anything to stderr
-			if test "x`$GNOME_CONFIG gpilot 2>&1 > /dev/null`" = "x"; then
-				gnome_cv_pilot_found=yes
-			else
-				gnome_cv_pilot_found=no
-			fi
-		fi
-	])
-	AM_CONDITIONAL(HAVE_GNOME_PILOT,test x$gnome_cv_pilot_found = xyes)
-	if test x$gnome_cv_pilot_found = xyes; then
-		PILOT_LINK_CHECK($1)
-		GNOME_PILOT_CFLAGS=`gnome-config --cflags gpilot`
-		GNOME_PILOT_LIBS=`gnome-config --libs gpilot`
-		$2
-	else
-		if test x$3 = xfailure; then
-			AC_MSG_ERROR(gnome-pilot development package not installed or installation problem)
-		fi
-	fi
-])
-
-AC_DEFUN([GNOME_PILOT_CHECK],[
-	if test x$1 = x; then
-		GNOME_PILOT_HOOK(0.9.5,[],nofailure)
-	else
-		GNOME_PILOT_HOOK($1,[],nofailure)
-	fi
-])
-
--- macros/gnome-gnorba-check.m4
+++ /dev/null
@@ -1,35 +0,0 @@
-dnl
-dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag)
-dnl
-dnl if failflag is "failure" it aborts if gnorba is not found.
-dnl
-
-AC_DEFUN([GNOME_GNORBA_HOOK],[
-	GNOME_ORBIT_HOOK([],$2)
-	AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[
-		gnome_cv_gnorba_found=no
-		if test x$gnome_cv_orbit_found = xyes; then
-			GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
-			GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
-			if test -n "$GNORBA_LIBS"; then
-				gnome_cv_gnorba_found=yes
-			fi
-		fi
-	])
-	AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes)
-	if test x$gnome_cv_orbit_found = xyes; then
-		$1
-		GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`"
-		GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`"
-		AC_SUBST(GNORBA_CFLAGS)
-		AC_SUBST(GNORBA_LIBS)
-	else
-	    	if test x$2 = xfailure; then
-			AC_MSG_ERROR(gnorba library not installed or installation problem)
-	    	fi
-	fi
-])
-
-AC_DEFUN([GNOME_GNORBA_CHECK], [
-	GNOME_GNORBA_HOOK([],failure)
-])
Index: aqbanking.m4
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/aqbanking.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lmacros/aqbanking.m4 -Lmacros/aqbanking.m4 -u -r1.3 -r1.4
--- macros/aqbanking.m4
+++ macros/aqbanking.m4
@@ -1,4 +1,4 @@
-# $Id$
+# Id: aqbanking.m4,v 1.3 2005/07/17 13:02:52 cstim Exp
 # (c) 2004 Martin Preuss<martin at libchipcard.de>
 # This function checks for AqBanking
 
--- macros/gnome-objc-checks.m4
+++ /dev/null
@@ -1,83 +0,0 @@
-AC_DEFUN([GNOME_CHECK_OBJC],
-[
-dnl Look for an ObjC compiler.
-dnl FIXME: extend list of possible names of ObjC compilers.
-  AC_CHECK_PROGS(OBJC, $OBJC egcs, "")
-  if test "x$OBJC" = "x" ; then
-    AC_CHECK_PROGS(OBJC, $OBJC egcc, "")
-    if test "x$OBJC" = "x" ; then
-      AC_CHECK_PROGS(OBJC, $OBJC gcc, "")
-    fi
-  fi
-
-  AC_REQUIRE([GNOME_PTHREAD_CHECK])
-
-  OBJC_LIBS="-lobjc $PTHREAD_LIB"
-  AC_CHECK_FUNC(sched_yield,,[
-    AC_CHECK_LIB(rt,sched_yield,
-      OBJC_LIBS="$OBJC_LIBS -lrt",[
-      AC_CHECK_LIB(posix4,sched_yield,
-        OBJC_LIBS="$OBJC_LIBS -lposix4",, 
-        $OBJC_LIBS)],
-      $OBJC_LIBS)])
-  AC_SUBST(OBJC_LIBS)
-
-  AC_CACHE_CHECK([if Objective C compiler ($OBJC) works],
-		 ac_cv_prog_objc_works, [
-    if test -n "$OBJC"; then
-      cat > conftest.m <<EOF
-#include <objc/Object.h>
- at interface myRandomObj : Object
-{
-}
- at end
- at implementation myRandomObj
- at end
-int main () {
-  /* No, you are not seeing double.  Remember that square brackets
-     are the autoconf m4 quotes.  */
-  id myid = [[myRandomObj alloc]];
-  [[myid free]];
-  return 0;
-}
-EOF
-
-      $OBJC $CFLAGS -o conftest $LDFLAGS conftest.m $OBJC_LIBS 1>&AC_FD_CC 2>&1
-      result=$?
-      rm -f conftest*
-
-      if test $result -eq 0; then
-        ac_cv_prog_objc_works=yes
-      fi
-    else
-      ac_cv_prog_objc_works=no
-    fi
-  ])
-
-  AM_CONDITIONAL(OBJECTIVE_C, test x$ac_cv_prog_objc_works = xyes)
-  dnl Also set the shell variable OBJECTIVE_C to "yes" or "no".
-  OBJECTIVE_C=$ac_cv_prog_objc_works
-])
-
-AC_DEFUN([GNOME_INIT_OBJC],
-[
-	AC_MSG_CHECKING(for an obGnomeConf.sh)
-	my_gnome_libdir=`$GNOME_CONFIG --libdir`
-	if test -f $my_gnome_libdir/obGnomeConf.sh; then
-	    . $my_gnome_libdir/obGnomeConf.sh
-	    AC_MSG_RESULT(found $my_gnome_libdir)
-	    ac_cv_have_gnome_objc=yes
-	else
-	    AC_MSG_RESULT(not found)
-	    AC_MSG_WARN(Could not find the obGnomeConf.sh file that is generated by gnome-objc install)
-	    ac_cv_have_gnome_objc=no
-	fi
-	
-	dnl Add a conditional on whether or not we have gnome-objc
-	AM_CONDITIONAL(HAVE_GNOME_OBJC, test x$ac_cv_have_gnome_objc = xyes)
-	HAVE_GNOME_OBJC=$ac_cv_have_gnome_objc
-
-	AC_SUBST(OBGNOME_INCLUDEDIR)
-	AC_SUBST(OBGNOME_LIBS)
-	AC_SUBST(OBGTK_LIBS)
-])
--- macros/gnome.m4
+++ /dev/null
@@ -1,128 +0,0 @@
-dnl
-dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits])
-dnl
-dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh
-dnl is not found. 
-dnl
-
-AC_DEFUN([GNOME_INIT_HOOK],[
-	AC_SUBST(GNOME_LIBS)
-	AC_SUBST(GNOMEUI_LIBS)
-	AC_SUBST(GNOMEGNORBA_LIBS)
-	AC_SUBST(GTKXMHTML_LIBS)
-	AC_SUBST(ZVT_LIBS)
-	AC_SUBST(GNOME_LIBDIR)
-	AC_SUBST(GNOME_INCLUDEDIR)
-
-	AC_ARG_WITH(gnome-includes,
-	[  --with-gnome-includes   Specify location of GNOME headers],[
-	CPPFLAGS="$CPPFLAGS -I$withval"
-	])
-	
-	AC_ARG_WITH(gnome-libs,
-	[  --with-gnome-libs       Specify location of GNOME libs],[
-	LDFLAGS="$LDFLAGS -L$withval"
-	gnome_prefix=$withval
-	])
-
-	AC_ARG_WITH(gnome,
-	[  --with-gnome            Specify prefix for GNOME files],
-		if test x$withval = xyes; then
-	    		want_gnome=yes
-	    		dnl Note that an empty true branch is not
-			dnl valid sh syntax.
-	    		ifelse([$1], [], :, [$1])
-        	else
-	    		if test "x$withval" = xno; then
-	        		want_gnome=no
-	    		else
-	        		want_gnome=yes
-	    			LDFLAGS="$LDFLAGS -L$withval/lib"
-	    			CPPFLAGS="$CPPFLAGS -I$withval/include"
-	    			gnome_prefix=$withval/lib
-	    		fi
-  		fi,
-		want_gnome=yes)
-
-	if test "x$want_gnome" = xyes; then
-
-	    AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
-	    if test "$GNOME_CONFIG" = "no"; then
-	      no_gnome_config="yes"
-	    else
-	      AC_MSG_CHECKING(if $GNOME_CONFIG works)
-	      if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then
-	        AC_MSG_RESULT(yes)
-	        GNOME_GNORBA_HOOK([],$2)
-	        GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`"
-	        GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`"
-	        GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`"
-	        GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`"
-		ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`"
-	        GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gtk gnorba gnomeui`"
-	        GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gtk gnorba gnomeui`"
-                $1
-	      else
-	        AC_MSG_RESULT(no)
-	        no_gnome_config="yes"
-              fi
-            fi
-
-	    if test x$exec_prefix = xNONE; then
-	        if test x$prefix = xNONE; then
-		    gnome_prefix=$ac_default_prefix/lib
-	        else
- 		    gnome_prefix=$prefix/lib
-	        fi
-	    else
-	        gnome_prefix=`eval echo \`echo $libdir\``
-	    fi
-	
-	    if test "$no_gnome_config" = "yes"; then
-              AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix)
-	      if test -f $gnome_prefix/gnomeConf.sh; then
-	        AC_MSG_RESULT(found)
-	        echo "loading gnome configuration from" \
-		     "$gnome_prefix/gnomeConf.sh"
-	        . $gnome_prefix/gnomeConf.sh
-	        $1
-	      else
-	        AC_MSG_RESULT(not found)
- 	        if test x$2 = xfail; then
-	          AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install)
- 	        fi
-	      fi
-            fi
-	fi
-
-	if test -n "$3"; then
-	  n="$3"
-	  for i in $n; do
-	    AC_MSG_CHECKING(extra library \"$i\")
-	    case $i in 
-	      applets)
-		AC_SUBST(GNOME_APPLETS_LIBS)
-		GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets`
-		AC_MSG_RESULT($GNOME_APPLETS_LIBS);;
-	      docklets)
-		AC_SUBST(GNOME_DOCKLETS_LIBS)
-		GNOME_DOCKLETS_LIBS=`$GNOME_CONFIG --libs-only-l docklets`
-		AC_MSG_RESULT($GNOME_DOCKLETS_LIBS);;
-	      capplet)
-		AC_SUBST(GNOME_CAPPLET_LIBS)
-		GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet`
-		AC_MSG_RESULT($GNOME_CAPPLET_LIBS);;
-	      *)
-		AC_MSG_RESULT(unknown library)
-	    esac
-	  done
-	fi
-])
-
-dnl
-dnl GNOME_INIT ([additional-inits])
-dnl
-
-AC_DEFUN([GNOME_INIT],[
-	GNOME_INIT_HOOK([],fail,$1)
-])
--- macros/gnome-gettext.m4
+++ /dev/null
@@ -1,336 +0,0 @@
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper at cygnus.com>, 1995.
-#
-# Modified to never use included libintl. 
-# Owen Taylor <otaylor at redhat.com>, 12/15/1998
-#
-#
-# This file can be copied and used freely without restrictions.  It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-# Please note that the actual code is *not* freely available.
-
-# serial 5
-
-AC_DEFUN([AM_GNOME_WITH_NLS],
-  [AC_MSG_CHECKING([whether NLS is requested])
-    dnl Default is enabled NLS
-    AC_ARG_ENABLE(nls,
-      [  --disable-nls           do not use Native Language Support],
-      USE_NLS=$enableval, USE_NLS=yes)
-    AC_MSG_RESULT($USE_NLS)
-    AC_SUBST(USE_NLS)
-
-    USE_INCLUDED_LIBINTL=no
-
-    dnl If we use NLS figure out what method
-    if test "$USE_NLS" = "yes"; then
-#      AC_DEFINE(ENABLE_NLS)
-#      AC_MSG_CHECKING([whether included gettext is requested])
-#      AC_ARG_WITH(included-gettext,
-#        [  --with-included-gettext use the GNU gettext library included here],
-#        nls_cv_force_use_gnu_gettext=$withval,
-#        nls_cv_force_use_gnu_gettext=no)
-#      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-      nls_cv_force_use_gnu_gettext="no"
-
-      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
-      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-        dnl User does not insist on using GNU NLS library.  Figure out what
-        dnl to use.  If gettext or catgets are available (in this order) we
-        dnl use this.  Else we have to fall back to GNU NLS library.
-	dnl catgets is only used if permitted by option --with-catgets.
-	nls_cv_header_intl=
-	nls_cv_header_libgt=
-	CATOBJEXT=NONE
-
-	AC_CHECK_HEADER(libintl.h,
-	  [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
-	    [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
-	       gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
-
-	   if test "$gt_cv_func_gettext_libc" != "yes"; then
-	     AC_CHECK_LIB(intl, bindtextdomain,
-	       [AC_CACHE_CHECK([for gettext in libintl],
-		 gt_cv_func_gettext_libintl,
-		 [AC_CHECK_LIB(intl, gettext,
-		  gt_cv_func_gettext_libintl=yes,
-		  gt_cv_func_gettext_libintl=no)],
-		 gt_cv_func_gettext_libintl=no)])
-	   fi
-
-	   if test "$gt_cv_func_gettext_libc" = "yes" \
-	      || test "$gt_cv_func_gettext_libintl" = "yes"; then
-	      AC_DEFINE(HAVE_GETTEXT)
-	      AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-		[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
-	      if test "$MSGFMT" != "no"; then
-		AC_CHECK_FUNCS(dcgettext)
-		AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-		AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-		  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-		AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
-			       return _nl_msg_cat_cntr],
-		  [CATOBJEXT=.gmo
-		   DATADIRNAME=share],
-		  [CATOBJEXT=.mo
-		   DATADIRNAME=lib])
-		INSTOBJEXT=.mo
-	      fi
-	    fi
-
-	    # Added by Martin Baulig 12/15/98 for libc5 systems
-	    if test "$gt_cv_func_gettext_libc" != "yes" \
-	       && test "$gt_cv_func_gettext_libintl" = "yes"; then
-	       INTLLIBS=-lintl
-	       LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-	    fi
-	])
-
-        if test "$CATOBJEXT" = "NONE"; then
-	  AC_MSG_CHECKING([whether catgets can be used])
-	  AC_ARG_WITH(catgets,
-	    [  --with-catgets          use catgets functions if available],
-	    nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
-	  AC_MSG_RESULT($nls_cv_use_catgets)
-
-	  if test "$nls_cv_use_catgets" = "yes"; then
-	    dnl No gettext in C library.  Try catgets next.
-	    AC_CHECK_LIB(i, main)
-	    AC_CHECK_FUNC(catgets,
-	      [AC_DEFINE(HAVE_CATGETS)
-	       INTLOBJS="\$(CATOBJS)"
-	       AC_PATH_PROG(GENCAT, gencat, no)dnl
-#	       if test "$GENCAT" != "no"; then
-#		 AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
-#		 if test "$GMSGFMT" = "no"; then
-#		   AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
-#		    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
-#		 fi
-#		 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-#		   [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-#		 USE_INCLUDED_LIBINTL=yes
-#		 CATOBJEXT=.cat
-#		 INSTOBJEXT=.cat
-#		 DATADIRNAME=lib
-#		 INTLDEPS='$(top_builddir)/intl/libintl.a'
-#		 INTLLIBS=$INTLDEPS
-#		 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-#		 nls_cv_header_intl=intl/libintl.h
-#		 nls_cv_header_libgt=intl/libgettext.h
-#              fi
-            ])
-	  fi
-        fi
-
-        if test "$CATOBJEXT" = "NONE"; then
-	  dnl Neither gettext nor catgets in included in the C library.
-	  dnl Fall back on GNU gettext library.
-	  nls_cv_use_gnu_gettext=yes
-        fi
-      fi
-
-      if test "$nls_cv_use_gnu_gettext" != "yes"; then
-        AC_DEFINE(ENABLE_NLS)
-      else
-         # Unset this variable since we use the non-zero value as a flag.
-         CATOBJEXT=
-#        dnl Mark actions used to generate GNU NLS library.
-#        INTLOBJS="\$(GETTOBJS)"
-#        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-#	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
-#        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-#        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-#	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
-#        AC_SUBST(MSGFMT)
-#	USE_INCLUDED_LIBINTL=yes
-#        CATOBJEXT=.gmo
-#        INSTOBJEXT=.mo
-#        DATADIRNAME=share
-#	INTLDEPS='$(top_builddir)/intl/libintl.a'
-#	INTLLIBS=$INTLDEPS
-#	LIBS=`echo $LIBS | sed -e 's/-lintl//'`
-#        nls_cv_header_intl=intl/libintl.h
-#        nls_cv_header_libgt=intl/libgettext.h
-      fi
-
-      dnl Test whether we really found GNU xgettext.
-      if test "$XGETTEXT" != ":"; then
-	dnl If it is no GNU xgettext we define it as : so that the
-	dnl Makefiles still can work.
-	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
-	  : ;
-	else
-	  AC_MSG_RESULT(
-	    [found xgettext program is not GNU xgettext; ignore it])
-	  XGETTEXT=":"
-	fi
-      fi
-
-      # We need to process the po/ directory.
-      POSUB=po
-    else
-      DATADIRNAME=share
-      nls_cv_header_intl=intl/libintl.h
-      nls_cv_header_libgt=intl/libgettext.h
-    fi
-    AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
-    AC_OUTPUT_COMMANDS(
-     [case "$CONFIG_FILES" in *po/Makefile.in*)
-        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-      esac])
-
-
-#    # If this is used in GNU gettext we have to set USE_NLS to `yes'
-#    # because some of the sources are only built for this goal.
-#    if test "$PACKAGE" = gettext; then
-#      USE_NLS=yes
-#      USE_INCLUDED_LIBINTL=yes
-#    fi
-
-    dnl These rules are solely for the distribution goal.  While doing this
-    dnl we only have to keep exactly one list of the available catalogs
-    dnl in configure.in.
-    for lang in $ALL_LINGUAS; do
-      GMOFILES="$GMOFILES $lang.gmo"
-      POFILES="$POFILES $lang.po"
-    done
-
-    dnl Make all variables we use known to autoconf.
-    AC_SUBST(USE_INCLUDED_LIBINTL)
-    AC_SUBST(CATALOGS)
-    AC_SUBST(CATOBJEXT)
-    AC_SUBST(DATADIRNAME)
-    AC_SUBST(GMOFILES)
-    AC_SUBST(INSTOBJEXT)
-    AC_SUBST(INTLDEPS)
-    AC_SUBST(INTLLIBS)
-    AC_SUBST(INTLOBJS)
-    AC_SUBST(POFILES)
-    AC_SUBST(POSUB)
-  ])
-
-AC_DEFUN([AM_GNOME_GETTEXT],
-  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-   AC_REQUIRE([AC_PROG_CC])dnl
-   AC_REQUIRE([AC_PROG_RANLIB])dnl
-   AC_REQUIRE([AC_ISC_POSIX])dnl
-   AC_REQUIRE([AC_HEADER_STDC])dnl
-   AC_REQUIRE([AC_C_CONST])dnl
-   AC_REQUIRE([AC_C_INLINE])dnl
-   AC_REQUIRE([AC_TYPE_OFF_T])dnl
-   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
-   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-   AC_REQUIRE([AC_FUNC_MMAP])dnl
-
-   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h sys/param.h])
-   AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
-strdup __argz_count __argz_stringify __argz_next])
-
-   if test "${ac_cv_func_stpcpy+set}" != "set"; then
-     AC_CHECK_FUNCS(stpcpy)
-   fi
-   if test "${ac_cv_func_stpcpy}" = "yes"; then
-     AC_DEFINE(HAVE_STPCPY)
-   fi
-
-   AM_LC_MESSAGES
-   AM_GNOME_WITH_NLS
-
-   if test "x$CATOBJEXT" != "x"; then
-     if test "x$ALL_LINGUAS" = "x"; then
-       LINGUAS=
-     else
-       AC_MSG_CHECKING(for catalogs to be installed)
-       NEW_LINGUAS=
-       if test "x$LINGUAS" = "x"; then
-           LINGUAS=$ALL_LINGUAS
-       fi
-       for lang in $LINGUAS; do
-         case "$ALL_LINGUAS" in
-          *\ $lang\ *|$lang\ *|*\ $lang) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
-         esac
-       done
-       LINGUAS=$NEW_LINGUAS
-       AC_MSG_RESULT($LINGUAS)
-     fi
-
-     dnl Construct list of names of catalog files to be constructed.
-     if test -n "$LINGUAS"; then
-       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
-     fi
-   fi
-
-   dnl The reference to <locale.h> in the installed <libintl.h> file
-   dnl must be resolved because we cannot expect the users of this
-   dnl to define HAVE_LOCALE_H.
-   if test $ac_cv_header_locale_h = yes; then
-     INCLUDE_LOCALE_H="#include <locale.h>"
-   else
-     INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>.  Take care yourself.  */"
-   fi
-   AC_SUBST(INCLUDE_LOCALE_H)
-
-   dnl Determine which catalog format we have (if any is needed)
-   dnl For now we know about two different formats:
-   dnl   Linux libc-5 and the normal X/Open format
-   test -d intl || mkdir intl
-   if test "$CATOBJEXT" = ".cat"; then
-     AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
-
-     dnl Transform the SED scripts while copying because some dumb SEDs
-     dnl cannot handle comments.
-     sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
-   fi
-   dnl po2tbl.sed is always needed.
-   sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
-     $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
-
-   dnl In the intl/Makefile.in we have a special dependency which makes
-   dnl only sense for gettext.  We comment this out for non-gettext
-   dnl packages.
-   if test "$PACKAGE" = "gettext"; then
-     GT_NO="#NO#"
-     GT_YES=
-   else
-     GT_NO=
-     GT_YES="#YES#"
-   fi
-   AC_SUBST(GT_NO)
-   AC_SUBST(GT_YES)
-
-   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
-   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
-   dnl Try to locate is.
-   MKINSTALLDIRS=
-   if test -n "$ac_aux_dir"; then
-     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
-   fi
-   if test -z "$MKINSTALLDIRS"; then
-     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
-   fi
-   AC_SUBST(MKINSTALLDIRS)
-
-   dnl *** For now the libtool support in intl/Makefile is not for real.
-   l=
-   AC_SUBST(l)
-
-   dnl Generate list of files to be processed by xgettext which will
-   dnl be included in po/Makefile.
-   test -d po || mkdir po
-   if test "x$srcdir" != "x."; then
-     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
-       posrcprefix="$srcdir/"
-     else
-       posrcprefix="../$srcdir/"
-     fi
-   else
-     posrcprefix="../"
-   fi
-   rm -f po/POTFILES
-   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
-	< $srcdir/po/POTFILES.in > po/POTFILES
-  ])
-
--- macros/linger.m4
+++ /dev/null
@@ -1,28 +0,0 @@
-dnl
-dnl Check for struct linger
-dnl
-AC_DEFUN([AC_STRUCT_LINGER], [
-av_struct_linger=no
-AC_MSG_CHECKING(struct linger is available)
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/socket.h>
-
-struct linger li;
-
-main ()
-{
-    li.l_onoff = 1;
-    li.l_linger = 120;
-    exit (0);
-}
-],[
-AC_DEFINE(HAVE_STRUCT_LINGER)
-av_struct_linger=yes
-],[
-av_struct_linger=no
-],[
-av_struct_linger=no
-])
-AC_MSG_RESULT($av_struct_linger)
-])
--- macros/gnome-fileutils.m4
+++ /dev/null
@@ -1,414 +0,0 @@
-dnl
-dnl GNOME_FILEUTILS_CHECKS
-dnl
-dnl checks that are needed for the diskusage applet.
-dnl
-
-AC_DEFUN([GNOME_FILEUTILS_CHECKS],
-[	
-AC_CHECK_HEADERS(fcntl.h sys/param.h sys/statfs.h sys/fstyp.h \
-mnttab.h mntent.h sys/statvfs.h sys/vfs.h sys/mount.h \
-sys/filsys.h sys/fs_types.h sys/fs/s5param.h)
-
-AC_CHECK_FUNCS(bcopy endgrent endpwent fchdir ftime ftruncate \
-getcwd getmntinfo gettimeofday isascii lchown \
-listmntent memcpy mkfifo strchr strerror strrchr vprintf)
-
-dnl Set some defaults when cross-compiling
-
-if test x$cross_compiling = xyes ; then
-	case "$host_os" in
-	linux*)
-	  fu_cv_sys_mounted_getmntent1=yes
-	  fu_cv_sys_stat_statfs2_bsize=yes
-	  ;;
-	sunos*)
-	  fu_cv_sys_stat_statfs4=yes
-	  ;;
-	freebsd*)
-	  fu_cv_sys_stat_statfs2_bsize=yes
-	  ;;
-	osf*)
-	  fu_cv_sys_stat_statfs3_osf1=yes
-	  ;;
-	esac
-fi
-
-# Determine how to get the list of mounted filesystems.
-list_mounted_fs=
-
-# If the getmntent function is available but not in the standard library,
-# make sure LIBS contains -lsun (on Irix4) or -lseq (on PTX).
-AC_FUNC_GETMNTENT
-
-# This test must precede the ones for getmntent because Unicos-9 is
-# reported to have the getmntent function, but its support is incompatible
-# with other getmntent implementations.
-
-# NOTE: Normally, I wouldn't use a check for system type as I've done for
-# `CRAY' below since that goes against the whole autoconf philosophy.  But
-# I think there is too great a chance that some non-Cray system has a
-# function named listmntent to risk the false positive.
-
-if test -z "$list_mounted_fs"; then
-# Cray UNICOS 9
-AC_MSG_CHECKING([for listmntent of Cray/Unicos-9])
-AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent,
-[fu_cv_sys_mounted_cray_listmntent=no
-AC_EGREP_CPP(yes,
-[#ifdef _CRAY
-yes
-#endif
-], [test $ac_cv_func_listmntent = yes \
-&& fu_cv_sys_mounted_cray_listmntent=yes]
-)
-]
-)
-AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent)
-if test $fu_cv_sys_mounted_cray_listmntent = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_LISTMNTENT)
-fi
-fi
-
-if test $ac_cv_func_getmntent = yes; then
-
-# This system has the getmntent function.
-# Determine whether it's the one-argument variant or the two-argument one.
-
-if test -z "$list_mounted_fs"; then
-# 4.3BSD, SunOS, HP-UX, Dynix, Irix
-AC_MSG_CHECKING([for one-argument getmntent function])
-AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1,
-[test $ac_cv_header_mntent_h = yes \
-&& fu_cv_sys_mounted_getmntent1=yes \
-|| fu_cv_sys_mounted_getmntent1=no])
-AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1)
-if test $fu_cv_sys_mounted_getmntent1 = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_GETMNTENT1)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-# SVR4
-AC_MSG_CHECKING([for two-argument getmntent function])
-AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2,
-[AC_EGREP_HEADER(getmntent, sys/mnttab.h,
-fu_cv_sys_mounted_getmntent2=yes,
-fu_cv_sys_mounted_getmntent2=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2)
-if test $fu_cv_sys_mounted_getmntent2 = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_GETMNTENT2)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
-fi
-
-fi
-
-if test -z "$list_mounted_fs"; then
-# DEC Alpha running OSF/1.
-AC_MSG_CHECKING([for getfsstat function])
-AC_CACHE_VAL(fu_cv_sys_mounted_getsstat,
-[AC_TRY_LINK([
-#include <sys/types.h>
-#include <sys/mount.h>
-#include <sys/fs_types.h>],
-[struct statfs *stats;
-int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); ],
-fu_cv_sys_mounted_getsstat=yes,
-fu_cv_sys_mounted_getsstat=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_getsstat)
-if test $fu_cv_sys_mounted_getsstat = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_GETFSSTAT)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-# AIX.
-AC_MSG_CHECKING([for mntctl function and struct vmount])
-AC_CACHE_VAL(fu_cv_sys_mounted_vmount,
-[AC_TRY_CPP([#include <fshelp.h>],
-fu_cv_sys_mounted_vmount=yes,
-fu_cv_sys_mounted_vmount=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_vmount)
-if test $fu_cv_sys_mounted_vmount = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_VMOUNT)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-# SVR3
-AC_MSG_CHECKING([for FIXME existence of three headers])
-AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp,
-[AC_TRY_CPP([
-#include <sys/statfs.h>
-#include <sys/fstyp.h>
-#include <mnttab.h>],
-fu_cv_sys_mounted_fread_fstyp=yes,
-fu_cv_sys_mounted_fread_fstyp=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp)
-if test $fu_cv_sys_mounted_fread_fstyp = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_FREAD_FSTYP)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-# 4.4BSD and DEC OSF/1.
-AC_MSG_CHECKING([for getmntinfo function])
-AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo,
-[
-ok=
-if test $ac_cv_func_getmntinfo = yes; then
-AC_EGREP_HEADER(f_type;, sys/mount.h,
-ok=yes)
-fi
-test -n "$ok" \
-&& fu_cv_sys_mounted_getmntinfo=yes \
-|| fu_cv_sys_mounted_getmntinfo=no
-])
-AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo)
-if test $fu_cv_sys_mounted_getmntinfo = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_GETMNTINFO)
-fi
-fi
-
-# FIXME: add a test for netbsd-1.1 here
-
-if test -z "$list_mounted_fs"; then
-# Ultrix
-AC_MSG_CHECKING([for getmnt function])
-AC_CACHE_VAL(fu_cv_sys_mounted_getmnt,
-[AC_TRY_CPP([
-#include <sys/fs_types.h>
-#include <sys/mount.h>],
-fu_cv_sys_mounted_getmnt=yes,
-fu_cv_sys_mounted_getmnt=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_getmnt)
-if test $fu_cv_sys_mounted_getmnt = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_GETMNT)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-# SVR2
-AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab])
-AC_CACHE_VAL(fu_cv_sys_mounted_fread,
-[AC_TRY_CPP([#include <mnttab.h>],
-fu_cv_sys_mounted_fread=yes,
-fu_cv_sys_mounted_fread=no)])
-AC_MSG_RESULT($fu_cv_sys_mounted_fread)
-if test $fu_cv_sys_mounted_fread = yes; then
-list_mounted_fs=found
-AC_DEFINE(MOUNTED_FREAD)
-fi
-fi
-
-if test -z "$list_mounted_fs"; then
-AC_MSG_ERROR([could not determine how to read list of mounted filesystems])
-# FIXME -- no need to abort building the whole package
-# Can't build mountlist.c or anything that needs its functions
-fi
-
-AC_CHECKING(how to get filesystem space usage)
-space=no
-
-# Perform only the link test since it seems there are no variants of the
-# statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
-# because that got a false positive on SCO OSR5.  Adding the declaration
-# of a `struct statvfs' causes this test to fail (as it should) on such
-# systems.  That system is reported to work fine with STAT_STATFS4 which
-# is what it gets when this test fails.
-if test $space = no; then
-# SVR4
-AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
-[AC_TRY_LINK([#include <sys/types.h>
-#include <sys/statvfs.h>],
-[struct statvfs fsd; statvfs (0, &fsd);],
-fu_cv_sys_stat_statvfs=yes,
-fu_cv_sys_stat_statvfs=no)])
-if test $fu_cv_sys_stat_statvfs = yes; then
-space=yes
-AC_DEFINE(STAT_STATVFS)
-fi
-fi
-
-if test $space = no; then
-# DEC Alpha running OSF/1
-AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
-AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
-[AC_TRY_RUN([
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/mount.h>
-main ()
-{
-struct statfs fsd;
-fsd.f_fsize = 0;
-exit (statfs (".", &fsd, sizeof (struct statfs)));
-}],
-fu_cv_sys_stat_statfs3_osf1=yes,
-fu_cv_sys_stat_statfs3_osf1=no,
-fu_cv_sys_stat_statfs3_osf1=no)])
-AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
-if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
-space=yes
-AC_DEFINE(STAT_STATFS3_OSF1)
-fi
-fi
-
-if test $space = no; then
-# AIX
-AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
-member (AIX, 4.3BSD)])
-AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
-[AC_TRY_RUN([
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-main ()
-{
-struct statfs fsd;
-fsd.f_bsize = 0;
-exit (statfs (".", &fsd));
-}],
-fu_cv_sys_stat_statfs2_bsize=yes,
-fu_cv_sys_stat_statfs2_bsize=no,
-fu_cv_sys_stat_statfs2_bsize=no)])
-AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
-if test $fu_cv_sys_stat_statfs2_bsize = yes; then
-space=yes
-AC_DEFINE(STAT_STATFS2_BSIZE)
-fi
-fi
-
-if test $space = no; then
-# SVR3
-AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
-AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
-[AC_TRY_RUN([#include <sys/types.h>
-#include <sys/statfs.h>
-main ()
-{
-struct statfs fsd;
-exit (statfs (".", &fsd, sizeof fsd, 0));
-}],
-fu_cv_sys_stat_statfs4=yes,
-fu_cv_sys_stat_statfs4=no,
-fu_cv_sys_stat_statfs4=no)])
-AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
-if test $fu_cv_sys_stat_statfs4 = yes; then
-space=yes
-AC_DEFINE(STAT_STATFS4)
-fi
-fi
-
-if test $space = no; then
-# 4.4BSD and NetBSD
-AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
-member (4.4BSD and NetBSD)])
-AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
-[AC_TRY_RUN([#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-main ()
-{
-struct statfs fsd;
-fsd.f_fsize = 0;
-exit (statfs (".", &fsd));
-}],
-fu_cv_sys_stat_statfs2_fsize=yes,
-fu_cv_sys_stat_statfs2_fsize=no,
-fu_cv_sys_stat_statfs2_fsize=no)])
-AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
-if test $fu_cv_sys_stat_statfs2_fsize = yes; then
-space=yes
-AC_DEFINE(STAT_STATFS2_FSIZE)
-fi
-fi
-
-if test $space = no; then
-# Ultrix
-AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
-AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
-[AC_TRY_RUN([#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_FS_TYPES_H
-#include <sys/fs_types.h>
-#endif
-main ()
-{
-struct fs_data fsd;
-/* Ultrix's statfs returns 1 for success,
-0 for not mounted, -1 for failure.  */
-exit (statfs (".", &fsd) != 1);
-}],
-fu_cv_sys_stat_fs_data=yes,
-fu_cv_sys_stat_fs_data=no,
-fu_cv_sys_stat_fs_data=no)])
-AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
-if test $fu_cv_sys_stat_fs_data = yes; then
-space=yes
-AC_DEFINE(STAT_STATFS2_FS_DATA)
-fi
-fi
-
-if test $space = no; then
-# SVR2
-AC_TRY_CPP([#include <sys/filsys.h>],
-AC_DEFINE(STAT_READ_FILSYS) space=yes)
-fi
-
-if test -n "$list_mounted_fs" && test $space != no; then
-DF_PROG="df"
-# LIBOBJS="$LIBOBJS fsusage.o"
-# LIBOBJS="$LIBOBJS mountlist.o"
-fi
-
-# Check for SunOS statfs brokenness wrt partitions 2GB and larger.
-# If <sys/vfs.h> exists and struct statfs has a member named f_spare,
-# enable the work-around code in fsusage.c.
-AC_MSG_CHECKING([for statfs that truncates block counts])
-AC_CACHE_VAL(fu_cv_sys_truncating_statfs,
-[AC_TRY_COMPILE([
-#if !defined(sun) && !defined(__sun)
-choke -- this is a workaround for a Sun-specific problem
-#endif
-#include <sys/types.h>
-#include <sys/vfs.h>],
-[struct statfs t; long c = *(t.f_spare);],
-fu_cv_sys_truncating_statfs=yes,
-fu_cv_sys_truncating_statfs=no,
-)])
-if test $fu_cv_sys_truncating_statfs = yes; then
-AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS)
-fi
-AC_MSG_RESULT($fu_cv_sys_truncating_statfs)
-
-AC_CHECKING(for AFS)
-test -d /afs && AC_DEFINE(AFS)
-])
--- macros/gnome-support.m4
+++ /dev/null
@@ -1,68 +0,0 @@
-dnl GNOME_SUPPORT_CHECKS
-dnl    Check for various support functions needed by the standard
-dnl    Gnome libraries.  Sets LIBOBJS, might define some macros.
-dnl    This should only be used when building the Gnome libs; 
-dnl    Gnome clients should not need this macro.
-AC_DEFUN([GNOME_SUPPORT_CHECKS],[
-  # we need an `awk' to build `gnomesupport.h'
-  AC_REQUIRE([AC_PROG_AWK])
-
-  # this should go away soon
-  need_gnome_support=yes
-
-  save_LIBOBJS="$LIBOBJS"
-  LIBOBJS=
-
-  AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
-
-  # for `scandir'
-  AC_HEADER_DIRENT
-
-  # copied from `configure.in' of `libiberty'
-  vars="program_invocation_short_name program_invocation_name sys_errlist"
-  for v in $vars; do
-    AC_MSG_CHECKING([for $v])
-    AC_CACHE_VAL(gnome_cv_var_$v,
-      [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
-		   [eval "gnome_cv_var_$v=yes"],
-		   [eval "gnome_cv_var_$v=no"])])
-    if eval "test \"`echo '$gnome_cv_var_'$v`\" = yes"; then
-      AC_MSG_RESULT(yes)
-      n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-      AC_DEFINE_UNQUOTED($n)
-    else
-      AC_MSG_RESULT(no)
-    fi
-  done
-
-  AC_REPLACE_FUNCS(memmove mkstemp scandir strcasecmp strerror strndup strnlen)
-  AC_REPLACE_FUNCS(strtok_r strtod strtol strtoul vasprintf vsnprintf)
-
-  AC_CHECK_FUNCS(realpath,,LIBOBJS="$LIBOBJS canonicalize.o")
-
-  # to include `error.c' error.c has some HAVE_* checks
-  AC_CHECK_FUNCS(vprintf doprnt strerror_r)
-  AM_FUNC_ERROR_AT_LINE
-
-  # This is required if we declare setreuid () and setregid ().
-  AC_TYPE_UID_T
-
-  # see if we need to declare some functions.  Solaris is notorious for
-  # putting functions into the `libc' but not listing them in the headers
-  AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h dirent.h)
-  GCC_NEED_DECLARATIONS(gethostname setreuid setregid getpagesize)
-  GCC_NEED_DECLARATION(scandir,[
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-])
-
-  # Turn our LIBOBJS into libtool objects.  This is gross, but it
-  # requires changes to autoconf before it goes away.
-  LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
-  AC_SUBST(need_gnome_support)
-  AC_SUBST(LTLIBOBJS)
-
-  LIBOBJS="$save_LIBOBJS"
-  AM_CONDITIONAL(BUILD_GNOME_SUPPORT, test "$need_gnome_support" = yes)
-])
--- macros/gnome-print-check.m4
+++ /dev/null
@@ -1,63 +0,0 @@
-# Configure paths for GNOME-PRINT
-# Chris Lahey	99-2-5
-# stolen from Manish Singh again
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl AM_PATH_GNOME_PRINT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for GNOME-PRINT, and define GNOME_PRINT_CFLAGS and GNOME_PRINT_LIBS
-dnl
-AC_DEFUN([AM_PATH_GNOME_PRINT],
-[
-  min_version=ifelse([$1],,0.21,$1)
-
-  gnome_print_ok=""
-
-  AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
-  if test "$GNOME_CONFIG" = "no" ; then
-    AC_MSG_RESULT(gnome-config is missing, check your gnome installation)
-  else
-    AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_version)
-    if `$GNOME_CONFIG --libs print > /dev/null 2>&1`; then
-      rqmajor=`echo "$min_version" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-      rqminor=`echo "$min_version" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-      major=`$GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-      minor=`$GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-      if test "$major" -ge "$rqmajor"; then
-        if test "$major" -gt "$rqmajor"; then
-          AC_MSG_RESULT("found $major.$minor")
-          gnome_print_ok="yes"
-        else
-          if test "$minor" -ge "$rqminor"; then
-            AC_MSG_RESULT("found $major.$minor")
-            gnome_print_ok="yes"
-          else
-            AC_MSG_RESULT("you have $major.$minor")
-          fi
-        fi
-      else
-        AC_MSG_RESULT("you have $major.$minor")
-      fi
-    else
-      AC_MSG_RESULT("did not find any version")
-    fi
-  fi
-
-  if test "x$gnome_print_ok" != "x" ; then
-    GNOME_PRINT_CFLAGS=`$GNOME_CONFIG --cflags print`
-    GNOME_PRINT_LIBS=`$GNOME_CONFIG --libs print`
-    ifelse([$2], , :, [$2])
-  else
-     GNOME_PRINT_CFLAGS=""
-     GNOME_PRINT_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-
-  AC_SUBST(GNOME_PRINT_CFLAGS)
-  AC_SUBST(GNOME_PRINT_LIBS)
-])
-
-AC_DEFUN([GNOME_PRINT_CHECK], [
-	AM_PATH_GNOME_PRINT($1,,[AC_MSG_ERROR(GNOME-PRINT not found or wrong version)])
-])
--- macros/gnome-xml-check.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-dnl
-dnl GNOME_XML_HOOK (script-if-xml-found, failflag)
-dnl
-dnl If failflag is "failure", script aborts due to lack of XML
-dnl 
-dnl Check for availability of the libxml library
-dnl the XML parser uses libz if available too
-dnl
-
-AC_DEFUN([GNOME_XML_HOOK],[
-	AC_PATH_PROG(GNOME_CONFIG,gnome-config,no)
-	if test "$GNOME_CONFIG" = no; then
-		if test x$2 = xfailure; then
-			AC_MSG_ERROR(Could not find gnome-config)
-		fi
-	fi
-	GNOME_XML_CFLAGS=`$GNOME_CONFIG --cflags xml`
-	AC_SUBST(GNOME_XML_CFLAGS)
-	AC_CHECK_LIB(xml, xmlNewDoc, [
-		$1
-		GNOME_XML_LIB=`$GNOME_CONFIG --libs xml`
-	], [
-		if test x$2 = xfailure; then 
-			AC_MSG_ERROR(Could not link sample xml program)
-		fi
-	], `$GNOME_CONFIG --libs xml`)
-	AC_SUBST(GNOME_XML_LIB)
-])
-
-AC_DEFUN([GNOME_XML_CHECK], [
-	GNOME_XML_HOOK([],failure)
-])
--- macros/gnome-gdk-pixbuf.m4
+++ /dev/null
@@ -1,166 +0,0 @@
-# Configure paths for gdk-pixbuf
-# Elliot Lee 2000-01-10
-# stolen from Raph Levien 98-11-18
-# stolen from Manish Singh    98-9-30
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl GNOME_CHECK_GDK_PIXBUF([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for GDK_PIXBUF, and define GDK_PIXBUF_CFLAGS and GDK_PIXBUF_LIBS
-dnl
-AC_DEFUN(GNOME_CHECK_GDK_PIXBUF,
-[dnl 
-dnl Get the cflags and libraries from the gdk-pixbuf-config script
-dnl
-AC_ARG_WITH(gdk-pixbuf-prefix,[  --with-gdk-pixbuf-prefix=PFX   Prefix where GDK_PIXBUF is installed (optional)],
-            gdk_pixbuf_prefix="$withval", gdk_pixbuf_prefix="")
-AC_ARG_WITH(gdk-pixbuf-exec-prefix,[  --with-gdk-pixbuf-exec-prefix=PFX Exec prefix where GDK_PIXBUF is installed (optional)],
-            gdk_pixbuf_exec_prefix="$withval", gdk_pixbuf_exec_prefix="")
-AC_ARG_ENABLE(gdk_pixbuftest, [  --disable-gdk_pixbuftest       Do not try to compile and run a test GDK_PIXBUF program],
-		    , enable_gdk_pixbuftest=yes)
-
-  if test x$gdk_pixbuf_exec_prefix != x ; then
-     gdk_pixbuf_args="$gdk_pixbuf_args --exec-prefix=$gdk_pixbuf_exec_prefix"
-     if test x${GDK_PIXBUF_CONFIG+set} != xset ; then
-        GDK_PIXBUF_CONFIG=$gdk_pixbuf_exec_prefix/bin/gdk-pixbuf-config
-     fi
-  fi
-  if test x$gdk_pixbuf_prefix != x ; then
-     gdk_pixbuf_args="$gdk_pixbuf_args --prefix=$gdk_pixbuf_prefix"
-     if test x${GDK_PIXBUF_CONFIG+set} != xset ; then
-        GDK_PIXBUF_CONFIG=$gdk_pixbuf_prefix/bin/gdk-pixbuf-config
-     fi
-  fi
-
-  AC_PATH_PROG(GDK_PIXBUF_CONFIG, gdk-pixbuf-config, no)
-  min_gdk_pixbuf_version=ifelse([$1], ,0.2.5,$1)
-  AC_MSG_CHECKING(for GDK_PIXBUF - version >= $min_gdk_pixbuf_version)
-  no_gdk_pixbuf=""
-  if test "$GDK_PIXBUF_CONFIG" = "no" ; then
-    no_gdk_pixbuf=yes
-  else
-    GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --cflags`
-    GDK_PIXBUF_LIBS=`$GDK_PIXBUF_CONFIG $gdk_pixbufconf_args --libs`
-
-    gdk_pixbuf_major_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    gdk_pixbuf_minor_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    gdk_pixbuf_micro_version=`$GDK_PIXBUF_CONFIG $gdk_pixbuf_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_gdk_pixbuftest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
-      LIBS="$LIBS $GDK_PIXBUF_LIBS"
-dnl
-dnl Now check if the installed GDK_PIXBUF is sufficiently new. (Also sanity
-dnl checks the results of gdk-pixbuf-config to some extent
-dnl
-      rm -f conf.gdk_pixbuftest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-
-static char*
-my_strdup (char *str)
-{
-  char *new_str;
-  
-  if (str)
-    {
-      new_str = malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
-  
-  return new_str;
-}
-
-int main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.gdk_pixbuftest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = my_strdup("$min_gdk_pixbuf_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_gdk_pixbuf_version");
-     exit(1);
-   }
-
-   if (($gdk_pixbuf_major_version > major) ||
-      (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version > minor)) ||
-      (($gdk_pixbuf_major_version == major) && ($gdk_pixbuf_minor_version == minor) && ($gdk_pixbuf_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'gdk-pixbuf-config --version' returned %d.%d.%d, but the minimum version\n", $gdk_pixbuf_major_version, $gdk_pixbuf_minor_version, $gdk_pixbuf_micro_version);
-      printf("*** of GDK_PIXBUF required is %d.%d.%d. If gdk-pixbuf-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If gdk-pixbuf-config was wrong, set the environment variable GDK_PIXBUF_CONFIG\n");
-      printf("*** to point to the correct copy of gdk-pixbuf-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-
-],, no_gdk_pixbuf=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_gdk_pixbuf" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$GDK_PIXBUF_CONFIG" = "no" ; then
-       echo "*** The gdk-pixbuf-config script installed by GDK_PIXBUF could not be found"
-       echo "*** If GDK_PIXBUF was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the GDK_PIXBUF_CONFIG environment variable to the"
-       echo "*** full path to gdk-pixbuf-config."
-     else
-       if test -f conf.gdk_pixbuftest ; then
-        :
-       else
-          echo "*** Could not run GDK_PIXBUF test program, checking why..."
-          CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"
-          LIBS="$LIBS $GDK_PIXBUF_LIBS"
-          AC_TRY_LINK([
-#include <stdio.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-],      [ return 0; ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding GDK_PIXBUF or finding the wrong"
-          echo "*** version of GDK_PIXBUF. If it is not finding GDK_PIXBUF, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means GDK_PIXBUF was incorrectly installed"
-          echo "*** or that you have moved GDK_PIXBUF since it was installed. In the latter case, you"
-          echo "*** may want to edit the gdk-pixbuf-config script: $GDK_PIXBUF_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     GDK_PIXBUF_CFLAGS=""
-     GDK_PIXBUF_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(GDK_PIXBUF_CFLAGS)
-  AC_SUBST(GDK_PIXBUF_LIBS)
-  rm -f conf.gdk_pixbuftest
-])
--- macros/gnome-orbit-check.m4
+++ /dev/null
@@ -1,33 +0,0 @@
-dnl
-dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
-dnl
-dnl if failflag is "failure" it aborts if orbit is not found.
-dnl
-
-AC_DEFUN([GNOME_ORBIT_HOOK],[
-	AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
-	AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
-	AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
-		if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
-			gnome_cv_orbit_found=no
-		else
-			gnome_cv_orbit_found=yes
-		fi
-	])
-	AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
-	if test x$gnome_cv_orbit_found = xyes; then
-		$1
-		ORBIT_CFLAGS=`orbit-config --cflags client server`
-		ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
-		AC_SUBST(ORBIT_CFLAGS)
-		AC_SUBST(ORBIT_LIBS)
-	else
-    		if test x$2 = xfailure; then
-			AC_MSG_ERROR(ORBit not installed or installation problem)
-    		fi
-	fi
-])
-
-AC_DEFUN([GNOME_ORBIT_CHECK], [
-	GNOME_ORBIT_HOOK([],failure)
-])
Index: gnome-guile-checks.m4
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/gnome-guile-checks.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lmacros/gnome-guile-checks.m4 -Lmacros/gnome-guile-checks.m4 -u -r1.1 -r1.2
--- macros/gnome-guile-checks.m4
+++ macros/gnome-guile-checks.m4
@@ -94,7 +94,7 @@
 		scm_boot_guile(0,NULL,NULL,NULL);
 	],[
 		ac_cv_guile_found=yes
-		AC_DEFINE(HAVE_GUILE)
+		AC_DEFINE(HAVE_GUILE,1,[Guile present])
 	],[
 		ac_cv_guile_found=no
 	])
--- macros/gnome-vfs.m4
+++ /dev/null
@@ -1,120 +0,0 @@
-dnl GNOME_VFS_CHECKS
-dnl   Check for various functions needed by libvfs.
-dnl   This has various effects:
-dnl     Sets GNOME_VFS_LIBS to libraries required
-dnl     Sets termnet  to true or false depending on whether it is required.
-dnl        If yes, defines USE_TERMNET.
-dnl     Sets vfs_flags to "pretty" list of vfs implementations we include.
-dnl     Sets shell variable use_vfs to yes (default, --with-vfs) or
-dnl        "no" (--without-vfs).
-dnl     Calls AC_SUBST(mcserv), which is either empty or "mcserv".
-
-dnl Private define
-AC_DEFUN([GNOME_WITH_VFS],[
-  dnl FIXME: network checks should probably be in their own macro.
-  AC_CHECK_LIB(nsl, t_accept)
-  AC_CHECK_LIB(socket, socket)
-
-  have_socket=no
-  AC_CHECK_FUNCS(socket, have_socket=yes)
-  if test $have_socket = no; then
-    # socket is not in the default libraries.  See if it's in some other.
-    for lib in bsd socket inet; do
-      AC_CHECK_LIB($lib, socket, [
-	  LIBS="$LIBS -l$lib"
-	  have_socket=yes
-	  AC_DEFINE(HAVE_SOCKET)
-	  break])
-    done
-  fi
-
-  have_gethostbyname=no
-  AC_CHECK_FUNC(gethostbyname, have_gethostbyname=yes)
-  if test $have_gethostbyname = no; then
-    # gethostbyname is not in the default libraries.  See if it's in some other.
-    for lib in bsd socket inet; do
-      AC_CHECK_LIB($lib, gethostbyname, [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
-    done
-  fi
-
-  vfs_flags="tarfs"
-  use_net_code=false
-  if test $have_socket = yes; then
-      AC_STRUCT_LINGER
-      AC_CHECK_FUNCS(pmap_set, , [
-	 AC_CHECK_LIB(rpc, pmap_set, [
-	   LIBS="-lrpc $LIBS"
-	  AC_DEFINE(HAVE_PMAP_SET)
-	  ])])
-      AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport)
-      dnl add for source routing support setsockopt
-      AC_CHECK_HEADERS(rpc/pmap_clnt.h)
-      vfs_flags="$vfs_flags, mcfs, ftpfs, fish"
-      use_net_code=true
-  fi
-
-  dnl
-  dnl Samba support
-  dnl
-  smbfs=""
-  SAMBAFILES=""
-  AC_ARG_WITH(samba,
-  	  [--with-samba	            Support smb virtual file system],[
-  	  if test "x$withval" != "xno"; then
-  		  AC_DEFINE(WITH_SMBFS)
-	          vfs_flags="$vfs_flags, smbfs"
-		  smbfs="smbfs.o"
-		  SAMBAFILES="\$(SAMBAFILES)"
-  	  fi
-  ])
-  AC_SUBST(smbfs)
-  AC_SUBST(SAMBAFILES)
-  
-  dnl
-  dnl The termnet support
-  dnl
-  termnet=false
-  AC_ARG_WITH(termnet,
-	  [--with-termnet             If you want a termified net support],[
-	  if test x$withval = xyes; then
-		  AC_DEFINE(USE_TERMNET)
-		  termnet=true		
-	  fi
-  ])
-
-  TERMNET=""
-  AC_DEFINE(USE_VFS)
-  if $use_net_code; then
-     AC_DEFINE(USE_NETCODE)
-  fi
-  mcserv=
-  if test $have_socket = yes; then
-     mcserv="mcserv"
-     if $termnet; then
-	TERMNET="-ltermnet"
-     fi
-  fi
-
-  AC_SUBST(TERMNET)
-  AC_SUBST(mcserv)
-
-dnl FIXME:
-dnl GNOME_VFS_LIBS=
-
-])
-
-AC_DEFUN([GNOME_VFS_CHECKS],[
-	use_vfs=yes
-	AC_ARG_WITH(vfs,
-		[--with-vfs		   Compile with the VFS code],
-		use_vfs=$withval
-	)
-	case $use_vfs in
-		yes) 	GNOME_WITH_VFS;;
-		no) 	use_vfs=no;;
-		*)   	use_vfs=no;;
-			dnl Should we issue a warning?
-	esac
-])
-
-
Index: autogen.sh
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/autogen.sh,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lmacros/autogen.sh -Lmacros/autogen.sh -u -r1.23 -r1.24
--- macros/autogen.sh
+++ macros/autogen.sh
@@ -3,14 +3,20 @@
 
 DIE=0
 
-GETTEXTIZE=${GETTEXTIZE:-gettextize}
+#GETTEXTIZE=${GETTEXTIZE:-gettextize}
 INTLTOOLIZE=${INTLTOOLIZE:-intltoolize}
 LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
 LIBTOOL=${LIBTOOL:-libtool}
 
 if [ -n "$GNOME2_PATH" ]; then
-	ACLOCAL_FLAGS="-I $GNOME2_PATH/share/aclocal $ACLOCAL_FLAGS"
-	PATH="$GNOME2_PATH/bin:$PATH"
+	for dir in `echo $GNOME2_PATH | sed 's/:/ /g'`; do
+	    if test -d "${dir}/share/aclocal"; then
+		ACLOCAL_FLAGS="${ACLOCAL_FLAGS} -I ${dir}/share/aclocal"
+	    fi;
+	    if test -d "${dir}/bin"; then
+		PATH="${PATH}:${dir}/bin"
+	    fi;
+	done;
 	export PATH
 fi
 
@@ -120,37 +126,37 @@
 	INTL="--intl --no-changelog";;
 esac
 
-#(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
-#  (${LIBTOOL} --version) < /dev/null > /dev/null 2>&1 || {
-#    echo
-#    echo "**Error**: You must have \`libtool' installed to compile GnuCash."
-#    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.2.tar.gz"
-#    echo "(or a newer version if it is available)"
-#    DIE=1
-#  }
-#}
-
-#grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
-#  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
-#  (${GETTEXT} --version) < /dev/null > /dev/null 2>&1 || {
-#    echo
-#    echo "**Error**: You must have \`gettext' installed to compile GnuCash."
-#    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
-#    echo "(or a newer version if it is available)"
-#    DIE=1
-#  }
-#}
-
-#grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
-#  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
-#  (${GETTEXT} --version) < /dev/null > /dev/null 2>&1 || {
-#    echo
-#    echo "**Error**: You must have \`gettext' installed to compile GnuCash."
-#    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
-#    echo "(or a newer version if it is available)"
-#    DIE=1
-#  }
-#}
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+  (${LIBTOOL} --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed to compile GnuCash."
+    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.4.2.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (${GETTEXT} --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed to compile GnuCash."
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (${GETTEXT} --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed to compile GnuCash."
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
 
 (${AUTOMAKE} --version) < /dev/null > /dev/null 2>&1 || {
   echo
@@ -179,7 +185,7 @@
 if test -z "$*"; then
   echo "**Warning**: I am going to run \`configure' with no arguments."
   echo "If you wish to pass any to it, please specify them on the"
-  echo \`$0\'" command line."
+  echo \`$0"' command line."
   echo
 fi
 
@@ -188,7 +194,7 @@
   am_opt=--include-deps;;
 esac
 
-for coin in `find $srcdir -name configure.in -print`
+for coin in "$srcdir/configure.in"
 do 
   dr=`dirname $coin`
   if test -f $dr/NO-AUTO-GEN; then
@@ -197,7 +203,7 @@
     echo processing $dr
     macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
     ( cd $dr
-      macrosdir=`find . -name macros -print`
+      macrodirs="$dr/macros"
       for i in $macrodirs; do
 	if test -f $i/gnome-gettext.m4; then
 	  DELETEFILES="$DELETEFILES $i/gnome-gettext.m4"
@@ -221,16 +227,7 @@
 	  fi
         fi
       done
-      grep "intl/Makefile" configure.in > /dev/null &&
-      ( sed -e 's#^AC_OUTPUT(.*intl/Makefile po/Makefile.in#AC_OUTPUT(#' \
-	  configure.in >configure.in.new && mv configure.in.new configure.in )
-      echo
-      echo "*** WARNING ***"
-      echo "*** We're about to run \"gettext\" which may spew a few paragraphs"
-      echo "*** of crap at you and ask you to acknowledge it.  If it does this,"
-      echo "*** just hit return to acknowledge gettext.  You DO NOT need to do"
-      echo "*** anything that it asks of you except hitting return."
-      echo
+
       if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
 	if grep "sed.*POTFILES" configure.in >/dev/null; then
 	  : do nothing -- we still have an old unmodified configure.in
@@ -242,55 +239,51 @@
 	  echo "Making $dr/aclocal.m4 writable ..."
 	  test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
         fi
+        grep "intl/Makefile" configure.in > /dev/null ||
+        ( sed -e 's#^AC_OUTPUT(#AC_OUTPUT( intl/Makefile po/Makefile.in#' \
+  	configure.in >configure.in.new && mv configure.in.new configure.in )
       fi
       if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
-	echo "Creating $dr/aclocal.m4 ..."
-	test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+        echo "Creating $dr/aclocal.m4 ..."
+        test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
 	echo "(2) Running ${GETTEXTIZE}...  Ignore non-fatal messages."
-	echo "no" | ${GETTEXTIZE} --force --copy $INTL
-	echo "Making $dr/aclocal.m4 writable ..."
-	test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        echo "no" | gettextize --force --copy $INTL
+        echo "Making $dr/aclocal.m4 writable ..."
+        test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        grep "intl/Makefile" configure.in > /dev/null ||
+        ( sed -e 's#^AC_OUTPUT(#AC_OUTPUT( intl/Makefile po/Makefile.in#' \
+  	configure.in >configure.in.new && mv configure.in.new configure.in )
+      fi
+      if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
+        echo "Creating $dr/aclocal.m4 ..."
+        test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+        echo "(3) Running gettextize...  Ignore non-fatal messages."
+        echo "no" | glib-gettextize --force --copy
+        echo "Making $dr/aclocal.m4 writable ..."
+        test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        grep "po/Makefile.in" configure.in > /dev/null ||
+        ( sed -e 's#^AC_OUTPUT(#AC_OUTPUT( po/Makefile.in#' \
+  	configure.in >configure.in.new && mv configure.in.new configure.in )
       fi
-      echo
-      echo "*** WARNING ***"
-      echo "*** Ignore any instruction above about running aclocal by hand."
-      echo "*** I repeat, do not run aclocal by hand.  You have been warned....."
-      echo
-      grep "intl/Makefile" configure.in > /dev/null ||
-      ( sed -e 's#^AC_OUTPUT(#AC_OUTPUT( intl/Makefile po/Makefile.in#' \
-	configure.in >configure.in.new && mv configure.in.new configure.in )
       if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
-        echo "Running ${INTLTOOLIZE} ..."
-        ${INTLTOOLIZE} --copy --force --automake
-      fi 
-#      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
-#	if test -z "$NO_LIBTOOLIZE" ; then 
-#	  echo "Running ${LIBTOOLIZE}..."
-#	  ${LIBTOOLIZE} --force --copy
-#	fi
-#      fi
-      echo "Running ${ACLOCAL} $aclocalinclude ..."
-      ${ACLOCAL} $aclocalinclude || {
-	echo
-	echo "**Error**: aclocal failed. This may mean that you have not"
-	echo "installed all of the packages you need, or you may need to"
-	echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
-	echo "for the prefix where you installed the packages whose"
-	echo "macros were not found"
-	exit 1
-      }
-
-      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+        echo "Running intltoolize ..."
+        intltoolize --force --copy
+      fi
+      if grep "^A[CM]_PROG_LIBTOOL" configure.in >/dev/null; then
+        echo "Running libtoolize..."
+        libtoolize --force --copy
+      fi
+      echo "Running $ACLOCAL $aclocalinclude ..."
+      $ACLOCAL $aclocalinclude
+      if grep "^AC_CONFIG_HEADER" configure.in >/dev/null; then
 	echo "Running ${AUTOHEADER}..."
-	echo "Note: you can ignore messages about using deprecated aux files"
 	${AUTOHEADER} || { echo "**Error**: autoheader failed."; exit 1; }
       fi
-      echo "Running ${AUTOMAKE} --gnu $am_opt ..."
-      ${AUTOMAKE} --add-missing --gnu $am_opt ||
-	{ echo "**Error**: automake failed."; exit 1; }
-      echo "Running ${AUTOCONF} ..."
-      ${AUTOCONF} || { echo "**Error**: autoconf failed."; exit 1; }
-    ) || exit 1
+      echo "Running $AUTOMAKE --gnu $am_opt ..."
+      $AUTOMAKE --add-missing --gnu $am_opt
+      echo "Running autoconf ..."
+      autoconf
+    )
   fi
 done
 
--- macros/gnome-ghttp-check.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-AC_DEFUN([GNOME_GHTTP_CHECK],[
-	AC_REQUIRE([GNOME_INIT_HOOK])
-	GHTTP_LIB=
-	AC_CHECK_FUNC(connect,,[
-	  AC_CHECK_LIB(socket,connect,
-		GHTTP_LIB="-lsocket $GHTTP_LIB",,$GHTTP_LIB)])
-	AC_CHECK_FUNC(gethostbyname,,[
- 	  AC_CHECK_LIB(nsl,gethostbyname,
-		GHTTP_LIB="-lnsl $GHTTP_LIB",,$GHTTP_LIB)])
-	AC_CHECK_LIB(ghttp, ghttp_request_new, 
-		GHTTP_LIB="-lghttp $GHTTP_LIB",GHTTP_LIB="",-L$gnome_prefix $GHTTP_LIB)
-	AC_SUBST(GHTTP_LIB)
-	AC_PROVIDE([GNOME_GHTTP_CHECK])
-])
--- macros/gperf-check.m4
+++ /dev/null
@@ -1,79 +0,0 @@
-dnl
-dnl AC_PROG_GPERF (MINIMUM-VERSION)
-dnl
-dnl Check for availability of gperf.
-dnl Abort if not found or if current version is not up to par.
-dnl
-
-AC_DEFUN([AC_PROG_GPERF],[
-	AC_PATH_PROG(GPERF, gperf, no)
-	if test "$GPERF" = no; then
-		AC_MSG_ERROR(Could not find gperf)
-	fi
-	min_gperf_version=ifelse([$1], ,2.7,$1)
-	AC_MSG_CHECKING(for gperf - version >= $min_gperf_version)
-	gperf_major_version=`$GPERF --version | \
-		sed 's/GNU gperf \([[0-9]]*\).\([[0-9]]*\)/\1/'`
-	gperf_minor_version=`$GPERF --version | \
-		sed 's/GNU gperf \([[0-9]]*\).\([[0-9]]*\)/\2/'`
-	no_gperf=""
-dnl
-dnl Now check if the installed gperf is sufficiently new.
-dnl
-	AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-static char*
-my_strdup (char *str)
-{
-  char *new_str;
-  
-  if (str)
-    {
-      new_str = malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
-  
-  return new_str;
-}
-
-int 
-main ()
-{
-  char  *tmp_version;
-  
-  int    major;
-  int    minor;
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = my_strdup("$min_gperf_version");
-  if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) {
-    printf ("%s, bad version string\n", "$min_gperf_version");
-    exit (1);
-  }
-
-  if (($gperf_major_version > major) ||
-      (($gperf_major_version == major) && ($gperf_minor_version >= minor))) {
-    return 0;
-  } else {
-    printf ("\n");
-    printf ("*** An old version of gperf ($gperf_major_version.$gperf_minor_version) was found.\n");
-    printf ("*** You need a version of gperf newer than %d.%d.%d.  The latest version of\n",
-	       major, minor);
-    printf ("*** gperf is always available from ftp://ftp.gnu.org.\n");
-    printf ("***\n");
-    return 1;
-  }
-}
-],,no_gperf=yes,[/bin/true])
-	if test "x$no_gperf" = x ; then
-		AC_MSG_RESULT(yes)
-	else
-		AC_MSG_RESULT(no)
-	fi
-
-])
--- macros/curses.m4
+++ /dev/null
@@ -1,318 +0,0 @@
-dnl Curses detection: Munged from Midnight Commander's configure.in
-dnl
-dnl What it does:
-dnl =============
-dnl
-dnl - Determine which version of curses is installed on your system
-dnl   and set the -I/-L/-l compiler entries and add a few preprocessor
-dnl   symbols 
-dnl - Do an AC_SUBST on the CURSES_INCLUDEDIR and CURSES_LIBS so that
-dnl   @CURSES_INCLUDEDIR@ and @CURSES_LIBS@ will be available in
-dnl   Makefile.in's
-dnl - Modify the following configure variables (these are the only
-dnl   curses.m4 variables you can access from within configure.in)
-dnl   CURSES_INCLUDEDIR - contains -I's and possibly -DRENAMED_CURSES if
-dnl                       an ncurses.h that's been renamed to curses.h
-dnl                       is found.
-dnl   CURSES_LIBS       - sets -L and -l's appropriately
-dnl   CFLAGS            - if --with-sco, add -D_SVID3 
-dnl   has_curses        - exports result of tests to rest of configure
-dnl
-dnl Usage:
-dnl ======
-dnl 1) Add lines indicated below to acconfig.h
-dnl 2) call AC_CHECK_CURSES after AC_PROG_CC in your configure.in
-dnl 3) Instead of #include <curses.h> you should use the following to
-dnl    properly locate ncurses or curses header file
-dnl
-dnl    #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
-dnl    #include <ncurses.h>
-dnl    #else
-dnl    #include <curses.h>
-dnl    #endif
-dnl
-dnl 4) Make sure to add @CURSES_INCLUDEDIR@ to your preprocessor flags
-dnl 5) Make sure to add @CURSES_LIBS@ to your linker flags or LIBS
-dnl
-dnl Notes with automake:
-dnl - call AM_CONDITIONAL(HAS_CURSES, test "$has_curses" = true) from
-dnl   configure.in
-dnl - your Makefile.am can look something like this
-dnl   -----------------------------------------------
-dnl   INCLUDES= blah blah blah $(CURSES_INCLUDEDIR) 
-dnl   if HAS_CURSES
-dnl   CURSES_TARGETS=name_of_curses_prog
-dnl   endif
-dnl   bin_PROGRAMS = other_programs $(CURSES_TARGETS)
-dnl   other_programs_SOURCES = blah blah blah
-dnl   name_of_curses_prog_SOURCES = blah blah blah
-dnl   other_programs_LDADD = blah
-dnl   name_of_curses_prog_LDADD = blah $(CURSES_LIBS)
-dnl   -----------------------------------------------
-dnl
-dnl
-dnl The following lines should be added to acconfig.h:
-dnl ==================================================
-dnl
-dnl /*=== Curses version detection defines ===*/
-dnl /* Found some version of curses that we're going to use */
-dnl #undef HAS_CURSES
-dnl    
-dnl /* Use SunOS SysV curses? */
-dnl #undef USE_SUNOS_CURSES
-dnl 
-dnl /* Use old BSD curses - not used right now */
-dnl #undef USE_BSD_CURSES
-dnl 
-dnl /* Use SystemV curses? */
-dnl #undef USE_SYSV_CURSES
-dnl 
-dnl /* Use Ncurses? */
-dnl #undef USE_NCURSES
-dnl 
-dnl /* If you Curses does not have color define this one */
-dnl #undef NO_COLOR_CURSES
-dnl 
-dnl /* Define if you want to turn on SCO-specific code */
-dnl #undef SCO_FLAVOR
-dnl 
-dnl /* Set to reflect version of ncurses *
-dnl  *   0 = version 1.*
-dnl  *   1 = version 1.9.9g
-dnl  *   2 = version 4.0/4.1 */
-dnl #undef NCURSES_970530
-dnl
-dnl /*=== End new stuff for acconfig.h ===*/
-dnl 
-
-
-AC_DEFUN([AC_CHECK_CURSES],[
-	search_ncurses=true
-	screen_manager=""
-	has_curses=false
-
-	CFLAGS=${CFLAGS--O}
-
-	AC_SUBST(CURSES_LIBS)
-	AC_SUBST(CURSES_INCLUDEDIR)
-
-	AC_ARG_WITH(sco,
-	  [  --with-sco              Use this to turn on SCO-specific code],[
-	  if test x$withval = xyes; then
-		AC_DEFINE(SCO_FLAVOR)
-		CFLAGS="$CFLAGS -D_SVID3"
-	  fi
-	])
-
-	AC_ARG_WITH(sunos-curses,
-	  [  --with-sunos-curses     Used to force SunOS 4.x curses],[
-	  if test x$withval = xyes; then
-		AC_USE_SUNOS_CURSES
-	  fi
-	])
-
-	AC_ARG_WITH(osf1-curses,
-	  [  --with-osf1-curses      Used to force OSF/1 curses],[
-	  if test x$withval = xyes; then
-		AC_USE_OSF1_CURSES
-	  fi
-	])
-
-	AC_ARG_WITH(vcurses,
-	  [  --with-vcurses[=incdir] Used to force SysV curses],
-	  if test x$withval != xyes; then
-		CURSES_INCLUDEDIR="-I$withval"
-	  fi
-	  AC_USE_SYSV_CURSES
-	)
-
-	AC_ARG_WITH(ncurses,
-	  [  --with-ncurses[=dir]  Compile with ncurses/locate base dir],
-	  if test x$withval = xno ; then
-		search_ncurses=false
-	  elif test x$withval != xyes ; then
-		CURSES_LIBS="$LIBS -L$withval/lib -lncurses"
-		CURSES_INCLUDEDIR="-I$withval/include"
-		search_ncurses=false
-		screen_manager="ncurses"
-		AC_DEFINE(USE_NCURSES)
-		AC_DEFINE(HAS_CURSES)
-		has_curses=true
-	  fi
-	)
-
-	if $search_ncurses
-	then
-		AC_SEARCH_NCURSES()
-	fi
-
-
-])
-
-
-AC_DEFUN([AC_USE_SUNOS_CURSES], [
-	search_ncurses=false
-	screen_manager="SunOS 4.x /usr/5include curses"
-	AC_MSG_RESULT(Using SunOS 4.x /usr/5include curses)
-	AC_DEFINE(USE_SUNOS_CURSES)
-	AC_DEFINE(HAS_CURSES)
-	has_curses=true
-	AC_DEFINE(NO_COLOR_CURSES)
-	AC_DEFINE(USE_SYSV_CURSES)
-	CURSES_INCLUDEDIR="-I/usr/5include"
-	CURSES_LIBS="/usr/5lib/libcurses.a /usr/5lib/libtermcap.a"
-	AC_MSG_RESULT(Please note that some screen refreshs may fail)
-])
-
-AC_DEFUN([AC_USE_OSF1_CURSES], [
-       AC_MSG_RESULT(Using OSF1 curses)
-       search_ncurses=false
-       screen_manager="OSF1 curses"
-       AC_DEFINE(HAS_CURSES)
-       has_curses=true
-       AC_DEFINE(NO_COLOR_CURSES)
-       AC_DEFINE(USE_SYSV_CURSES)
-       CURSES_LIBS="-lcurses"
-])
-
-AC_DEFUN([AC_USE_SYSV_CURSES], [
-	AC_MSG_RESULT(Using SysV curses)
-	AC_DEFINE(HAS_CURSES)
-	has_curses=true
-	AC_DEFINE(USE_SYSV_CURSES)
-	search_ncurses=false
-	screen_manager="SysV/curses"
-	CURSES_LIBS="-lcurses"
-])
-
-dnl AC_ARG_WITH(bsd-curses,
-dnl [--with-bsd-curses         Used to compile with bsd curses, not very fancy],
-dnl 	search_ncurses=false
-dnl	screen_manager="Ultrix/cursesX"
-dnl	if test $system = ULTRIX
-dnl	then
-dnl	    THIS_CURSES=cursesX
-dnl        else
-dnl	    THIS_CURSES=curses
-dnl	fi
-dnl
-dnl	CURSES_LIBS="-l$THIS_CURSES -ltermcap"
-dnl	AC_DEFINE(HAS_CURSES)
-dnl	has_curses=true
-dnl	AC_DEFINE(USE_BSD_CURSES)
-dnl	AC_MSG_RESULT(Please note that some screen refreshs may fail)
-dnl	AC_MSG_WARN(Use of the bsdcurses extension has some)
-dnl	AC_MSG_WARN(display/input problems.)
-dnl	AC_MSG_WARN(Reconsider using xcurses)
-dnl)
-
-	
-dnl
-dnl Parameters: directory filename cureses_LIBS curses_INCLUDEDIR nicename
-dnl
-AC_DEFUN([AC_NCURSES], [
-    if $search_ncurses
-    then
-        if test -f $1/$2
-	then
-	    AC_MSG_RESULT(Found ncurses on $1/$2)
- 	    CURSES_LIBS="$3"
-	    CURSES_INCLUDEDIR="$4"
-	    search_ncurses=false
-	    screen_manager=$5
-            AC_DEFINE(HAS_CURSES)
-            has_curses=true
-	    AC_DEFINE(USE_NCURSES)
-	fi
-    fi
-])
-
-AC_DEFUN([AC_SEARCH_NCURSES], [
-    AC_CHECKING("location of ncurses.h file")
-
-    AC_NCURSES(/usr/include, ncurses.h, -lncurses,, "ncurses on /usr/include")
-    AC_NCURSES(/usr/include/ncurses, ncurses.h, -lncurses, -I/usr/include/ncurses, "ncurses on /usr/include/ncurses")
-    AC_NCURSES(/usr/local/include, ncurses.h, -L/usr/local/lib -lncurses, -I/usr/local/include, "ncurses on /usr/local")
-    AC_NCURSES(/usr/local/include/ncurses, ncurses.h, -L/usr/local/lib -L/usr/local/lib/ncurses -lncurses, -I/usr/local/include/ncurses, "ncurses on /usr/local/include/ncurses")
-
-    AC_NCURSES(/usr/local/include/ncurses, curses.h, -L/usr/local/lib -lncurses, -I/usr/local/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/local/.../ncurses")
-
-    AC_NCURSES(/usr/include/ncurses, curses.h, -lncurses, -I/usr/include/ncurses -DRENAMED_NCURSES, "renamed ncurses on /usr/include/ncurses")
-
-    dnl
-    dnl We couldn't find ncurses, try SysV curses
-    dnl
-    if $search_ncurses 
-    then
-        AC_EGREP_HEADER(init_color, /usr/include/curses.h,
-	    AC_USE_SYSV_CURSES)
-	AC_EGREP_CPP(USE_NCURSES,[
-#include <curses.h>
-#ifdef __NCURSES_H
-#undef USE_NCURSES
-USE_NCURSES
-#endif
-],[
-	CURSES_INCLUDEDIR="$CURSES_INCLUDEDIR -DRENAMED_NCURSES"
-        AC_DEFINE(HAS_CURSES)
-	has_curses=true
-        AC_DEFINE(USE_NCURSES)
-        search_ncurses=false
-        screen_manager="ncurses installed as curses"
-])
-    fi
-
-    dnl
-    dnl Try SunOS 4.x /usr/5{lib,include} ncurses
-    dnl The flags USE_SUNOS_CURSES, USE_BSD_CURSES and BUGGY_CURSES
-    dnl should be replaced by a more fine grained selection routine
-    dnl
-    if $search_ncurses
-    then
-	if test -f /usr/5include/curses.h
-	then
-	    AC_USE_SUNOS_CURSES
-        fi
-    else
-        # check for ncurses version, to properly ifdef mouse-fix
-	AC_MSG_CHECKING(for ncurses version)
-	ncurses_version=unknown
-cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-#include "confdefs.h"
-#ifdef RENAMED_NCURSES
-#include <curses.h>
-#else
-#include <ncurses.h>
-#endif
-#undef VERSION
-VERSION:NCURSES_VERSION
-EOF
-        if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
-  egrep "VERSION:" >conftest.out 2>&1; then
-changequote(,)dnl
-            ncurses_version=`cat conftest.out|sed -e 's/^[^"]*"//' -e 's/".*//'`
-changequote([,])dnl
-	fi
-	rm -rf conftest*
-        AC_MSG_RESULT($ncurses_version)
-	case "$ncurses_version" in
-changequote(,)dnl
-	4.[01])
-changequote([,])dnl
-            AC_DEFINE(NCURSES_970530,2)
-            ;;
-	1.9.9g)
-            AC_DEFINE(NCURSES_970530,1)
-            ;;
-	1*)
-            AC_DEFINE(NCURSES_970530,0)
-            ;;
-	esac
-    fi
-])
-
-
-
-
-
--- macros/gnome-libgtop-check.m4
+++ /dev/null
@@ -1,217 +0,0 @@
-dnl
-dnl LIBGTOP_CHECK_TYPE
-dnl
-dnl Improved version of AC_CHECK_TYPE which takes into account
-dnl that we need to #include some other header files on some
-dnl systems to get some types.
-
-dnl AC_LIBGTOP_CHECK_TYPE(TYPE, DEFAULT)
-AC_DEFUN([AC_LIBGTOP_CHECK_TYPE],
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(ac_cv_type_$1,
-[AC_EGREP_CPP(dnl
-changequote(<<,>>)dnl
-<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
-changequote([,]), [#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-
-/* For Tru64 */
-#ifdef HAVE_SYS_BITYPES_H
-#include <sys/bitypes.h>
-#endif
-], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
-AC_MSG_RESULT($ac_cv_type_$1)
-if test $ac_cv_type_$1 = no; then
-  AC_DEFINE($1, $2)
-fi
-])
-
-dnl
-dnl GNOME_LIBGTOP_TYPES
-dnl
-dnl some typechecks for libgtop.
-dnl
-
-AC_DEFUN([GNOME_LIBGTOP_TYPES],
-[
-	AC_CHECK_HEADERS(sys/bitypes.h)
-	AC_LIBGTOP_CHECK_TYPE(u_int64_t, unsigned long long int)
-	AC_LIBGTOP_CHECK_TYPE(int64_t, signed long long int)
-])
-
-dnl
-dnl GNOME_LIBGTOP_HOOK (minversion, script-if-libgtop-enabled, failflag)
-dnl
-dnl if failflag is "fail" then GNOME_LIBGTOP_HOOK will abort if LibGTop
-dnl is not found. 
-dnl
-
-AC_DEFUN([GNOME_LIBGTOP_HOOK],
-[	
-	AC_REQUIRE([GNOME_LIBGTOP_TYPES])
-
-	AC_SUBST(LIBGTOP_LIBDIR)
-	AC_SUBST(LIBGTOP_INCLUDEDIR)
-	AC_SUBST(LIBGTOP_EXTRA_LIBS)
-	AC_SUBST(LIBGTOP_LIBS)
-	AC_SUBST(LIBGTOP_INCS)
-	AC_SUBST(LIBGTOP_NAMES_LIBS)
-	AC_SUBST(LIBGTOP_NAMES_INCS)
-	AC_SUBST(LIBGTOP_MAJOR_VERSION)
-	AC_SUBST(LIBGTOP_MINOR_VERSION)
-	AC_SUBST(LIBGTOP_MICRO_VERSION)
-	AC_SUBST(LIBGTOP_VERSION)
-	AC_SUBST(LIBGTOP_VERSION_CODE)
-	AC_SUBST(LIBGTOP_SERVER_VERSION)
-	AC_SUBST(LIBGTOP_INTERFACE_AGE)
-	AC_SUBST(LIBGTOP_BINARY_AGE)
-	AC_SUBST(LIBGTOP_BINDIR)
-	AC_SUBST(LIBGTOP_SERVER)
-
-	dnl Get the cflags and libraries from the libgtop-config script
-	dnl
-	AC_ARG_WITH(libgtop,
-	[  --with-libgtop=PFX      Prefix where LIBGTOP is installed (optional)],
-	libgtop_config_prefix="$withval", libgtop_config_prefix="")
-	AC_ARG_WITH(libgtop-exec,
-	[  --with-libgtop-exec=PFX Exec prefix where LIBGTOP is installed (optional)],
-	libgtop_config_exec_prefix="$withval", libgtop_config_exec_prefix="")
-
-	if test x$libgtop_config_exec_prefix != x ; then
-	  libgtop_config_args="$libgtop_config_args --exec-prefix=$libgtop_config_exec_prefix"
-	  if test x${LIBGTOP_CONFIG+set} != xset ; then
-	    LIBGTOP_CONFIG=$libgtop_config_exec_prefix/bin/libgtop-config
-	  fi
-	fi
-	if test x$libgtop_config_prefix != x ; then
-	  libgtop_config_args="$libgtop_config_args --prefix=$libgtop_config_prefix"
-	  if test x${LIBGTOP_CONFIG+set} != xset ; then
-	    LIBGTOP_CONFIG=$libgtop_config_prefix/bin/libgtop-config
-	  fi
-	fi
-
-	AC_PATH_PROG(LIBGTOP_CONFIG, libgtop-config, no)
-	dnl IMPORTANT NOTICE:
-	dnl   If you increase this number here, this means that *ALL*
-	dnl   modules will require the new version, even if they explicitly
-	dnl   give a lower number in their `configure.in' !!!
-	real_min_libgtop_version=1.0.0
-	min_libgtop_version=ifelse([$1], ,$real_min_libgtop_version,$1)
-	dnl I know, the following code looks really ugly, but if you want
-	dnl to make changes, please test it with a brain-dead /bin/sh and
-	dnl with a brain-dead /bin/test (not all shells/tests support the
-	dnl `<' operator to compare strings, that's why I convert everything
-	dnl into numbers and test them).
-	min_libgtop_major=`echo $min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-	min_libgtop_minor=`echo $min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-	min_libgtop_micro=`echo $min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-	test x$min_libgtop_micro = x && min_libgtop_micro=0
-	real_min_libgtop_major=`echo $real_min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-	real_min_libgtop_minor=`echo $real_min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-	real_min_libgtop_micro=`echo $real_min_libgtop_version | \
-	  sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-	test x$real_min_libgtop_micro = x && real_min_libgtop_micro=0
-	dnl You cannot require a version less then $real_min_libgtop_version,
-	dnl so you don't need to update each `configure.in' when it's increased.
-	if test $real_min_libgtop_major -gt $min_libgtop_major ; then
-	  min_libgtop_major=$real_min_libgtop_major
-	  min_libgtop_minor=$real_min_libgtop_minor
-	  min_libgtop_micro=$real_min_libgtop_micro
-	elif test $real_min_libgtop_major = $min_libgtop_major ; then
-	  if test $real_min_libgtop_minor -gt $min_libgtop_minor ; then
-	    min_libgtop_minor=$real_min_libgtop_minor
-	    min_libgtop_micro=$real_min_libgtop_micro
-	  elif test $real_min_libgtop_minor = $min_libgtop_minor ; then
-	    if test $real_min_libgtop_micro -gt $min_libgtop_micro ; then
-	      min_libgtop_micro=$real_min_libgtop_micro
-	    fi
-	  fi
-	fi
-	min_libgtop_version="$min_libgtop_major.$min_libgtop_minor.$min_libgtop_micro"
-	AC_MSG_CHECKING(for libgtop - version >= $min_libgtop_version)
-	no_libgtop=""
-	if test "$LIBGTOP_CONFIG" = "no" ; then
-	  no_libgtop=yes
-	else
-	  configfile=`$LIBGTOP_CONFIG --config`
-	  libgtop_major_version=`$LIBGTOP_CONFIG --version | \
-	    sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-	  libgtop_minor_version=`$LIBGTOP_CONFIG --version | \
-	    sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-	  libgtop_micro_version=`$LIBGTOP_CONFIG --version | \
-	    sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-	  if test $libgtop_major_version != $min_libgtop_major ; then 
-	    no_libgtop=mismatch
-	  else 
- 	    test $libgtop_minor_version -lt $min_libgtop_minor && no_libgtop=yes
-	    if test $libgtop_minor_version = $min_libgtop_minor ; then
-	      test $libgtop_micro_version -lt $min_libgtop_micro && no_libgtop=yes
-	    fi
-	  fi
-	  . $configfile
-	fi
-	if test x$no_libgtop = x ; then
-	  AC_DEFINE(HAVE_LIBGTOP)
-	  AC_DEFINE_UNQUOTED(LIBGTOP_VERSION, "$LIBGTOP_VERSION")
-	  AC_DEFINE_UNQUOTED(LIBGTOP_VERSION_CODE, $LIBGTOP_VERSION_CODE)
-	  AC_DEFINE_UNQUOTED(LIBGTOP_MAJOR_VERSION, $LIBGTOP_MAJOR_VERSION)
-	  AC_DEFINE_UNQUOTED(LIBGTOP_MINOR_VERSION, $LIBGTOP_MINOR_VERSION)
-	  AC_DEFINE_UNQUOTED(LIBGTOP_MICRO_VERSION, $LIBGTOP_MICRO_VERSION)
-	  AC_DEFINE_UNQUOTED(LIBGTOP_SERVER_VERSION, $LIBGTOP_SERVER_VERSION)
-	  AC_MSG_RESULT(yes)
-	  dnl Note that an empty true branch is not valid sh syntax.
-	  ifelse([$2], [], :, [$2])
-	else
-	  AC_MSG_RESULT(no)
-	  if test "$no_libgtop"x = mismatchx; then
-	    AC_MSG_ERROR(LibGTop major version mismatch $libgtop_major_version != $min_libgtop_major)
-	  fi
-	  if test "x$3" = "xfail"; then
-	    AC_MSG_ERROR(LibGTop >= $min_libgtop_version not found)
-	  else
-	    AC_MSG_WARN(LibGTop >= $min_libgtop_version not found)
-	  fi
-	fi
-
-	AM_CONDITIONAL(HAVE_LIBGTOP, test x$no_libgtop != xyes)
-])
-
-AC_DEFUN([GNOME_INIT_LIBGTOP],[
-	GNOME_LIBGTOP_HOOK($1,[ifelse([$3], [], :, [$3])],$2)
-])
-
-dnl
-dnl GNOME_LIBGTOP_DOCU
-dnl
-dnl checks whether the documentation of LibGTop is installed
-dnl
-
-AC_DEFUN([GNOME_LIBGTOP_DOCU],
-[
-	AC_REQUIRE([GNOME_LIBGTOP_HOOK])
-
-	helpdir="$LIBGTOP_DATADIR/gnome/help/libgtop"
-
-	AC_MSG_CHECKING(whether you have the LibGTop Documentation)
-
-	if test -f "$helpdir/C/topic.dat" ; then
-	  have_libgtop_docu=yes
-	  AC_DEFINE(HAVE_LIBGTOP_DOCU)
-	else
-	  have_libgtop_docu=no
-	fi
-
-	AC_MSG_RESULT($have_libgtop_docu)
-
-	AM_CONDITIONAL(HAVE_LIBGTOP_DOCU, test x$have_libgtop_docu = xyes)
-])
-
--- macros/gnome-pthread-check.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-dnl
-dnl And better, use gthreads instead...
-dnl
-
-AC_DEFUN([GNOME_PTHREAD_CHECK],[
-	PTHREAD_LIB=""
-	AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread",
-		[AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads",
-		    [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r",
-			[AC_CHECK_FUNC(pthread_create)]
-		    )]
-		)]
-	)
-	AC_SUBST(PTHREAD_LIB)
-	AC_PROVIDE([GNOME_PTHREAD_CHECK])
-])
--- macros/acx_pthread.m4
+++ /dev/null
@@ -1,234 +0,0 @@
-dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
-dnl
-dnl This macro figures out how to build C programs using POSIX
-dnl threads.  It sets the PTHREAD_LIBS output variable to the threads
-dnl library and linker flags, and the PTHREAD_CFLAGS output variable
-dnl to any special C compiler flags that are needed.  (The user can also
-dnl force certain compiler flags/libs to be tested by setting these
-dnl environment variables.)
-dnl
-dnl Also sets PTHREAD_CC to any special C compiler that is needed for
-dnl multi-threaded programs (defaults to the value of CC otherwise).
-dnl (This is necessary on AIX to use the special cc_r compiler alias.)
-dnl
-dnl If you are only building threads programs, you may wish to
-dnl use these variables in your default LIBS, CFLAGS, and CC:
-dnl
-dnl        LIBS="$PTHREAD_LIBS $LIBS"
-dnl        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-dnl        CC="$PTHREAD_CC"
-dnl
-dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
-dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE
-dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
-dnl
-dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
-dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands
-dnl to run it if it is not found.  If ACTION-IF-FOUND is not specified,
-dnl the default action will define HAVE_PTHREAD.
-dnl
-dnl Please let the authors know if this macro fails on any platform,
-dnl or if you have any other suggestions or comments.  This macro was
-dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org)
-dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread
-dnl macros posted by AFC to the autoconf macro repository.  We are also
-dnl grateful for the helpful feedback of numerous users.
-dnl
-dnl @author Steven G. Johnson <stevenj at alum.mit.edu> and Alejandro Forero Cuervo <bachue at bachue.com>
-
-AC_DEFUN([ACX_PTHREAD], [
-AC_REQUIRE([AC_CANONICAL_HOST])
-AC_LANG_SAVE
-AC_LANG_C
-acx_pthread_ok=no
-
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
-        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
-        fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all.
-
-#acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
-
-acx_pthread_flags="pthreads none lthread pthread"
-
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-
-case "${host_cpu}-${host_os}" in
-        *solaris*)
-
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
-
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-        ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
-        case $flag in
-                none)
-                AC_MSG_CHECKING([whether pthreads work without any flags])
-                ;;
-
-                -*)
-                AC_MSG_CHECKING([whether pthreads work with $flag])
-                PTHREAD_CFLAGS="$flag"
-                ;;
-
-                *)
-                AC_MSG_CHECKING([for the pthreads library -l$flag])
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
-
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-        AC_TRY_LINK([#include <pthread.h>],
-                    [pthread_t th; pthread_join(th, 0);
-                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
-                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
-                    [acx_pthread_ok=yes])
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        AC_MSG_RESULT($acx_pthread_ok)
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
-
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
-
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-
-        # Detect AIX lossage: threads are created detached by default
-        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
-        AC_MSG_CHECKING([for joinable pthread attribute])
-        AC_TRY_LINK([#include <pthread.h>],
-                    [int attr=PTHREAD_CREATE_JOINABLE;],
-                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
-        if test x"$ok" = xunknown; then
-                AC_TRY_LINK([#include <pthread.h>],
-                            [int attr=PTHREAD_CREATE_UNDETACHED;],
-                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
-        fi
-        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
-                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
-                          [Define to the necessary symbol if this constant
-                           uses a non-standard name on your system.])
-        fi
-        AC_MSG_RESULT(${ok})
-        if test x"$ok" = xunknown; then
-                AC_MSG_WARN([we do not know how to create joinable pthreads])
-        fi
-
-        AC_MSG_CHECKING([if more special flags are required for pthreads])
-        flag=no
-        case "${host_cpu}-${host_os}" in
-                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
-                *-osf* | *-hpux*) flag="-D_REENTRANT";;
-                *solaris*)
-                if test "$GCC" = "yes"; then
-                    flag="-D_REENTRANT"
-                else
-                    flag="-mt -D_REENTRANT"
-                fi
-                ;;
-        esac
-        AC_MSG_RESULT(${flag})
-        if test "x$flag" != xno; then
-                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
-
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-
-        # More AIX lossage: must compile with cc_r
-        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
-else
-        PTHREAD_CC="$CC"
-fi
-
-AC_SUBST(PTHREAD_LIBS)
-AC_SUBST(PTHREAD_CFLAGS)
-AC_SUBST(PTHREAD_CC)
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
-        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
-        :
-else
-        acx_pthread_ok=no
-        $2
-fi
-AC_LANG_RESTORE
-])dnl ACX_PTHREAD
--- macros/aclocal-include.m4
+++ /dev/null
@@ -1,16 +0,0 @@
-# aclocal-include.m4
-# 
-# This macro adds the name macrodir to the set of directories
-# that `aclocal' searches for macros.  
-
-# serial 1
-
-dnl AM_ACLOCAL_INCLUDE(macrodir)
-AC_DEFUN([AM_ACLOCAL_INCLUDE],
-[
-	AM_CONDITIONAL(INSIDE_GNOME_COMMON, test x = y)
-
-	test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-
-	for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done
-])
--- macros/gnome-x-checks.m4
+++ /dev/null
@@ -1,80 +0,0 @@
-dnl GNOME_X_CHECKS
-dnl
-dnl Basic X11 related checks for X11.  At the end, the following will be
-dnl defined/changed:
-dnl   GTK_{CFLAGS,LIBS}      From AM_PATH_GTK
-dnl   CPPFLAGS		     Will include $X_CFLAGS
-dnl   GNOME_HAVE_SM	     `true' or `false' depending on whether session
-dnl                          management is available.  It is available if
-dnl                          both -lSM and X11/SM/SMlib.h exist.  (Some
-dnl                          Solaris boxes have the library but not the header)
-dnl   XPM_LIBS               -lXpm if Xpm library is present, otherwise ""
-dnl
-dnl The following configure cache variables are defined (but not used):
-dnl   gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS}
-dnl
-AC_DEFUN([GNOME_X_CHECKS],
-[
-	AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path))
-	dnl Hope that GTK_CFLAGS have only -I and -D.  Otherwise, we could
-	dnl   test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes"
-	dnl
-	dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses
-	dnl CPPFLAGS, not CFLAGS
-        CPPFLAGS="$CPPFLAGS $GTK_CFLAGS"
-
-        saved_ldflags="$LDFLAGS"
-        LDFLAGS="$LDFLAGS $GTK_LIBS"
-
-	gnome_cv_passdown_x_libs="$GTK_LIBS"
-	gnome_cv_passdown_X_LIBS="$GTK_LIBS"
-	gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS"
-	gnome_cv_passdown_GTK_LIBS="$GTK_LIBS"
-
-        LDFLAGS="$saved_ldflags $GTK_LIBS"
-
-dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow.
-	USE_DEVGTK=true
-
-dnl	AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x])
-dnl	AC_EGREP_CPP(answer_affirmatively,
-dnl	[#include <gtk/gtkfeatures.h>
-dnl	#ifdef GTK_HAVE_FEATURES_1_1_0
-dnl	   answer_affirmatively
-dnl	#endif
-dnl	], dev_gtk=yes, dev_gtk=no)
-dnl	if test "$dev_gtk" = "yes"; then
-dnl	   USE_DEVGTK=true
-dnl	fi
-dnl	AC_MSG_RESULT("$dev_gtk")
-
-	GNOME_HAVE_SM=true
-	case "$GTK_LIBS" in
-	 *-lSM*)
-	    dnl Already found it.
-	    ;;
-	 *)
-	    dnl Assume that if we have -lSM then we also have -lICE.
-	    AC_CHECK_LIB(SM, SmcSaveYourselfDone,
-	        [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false,
-		$x_libs -lICE)
-	    ;;
-	esac
-
-	if test "$GNOME_HAVE_SM" = true; then
-	   AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false)
-	fi
-
-	if test "$GNOME_HAVE_SM" = true; then
-	   AC_DEFINE(HAVE_LIBSM)
-	fi
-
-	XPM_LIBS=""
-	AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs)
-	AC_SUBST(XPM_LIBS)
-
-	AC_REQUIRE([GNOME_PTHREAD_CHECK])
-        LDFLAGS="$saved_ldflags"
-
-	AC_PROVIDE([GNOME_X_CHECKS])
-])
--- macros/need-declaration.m4
+++ /dev/null
@@ -1,42 +0,0 @@
-dnl See whether we need a declaration for a function.
-dnl GCC_NEED_DECLARATION(FUNCTION [, EXTRA-HEADER-FILES])
-AC_DEFUN([GCC_NEED_DECLARATION],
-[AC_MSG_CHECKING([whether $1 must be declared])
-AC_CACHE_VAL(gcc_cv_decl_needed_$1,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-$2],
-[char *(*pfn) = (char *(*)) $1],
-eval "gcc_cv_decl_needed_$1=no", eval "gcc_cv_decl_needed_$1=yes")])
-if eval "test \"`echo '$gcc_cv_decl_needed_'$1`\" = yes"; then
-  AC_MSG_RESULT(yes)
-  gcc_need_declarations="$gcc_need_declarations $1"
-  gcc_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  AC_DEFINE_UNQUOTED($gcc_tr_decl)
-else
-  AC_MSG_RESULT(no)
-fi
-])dnl
-
-dnl Check multiple functions to see whether each needs a declaration.
-dnl GCC_NEED_DECLARATIONS(FUNCTION... [, EXTRA-HEADER-FILES])
-AC_DEFUN([GCC_NEED_DECLARATIONS],
-[for ac_func in $1
-do
-GCC_NEED_DECLARATION($ac_func, $2)
-done
-]
-)
--- macros/gnome-undelfs.m4
+++ /dev/null
@@ -1,20 +0,0 @@
-dnl GNOME_UNDELFS_CHECKS
-dnl    Check for ext2fs undel support.
-dnl    Set shell variable ext2fs_undel to "yes" if we have it,
-dnl    "no" otherwise.  May define USE_EXT2FSLIB for cpp.
-dnl    Will set EXT2FS_UNDEL_LIBS to required libraries.
-
-AC_DEFUN([GNOME_UNDELFS_CHECKS], [
-  AC_CHECK_HEADERS(ext2fs/ext2fs.h linux/ext2_fs.h)
-  ext2fs_undel=no
-  EXT2FS_UNDEL_LIBS=
-  if test x$ac_cv_header_ext2fs_ext2fs_h = xyes
-  then
-    if test x$ac_cv_header_linux_ext2_fs_h = xyes
-    then
-      AC_DEFINE(USE_EXT2FSLIB)
-      ext2fs_undel=yes
-      EXT2FS_UNDEL_LIBS="-lext2fs -lcom_err"
-    fi
-  fi
-])
--- macros/gnome-common.m4
+++ /dev/null
@@ -1,14 +0,0 @@
-# gnome-common.m4
-# 
-# This only for packages that are not in the GNOME CVS tree.
-
-dnl GNOME_COMMON_INIT
-
-AC_DEFUN([GNOME_COMMON_INIT],
-[
-	GNOME_ACLOCAL_DIR="$GNOME_COMMON_MACROS_DIR"
-	AC_SUBST(GNOME_ACLOCAL_DIR)
-
-	ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
-])
-
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/macros/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lmacros/.cvsignore -Lmacros/.cvsignore -u -r1.1 -r1.2
--- macros/.cvsignore
+++ macros/.cvsignore
@@ -2,3 +2,4 @@
 Makefile
 macros.dep
 gnome-macros.dep
+intltool.m4
--- macros/gnome-bonobo-check.m4
+++ /dev/null
@@ -1,166 +0,0 @@
-# Configure paths for Bonobo
-# Miguel de Icaza, 99-04-12
-# Stolen from Chris Lahey	99-2-5
-# stolen from Manish Singh again
-# stolen back from Frank Belew
-# stolen from Manish Singh
-# Shamelessly stolen from Owen Taylor
-
-dnl AM_PATH_BONOBO ([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for Bonobo, and define BONOBO_CFLAGS and BONOBO_LIBS
-dnl
-AC_DEFUN([AM_PATH_BONOBO],
-[
-dnl 
-dnl Get the cflags and libraries from the gnome-config script
-dnl
-AC_ARG_WITH(bonobo-prefix,[  --with-bonobo-prefix=PFX   Prefix where Bonobo is installed (optional)],
-            bonobo_prefix="$withval", bonobo_prefix="")
-AC_ARG_WITH(bonobo-exec-prefix,[  --with-bonobo-exec-prefix=PFX Exec prefix where Bonobo is installed (optional)],
-            bonobo_exec_prefix="$withval", bonobo_exec_prefix="")
-AC_ARG_ENABLE(bonobotest, [  --disable-bonobotest       Do not try to compile and run a test Bonobo program],
-		    , enable_bonobotest=yes)
-
-  if test x$bonobo_exec_prefix != x ; then
-     bonobo_args="$bonobo_args --exec-prefix=$bonobo_exec_prefix"
-     if test x${GNOME_CONFIG+set} != xset ; then
-        GNOME_CONFIG=$bonobo_exec_prefix/bin/gnome-config
-     fi
-  fi
-  if test x$bonobo_prefix != x ; then
-     bonobo_args="$bonobo_args --prefix=$bonobo_prefix"
-     if test x${GNOME_CONFIG+set} != xset ; then
-        GNOME_CONFIG=$bonobo_prefix/bin/gnome-config
-     fi
-  fi
-
-  AC_PATH_PROG(GNOME_CONFIG, gnome-config, no)
-  min_bonobo_version=ifelse([$1], ,0.1.0,$1)
-  AC_MSG_CHECKING(for BONOBO - version >= $min_bonobo_version)
-  no_bonobo=""
-  if test "$GNOME_CONFIG" = "no" ; then
-    no_bonobo=yes
-  else
-    BONOBO_CFLAGS=`$GNOME_CONFIG $bonoboconf_args --cflags bonobo bonobox`
-    BONOBO_LIBS=`$GNOME_CONFIG $bonoboconf_args --libs bonobo bonobox`
-
-    bonobo_major_version=`$GNOME_CONFIG $bonobo_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    bonobo_minor_version=`$GNOME_CONFIG $bonobo_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
-    bonobo_micro_version=`$GNOME_CONFIG $bonobo_config_args --version | \
-           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
-    if test "x$enable_bonobotest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $BONOBO_CFLAGS"
-      LIBS="$LIBS $BONOBO_LIBS"
-dnl
-dnl Now check if the installed BONOBO is sufficiently new. (Also sanity
-dnl checks the results of gnome-config to some extent
-dnl
-      rm -f conf.bonobotest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <bonobo.h>
-
-static char*
-my_strdup (char *str)
-{
-  char *new_str;
-  
-  if (str)
-    {
-      new_str = malloc ((strlen (str) + 1) * sizeof(char));
-      strcpy (new_str, str);
-    }
-  else
-    new_str = NULL;
-  
-  return new_str;
-}
-
-int main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.bonobotest");
-  bonobo_object_get_type ();
-  return 0;
-}
-
-],, no_bonobo=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_bonobo" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])     
-  else
-     AC_MSG_RESULT(no)
-     if test "$GNOME_CONFIG" = "no" ; then
-       echo "*** The gnome-config script installed by GNOME-LIBS could not be found"
-       echo "*** If BONOBO was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the GNOME_CONFIG environment variable to the"
-       echo "*** full path to gnome-config."
-     else
-       if test -f conf.bonobotest ; then
-        :
-       else
-          echo "*** Could not run BONOBO test program, checking why..."
-          CFLAGS="$CFLAGS $BONOBO_CFLAGS"
-          LIBS="$LIBS $BONOBO_LIBS"
-          AC_TRY_LINK([
-#include <stdio.h>
-#include <bonobo/gnome-object.h>
-],      [ return 0; ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding BONOBO or finding the wrong"
-          echo "*** version of BONOBO. If it is not finding BONOBO, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means BONOBO was incorrectly installed"
-          echo "*** or that you have moved BONOBO since it was installed. In the latter case, you"
-          echo "*** may want to edit the gnome-config script: $GNOME_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     BONOBO_CFLAGS=""
-     BONOBO_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(BONOBO_CFLAGS)
-  AC_SUBST(BONOBO_LIBS)
-  rm -f conf.bonobotest
-])
-
-AC_DEFUN([BONOBO_CHECK], [
-	AM_PATH_BONOBO(0.1.0,,[AC_MSG_ERROR(BONOBO not found)])
-])
-
-AC_DEFUN([AM_BONOBO_USES_OAF],
-[
-	AC_REQUIRE([AM_PATH_BONOBO])
-
-	AC_MSG_CHECKING(if Bonobo uses OAF)
-	if ( gnome-config --libs bonobo | grep oaf ) > /dev/null 2>&1 ; then
-	  using_oaf="yes"
-	  AC_DEFINE(BONOBO_USES_OAF)
-	else
-	  using_oaf="no"
-	fi
-
-	AC_MSG_RESULT("$using_oaf")
-
-	AM_CONDITIONAL(BONOBO_USES_OAF, test x"using_oaf" = "xyes")
-])
--- macros/Makefile.am
+++ /dev/null
@@ -1,50 +0,0 @@
-## Please update this variable if any new macros are created
-
-MACROS=						\
-  aclocal-include.m4				\
-  acx_pthread.m4				\
-  as-scrub-include.m4				\
-  compiler-flags.m4				\
-  curses.m4					\
-  gnome-bonobo-check.m4				\
-  gnome-common.m4				\
-  gnome-cxx-check.m4				\
-  gnome-fileutils.m4				\
-  gnome-gdk-pixbuf.m4                           \
-  gnome-gettext.m4				\
-  gnome-ghttp-check.m4				\
-  gnome-gnorba-check.m4				\
-  gnome-guile-checks.m4				\
-  gnome-libgtop-check.m4			\
-  gnome-objc-checks.m4				\
-  gnome-orbit-check.m4				\
-  gnome-pilot.m4				\
-  gnome-print-check.m4				\
-  gnome-pthread-check.m4			\
-  gnome-support.m4				\
-  gnome-undelfs.m4				\
-  gnome-vfs.m4					\
-  gnome-x-checks.m4				\
-  gnome-xml-check.m4				\
-  gnome.m4					\
-  gperf-check.m4				\
-  linger.m4					\
-  need-declaration.m4				\
-  aqbanking.m4
-
-EXTRA_DIST=$(MACROS) gnome-common.m4 autogen.sh
-MAINTAINERCLEANFILES=macros.dep
-
- at MAINT@macros.dep: Makefile.am
- at MAINT@	@echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=macros/%)' > $@
-
-if INSIDE_GNOME_COMMON
-gnome_aclocaldir = $(datadir)/aclocal/gnome-macros
-
-gnome-macros.dep: Makefile.am
-	@echo '$$(top_srcdir)/aclocal.m4: $(MACROS:%=$(gnome_aclocaldir)/%)' > $@
-
-gnome_aclocal_DATA = $(MACROS) gnome-macros.dep gnome-common.m4 \
-	autogen.sh
-
-endif
--- macros/gnome-cxx-check.m4
+++ /dev/null
@@ -1,10 +0,0 @@
-dnl GNOME_CHECK_CXX(not_found_string)
-AC_DEFUN([GNOME_CHECK_CXX],
-[
-  # see if a C++ compiler exists and works
-  AC_REQUIRE([AC_PROG_CXX])dnl
-  if test "x$ac_cv_prog_cxx_works" = xno; then
-    AC_MSG_WARN(ifelse([$1], , "No C++ compiler", [$1]))
-  fi
-  AM_CONDITIONAL(CXX_PRESENT, test "x$ac_cv_prog_cxx_works" != xno)
-])
--- macros/README
+++ /dev/null
@@ -1,2 +0,0 @@
-This is the macros directory from the gnome-common package
-and should be kept in sync with it.
Index: POTFILES.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/po/POTFILES.in,v
retrieving revision 1.98
retrieving revision 1.99
diff -Lpo/POTFILES.in -Lpo/POTFILES.in -u -r1.98 -r1.99
--- po/POTFILES.in
+++ po/POTFILES.in
@@ -1,460 +1,577 @@
 # List of files which containing translatable strings.
 # This file was generated by ../make-gnucash-potfiles.in.
 
-src/app-file/gnome/gnc-file-dialog.c
-src/app-file/gnome/gnc-file-history.c
-src/app-file/gnc-file.c
-src/app-file/gncmod-app-file.c
-src/app-file/test/test-link.c
-src/app-utils/test/test-exp-parser.c
-src/app-utils/test/test-link-module.c
+src/tax/us/test/test-link-module.c
+src/tax/us/gncmod-tax-us.c
+src/gnc-module/test/test-dynload.c
+src/gnc-module/test/test-agedver.c
+src/gnc-module/test/mod-bar/bar.c
+src/gnc-module/test/mod-bar/gnc-mod-bar.c
+src/gnc-module/test/mod-baz/baz.c
+src/gnc-module/test/mod-baz/gnc-mod-baz.c
+src/gnc-module/test/mod-foo/foo.c
+src/gnc-module/test/mod-foo/gnc-mod-foo.c
+src/gnc-module/test/test-modsysver.c
+src/gnc-module/test/test-incompatdep.c
+src/gnc-module/test/misc-mods/futuremodsys.c
+src/gnc-module/test/misc-mods/incompatdep.c
+src/gnc-module/test/misc-mods/agedver.c
+src/gnc-module/test/test-load-c.c
+src/gnc-module/gnc-module.c
+src/calculation/test/test-link.c
+src/calculation/amort_opt.c
+src/calculation/amort_prt.c
+src/calculation/fin.c
+src/calculation/gncmod-calculation.c
+src/calculation/fin-main.c
+src/calculation/fin-interactive.c
+src/calculation/numeric_ops.c
+src/calculation/expression_parser.c
+src/gnome/druid-budget-create.c
+src/gnome/dialog-fincalc.c
+src/gnome/druid-merge.c
+src/gnome/lot-viewer.c
+src/gnome/glade/chart-export.glade
+src/gnome/glade/budget.glade
+src/gnome/glade/merge.glade
+src/gnome/glade/tax.glade
+src/gnome/glade/totd.glade
+src/gnome/glade/progress.glade
+src/gnome/glade/lots.glade
+src/gnome/glade/userpass.glade
+src/gnome/glade/sched-xact.glade
+src/gnome/glade/newuser.glade
+src/gnome/glade/register.glade
+src/gnome/glade/stocks.glade
+src/gnome/glade/reconcile.glade
+src/gnome/glade/commodities.glade
+src/gnome/glade/fincalc.glade
+src/gnome/glade/print.glade
+src/gnome/glade/account.glade
+src/gnome/glade/price.glade
+src/gnome/glade/acctperiod.glade
+src/gnome/dialog-new-user.c
+src/gnome/dialog-userpass.c
+src/gnome/druid-hierarchy.c
+src/gnome/top-level.c
+src/gnome/gnc-plugin-register.c
+src/gnome/window-main-summarybar.c
+src/gnome/dialog-price-editor.c
+src/gnome/dialog-chart-export.c
+src/gnome/druid-stock-split.c
+src/gnome/reconcile-list.c
+src/gnome/druid-loan.c
+src/gnome/dialog-sxsincelast.c
+src/gnome/gnc-split-reg.c
+src/gnome/dialog-budget-list.c
+src/gnome/dialog-print-check.c
+src/gnome/dialog-scheduledxaction.c
+src/gnome/dialog-sx-from-trans.c
+src/gnome/dialog-budget-category.c
+src/gnome/gnc-plugin-page-register.c
+src/gnome/dialog-budget-workbench.c
+src/gnome/dialog-commodities.c
+src/gnome/dialog-price-edit-db.c
+src/gnome/gnucash.desktop.in
+src/gnome/dialog-progress.c
+src/gnome/gnc-plugin-account-tree.c
+src/gnome/dialog-totd.c
+src/gnome/gnc-plugin-basic-commands.c
+src/gnome/dialog-find-transactions.c
+src/gnome/window-reconcile.c
+src/gnome/dialog-tax-info.c
+src/gnome/druid-acct-period.c
+src/gnome/gnucash.keys.in
+src/gnome/gnc-plugin-page-account-tree.c
+src/app-utils/test/test-scm-query-string.c
 src/app-utils/test/test-print-parse-amount.c
+src/app-utils/test/test-link-module.c
+src/app-utils/test/test-exp-parser.c
 src/app-utils/test/test-print-queries.c
-src/app-utils/test/test-scm-query-string.c
-src/app-utils/file-utils.c
-src/app-utils/gfec.c
-src/app-utils/global-options.c
+src/app-utils/gnc-druid-provider-desc.c
+src/app-utils/gnc-druid-provider.c
+src/app-utils/gnc-druid.c
+src/app-utils/gnc-druid-provider-file-cb.c
+src/app-utils/gnc-druid-provider-desc-edge.c
+src/app-utils/gnc-druid-provider-desc-file.c
+src/app-utils/option-util.c
+src/app-utils/gncmod-app-utils.c
 src/app-utils/gnc-component-manager.c
-src/app-utils/gnc-euro.c
+src/app-utils/guile-util.c
+src/app-utils/gnc-ui-util.c
+src/app-utils/gnc-err-popup.c
+src/app-utils/gfec.c
 src/app-utils/gnc-exp-parser.c
-src/app-utils/gnc-gettext-util.c
 src/app-utils/gnc-helpers.c
-src/app-utils/gnc-ui-util.c
-src/app-utils/gncmod-app-utils.c
-src/app-utils/guile-util.c
-src/app-utils/option-util.c
-src/backend/file/test/test-date-converting.c
-src/backend/file/test/test-dom-converters1.c
-src/backend/file/test/test-dom-parser1.c
-src/backend/file/test/test-file-stuff.c
-src/backend/file/test/test-kvp-frames.c
-src/backend/file/test/test-load-example-account.c
+src/app-utils/gnc-gettext-util.c
+src/app-utils/gnc-accounting-period.c
+src/app-utils/gnc-druid-cb.c
+src/app-utils/gnc-druid-provider-desc-multifile.c
+src/app-utils/gnc-euro.c
+src/app-utils/file-utils.c
+src/gnome-search/search-account.c
+src/gnome-search/dialog-search.c
+src/gnome-search/search-string.c
+src/gnome-search/search-date.c
+src/gnome-search/search-double.c
+src/gnome-search/search-boolean.c
+src/gnome-search/search.glade
+src/gnome-search/gnc-general-search.c
+src/gnome-search/search-numeric.c
+src/gnome-search/search-core-type.c
+src/gnome-search/search-reconciled.c
+src/gnome-search/gncmod-gnome-search.c
+src/gnome-search/search-int64.c
+src/network-utils/test/test-link-module.c
+src/network-utils/gnc-gpg.c
+src/network-utils/gncmod-network-utils.c
+src/network-utils/gnc-http.c
+src/engine/Group.c
+src/engine/gncmod-engine.c
+src/engine/test/test-book-merge.c
+src/engine/test/test-date.c
+src/engine/test/test-guid.c
+src/engine/test/test-period.c
+src/engine/test/test-numeric.c
+src/engine/test/test-resolve-file-path.c
+src/engine/test/test-transaction-reversal.c
+src/engine/test/test-link.c
+src/engine/test/test-lots.c
+src/engine/test/test-split-vs-account.c
+src/engine/test/test-commodities.c
+src/engine/test/test-freq-spec.c
+src/engine/test/test-scm-query.c
+src/engine/test/test-transaction-voiding.c
+src/engine/test/test-querynew.c
+src/engine/test/test-load-engine.c
+src/engine/test/test-group-vs-book.c
+src/engine/test/test-query.c
+src/engine/test/test-object.c
+src/engine/kvp_frame.c
+src/engine/qofquery-serialize.c
+src/engine/qofbook.c
+src/engine/qofid.c
+src/engine/Account.c
+src/engine/messages.c
+src/engine/qofgobj.c
+src/engine/gnc-session-scm.c
+src/engine/md5.c
+src/engine/gnc-budget.c
+src/engine/Scrub2.c
+src/engine/Scrub3.c
+src/engine/SchedXaction.c
+src/engine/qofsession.c
+src/engine/qofmath128.c
+src/engine/gnc-event.c
+src/engine/policy.c
+src/engine/gnc-budget-book.c
+src/engine/engine-helpers.c
+src/engine/gnc-budget-cat.c
+src/engine/gnc-trace.c
+src/engine/qofinstance.c
+src/engine/qofchoice.c
+src/engine/gnc-commodity.c
+src/engine/Query.c
+src/engine/qofquerycore.c
+src/engine/guid.c
+src/engine/xlate.pl
+src/engine/gnc-pricedb.c
+src/engine/gnc-lot.c
+src/engine/Scrub.c
+src/engine/cashobjects.c
+src/engine/qofbackend.c
+src/engine/cap-gains.c
+src/engine/kvp-scm.c
+src/engine/qof_book_merge.c
+src/engine/Transaction.c
+src/engine/Period.c
+src/engine/gnc-hooks.c
+src/engine/kvp-util.c
+src/engine/gnc-budget-period.c
+src/engine/SX-book.c
+src/engine/qofobject.c
+src/engine/gnc-numeric.c
+src/engine/glib-helpers.c
+src/engine/qofquery-deserial.c
+src/engine/FreqSpec.c
+src/engine/qofclass.c
+src/engine/gnc-associate-account.c
+src/engine/qofsql.c
+src/engine/test-core/gncmod-test-engine.c
+src/engine/test-core/test-engine-stuff.c
+src/engine/gnc-engine-util.c
+src/engine/gnc-budget-period-value.c
+src/engine/gnc-date.c
+src/engine/TransLog.c
+src/engine/gnc-filepath-utils.c
+src/engine/gnc-engine.c
+src/engine/SX-ttinfo.c
+src/engine/qofquery.c
+src/report/stylesheets/gnc-plugin-stylesheets.c
+src/report/stylesheets/gncmod-stylesheets.c
+src/report/report-system/test/test-link-module.c
+src/report/report-system/gnc-report.c
+src/report/report-system/gncmod-report-system.c
+src/report/report-gnome/test/test-link-module.c
+src/report/report-gnome/dialog-column-view.c
+src/report/report-gnome/report.glade
+src/report/report-gnome/dialog-style-sheet.c
+src/report/report-gnome/gncmod-report-gnome.c
+src/report/report-gnome/window-report.c
+src/report/report-gnome/gnc-plugin-page-report.c
+src/report/utility-reports/gncmod-utility-reports.c
+src/report/standard-reports/gncmod-standard-reports.c
+src/report/locale-specific/us/test/test-link-module.c
+src/report/locale-specific/us/gncmod-locale-reports-us.c
+src/quotes/Quote_example.pl
+src/experimental/cbb/cbb-engine/common.pl
+src/experimental/cbb/cbb-engine/CBBlib.pl
+src/experimental/cbb/cbb-engine/CBBlib-auto.pl
+src/experimental/cgi-bin/gnc-server.c
+src/experimental/cgi-bin/hello.c
+src/experimental/cgi-bin/fastcgi-hello.c
+src/experimental/cgi-bin/hello2.c
+src/experimental/cgi-bin/hello3.c
+src/backend/dwi/qofmap.c
+src/backend/net/NetIO.c
+src/backend/qsf/qsf-backend.c
+src/backend/qsf/qsf-xml-map.c
+src/backend/qsf/qsf-xml.c
+src/backend/rpc/gncmod-backend-rpc.c
+src/backend/rpc/clnt_thrd.c
+src/backend/rpc/svc_thrd.c
+src/backend/rpc/gncRpc_svc.c
+src/backend/rpc/RpcSock.c
+src/backend/rpc/gncRpc_clnt.c
+src/backend/rpc/RpcServer.c
+src/backend/rpc/gncRpc_server_stubs.c
+src/backend/rpc/RpcBackend.c
+src/backend/rpc/gncRpc_server.c
+src/backend/rpc/xprt_thrd.c
+src/backend/rpc/RpcUtils.c
 src/backend/file/test/test-load-xml2.c
-src/backend/file/test/test-save-in-lang.c
+src/backend/file/test/test-file-stuff.c
 src/backend/file/test/test-string-converters.c
-src/backend/file/test/test-xml-account.c
-src/backend/file/test/test-xml-commodity.c
 src/backend/file/test/test-xml-pricedb.c
-src/backend/file/test/test-xml-transaction.c
+src/backend/file/test/test-load-example-account.c
+src/backend/file/test/test-dom-converters1.c
 src/backend/file/test/test-xml2-is-file.c
-src/backend/file/gnc-account-xml-v2.c
-src/backend/file/gnc-backend-file.c
-src/backend/file/gnc-book-xml-v2.c
+src/backend/file/test/test-save-in-lang.c
+src/backend/file/test/test-date-converting.c
+src/backend/file/test/test-dom-parser1.c
+src/backend/file/test/grab-types.pl
+src/backend/file/test/test-xml-transaction.c
+src/backend/file/test/test-xml-commodity.c
+src/backend/file/test/test-xml-account.c
+src/backend/file/test/test-kvp-frames.c
+src/backend/file/io-utils.c
+src/backend/file/sixtp-dom-generators.c
 src/backend/file/gnc-commodity-xml-v2.c
-src/backend/file/gnc-freqspec-xml-v2.c
 src/backend/file/gnc-lot-xml-v2.c
-src/backend/file/gnc-pricedb-xml-v2.c
-src/backend/file/gnc-schedxaction-xml-v2.c
-src/backend/file/gnc-transaction-xml-v2.c
-src/backend/file/gncmod-backend-file.c
-src/backend/file/io-example-account.c
-src/backend/file/io-gncbin-r.c
 src/backend/file/io-gncxml-gen.c
+src/backend/file/gnc-account-xml-v2.c
 src/backend/file/io-gncxml-v1.c
 src/backend/file/io-gncxml-v2.c
-src/backend/file/io-utils.c
-src/backend/file/sixtp-dom-generators.c
-src/backend/file/sixtp-dom-parsers.c
+src/backend/file/gnc-transaction-xml-v2.c
 src/backend/file/sixtp-stack.c
-src/backend/file/sixtp-to-dom-parser.c
-src/backend/file/sixtp-utils.c
+src/backend/file/gnc-pricedb-xml-v2.c
 src/backend/file/sixtp.c
-src/backend/net/NetIO.c
-src/backend/postgres/test/test-db.c
-src/backend/postgres/test/test-escape.c
+src/backend/file/io-gncbin-r.c
+src/backend/file/gnc-backend-file.c
+src/backend/file/gnc-freqspec-xml-v2.c
+src/backend/file/sixtp-utils.c
+src/backend/file/sixtp-dom-parsers.c
+src/backend/file/sixtp-to-dom-parser.c
+src/backend/file/gnc-schedxaction-xml-v2.c
+src/backend/file/io-example-account.c
+src/backend/file/gnc-book-xml-v2.c
 src/backend/postgres/test/test-period.c
-src/backend/postgres/PostgresBackend.c
-src/backend/postgres/account.c
-src/backend/postgres/book.c
-src/backend/postgres/builder.c
-src/backend/postgres/checkpoint.c
-src/backend/postgres/demo.c
-src/backend/postgres/escape.c
-src/backend/postgres/events.c
-src/backend/postgres/gncmod-backend-postgres.c
-src/backend/postgres/gncquery.c
-src/backend/postgres/kvp-sql.c
-src/backend/postgres/price.c
+src/backend/postgres/test/test-escape.c
+src/backend/postgres/test/test-db.c
 src/backend/postgres/putil.c
-src/backend/postgres/txn.c
-src/backend/postgres/txnmass.c
-src/backend/postgres/upgrade.c
-src/backend/rpc/RpcBackend.c
-src/backend/rpc/RpcServer.c
-src/backend/rpc/RpcSock.c
-src/backend/rpc/RpcUtils.c
-src/backend/rpc/clnt_thrd.c
-src/backend/rpc/gncRpc_clnt.c
-src/backend/rpc/gncRpc_server.c
-src/backend/rpc/gncRpc_server_stubs.c
-src/backend/rpc/gncRpc_svc.c
-src/backend/rpc/gncmod-backend-rpc.c
-src/backend/rpc/svc_thrd.c
-src/backend/rpc/xprt_thrd.c
-src/business/business-core/file/gnc-address-xml-v2.c
-src/business/business-core/file/gnc-bill-term-xml-v2.c
-src/business/business-core/file/gnc-customer-xml-v2.c
-src/business/business-core/file/gnc-employee-xml-v2.c
-src/business/business-core/file/gnc-entry-xml-v2.c
-src/business/business-core/file/gnc-invoice-xml-v2.c
-src/business/business-core/file/gnc-job-xml-v2.c
-src/business/business-core/file/gnc-order-xml-v2.c
-src/business/business-core/file/gnc-owner-xml-v2.c
-src/business/business-core/file/gnc-tax-table-xml-v2.c
-src/business/business-core/file/gnc-vendor-xml-v2.c
-src/business/business-core/file/gncmod-business-backend-file.c
-src/business/business-core/test/test-address.c
-src/business/business-core/test/test-business.c
-src/business/business-core/test/test-customer.c
-src/business/business-core/test/test-employee.c
-src/business/business-core/test/test-job.c
-src/business/business-core/test/test-load-module.c
-src/business/business-core/test/test-vendor.c
-src/business/business-core/businessmod-core.c
-src/business/business-core/gncAddress.c
-src/business/business-core/gncBillTerm.c
-src/business/business-core/gncBusGuile.c
-src/business/business-core/gncBusiness.c
-src/business/business-core/gncCustomer.c
-src/business/business-core/gncEmployee.c
-src/business/business-core/gncEntry.c
-src/business/business-core/gncInvoice.c
-src/business/business-core/gncJob.c
-src/business/business-core/gncOrder.c
-src/business/business-core/gncOwner.c
-src/business/business-core/gncTaxTable.c
-src/business/business-core/gncVendor.c
-src/business/business-gnome/glade/billterms.glade
-src/business/business-gnome/glade/customer.glade
-src/business/business-gnome/glade/date-close.glade
-src/business/business-gnome/glade/employee.glade
-src/business/business-gnome/glade/invoice.glade
-src/business/business-gnome/glade/job.glade
-src/business/business-gnome/glade/order.glade
-src/business/business-gnome/glade/payment.glade
-src/business/business-gnome/glade/vendor.glade
-src/business/business-gnome/business-gnome-utils.c
-src/business/business-gnome/business-options-gnome.c
-src/business/business-gnome/business-urls.c
-src/business/business-gnome/businessmod-gnome.c
-src/business/business-gnome/dialog-billterms.c
-src/business/business-gnome/dialog-customer.c
-src/business/business-gnome/dialog-date-close.c
-src/business/business-gnome/dialog-employee.c
-src/business/business-gnome/dialog-invoice.c
-src/business/business-gnome/dialog-job.c
-src/business/business-gnome/dialog-order.c
-src/business/business-gnome/dialog-payment.c
-src/business/business-gnome/dialog-vendor.c
-src/business/business-gnome/search-owner.c
-src/business/business-ledger/gncEntryLedger.c
-src/business/business-ledger/gncEntryLedgerControl.c
-src/business/business-ledger/gncEntryLedgerDisplay.c
-src/business/business-ledger/gncEntryLedgerLayout.c
-src/business/business-ledger/gncEntryLedgerLoad.c
-src/business/business-ledger/gncEntryLedgerModel.c
-src/business/business-utils/business-options.c
-src/business/business-utils/gncmod-business-utils.c
-src/business/dialog-tax-table/dialog-tax-table.c
-src/business/dialog-tax-table/gncmod-dialog-tax-table.c
-src/business/dialog-tax-table/tax-tables.glade
-src/calculation/test/test-link.c
-src/calculation/amort_opt.c
-src/calculation/amort_prt.c
-src/calculation/expression_parser.c
-src/calculation/fin-interactive.c
-src/calculation/fin-main.c
-src/calculation/fin.c
-src/calculation/gncmod-calculation.c
-src/calculation/numeric_ops.c
-src/core-utils/core-utils.c
-src/doc/doxygen_main_page.c
-src/engine/Account.c
-src/engine/FreqSpec.c
-src/engine/Group.c
-src/engine/Period.c
-src/engine/Query.c
-src/engine/SX-book.c
-src/engine/SX-ttinfo.c
-src/engine/SchedXaction.c
-src/engine/Scrub.c
-src/engine/Scrub2.c
-src/engine/TransLog.c
-src/engine/Transaction.c
-src/engine/engine-helpers.c
-src/engine/glib-helpers.c
-src/engine/gnc-associate-account.c
-src/engine/gnc-commodity.c
-src/engine/gnc-date.c
-src/engine/gnc-engine-util.c
-src/engine/gnc-engine.c
-src/engine/gnc-event.c
-src/engine/gnc-lot.c
-src/engine/gnc-numeric.c
-src/engine/gnc-pricedb.c
-src/engine/gnc-session-scm.c
-src/engine/gnc-trace.c
-src/engine/gncmod-engine.c
-src/engine/guid.c
-src/engine/kvp-scm.c
-src/engine/kvp-util.c
-src/engine/kvp_frame.c
-src/engine/md5.c
-src/engine/messages.c
-src/engine/qofbackend.c
-src/engine/qofbook.c
-src/engine/qofid.c
-src/engine/qofobject.c
-src/engine/qofquery.c
-src/engine/qofquerycore.c
-src/engine/qofclass.c
-src/engine/qofsession.c
-src/engine/test/test-commodities.c
-src/engine/test/test-date.c
-src/engine/test/test-freq-spec.c
-src/engine/test/test-group-vs-book.c
-src/engine/test/test-load-engine.c
-src/engine/test/test-lots.c
-src/engine/test/test-object.c
-src/engine/test/test-period.c
-src/engine/test/test-query.c
-src/engine/test/test-querynew.c
-src/engine/test/test-resolve-file-path.c
-src/engine/test/test-scm-query.c
-src/engine/test/test-split-vs-account.c
-src/engine/test/test-transaction-reversal.c
-src/engine/test/test-transaction-voiding.c
-src/engine/test-core/gncmod-test-engine.c
-src/engine/test-core/test-engine-stuff.c
-src/experimental/cgi-bin/fastcgi-hello.c
-src/experimental/cgi-bin/gnc-server.c
-src/experimental/cgi-bin/hello.c
-src/experimental/cgi-bin/hello2.c
-src/experimental/cgi-bin/hello3.c
-src/gnc-module/test/misc-mods/agedver.c
-src/gnc-module/test/misc-mods/futuremodsys.c
-src/gnc-module/test/misc-mods/incompatdep.c
-src/gnc-module/test/test-agedver.c
-src/gnc-module/test/test-dynload.c
-src/gnc-module/test/test-incompatdep.c
-src/gnc-module/test/test-load-c.c
-src/gnc-module/test/test-modsysver.c
-src/gnc-module/test/mod-bar/bar.c
-src/gnc-module/test/mod-bar/gnc-mod-bar.c
-src/gnc-module/test/mod-baz/baz.c
-src/gnc-module/test/mod-baz/gnc-mod-baz.c
-src/gnc-module/test/mod-foo/foo.c
-src/gnc-module/test/mod-foo/gnc-mod-foo.c
-src/gnc-module/gnc-module.c
-src/gnome/glade/account.glade
-src/gnome/glade/commodities.glade
-src/gnome/glade/fincalc.glade
-src/gnome/glade/help.glade
-src/gnome/glade/newuser.glade
-src/gnome/glade/price.glade
-src/gnome/glade/print.glade
-src/gnome/glade/progress.glade
-src/gnome/glade/register.glade
-src/gnome/glade/sched-xact.glade
-src/gnome/glade/stocks.glade
-src/gnome/glade/tax.glade
-src/gnome/glade/userpass.glade
-src/gnome/dialog-commodities.c
-src/gnome/dialog-fincalc.c
-src/gnome/dialog-find-transactions.c
-src/gnome/dialog-new-user.c
-src/gnome/dialog-price-edit-db.c
-src/gnome/dialog-price-editor.c
-src/gnome/dialog-print-check.c
-src/gnome/dialog-progress.c
-src/gnome/dialog-scheduledxaction.c
-src/gnome/dialog-sx-from-trans.c
-src/gnome/dialog-sxsincelast.c
-src/gnome/dialog-tax-info.c
-src/gnome/dialog-totd.c
-src/gnome/dialog-userpass.c
-src/gnome/druid-hierarchy.c
-src/gnome/druid-loan.c
-src/gnome/druid-stock-split.c
-src/gnome/gnc-network.c
-src/gnome/gnc-split-reg.c
-src/gnome/gnucash.desktop.in
-src/gnome/gnucash.keys.in
-src/gnome/mainwindow-account-tree.c
-src/gnome/reconcile-list.c
-src/gnome/tip-of-the-day.c
-src/gnome/top-level.c
-src/gnome/window-acct-tree.c
-src/gnome/window-main-summarybar.c
-src/gnome/window-main.c
-src/gnome/window-reconcile.c
-src/gnome/window-register.c
-src/gnome-search/dialog-search.c
-src/gnome-search/gnc-general-search.c
-src/gnome-search/gncmod-gnome-search.c
-src/gnome-search/search-account.c
-src/gnome-search/search-boolean.c
-src/gnome-search/search-core-type.c
-src/gnome-search/search-date.c
-src/gnome-search/search-double.c
-src/gnome-search/search-int64.c
-src/gnome-search/search-numeric.c
-src/gnome-search/search-reconciled.c
-src/gnome-search/search-string.c
-src/gnome-search/search.glade
-src/gnome-utils/test/test-link-module.c
-src/gnome-utils/QuickFill.c
-src/gnome-utils/argv-list-converters.c
-src/gnome-utils/commodity.glade
-src/gnome-utils/cursors.c
-src/gnome-utils/dialog-account.c
-src/gnome-utils/dialog-commodity.c
-src/gnome-utils/dialog-options.c
-src/gnome-utils/dialog-query-list.c
-src/gnome-utils/dialog-query-list.glade
-src/gnome-utils/dialog-transfer.c
-src/gnome-utils/dialog-utils.c
-src/gnome-utils/druid-utils.c
-src/gnome-utils/exchange-dialog.glade
-src/gnome-utils/gnc-account-sel.c
-src/gnome-utils/gnc-account-tree.c
-src/gnome-utils/gnc-amount-edit.c
-src/gnome-utils/gnc-commodity-edit.c
-src/gnome-utils/gnc-currency-edit.c
-src/gnome-utils/gnc-date-delta.c
-src/gnome-utils/gnc-date-edit.c
-src/gnome-utils/gnc-date-format.c
-src/gnome-utils/gnc-date-format.glade
-src/gnome-utils/gnc-dense-cal.c
-src/gnome-utils/gnc-frequency.c
-src/gnome-utils/gnc-general-select.c
-src/gnome-utils/gnc-gnome-utils.c
-src/gnome-utils/gnc-gui-query.c
-src/gnome-utils/gnc-html-guppi.c
-src/gnome-utils/gnc-html-history.c
-src/gnome-utils/gnc-html.c
-src/gnome-utils/gnc-mdi-utils.c
-src/gnome-utils/gnc-menu-extensions.c
-src/gnome-utils/gnc-query-list.c
-src/gnome-utils/gnc-splash.c
-src/gnome-utils/gncmod-gnome-utils.c
-src/gnome-utils/gtkselect.c
-src/gnome-utils/print-session.c
-src/gnome-utils/search-param.c
-src/gnome-utils/transfer.glade
-src/gnome-utils/window-help.c
-src/import-export/binary-import/test/test-link-module.c
-src/import-export/binary-import/binary-import.glade
-src/import-export/binary-import/druid-commodity.c
-src/import-export/binary-import/gncmod-binary-import.c
-src/import-export/generic-import.glade
-src/import-export/gncmod-generic-import.c
-src/import-export/import-account-matcher.c
-src/import-export/import-backend.c
-src/import-export/import-commodity-matcher.c
-src/import-export/import-main-matcher.c
-src/import-export/import-match-map.c
-src/import-export/import-match-picker.c
-src/import-export/import-settings.c
-src/import-export/import-utilities.c
-src/import-export/hbci/glade/hbci.glade
+src/backend/postgres/gncquery.c
+src/backend/postgres/escape.c
+src/backend/postgres/PostgresBackend.c
+src/backend/postgres/txn.c
+src/backend/postgres/upgrade.c
+src/backend/postgres/book.c
+src/backend/postgres/account.c
+src/backend/postgres/demo.c
+src/backend/postgres/txnmass.c
+src/backend/postgres/events.c
+src/backend/postgres/kvp-sql.c
+src/backend/postgres/checkpoint.c
+src/backend/postgres/builder.c
+src/backend/postgres/price.c
+src/import-export/csv/gnc-csv2glist.c
+src/import-export/ofx/test/test-link.c
+src/import-export/ofx/gncmod-ofx-import.c
+src/import-export/ofx/gnc-plugin-ofx.c
+src/import-export/ofx/gnc-ofx-import.c
+src/import-export/qif/test/test-link.c
+src/import-export/qif/test/test-qif.c
+src/import-export/qif/qif-context.c
+src/import-export/qif/qif-parse.c
+src/import-export/qif/qif-objects.c
+src/import-export/qif/qif-file.c
+src/import-export/qif/qif-defaults.c
+src/import-export/hbci/test/test-link-module.c
+src/import-export/hbci/gnc-hbci-getbalance.c
+src/import-export/hbci/gnc-hbci-kvp.c
 src/import-export/hbci/glade/hbcipass.glade
+src/import-export/hbci/glade/hbci.glade
+src/import-export/hbci/glade/hbciprefs.glade
+src/import-export/hbci/gnc-plugin-hbci.c
+src/import-export/hbci/gnc-hbci-utils.c
+src/import-export/hbci/gnc-hbci-gettrans.c
 src/import-export/hbci/dialog-daterange.c
+src/import-export/hbci/gnc-hbci-trans-templ.c
+src/import-export/hbci/druid-hbci-initial.c
+src/import-export/hbci/hbci-interaction.c
 src/import-export/hbci/dialog-hbcitrans.c
 src/import-export/hbci/dialog-pass.c
-src/import-export/hbci/druid-hbci-initial.c
-src/import-export/hbci/druid-hbci-utils.c
 src/import-export/hbci/gnc-hbci-actions.c
-src/import-export/hbci/gnc-hbci-cb.c
-src/import-export/hbci/gnc-hbci-getbalance.c
-src/import-export/hbci/gnc-hbci-gettrans.c
-src/import-export/hbci/gnc-hbci-kvp.c
-src/import-export/hbci/gnc-hbci-trans-templ.c
 src/import-export/hbci/gnc-hbci-transfer.c
-src/import-export/hbci/gnc-hbci-utils.c
 src/import-export/hbci/gncmod-hbci.c
-src/import-export/hbci/hbci-interaction.c
-src/import-export/hbci/test/test-link-module.c
+src/import-export/hbci/druid-hbci-utils.c
+src/import-export/test/test-link.c
+src/import-export/test/test-import-parse.c
+src/import-export/gnc-import-desc-format.c
+src/import-export/mt940/gnc-plugin-mt940.c
+src/import-export/mt940/gncmod-mt940-import.c
+src/import-export/mt940/gnc-mt940-import.c
+src/import-export/gnc-import-format-gnome.c
+src/import-export/import-account-matcher.c
+src/import-export/log-replay/gnc-plugin-log-replay.c
 src/import-export/log-replay/gnc-log-replay.c
 src/import-export/log-replay/gncmod-log-replay.c
-src/import-export/ofx/test/test-link.c
-src/import-export/ofx/gnc-ofx-import.c
-src/import-export/ofx/gncmod-ofx-import.c
+src/import-export/import-match-map.c
+src/import-export/import-parse.c
+src/import-export/qif-io-core/gncmod-qifiocore.c
+src/import-export/import-settings.c
 src/import-export/qif-import/test/test-link.c
 src/import-export/qif-import/dialog-account-picker.c
-src/import-export/qif-import/druid-qif-import.c
+src/import-export/qif-import/gnc-plugin-qif-import.c
 src/import-export/qif-import/gncmod-qif-import.c
 src/import-export/qif-import/qif.glade
-src/import-export/qif-io-core/gncmod-qifiocore.c
-src/import-export/test/test-link.c
-src/network-utils/test/test-link-module.c
-src/network-utils/gnc-gpg.c
-src/network-utils/gnc-http.c
-src/network-utils/gncmod-network-utils.c
+src/import-export/qif-import/gnc-druid-test.c
+src/import-export/qif-import/druid-qif-import.c
+src/import-export/import-commodity-matcher.c
+src/import-export/import-main-matcher.c
+src/import-export/import-provider-format.glade
+src/import-export/binary-import/test/test-link-module.c
+src/import-export/binary-import/druid-commodity.c
+src/import-export/binary-import/gncmod-binary-import.c
+src/import-export/binary-import/binary-import.glade
+src/import-export/gncmod-generic-import.c
+src/import-export/generic-import.glade
+src/import-export/import-backend.c
+src/import-export/gnc-import-format-cb.c
+src/import-export/import-format-dialog.c
+src/import-export/import-utilities.c
+src/import-export/import-match-picker.c
+src/gnome-utils/gnc-account-sel.c
+src/gnome-utils/gnc-tree-view.c
+src/gnome-utils/druid-gconf-setup.glade
+src/gnome-utils/test/test-link-module.c
+src/gnome-utils/dialog-reset-warnings.c
+src/gnome-utils/argv-list-converters.c
+src/gnome-utils/exchange-dialog.glade
+src/gnome-utils/gnc-date-format.glade
+src/gnome-utils/dialog-preferences.c
+src/gnome-utils/gnc-tree-model-account.c
+src/gnome-utils/gnc-tree-model-selection.c
+src/gnome-utils/gnc-html-history.c
+src/gnome-utils/gnc-window.c
+src/gnome-utils/gnc-tree-model-account-types.c
+src/gnome-utils/gnc-tree-view-price.c
+src/gnome-utils/transfer.glade
+src/gnome-utils/dialog-account.c
+src/gnome-utils/gnc-html-graph-gog.c
+src/gnome-utils/gnc-main-window.c
+src/gnome-utils/print-session.c
+src/gnome-utils/account-quickfill.c
+src/gnome-utils/gnc-budget-list-tree-model.c
+src/gnome-utils/gnc-commodity-edit.c
+src/gnome-utils/gncmod-gnome-utils.c
+src/gnome-utils/QuickFill.c
+src/gnome-utils/gnc-frequency.c
+src/gnome-utils/gnc-plugin-page.c
+src/gnome-utils/gnc-currency-edit.c
+src/gnome-utils/gnc-date-edit.c
+src/gnome-utils/dialog-options.c
+src/gnome-utils/druid-utils.c
+src/gnome-utils/dialog-reset-warnings.glade
+src/gnome-utils/gnc-date-format.c
+src/gnome-utils/preferences.glade
+src/gnome-utils/dialog-transfer.c
+src/gnome-utils/dialog-commodity.c
+src/gnome-utils/dialog-query-list.c
+src/gnome-utils/dialog-query-list.glade
+src/gnome-utils/gnc-plugin.c
+src/gnome-utils/gnc-date-delta.c
+src/gnome-utils/gnc-druid-gnome.c
+src/gnome-utils/gnc-amount-edit.c
+src/gnome-utils/gnc-menu-extensions.c
+src/gnome-utils/gnc-plugin-file-history.c
+src/gnome-utils/gnc-druid-provider-edge-gnome.c
+src/gnome-utils/druid-provider-multifile.glade
+src/gnome-utils/gnc-druid-provider-multifile-gnome.c
+src/gnome-utils/gnc-plugin-manager.c
+src/gnome-utils/gnc-period-select.c
+src/gnome-utils/gnc-druid-provider-file-gnome.c
+src/gnome-utils/gnc-embedded-window.c
+src/gnome-utils/gnc-icons.c
+src/gnome-utils/gnc-general-select.c
+src/gnome-utils/gnc-gui-query.c
+src/gnome-utils/gnc-html-guppi.c
+src/gnome-utils/gnc-query-list.c
+src/gnome-utils/cursors.c
+src/gnome-utils/gnc-gui-query.glade
+src/gnome-utils/gnc-tree-model-price.c
+src/gnome-utils/gnc-splash.c
+src/gnome-utils/gnc-gnome-utils.c
+src/gnome-utils/search-param.c
+src/gnome-utils/gnc-dense-cal.c
+src/gnome-utils/gnc-tree-model.c
+src/gnome-utils/gnc-tree-view-commodity.c
+src/gnome-utils/gnc-tree-model-commodity.c
+src/gnome-utils/gnc-plugin-menu-additions.c
+src/gnome-utils/gnc-tree-model-example-account.c
+src/gnome-utils/druid-gconf-setup.c
+src/gnome-utils/gnc-file.c
+src/gnome-utils/misc-gnome-utils.c
+src/gnome-utils/dialog-utils.c
+src/gnome-utils/gnc-budget-tree-model.c
+src/gnome-utils/gnc-html.c
+src/gnome-utils/commodity.glade
+src/gnome-utils/gnc-tree-view-account.c
+src/business/dialog-tax-table/gncmod-dialog-tax-table.c
+src/business/dialog-tax-table/dialog-tax-table.c
+src/business/dialog-tax-table/tax-tables.glade
+src/business/business-gnome/businessmod-gnome.c
+src/business/business-gnome/dialog-order.c
+src/business/business-gnome/dialog-invoice.c
+src/business/business-gnome/gnc-plugin-page-invoice.c
+src/business/business-gnome/glade/customer.glade
+src/business/business-gnome/glade/invoice.glade
+src/business/business-gnome/glade/payment.glade
+src/business/business-gnome/glade/order.glade
+src/business/business-gnome/glade/vendor.glade
+src/business/business-gnome/glade/job.glade
+src/business/business-gnome/glade/employee.glade
+src/business/business-gnome/glade/businessprefs.glade
+src/business/business-gnome/glade/billterms.glade
+src/business/business-gnome/glade/date-close.glade
+src/business/business-gnome/dialog-date-close.c
+src/business/business-gnome/dialog-employee.c
+src/business/business-gnome/dialog-customer.c
+src/business/business-gnome/business-urls.c
+src/business/business-gnome/gnc-plugin-business.c
+src/business/business-gnome/business-gnome-utils.c
+src/business/business-gnome/dialog-job.c
+src/business/business-gnome/dialog-payment.c
+src/business/business-gnome/dialog-billterms.c
+src/business/business-gnome/business-options-gnome.c
+src/business/business-gnome/search-owner.c
+src/business/business-gnome/dialog-vendor.c
+src/business/business-utils/gncmod-business-utils.c
+src/business/business-utils/business-options.c
+src/business/business-ledger/gncEntryLedger.c
+src/business/business-ledger/gncEntryLedgerControl.c
+src/business/business-ledger/gncEntryLedgerModel.c
+src/business/business-ledger/gncEntryLedgerLoad.c
+src/business/business-ledger/gncEntryLedgerDisplay.c
+src/business/business-ledger/gncEntryLedgerLayout.c
+src/business/business-core/file/gnc-invoice-xml-v2.c
+src/business/business-core/file/gnc-customer-xml-v2.c
+src/business/business-core/file/gnc-order-xml-v2.c
+src/business/business-core/file/gnc-job-xml-v2.c
+src/business/business-core/file/gnc-entry-xml-v2.c
+src/business/business-core/file/gnc-owner-xml-v2.c
+src/business/business-core/file/gnc-employee-xml-v2.c
+src/business/business-core/file/gnc-bill-term-xml-v2.c
+src/business/business-core/file/gnc-vendor-xml-v2.c
+src/business/business-core/file/gnc-address-xml-v2.c
+src/business/business-core/file/gnc-tax-table-xml-v2.c
+src/business/business-core/file/gncmod-business-backend-file.c
+src/business/business-core/test/test-job.c
+src/business/business-core/test/test-address.c
+src/business/business-core/test/test-employee.c
+src/business/business-core/test/test-load-module.c
+src/business/business-core/test/test-vendor.c
+src/business/business-core/test/test-customer.c
+src/business/business-core/test/test-business.c
+src/business/business-core/businessmod-core.c
+src/business/business-core/gncOrder.c
+src/business/business-core/gncOwner.c
+src/business/business-core/gncEmployee.c
+src/business/business-core/gncBusPeriod.c
+src/business/business-core/gncTaxTable.c
+src/business/business-core/gncCustomer.c
+src/business/business-core/gncBillTerm.c
+src/business/business-core/gncBusiness.c
+src/business/business-core/gncJob.c
+src/business/business-core/gncEntry.c
+src/business/business-core/gncAddress.c
+src/business/business-core/gncBusGuile.c
+src/business/business-core/gncInvoice.c
+src/business/business-core/gncVendor.c
+src/test-core/gncmod-test.c
+src/test-core/test-stuff.c
 src/optional/swig/gnucash-swig-defines.c
+src/optional/swig/examples/time-query.pl
+src/optional/swig/examples/time-book-load.pl
+src/optional/swig/examples/scan-acct.pl
 src/optional/swig/helperfuncs.c
+src/core-utils/gnc-gdate-utils.c
+src/core-utils/gnc-gkeyfile-utils.c
+src/core-utils/gnc-gconf-utils.c
+src/core-utils/gnc-gobject-utils.c
 src/register/ledger-core/test/test-link-module.c
-src/register/ledger-core/dialog-dup-trans.c
+src/register/ledger-core/split-register.c
+src/register/ledger-core/split-register-model-save.c
+src/register/ledger-core/split-register-load.c
+src/register/ledger-core/split-register-util.c
+src/register/ledger-core/split-register-control.c
 src/register/ledger-core/gnc-ledger-display.c
+src/register/ledger-core/split-register-model.c
+src/register/ledger-core/dialog-dup-trans.c
 src/register/ledger-core/gncmod-ledger-core.c
-src/register/ledger-core/split-register-control.c
 src/register/ledger-core/split-register-layout.c
-src/register/ledger-core/split-register-load.c
-src/register/ledger-core/split-register-model-save.c
-src/register/ledger-core/split-register-model.c
-src/register/ledger-core/split-register-util.c
-src/register/ledger-core/split-register.c
-src/register/register-core/test/test-link-module.c
-src/register/register-core/basiccell.c
-src/register/register-core/cell-factory.c
-src/register/register-core/cellblock.c
-src/register/register-core/checkboxcell.c
-src/register/register-core/formulacell.c
-src/register/register-core/gncmod-register-core.c
-src/register/register-core/gtable.c
-src/register/register-core/numcell.c
-src/register/register-core/pricecell.c
-src/register/register-core/quickfillcell.c
-src/register/register-core/recncell.c
-src/register/register-core/register-common.c
-src/register/register-core/table-allgui.c
-src/register/register-core/table-control.c
-src/register/register-core/table-layout.c
-src/register/register-core/table-model.c
 src/register/register-gnome/test/test-link-module.c
+src/register/register-gnome/quickfillcell-gnome.c
+src/register/register-gnome/gnucash-date-picker.c
+src/register/register-gnome/table-gnome.c
+src/register/register-gnome/gnucash-item-edit.c
+src/register/register-gnome/gnucash-color.c
 src/register/register-gnome/combocell-gnome.c
 src/register/register-gnome/datecell-gnome.c
-src/register/register-gnome/formulacell-gnome.c
 src/register/register-gnome/gncmod-register-gnome.c
-src/register/register-gnome/gnucash-color.c
-src/register/register-gnome/gnucash-cursor.c
-src/register/register-gnome/gnucash-date-picker.c
-src/register/register-gnome/gnucash-grid.c
-src/register/register-gnome/gnucash-header.c
-src/register/register-gnome/gnucash-item-edit.c
 src/register/register-gnome/gnucash-item-list.c
-src/register/register-gnome/gnucash-scrolled-window.c
+src/register/register-gnome/gnucash-cursor.c
 src/register/register-gnome/gnucash-sheet.c
-src/register/register-gnome/gnucash-style.c
 src/register/register-gnome/pricecell-gnome.c
-src/register/register-gnome/quickfillcell-gnome.c
-src/register/register-gnome/table-gnome.c
-src/report/locale-specific/us/test/test-link-module.c
-src/report/locale-specific/us/gncmod-locale-reports-us.c
-src/report/report-gnome/test/test-link-module.c
-src/report/report-gnome/dialog-column-view.c
-src/report/report-gnome/dialog-style-sheet.c
-src/report/report-gnome/gncmod-report-gnome.c
-src/report/report-gnome/report.glade
-src/report/report-gnome/window-report.c
-src/report/report-system/test/test-link-module.c
-src/report/report-system/gnc-report.c
-src/report/report-system/gncmod-report-system.c
-src/report/standard-reports/gncmod-standard-reports.c
-src/report/stylesheets/gncmod-stylesheets.c
-src/report/utility-reports/gncmod-utility-reports.c
-src/tax/us/test/test-link-module.c
-src/tax/us/gncmod-tax-us.c
-src/test-core/gncmod-test.c
-src/test-core/test-stuff.c
+src/register/register-gnome/gnucash-style.c
+src/register/register-gnome/gnucash-scrolled-window.c
+src/register/register-gnome/gnucash-grid.c
+src/register/register-gnome/gnucash-header.c
+src/register/register-gnome/formulacell-gnome.c
+src/register/register-core/test/test-link-module.c
+src/register/register-core/recncell.c
+src/register/register-core/table-layout.c
+src/register/register-core/register-common.c
+src/register/register-core/table-model.c
+src/register/register-core/basiccell.c
+src/register/register-core/gtable.c
+src/register/register-core/formulacell.c
+src/register/register-core/quickfillcell.c
+src/register/register-core/pricecell.c
+src/register/register-core/cellblock.c
+src/register/register-core/table-control.c
+src/register/register-core/table-allgui.c
+src/register/register-core/checkboxcell.c
+src/register/register-core/numcell.c
+src/register/register-core/gncmod-register-core.c
+src/register/register-core/cell-factory.c
 intl-scm/guile-strings.c
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/rpm/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lrpm/.cvsignore -Lrpm/.cvsignore -u -r1.3 -r1.4
--- rpm/.cvsignore
+++ rpm/.cvsignore
@@ -1,3 +1,4 @@
 Makefile
 Makefile.in
 gnucash.spec
+.DS_Store
Index: gncmod-app-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gncmod-app-utils.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/app-utils/gncmod-app-utils.c -Lsrc/app-utils/gncmod-app-utils.c -u -r1.7 -r1.8
--- src/app-utils/gncmod-app-utils.c
+++ src/app-utils/gncmod-app-utils.c
@@ -9,7 +9,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
Index: guile-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/guile-util.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/app-utils/guile-util.c -Lsrc/app-utils/guile-util.c -u -r1.13 -r1.14
--- src/app-utils/guile-util.c
+++ src/app-utils/guile-util.c
@@ -22,10 +22,10 @@
 
 #include <string.h>
 
-#include "global-options.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
 #include "engine-helpers.h"
 #include "glib-helpers.h"
+#include "gnc-gconf-utils.h"
 #include "guile-util.h"
 #include "messages.h"
 
@@ -34,7 +34,7 @@
 #include "guile-mappings.h"
 
 /* This static indicates the debugging module this .o belongs to.  */
-static short module = MOD_GUILE;
+static QofLogModule log_module = GNC_MOD_GUILE;
 
 
 struct _setters
@@ -141,7 +141,7 @@
     value = scm_call_1(func, arg);
 
     if (SCM_STRINGP(value))
-      return gh_scm2newstr(value, NULL);
+      return g_strdup(SCM_STRING_CHARS(value));
     else
     {
       PERR("bad value\n");
@@ -176,7 +176,7 @@
     value = scm_call_1(func, arg);
 
     if (SCM_SYMBOLP(value))
-      return gh_symbol2newstr(value, NULL);
+      return g_strdup(SCM_SYMBOL_CHARS(value));
     else
     {
       PERR("bad value\n");
@@ -645,7 +645,7 @@
   if (!SCM_STRINGP(result))
     return NULL;
 
-  return gh_scm2newstr(result, NULL);
+  return g_strdup(SCM_STRING_CHARS(result));
 }
 
 
@@ -670,7 +670,7 @@
   if (!SCM_STRINGP(result))
     return NULL;
 
-  return gh_scm2newstr(result, NULL);
+  return g_strdup(SCM_STRING_CHARS(result));
 }
 
 
@@ -1089,14 +1089,13 @@
 gnc_get_debit_string(GNCAccountType account_type)
 {
   const char *type_string;
-  char *string;
-  char *temp;
+  const gchar *string;
   SCM result;
   SCM arg;
 
   initialize_scm_functions();
 
-  if (gnc_lookup_boolean_option("Accounts", "Use accounting labels", FALSE))
+  if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL))
     return g_strdup(_("Debit"));
 
   if ((account_type < NO_TYPE) || (account_type >= NUM_ACCOUNT_TYPES))
@@ -1110,16 +1109,10 @@
   if (!SCM_STRINGP(result))
     return NULL;
 
-  string = gh_scm2newstr(result, NULL);
+  string = SCM_STRING_CHARS(result);
   if (string)
-  {
-    temp = g_strdup (string);
-    free (string);
-  }
-  else
-    temp = NULL;
-
-  return temp;
+    return g_strdup(string);
+  return NULL;
 }
 
 
@@ -1134,14 +1127,13 @@
 gnc_get_credit_string(GNCAccountType account_type)
 {
   const char *type_string;
-  char *string;
-  char *temp;
+  const gchar *string;
   SCM result;
   SCM arg;
 
   initialize_scm_functions();
 
-  if (gnc_lookup_boolean_option("Accounts", "Use accounting labels", FALSE))
+  if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL))
     return g_strdup(_("Credit"));
 
   if ((account_type < NO_TYPE) || (account_type >= NUM_ACCOUNT_TYPES))
@@ -1155,16 +1147,8 @@
   if (!SCM_STRINGP(result))
     return NULL;
 
-  string = gh_scm2newstr(result, NULL);
+  string = SCM_STRING_CHARS(result);
   if (string)
-  {
-    temp = g_strdup (string);
-    free (string);
-  }
-  else
-    temp = NULL;
-
-  return temp;
+    return g_strdup(string);
+  return NULL;
 }
-
-
Index: gnc-ui-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/app-utils/gnc-ui-util.h -Lsrc/app-utils/gnc-ui-util.h -u -r1.28 -r1.29
--- src/app-utils/gnc-ui-util.h
+++ src/app-utils/gnc-ui-util.h
@@ -20,8 +20,10 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
 \********************************************************************/
 
-/** @addtogroup UI
+/** @addtogroup GUI
     @{ */
+/** @addtogroup GuiUtility Utility functions for the GnuCash GUI
+ * @{ */
 /** @file gnc-ui-util.h 
     @brief  utility functions for the GnuCash UI
     @author Copyright (C) 2000 Dave Peticolas <dave at krondo.com>
@@ -36,7 +38,6 @@
 #include <locale.h>
 
 #include "Account.h"
-#include "gnc-engine.h"
 #include "Group.h"
 #include "qofbook.h"
 #include "qofsession.h"
@@ -45,9 +46,10 @@
 typedef QofSession * (*QofSessionCB) (void);
 
 
-/* User Settings ****************************************************/
-gboolean gnc_color_deficits (void);
-
+/** Returns the account separation character chosen by the user.
+ *
+ *  @return The character to use.
+ */
 char gnc_get_account_separator (void);
 
 gboolean gnc_reverse_balance(Account *account);
@@ -57,6 +59,22 @@
 /* Default directories **********************************************/
 
 void gnc_init_default_directory (char **dirname);
+/** 
+ * Extracts the directory part of the given 'filename' into the char
+ * pointer variable '*dirname'. If the 'filename' is NULL or does not
+ * contain any directory separator '/', then '*dirname' will be set to
+ * NULL.
+ * 
+ * WATCH OUT: If '*dirname' (i.e. the underlying char pointer
+ * variable) is non-NULL, then it will be free()'d. Make sure that you
+ * have initialized it to NULL, or otherwise you will get a bogus
+ * free() or a double-free() here. FIXME: This is probably not-so-good
+ * behaviour and should be changed (2005-10-08, cstim).
+ *
+ * Again watch out: The caller takes ownership of the char buffer
+ * '*dirname', i.e. the caller has to do a g_free(*dirname) when that
+ * buffer is no longer in use.
+*/
 void gnc_extract_directory (char **dirname, const char *filename);
 
 
@@ -66,53 +84,29 @@
 gnc_commodity_table * gnc_get_current_commodities (void);
 
 /*
- * These values are order according to the way they should appear in
- * the register.  If you change this enum, you must also change the
- * acct_tree_defaults data structure in gnc-account-tree.c.
- */
-typedef enum
-{
-  ACCOUNT_NAME = 0,
-  ACCOUNT_TYPE,
-  ACCOUNT_COMMODITY,
-  ACCOUNT_CODE,
-  ACCOUNT_DESCRIPTION,
-  ACCOUNT_PRESENT,
-  ACCOUNT_PRESENT_REPORT,
-  ACCOUNT_BALANCE,        /* with sign reversal */
-  ACCOUNT_BALANCE_REPORT, /* ACCOUNT_BALANCE in default report currency */
-  ACCOUNT_CLEARED,
-  ACCOUNT_CLEARED_REPORT,
-  ACCOUNT_RECONCILED,
-  ACCOUNT_RECONCILED_REPORT,
-  ACCOUNT_FUTURE_MIN,
-  ACCOUNT_FUTURE_MIN_REPORT,
-  ACCOUNT_TOTAL,          /* balance + children's balance with sign reversal */
-  ACCOUNT_TOTAL_REPORT,   /* ACCOUNT_TOTAL in default report currency */
-  ACCOUNT_NOTES,
-  ACCOUNT_TAX_INFO,
-  NUM_ACCOUNT_FIELDS
-} AccountFieldCode;
-
-/**
- * This routine retrives the content for any given field in the
- * account tree data structure.  The account specifies the "row" and
- * the field parameter specifies the "column".  In essence, this is
- * one giant accessor routine for the Account object where all the
- * results are string values.
- *
- * @param account  The account to retrieve data about.
- * @param field    An indicator of which field in the account tree to return
- * @param negative An indicator that the result was a negative numeric
- *                 value.  May be used by the caller for colorization of the
- *                 returned string.
- * @return         The textual string representing the requested field.
+ * This is a wrapper routine around an xaccGetBalanceInCurrency
+ * function that handles additional needs of the gui.
  *
- * @note The caller must free the returned string when done with it.
+ * @param fn        The underlying function in Account.c to call to retrieve
+ *                  a specific balance from the account.
+ * @param account   The account to retrieve data about.
+ * @param recurse   Include all sub-accounts of this account.
+ * @param negative  An indication of whether or not the returned value
+ *                  is negative.  This can be used by the caller to
+ *                  easily decode whether or not to color the output.
+ * @param commodity The commodity in which the account balance should
+ *                  be returned. If NULL, the value will be returned in
+ *                  the commodity of the account. This is normally used
+ *                  to specify a currency, which forces the conversion
+ *                  of things like stock account values from share
+ *                  values to an amount the requested currency.
  */
-char * gnc_ui_account_get_field_value_string (Account *account,
-                                              AccountFieldCode field,
-					      gboolean *negative);
+gnc_numeric
+gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
+				 Account *account,
+				 gboolean recurse,
+				 gboolean *negative,
+				 gnc_commodity *commodity);
 
 /**
  * This routine retrives the total balance in an account, possibly
@@ -137,6 +131,47 @@
 gnc_numeric gnc_ui_account_get_reconciled_balance(Account *account,
                                                   gboolean include_children);
 
+/**
+ * Wrapper around gnc_ui_account_get_balance_internal that converts
+ * the resulting number to a character string.  The number is
+ * formatted according to the specification of the account currency.
+ *
+ * @param fn        The underlying function in Account.c to call to retrieve
+ *                  a specific balance from the account.
+ * @param account   The account to retrieve data about.
+ * @param recurse   Include all sub-accounts of this account.
+ * @param negative  An indication of whether or not the returned value
+ *                  is negative.  This can be used by the caller to
+ *                  easily decode whether or not to color the output.
+ */
+gchar *
+gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
+				  Account *account,
+				  gboolean recurse,
+				  gboolean *negative);
+
+/**
+ * Wrapper around gnc_ui_account_get_balance_internal that converts
+ * the resulting number to a character string.  The number is
+ * formatted according to the specification of the default reporting
+ * currency.
+ *
+ * @param fn        The underlying function in Account.c to call to retrieve
+ *                  a specific balance from the account.
+ * @param account   The account to retrieve data about.
+ * @param recurse   Include all sub-accounts of this account.
+ * @param negative  An indication of whether or not the returned value
+ *                  is negative.  This can be used by the caller to
+ *                  easily decode whether or not to color the output.
+ */
+gchar *
+gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
+					 Account *account,
+					 gboolean recurse,
+					 gboolean *negative);
+
+char *gnc_ui_account_get_tax_info_string (Account *account);
+
 gnc_numeric gnc_ui_account_get_balance_as_of_date (Account *account,
                                                    time_t date,
                                                    gboolean include_children);
@@ -183,6 +218,25 @@
 /* Returns the default ISO currency string of the current locale. */
 const char * gnc_locale_default_iso_currency_code (void);
 
+
+/** Return the default currency set by the user.  If the user's
+ *  preference is invalid, then this routine will return the default
+ *  currency for the user's locale.
+ *
+ *  @return A pointer to a currency.
+ */
+gnc_commodity * gnc_default_currency (void);
+
+
+/** Return the default currency for use in reports, as set by the
+ *  user.  If the user's preference is invalid, then this routine will
+ *  return the default currency for the user's locale.
+ *
+ *  @return A pointer to a currency.
+ */
+gnc_commodity * gnc_default_report_currency (void);
+
+
 /* Returns the number of decimal place to print in the current locale */
 int gnc_locale_decimal_places (void);
 
@@ -265,8 +319,9 @@
  * caller must provide all the locale-specific information.
  *
  * Note: if group is NULL, no group-size verification will take place.
- * 	 ignore_list is a list of characters that are completely ignored
- *	 while processing the input string.  If NULL, nothing is ignored.
+ * ignore_list is a list of characters that are completely ignored
+ * while processing the input string.  If ignore_list is NULL, nothing
+ * is ignored.
  */
 gboolean
 xaccParseAmountExtended (const char * in_str, gboolean monetary,
@@ -274,14 +329,9 @@
 			 char group_separator, char *group, char *ignore_list,
 			 gnc_numeric *result, char **endstr);
 
-/* Automatic decimal place conversion *******************************/
-
-/* enable/disable the auto decimal option */
-void gnc_set_auto_decimal_enabled(gboolean enabled);
-
-/* set how many auto decimal places to use */
-void gnc_set_auto_decimal_places(int places);
+/* Initialization ***************************************************/
 
+void gnc_ui_util_init (void);
 
 /* Missing functions ************************************************/
 
@@ -292,3 +342,4 @@
 
 #endif
 /** @} */
+/** @} */
Index: gnc-gettext-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-gettext-util.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/app-utils/gnc-gettext-util.c -Lsrc/app-utils/gnc-gettext-util.c -u -r1.3 -r1.4
--- src/app-utils/gnc-gettext-util.c
+++ src/app-utils/gnc-gettext-util.c
@@ -42,6 +42,7 @@
 #ifdef HAVE_GETTEXT
   bindtextdomain (TEXT_DOMAIN, LOCALE_DIR);
   textdomain (TEXT_DOMAIN);
+  bind_textdomain_codeset (TEXT_DOMAIN, "UTF-8");
 #endif
 }
 
--- src/app-utils/global-options.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/********************************************************************\
- * global-options.h -- GNOME global option handling                 *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GLOBAL_OPTIONS_H
-#define GLOBAL_OPTIONS_H
-
-#include <glib.h>
-
-#include "option-util.h"
-
-
-void gnc_options_init(void);
-void gnc_options_shutdown(void);
-
-SCM gnc_register_option_change_callback(GNCOptionChangeCallback callback,
-                                        gpointer user_data,
-                                        char *section,
-                                        char *name);
-
-void gnc_unregister_option_change_callback_id(SCM callback_id);
-
-GNCOption * gnc_get_option_by_name(const char *section_name, const char *name);
-GNCOption * gnc_get_option_by_SCM(SCM guile_option);
-
-SCM gnc_lookup_option(const char *section, const char *name,
-                      SCM default_value);
-
-gboolean gnc_lookup_boolean_option(const char *section, const char *name,
-				   gboolean default_value);
-
-char * gnc_lookup_string_option(const char *section, const char *name,
-				const char *default_value);
-
-char * gnc_lookup_font_option(const char *section, const char *name,
-                              const char *default_value);
-
-char * gnc_lookup_multichoice_option(const char *section, const char *name,
-                                     const char *default_value);
-
-time_t gnc_lookup_date_option(const char *section, const char *name,
-			      gboolean *is_relative, Timespec *set_ab_value,
-			      char **set_rel_value, Timespec *default_value);
-
-gdouble gnc_lookup_number_option(const char *section, const char *name,
-                                 gdouble default_value);
-
-gboolean gnc_lookup_color_option(const char *section, const char *name,
-                                 gdouble *red, gdouble *green,
-                                 gdouble *blue, gdouble *alpha);
-
-guint32 gnc_lookup_color_option_argb(const char *section, const char *name,
-                                     guint32 default_value);
-
-GSList * gnc_lookup_list_option(const char *section, const char *name,
-                                GSList *default_value);
-
-gnc_commodity *
-gnc_lookup_currency_option(const char *section,
-                           const char *name,
-                           gnc_commodity *default_value);
-
-gnc_commodity * gnc_default_currency (void);
-gnc_commodity * gnc_default_report_currency (void);
-
-void gnc_set_option_default(const char *section, const char *name);
-
-gboolean gnc_set_option(const char *section, const char *name, SCM value);
-
-gboolean gnc_set_number_option(const char *section, const char *name,
-                               gdouble value);
-
-gboolean gnc_set_boolean_option(const char *section, const char *name,
-                                gboolean value);
-
-gboolean gnc_set_string_option(const char *section, const char *name,
-			       const char *value);
-
-void gnc_option_refresh_ui_by_name(const char *section_name, 
-				   const char *name);
-
-void gnc_set_option_selectable_by_name(const char *section, 
-                                       const char *name,
-                                       gboolean selectable);
-
-/* private */
-
-void gncp_option_refresh_ui(SCM option);
-GNCOptionDB * gnc_get_global_options(void);
-
-#endif /* GLOBAL_OPTIONS_H */
Index: gnc-exp-parser.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-exp-parser.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/app-utils/gnc-exp-parser.c -Lsrc/app-utils/gnc-exp-parser.c -u -r1.8 -r1.9
--- src/app-utils/gnc-exp-parser.c
+++ src/app-utils/gnc-exp-parser.c
@@ -29,12 +29,13 @@
 
 #include "finproto.h"
 #include "fin_spl_protos.h"
-#include "global-options.h"
+#include "gnc-gkeyfile-utils.h"
 #include "gnc-exp-parser.h"
 #include "messages.h"
 #include "gnc-ui-util.h"
 #include "guile-mappings.h"
 
+#define GROUP_NAME "Variables"
 
 /** Data Types *****************************************************/
 
@@ -53,6 +54,12 @@
 
 /** Implementations ************************************************/
 
+static gchar *
+gnc_exp_parser_filname (void)
+{
+  return g_build_filename(g_get_home_dir(), ".gnucash", "expressions-2.0", NULL);
+}
+
 void
 gnc_exp_parser_init ( void )
 {
@@ -62,7 +69,9 @@
 void
 gnc_exp_parser_real_init ( gboolean addPredefined )
 {
-  SCM alist;
+  gchar *filename, **keys, **key, *str_value;
+  GKeyFile *key_file;
+  gnc_numeric value;
 
   if (parser_inited)
     gnc_exp_parser_shutdown ();
@@ -73,59 +82,20 @@
   parser_inited = TRUE;
 
   if ( addPredefined ) {
-    alist = gnc_lookup_option ("__exp_parser", "defined_variables", SCM_EOL);
-
-    while (SCM_LISTP(alist) && !SCM_NULLP(alist))
-      {
-        char *name;
-        SCM assoc;
-        SCM val_scm;
-        gnc_numeric value;
-        gboolean good;
-
-        assoc = SCM_CAR (alist);
-        alist = SCM_CDR (alist);
-
-        if (!SCM_CONSP (assoc))
-          continue;
-
-        name = gh_scm2newstr (SCM_CAR (assoc), NULL);
-        if (name == NULL)
-          continue;
-
-        val_scm = SCM_CDR (assoc);
-        good = TRUE;
-
-        if (SCM_NUMBERP (val_scm))
-          {
-            double dvalue;
-
-            dvalue = scm_num2dbl (val_scm, __FUNCTION__);
-            value = double_to_gnc_numeric (dvalue, GNC_DENOM_AUTO, 
-                                           GNC_DENOM_SIGFIGS(6)
-                                           | GNC_RND_ROUND);
-          }
-        else if (SCM_STRINGP (val_scm))
-          {
-            char *s;
-            gboolean err;
-
-            s = gh_scm2newstr (val_scm, NULL);
-
-            err = string_to_gnc_numeric (s, &value);
-            if (err == FALSE)
-              good = FALSE;
-
-            free (s);
-          }
-        else
-          good = FALSE;
-
-        if (good)
-          gnc_exp_parser_set_value (name, gnc_numeric_reduce (value));
-
-        free (name);
-      }
+    filename = gnc_exp_parser_filname();
+    key_file = gnc_key_file_load_from_file(filename, FALSE);
+    if (key_file) {
+      keys = g_key_file_get_keys(key_file, GROUP_NAME, NULL, NULL);
+      for (key = keys; key && *key; key++) {
+	str_value = g_key_file_get_string(key_file, GROUP_NAME, *key, NULL);
+	if (str_value && string_to_gnc_numeric(str_value, &value)) {
+	  gnc_exp_parser_set_value (*key, gnc_numeric_reduce (value));
+	}
+      } 
+      g_strfreev(keys);
+      g_key_file_free(key_file);
+    }
+    g_free(filename);
   }
 }
 
@@ -139,32 +109,35 @@
 }
 
 static void
-binding_cons (gpointer key, gpointer value, gpointer data)
+set_one_key (gpointer key, gpointer value, gpointer data)
 {
   char *name = key;
   ParserNum *pnum = value;
-  SCM *alist_p = data;
   char *num_str;
-  SCM assoc;
 
   num_str = gnc_numeric_to_string (gnc_numeric_reduce (pnum->value));
-  assoc = scm_cons (scm_makfrom0str (name), scm_makfrom0str (num_str));
+  g_key_file_set_string ((GKeyFile *)data, GROUP_NAME, name, num_str);
   g_free (num_str);
-
-  *alist_p = scm_cons (assoc, *alist_p);
 }
 
 void
 gnc_exp_parser_shutdown (void)
 {
-  SCM alist;
+  GKeyFile* key_file;
+  gchar *filename;
 
   if (!parser_inited)
     return;
 
-  alist = SCM_EOL;
-  g_hash_table_foreach (variable_bindings, binding_cons, &alist);
-  gnc_set_option ("__exp_parser", "defined_variables", alist);
+  filename = gnc_exp_parser_filname();
+  key_file = g_key_file_new();
+  g_hash_table_foreach (variable_bindings, set_one_key, key_file);
+  g_key_file_set_comment(key_file, GROUP_NAME, NULL,
+			 _(" Variables are in the form 'name=value'"),
+			 NULL);
+  gnc_key_file_save_to_file(filename, key_file);
+  g_key_file_free(key_file);
+  g_free(filename);
 
   g_hash_table_foreach_remove (variable_bindings, remove_binding, NULL);
   g_hash_table_destroy (variable_bindings);
Index: option-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/app-utils/option-util.h -Lsrc/app-utils/option-util.h -u -r1.14 -r1.15
--- src/app-utils/option-util.h
+++ src/app-utils/option-util.h
@@ -254,10 +254,10 @@
                                                  const char *name,
                                                  gboolean selectable);
 
-gboolean gnc_dateformat_option_value_parse(SCM value, DateFormat *format,
+gboolean gnc_dateformat_option_value_parse(SCM value, QofDateFormat *format,
 					   GNCDateMonthFormat *months,
 					   gboolean *years, char **custom);
-SCM gnc_dateformat_option_set_value(DateFormat format, GNCDateMonthFormat months,
+SCM gnc_dateformat_option_set_value(QofDateFormat format, GNCDateMonthFormat months,
 				    gboolean years, const char *custom);
 
 
Index: gnc-helpers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-helpers.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/app-utils/gnc-helpers.c -Lsrc/app-utils/gnc-helpers.c -u -r1.10 -r1.11
--- src/app-utils/gnc-helpers.c
+++ src/app-utils/gnc-helpers.c
@@ -28,15 +28,12 @@
 #include <string.h>
 #include <g-wrap-wct.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "engine-helpers.h"
 #include "gnc-helpers.h"
 #include "gnc-ui-util.h"
-#include "global-options.h"
 
 
-static short module = MOD_SX;
-
 /* Type converters for GNCPrintAmountInfo */
 SCM
 gnc_printinfo2scm(GNCPrintAmountInfo info)
@@ -99,8 +96,7 @@
 int
 gnc_printinfo_p(SCM info_scm)
 {
-  char *symbol;
-  int retval;
+  const gchar *symbol;
 
   if (!SCM_LISTP(info_scm) || SCM_NULLP(info_scm))
     return 0;
@@ -109,15 +105,11 @@
   if (!SCM_SYMBOLP (info_scm))
     return 0;
 
-  symbol = gh_symbol2newstr (info_scm, NULL);
+  symbol = SCM_SYMBOL_CHARS (info_scm);
   if (symbol == NULL)
     return 0;
 
-  retval = strcmp (symbol, "print-info") == 0;
-
-  free (symbol);
-
-  return retval;
+  return (strcmp (symbol, "print-info") == 0);
 }
 
 /* This is a scaled down version of the routine that would be needed
@@ -186,25 +178,3 @@
 
   return gnc_numeric_to_scm (result);
 }
-
-gint
-g_date_equals( gconstpointer gda, gconstpointer gdb )
-{
-  if ( !g_date_valid( (GDate*)gda )
-       || !g_date_valid( (GDate*)gdb ) ) {
-    DEBUG( "invalid: %p(%s), %p(%s)",
-           gda, ( g_date_valid((GDate*)gda) ? "" : "*" ),
-           gdb, ( g_date_valid((GDate*)gdb) ? "" : "*" ) );
-  }
-  return ( g_date_compare( (GDate*)gda, (GDate*)gdb )
-           == 0 ? TRUE : FALSE );
-}
-
-guint
-g_date_hash( gconstpointer gd )
-{
-  gint val = (g_date_year( (GDate*)gd ) * 10000)
-    + (g_date_month( (GDate*)gd ) * 100)
-    + g_date_day( (GDate*)gd );
-  return g_int_hash( &val );
-}
Index: gnc-helpers.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-helpers.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/gnc-helpers.h -Lsrc/app-utils/gnc-helpers.h -u -r1.6 -r1.7
--- src/app-utils/gnc-helpers.h
+++ src/app-utils/gnc-helpers.h
@@ -47,15 +47,4 @@
 
 SCM gnc_parse_amount_helper (const char * string, gboolean monetary);
 
-/**
- * Compares two GDate*'s for equality; useful for using GDate*'s as
- * GHashTable keys.
- **/
-gint g_date_equals( gconstpointer gda, gconstpointer gdb );
-/**
- * Provides a "hash" of a GDate* value; useful for using GDate*'s as
- * GHashTable keys.
- **/
-guint g_date_hash( gconstpointer gd );
-
 #endif
Index: gnc-euro.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-euro.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/app-utils/gnc-euro.c -Lsrc/app-utils/gnc-euro.c -u -r1.5 -r1.6
--- src/app-utils/gnc-euro.c
+++ src/app-utils/gnc-euro.c
@@ -26,7 +26,6 @@
 #include <string.h>
 
 #include "gnc-commodity.h"
-#include "gnc-engine.h"
 #include "gnc-euro.h"
 #include "gnc-ui-util.h"
 
Index: option-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/option-util.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -Lsrc/app-utils/option-util.c -Lsrc/app-utils/option-util.c -u -r1.27 -r1.28
--- src/app-utils/option-util.c
+++ src/app-utils/option-util.c
@@ -30,13 +30,20 @@
 #include "engine-helpers.h"
 #include "glib-helpers.h"
 #include "guile-util.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
 #include "gnc-err-popup.h"
 #include "guile-mappings.h"
 #include "messages.h"
 
 #include <g-wrap-wct.h>
 
+/* TODO: 
+
+  - for make-date-option, there seems to be only support for getting,
+    not for setting.
+*/
+
+
 /****** Structures *************************************************/
 
 struct gnc_option
@@ -109,7 +116,7 @@
                           0, 0, 0, 0, 0, 0, 0, 0, 0};
 
 /* This static indicates the debugging module this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 static GHashTable *option_dbs = NULL;
 static int last_db_handle = 0;
@@ -926,8 +933,10 @@
                     scm_int2num(index));
   if (name == SCM_UNDEFINED)
     return NULL;
+  if (!SCM_STRINGP(name))
+    return NULL;
   
-  return gh_scm2newstr(name, NULL);
+  return g_strdup(SCM_STRING_CHARS(name));
 }
 
 
@@ -955,8 +964,10 @@
                     scm_int2num(index));
   if (help == SCM_UNDEFINED)
     return NULL;
+  if (!SCM_SYMBOLP(help))
+    return NULL;
 
-  return gh_scm2newstr(help, NULL);
+  return g_strdup(SCM_STRING_CHARS(help));
 }
 
 
@@ -1718,7 +1729,8 @@
   else
   {
     SCM oops;
-    char *section, *name, *message;
+    char *section, *name;
+    const gchar *message;
 
     /* Second element is error message */
     oops = SCM_CADR(result);
@@ -1728,7 +1740,7 @@
       return;
     }
 
-    message = gh_scm2newstr(oops, NULL);
+    message = SCM_STRING_CHARS(oops);
     name = gnc_option_name(option);
     section = gnc_option_section(option);
 
@@ -1737,8 +1749,6 @@
                            name ? name : "(null)",
                            message ? message : "(null)");
 
-    if (message != NULL)
-      free(message);
     if (name != NULL)
       free(name);
     if (section != NULL)
@@ -1915,7 +1925,7 @@
   if (!SCM_STRINGP(value))
     return NULL;
 
-  return gh_scm2newstr(value, NULL);
+  return g_strdup(SCM_STRING_CHARS(value));
 }
 
 
@@ -2021,7 +2031,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_STRINGP(value))
-        return gh_scm2newstr(value, NULL);
+        return g_strdup(SCM_STRING_CHARS(value));
     }
   }
 
@@ -2086,7 +2096,7 @@
     {
       value = scm_call_0(getter);
       if (SCM_SYMBOLP(value))
-        return gh_symbol2newstr(value, NULL);
+        return g_strdup(SCM_SYMBOL_CHARS(value));
     }
   }
 
@@ -2102,10 +2112,10 @@
  *   looks up a date option. If present, returns the absolute date  *
  *   represented in the set_ab_value argument provided, otherwise   *
  *   copies the default_value argument (if non-NULL) to the         *
- *   set_value argument. If the default_value argument is NULL,     *
+ *   set_ab_value argument. If the default_value argument is NULL,  *
  *   copies the current date to set_ab_value. Whatever value is     *
- *   stored in set_value is return as an approximate (no            *
- *   nanoseconds) time_t value. set_value may be NULL, in which     *
+ *   stored in set_ab_value is returned as an approximate (no       *
+ *   nanoseconds) time_t value.  set_ab_value may be NULL, in which *
  *   case only the return value can be used. If is_relative is      *
  *   non-NULL, it is set to whether the date option is currently    *
  *   storing a relative date.  If it is, and set_rel_value          *
@@ -2115,6 +2125,7 @@
  * Args: odb           - option database to search in               *
  *       section       - section name of option                     *
  *       name          - name of option                             *
+ *       is_relative   - location to store boolean value            *
  *       set_ab_value  - location to store absolute option value    *
  *       set_rel_value - location to store relative option value    *
  *       default       - default value if not found                 *
@@ -2179,7 +2190,7 @@
             *is_relative = TRUE;
 
           if (set_rel_value != NULL)
-            *set_rel_value = gh_symbol2newstr (relative, NULL);
+            *set_rel_value = g_strdup(SCM_SYMBOL_CHARS (relative));
         }
 
         if (symbol)
@@ -2340,7 +2351,7 @@
       return default_value;
     }
 
-    list = g_slist_prepend(list, gh_symbol2newstr(item, NULL));
+    list = g_slist_prepend(list, g_strdup(SCM_SYMBOL_CHARS(item)));
   }
 
   if (!SCM_LISTP(value) || !SCM_NULLP(value))
@@ -2602,7 +2613,7 @@
   value = scm_call_1(getters.date_option_subtype, option->guile_option);
 
   if (SCM_SYMBOLP(value))
-    return gh_symbol2newstr(value, NULL);
+    return g_strdup(SCM_SYMBOL_CHARS(value));
   else
     return NULL;
 }
@@ -2625,7 +2636,7 @@
   if (!SCM_SYMBOLP (value))
     return NULL;
 
-  return gh_symbol2newstr (value, NULL);
+  return g_strdup(SCM_SYMBOL_CHARS (value));
 }
 
 /*******************************************************************\
@@ -2696,12 +2707,12 @@
  * format(symbol), month(symbol), include-years(bool), custom-string(string)
  */
 
-gboolean gnc_dateformat_option_value_parse(SCM value, DateFormat *format,
+gboolean gnc_dateformat_option_value_parse(SCM value, QofDateFormat *format,
                                            GNCDateMonthFormat *months,
                                            gboolean *years, char **custom)
 {
   SCM val;
-  char *str;
+  const char *str;
 
   if (!SCM_LISTP(value) || SCM_NULLP(value))
     return TRUE;
@@ -2713,13 +2724,12 @@
     value = SCM_CDR(value);
     if (!SCM_SYMBOLP(val))
       break;
-    str = gh_symbol2newstr (val, NULL);
+    str = SCM_SYMBOL_CHARS (val);
     if (!str)
       break;
 
     if (format) {
       if (gnc_date_string_to_dateformat(str, format)) {
-        free(str);
         break;
       }
     }
@@ -2729,13 +2739,12 @@
     value = SCM_CDR(value);
     if (!SCM_SYMBOLP(val))
       break;
-    str = gh_symbol2newstr (val, NULL);
+    str = SCM_SYMBOL_CHARS (val);
     if (!str)
       break;
 
     if (months) {
       if (gnc_date_string_to_monthformat(str, months)) {
-        free(str);
         break;
       }
     }
@@ -2758,7 +2767,7 @@
       break;
 
     if (custom)
-      *custom = gh_scm2newstr(val, NULL);
+      *custom = g_strdup(SCM_STRING_CHARS(val));
 
     return FALSE;
 
@@ -2767,7 +2776,7 @@
   return TRUE;
 }
 
-SCM gnc_dateformat_option_set_value(DateFormat format, GNCDateMonthFormat months,
+SCM gnc_dateformat_option_set_value(QofDateFormat format, GNCDateMonthFormat months,
                                     gboolean years, const char *custom)
 {
   SCM value = SCM_EOL;
Index: date-utilities.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/date-utilities.scm,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/date-utilities.scm -Lsrc/app-utils/date-utilities.scm -u -r1.6 -r1.7
--- src/app-utils/date-utilities.scm
+++ src/app-utils/date-utilities.scm
@@ -47,6 +47,8 @@
 ;; get stuff from localtime date vector
 (define (gnc:date-get-year datevec)
   (+ 1900 (tm:year datevec)))
+(define (gnc:date-get-quarter datevec)
+  (+ (quotient (tm:mon datevec) 3) 1))
 (define (gnc:date-get-month-day datevec)
   (tm:mday datevec))
 ;; get month with january==1
@@ -62,8 +64,11 @@
 (define (gnc:timepair-get-year tp)
   (gnc:date-get-year (gnc:timepair->date tp)))
 
+(define (gnc:timepair-get-quarter tp)
+  (gnc:date-get-quarter (gnc:timepair->date tp)))
+
 (define (gnc:timepair-get-month-day tp)
-  (gnc:date-get-month (gnc:timepair->date tp)))
+  (gnc:date-get-month-day (gnc:timepair->date tp)))
 
 (define (gnc:timepair-get-month tp)
   (gnc:date-get-month (gnc:timepair->date tp)))
@@ -74,9 +79,24 @@
 (define (gnc:timepair-get-year-day tp)
   (gnc:date-get-year-day (gnc:timepair->date tp)))
 
+(define (gnc:date-get-year-string datevec)
+  (strftime "%Y" datevec))
+
+(define (gnc:date-get-quarter-string datevec)
+  (sprintf #f "Q%d" (gnc:date-get-quarter datevec)))
+
+(define (gnc:date-get-quarter-year-string datevec)
+  (string-append 
+   (gnc:date-get-quarter-string datevec) 
+   " " 
+   (gnc:date-get-year-string datevec)))
+
 (define (gnc:date-get-month-string datevec)
   (strftime "%B" datevec))
 
+(define (gnc:date-get-month-year-string datevec)
+  (strftime "%B %Y" datevec))
+
 ;; is leap year?
 (define (gnc:leap-year? year)
   (if (= (remainder year 4) 0)
Index: file-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/file-utils.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/file-utils.c -Lsrc/app-utils/file-utils.c -u -r1.6 -r1.7
--- src/app-utils/file-utils.c
+++ src/app-utils/file-utils.c
@@ -30,14 +30,13 @@
 
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "file-utils.h"
 #include "messages.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
  
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUILE;
+static QofLogModule log_module = GNC_MOD_GUILE;
 
 /********************************************************************\
 \********************************************************************/
@@ -45,8 +44,7 @@
 char *
 gncFindFile (const char * filename) 
 {
-  char *full_filename = NULL;
-  char *g_filename;
+  const gchar *full_filename = NULL;
   SCM find_doc_file;
   SCM scm_filename;
   SCM scm_result;
@@ -59,13 +57,9 @@
   scm_result = scm_call_1(find_doc_file, scm_filename);
 
   if (SCM_STRINGP(scm_result))
-    full_filename = gh_scm2newstr(scm_result, NULL);
+    full_filename = SCM_STRING_CHARS(scm_result);
 
-  g_filename = g_strdup (full_filename);
-  if (full_filename)
-    free (full_filename);
-
-  return g_filename;
+  return g_strdup (full_filename);
 }
 
 /********************************************************************\
Index: gnc-component-manager.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-component-manager.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/app-utils/gnc-component-manager.c -Lsrc/app-utils/gnc-component-manager.c -u -r1.20 -r1.21
--- src/app-utils/gnc-component-manager.c
+++ src/app-utils/gnc-component-manager.c
@@ -23,7 +23,7 @@
 
 #include "Group.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
 #include "gnc-ui-util.h"
 
 
@@ -64,7 +64,8 @@
 
 /** Static Variables ************************************************/
 static guint  suspend_counter = 0;
-static gint   next_component_id = 0;
+/* Some code foolishly uses 0 instead of NO_COMPONENT, so we start with 1. */
+static gint   next_component_id = 1;
 static GList *components = NULL;
 
 static ComponentEventInfo changes = { NULL, NULL, FALSE };
@@ -72,7 +73,7 @@
 
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 
 /** Prototypes ******************************************************/
@@ -127,9 +128,7 @@
 static gboolean
 destroy_mask_hash_helper (gpointer key, gpointer value, gpointer user_data)
 {
-  GCache *gc = gnc_engine_get_string_cache ();
-
-  g_cache_remove (gc, key);
+  gnc_string_cache_remove (key);
   g_free (value);
 
   return TRUE;
@@ -246,8 +245,7 @@
   mask = g_hash_table_lookup (cei->event_masks, entity_type);
   if (!mask)
   {
-    char * key = g_cache_insert (gnc_engine_get_string_cache (),
-                                 (gpointer) entity_type);
+    char * key = gnc_string_cache_insert ((gpointer) entity_type);
     mask = g_new0 (GNCEngineEventType, 1);
     g_hash_table_insert (cei->event_masks, key, mask);
   }
@@ -392,10 +390,17 @@
   /* look for a free handler id */
   component_id = next_component_id;
 
+  /* design warning: if we ever get 2^32-1 components, 
+     this loop is infinite.  Instead of fixing it, we'll just 
+     complain when (if) we get half way there (probably never).
+  */ 
   while (find_component (component_id))
     if (++component_id == NO_COMPONENT)
       component_id++;
 
+  if (component_id < 0) 
+    PERR("Amazing! Half way to running out of component_ids.");
+  
   /* found one, add the handler */
   ci = g_new0 (ComponentInfo, 1);
 
@@ -520,7 +525,7 @@
 }
 
 const EventInfo *
-gnc_gui_get_entity_events (GHashTable *changes, GUID *entity)
+gnc_gui_get_entity_events (GHashTable *changes, const GUID *entity)
 {
   if (!changes || !entity)
     return GNC_EVENT_NONE;
Index: gnc-ui-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-ui-util.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lsrc/app-utils/gnc-ui-util.c -Lsrc/app-utils/gnc-ui-util.c -u -r1.50 -r1.51
--- src/app-utils/gnc-ui-util.c
+++ src/app-utils/gnc-ui-util.c
@@ -34,16 +34,15 @@
 #include <string.h>
 
 #include "Transaction.h"
-#include "global-options.h"
 
 #include "Account.h"
 #include "gnc-book.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
 #include "gnc-engine.h"
 #include "gnc-euro.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-module.h"
-#include "gnc-session.h"
 #include "gnc-ui-util.h"
 #include "Group.h"
 #include "messages.h"
@@ -51,33 +50,18 @@
 #include "guile-mappings.h"
 
 
-static short module = MOD_GUI;
+#define KEY_CURRENCY_CHOICE "currency_choice"
+#define KEY_CURRENCY_OTHER  "currency_other"
+
+static QofLogModule log_module = GNC_MOD_GUI;
 
 static gboolean auto_decimal_enabled = FALSE;
 static int auto_decimal_places = 2;    /* default, can be changed */
 
 static gboolean reverse_balance_inited = FALSE;
-static SCM reverse_balance_callback_id = SCM_UNDEFINED;
 static gboolean reverse_type[NUM_ACCOUNT_TYPES];
 
 /********************************************************************\
- * gnc_color_deficits                                               *
- *   return a boolean value indicating whether deficit quantities   *
- *   should be displayed using the gnc_get_deficit_color().         *
- *                                                                  *
- * Args: none                                                       *
- * Returns: boolean deficit color indicator                         *
- \*******************************************************************/
-gboolean
-gnc_color_deficits (void)
-{
-  return gnc_lookup_boolean_option ("General",
-                                    "Display negative amounts in red",
-                                    TRUE);
-}
-
-
-/********************************************************************\
  * gnc_get_account_separator                                        *
  *   returns the current account separator character                *
  *                                                                  *
@@ -90,11 +74,9 @@
   char separator = ':';
   char *string;
 
-  string = gnc_lookup_multichoice_option("Accounts",
-                                         "Account Separator",
-                                         "colon");
+  string = gnc_gconf_get_string(GCONF_GENERAL, KEY_ACCOUNT_SEPARATOR, NULL);
 
-  if (safe_strcmp(string, "colon") == 0)
+  if (!string || safe_strcmp(string, "colon") == 0)
     separator = ':';
   else if (safe_strcmp(string, "slash") == 0)
     separator = '/';
@@ -121,56 +103,36 @@
   for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
     reverse_type[i] = FALSE;
 
-  choice = gnc_lookup_multichoice_option ("Accounts",
-                                          "Reversed-balance account types",
-                                          "credit");
+  choice = gnc_gconf_get_string(GCONF_GENERAL, "reversed_accounts", NULL);
 
-  if (safe_strcmp (choice, "income-expense") == 0)
+  if (safe_strcmp (choice, "none") == 0)
+  {
+  }
+  else if (safe_strcmp (choice, "income_expense") == 0)
   {
     reverse_type[INCOME]  = TRUE;
     reverse_type[EXPENSE] = TRUE;
   }
-  else if (safe_strcmp (choice, "credit") == 0)
+  else
   {
+    if (safe_strcmp (choice, "credit") != 0)
+      PERR("bad value '%s'", choice);
     reverse_type[LIABILITY] = TRUE;
     reverse_type[PAYABLE]   = TRUE;
     reverse_type[EQUITY]    = TRUE;
     reverse_type[INCOME]    = TRUE;
     reverse_type[CREDIT]    = TRUE;
   }
-  else if (safe_strcmp (choice, "none") == 0)
-  {
-  }
-  else
-  {
-    PERR("bad value\n");
-
-    reverse_type[INCOME]  = TRUE;
-    reverse_type[EXPENSE] = TRUE;
-  }
 
   if (choice != NULL)
     free (choice);
 }
 
 static void
-gnc_configure_reverse_balance_cb (gpointer not_used)
-{
-  gnc_configure_reverse_balance ();
-  gnc_gui_refresh_all ();
-}
-
-static void
 gnc_reverse_balance_init (void)
 {
   gnc_configure_reverse_balance ();
-
-  reverse_balance_callback_id = 
-    gnc_register_option_change_callback (gnc_configure_reverse_balance_cb,
-                                         NULL, "Accounts",
-                                         "Reversed-balance account types");
-
-  reverse_balance_inited = (reverse_balance_callback_id != SCM_UNDEFINED);
+  reverse_balance_inited = TRUE;
 }
 
 gboolean
@@ -266,12 +228,12 @@
  *                  of things like stock account values from share
  *                  values to an amount the requested currency.
  */
-static gnc_numeric
-gnc_ui_account_get_balance_internal (xaccGetBalanceInCurrencyFn fn,
-				     Account *account,
-				     gboolean recurse,
-				     gboolean *negative,
-				     gnc_commodity *commodity)
+gnc_numeric
+gnc_ui_account_get_balance_full (xaccGetBalanceInCurrencyFn fn,
+				 Account *account,
+				 gboolean recurse,
+				 gboolean *negative,
+				 gnc_commodity *commodity)
 {
   gnc_numeric balance;
 
@@ -295,8 +257,8 @@
 gnc_numeric
 gnc_ui_account_get_balance (Account *account, gboolean recurse)
 {
-  return gnc_ui_account_get_balance_internal (xaccAccountGetBalanceInCurrency,
-					      account, recurse, NULL, NULL);
+  return gnc_ui_account_get_balance_full (xaccAccountGetBalanceInCurrency,
+					  account, recurse, NULL, NULL);
 }
 
 /*
@@ -308,8 +270,8 @@
 gnc_ui_account_get_balance_in_currency (Account *account, gnc_commodity *currency,
 					gboolean recurse)
 {
-  return gnc_ui_account_get_balance_internal (xaccAccountGetBalanceInCurrency,
-					      account, recurse, NULL, currency);
+  return gnc_ui_account_get_balance_full (xaccAccountGetBalanceInCurrency,
+					  account, recurse, NULL, currency);
 }
 
 /*
@@ -320,15 +282,16 @@
 gnc_ui_account_get_reconciled_balance (Account *account,
                                        gboolean recurse)
 {
-  return gnc_ui_account_get_balance_internal (xaccAccountGetReconciledBalanceInCurrency,
-					      account, recurse, NULL, NULL);
+  return gnc_ui_account_get_balance_full (xaccAccountGetReconciledBalanceInCurrency,
+					  account, recurse, NULL, NULL);
 }
 
 
 /**
- * Wrapper around gnc_ui_account_get_balance_internal that converts
+ * Wrapper around gnc_ui_account_get_balance_full that converts
  * the resulting number to a character string.  The number is
  * formatted according to the specification of the account currency.
+ * The caller is responsible for g_free'ing the returned memory.
  *
  * @param fn        The underlying function in Account.c to call to retrieve
  *                  a specific balance from the account.
@@ -338,7 +301,7 @@
  *                  is negative.  This can be used by the caller to
  *                  easily decode whether or not to color the output.
  */
-static gchar *
+gchar *
 gnc_ui_account_get_print_balance (xaccGetBalanceInCurrencyFn fn,
 				  Account *account,
 				  gboolean recurse,
@@ -347,15 +310,15 @@
   GNCPrintAmountInfo print_info;
   gnc_numeric balance;
 
-  balance = gnc_ui_account_get_balance_internal(fn, account, recurse,
-						negative, NULL);
+  balance = gnc_ui_account_get_balance_full(fn, account, recurse,
+					    negative, NULL);
   print_info = gnc_account_print_info(account, TRUE);
   return g_strdup(xaccPrintAmount(balance, print_info));
 }
 
 
 /**
- * Wrapper around gnc_ui_account_get_balance_internal that converts
+ * Wrapper around gnc_ui_account_get_balance_full that converts
  * the resulting number to a character string.  The number is
  * formatted according to the specification of the default reporting
  * currency.
@@ -368,7 +331,7 @@
  *                  is negative.  This can be used by the caller to
  *                  easily decode whether or not to color the output.
  */
-static gchar *
+gchar *
 gnc_ui_account_get_print_report_balance (xaccGetBalanceInCurrencyFn fn,
 					 Account *account,
 					 gboolean recurse,
@@ -379,8 +342,8 @@
   gnc_commodity *report_commodity;
 
   report_commodity = gnc_default_report_currency();
-  balance = gnc_ui_account_get_balance_internal(fn, account, recurse,
-						negative, report_commodity);
+  balance = gnc_ui_account_get_balance_full(fn, account, recurse,
+					    negative, report_commodity);
   print_info = gnc_commodity_print_info(report_commodity, TRUE);
   return g_strdup(xaccPrintAmount(balance, print_info));
 }
@@ -429,7 +392,8 @@
   return balance;
 }
 
-static char *
+/* Caller is responsible for g_free'ing returned memory */
+char *
 gnc_ui_account_get_tax_info_string (Account *account)
 {
   static SCM get_form = SCM_UNDEFINED;
@@ -439,9 +403,7 @@
   const char *code;
   SCM category;
   SCM code_scm;
-  char *result;
-  char *form;
-  char *desc;
+  const gchar *form, *desc;
   SCM scm;
 
   if (get_form == SCM_UNDEFINED)
@@ -496,135 +458,19 @@
   if (!SCM_STRINGP (scm))
     return NULL;
 
-  form = gh_scm2newstr (scm, NULL);
+  form = SCM_STRING_CHARS (scm);
   if (!form)
     return NULL;
 
   scm = scm_call_2 (get_desc, category, code_scm);
   if (!SCM_STRINGP (scm))
-  {
-    free (form);
     return NULL;
-  }
 
-  desc = gh_scm2newstr (scm, NULL);
+  desc = SCM_STRING_CHARS (scm);
   if (!desc)
-  {
-    free (form);
     return NULL;
-  }
-
-  result = g_strdup_printf ("%s %s", form, desc);
-
-  free (form);
-  free (desc);
 
-  return result;
-}
-
-
-char *
-gnc_ui_account_get_field_value_string (Account *account,
-                                       AccountFieldCode field,
-				       gboolean *negative)
-{
-  g_return_val_if_fail ((field >= 0) && (field < NUM_ACCOUNT_FIELDS), NULL);
-
-  *negative = FALSE;
-  if (account == NULL)
-    return NULL;
-
-  switch (field)
-  {
-    case ACCOUNT_TYPE :
-      return g_strdup (xaccAccountGetTypeStr(xaccAccountGetType(account)));
-
-    case ACCOUNT_NAME :
-      return g_strdup (xaccAccountGetName(account));
-
-    case ACCOUNT_CODE :
-      return g_strdup (xaccAccountGetCode(account));
-
-    case ACCOUNT_DESCRIPTION :
-      return g_strdup (xaccAccountGetDescription(account));
-
-    case ACCOUNT_NOTES :
-      return g_strdup (xaccAccountGetNotes(account));
-
-    case ACCOUNT_COMMODITY :
-      return
-        g_strdup
-        (gnc_commodity_get_printname(xaccAccountGetCommodity(account)));
-
-    case ACCOUNT_PRESENT :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetPresentBalanceInCurrency,
-					 account, FALSE, negative);
-
-    case ACCOUNT_PRESENT_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetPresentBalanceInCurrency,
-						account, FALSE, negative);
-
-    case ACCOUNT_BALANCE :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetBalanceInCurrency,
-					 account, FALSE, negative);
-
-    case ACCOUNT_BALANCE_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetBalanceInCurrency,
-						account, FALSE, negative);
-
-    case ACCOUNT_CLEARED :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetClearedBalanceInCurrency,
-					 account, FALSE, negative);
-
-    case ACCOUNT_CLEARED_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetClearedBalanceInCurrency,
-						account, FALSE, negative);
-
-    case ACCOUNT_RECONCILED :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetReconciledBalanceInCurrency,
-					 account, FALSE, negative);
-
-    case ACCOUNT_RECONCILED_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetReconciledBalanceInCurrency,
-						account, FALSE, negative);
-
-    case ACCOUNT_FUTURE_MIN :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetProjectedMinimumBalanceInCurrency,
-					 account, FALSE, negative);
-
-    case ACCOUNT_FUTURE_MIN_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetProjectedMinimumBalanceInCurrency,
-						account, FALSE, negative);
-
-    case ACCOUNT_TOTAL :
-      return
-	gnc_ui_account_get_print_balance(xaccAccountGetBalanceInCurrency,
-					 account, TRUE, negative);
-
-
-    case ACCOUNT_TOTAL_REPORT :
-      return
-	gnc_ui_account_get_print_report_balance(xaccAccountGetBalanceInCurrency,
-						account, TRUE, negative);
-
-    case ACCOUNT_TAX_INFO:
-      return gnc_ui_account_get_tax_info_string (account);
-
-    default:
-      break;
-  }
-
-  return NULL;
+  return g_strdup_printf ("%s %s", form, desc);
 }
 
 
@@ -864,14 +710,16 @@
 }
 
 static void
-gnc_lconv_set (char **p_value, char *default_value)
+gnc_lconv_set_utf8 (char **p_value, char *default_value)
 {
   char *value = *p_value;
 
   if ((value == NULL) || (value[0] == 0))
     *p_value = default_value;
 
-  *p_value = g_strdup (*p_value);
+  *p_value = g_locale_to_utf8 (*p_value, -1, NULL, NULL, NULL);
+  // FIXME: Do we really need to make a copy here ?
+  //*p_value = g_strdup (*p_value);
 }
 
 static void
@@ -892,15 +740,15 @@
 
   lc = *localeconv();
 
-  gnc_lconv_set(&lc.decimal_point, ".");
-  gnc_lconv_set(&lc.thousands_sep, ",");
-  gnc_lconv_set(&lc.grouping, "\003");
-  gnc_lconv_set(&lc.int_curr_symbol, "USD ");
-  gnc_lconv_set(&lc.currency_symbol, "$");
-  gnc_lconv_set(&lc.mon_decimal_point, ".");
-  gnc_lconv_set(&lc.mon_thousands_sep, ",");
-  gnc_lconv_set(&lc.mon_grouping, "\003");
-  gnc_lconv_set(&lc.negative_sign, "-");
+  gnc_lconv_set_utf8(&lc.decimal_point, ".");
+  gnc_lconv_set_utf8(&lc.thousands_sep, ",");
+  gnc_lconv_set_utf8(&lc.grouping, "\003");
+  gnc_lconv_set_utf8(&lc.int_curr_symbol, "USD ");
+  gnc_lconv_set_utf8(&lc.currency_symbol, "$");
+  gnc_lconv_set_utf8(&lc.mon_decimal_point, ".");
+  gnc_lconv_set_utf8(&lc.mon_thousands_sep, ",");
+  gnc_lconv_set_utf8(&lc.mon_grouping, "\003");
+  gnc_lconv_set_utf8(&lc.negative_sign, "-");
 
   gnc_lconv_set_char(&lc.frac_digits, 2);
   gnc_lconv_set_char(&lc.int_frac_digits, 2);
@@ -964,6 +812,53 @@
 }
 
 
+gnc_commodity *
+gnc_default_currency (void)
+{
+  gnc_commodity *currency;
+  gchar *choice, *mnemonic;
+
+  choice = gnc_gconf_get_string(GCONF_GENERAL, KEY_CURRENCY_CHOICE, NULL);
+  if (choice && strcmp(choice, "other") == 0) {
+    mnemonic = gnc_gconf_get_string(GCONF_GENERAL, KEY_CURRENCY_OTHER, NULL);
+    currency = gnc_commodity_table_lookup(gnc_get_current_commodities(),
+					  GNC_COMMODITY_NS_ISO, mnemonic);
+    DEBUG("mnemonic %s, result %p", mnemonic, currency);
+    g_free(mnemonic);
+    g_free(choice);
+
+    if (currency)
+      return currency;
+  }
+
+  return gnc_locale_default_currency ();
+}
+
+gnc_commodity *
+gnc_default_report_currency (void)
+{
+  gnc_commodity *currency;
+  gchar *choice, *mnemonic;
+
+  choice = gnc_gconf_get_string(GCONF_GENERAL_REPORT,
+				KEY_CURRENCY_CHOICE, NULL);
+  if (choice && strcmp(choice, "other") == 0) {
+    mnemonic = gnc_gconf_get_string(GCONF_GENERAL_REPORT,
+				    KEY_CURRENCY_OTHER, NULL);
+    currency = gnc_commodity_table_lookup(gnc_get_current_commodities(),
+					  GNC_COMMODITY_NS_ISO, mnemonic);
+    DEBUG("mnemonic %s, result %p", mnemonic, currency);
+    g_free(mnemonic);
+    g_free(choice);
+
+    if (currency)
+      return currency;
+  }
+
+  return gnc_locale_default_currency ();
+}
+
+
 /* Return the number of decimal places for this locale. */
 int 
 gnc_locale_decimal_places (void)
@@ -1108,8 +1003,8 @@
 
 static GNCPrintAmountInfo
 gnc_account_print_info_helper(Account *account, gboolean use_symbol,
-                              gnc_commodity * (*efffunc)(Account *),
-                              int (*scufunc)(Account*))
+                              gnc_commodity * (*efffunc)(const Account *),
+                              int (*scufunc)(const Account*))
 {
   GNCPrintAmountInfo info;
   gboolean is_iso;
@@ -1309,7 +1204,7 @@
   }
 
   /* print the integer part without separators */
-  sprintf(temp_buf, "%lld", (long long int) whole.num);
+  sprintf(temp_buf, "%" G_GINT64_FORMAT, whole.num);
   num_whole_digits = strlen (temp_buf);
 
   if (!info->use_separators)
@@ -1383,9 +1278,9 @@
     {
       val = gnc_numeric_reduce (val);
 
-      sprintf (temp_buf, " + %lld / %lld",
-               (long long int) val.num,
-               (long long int) val.denom);
+      sprintf (temp_buf, " + %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT,
+               val.num,
+               val.denom);
 
       strcat (buf, temp_buf);
     }
@@ -1625,7 +1520,7 @@
 
 G_INLINE_FUNC long long int multiplier (int num_decimals);
 
-G_INLINE_FUNC long long int
+long long int
 multiplier (int num_decimals)
 {
   switch (num_decimals)
@@ -1740,7 +1635,7 @@
       continue;
     }
 
-    /* Note we never need to check for then end of 'in_str' explicitly.
+    /* Note we never need to check for the end of 'in_str' explicitly.
      * The 'else' clauses on all the state transitions will handle that. */
     switch (state)
     {
@@ -2092,17 +1987,38 @@
 }
 
 /* enable/disable the auto_decimal_enabled option */
-void
-gnc_set_auto_decimal_enabled(gboolean enabled)
+static void
+gnc_set_auto_decimal_enabled (GConfEntry *entry, gpointer user_data)
 {
-  auto_decimal_enabled = enabled;
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  auto_decimal_enabled = gconf_value_get_bool(value);
 }
 
 /* set the number of auto decimal places to use */
+static void
+gnc_set_auto_decimal_places  (GConfEntry *entry, gpointer user_data)
+{
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  auto_decimal_places = gconf_value_get_float(value);
+}
+
 void
-gnc_set_auto_decimal_places( int places )
+gnc_ui_util_init (void)
 {
-  auto_decimal_places = places;
+  gnc_gconf_general_register_cb("reversed_accounts",
+				(GncGconfGeneralCb)gnc_configure_reverse_balance,
+				NULL);
+  gnc_gconf_general_register_cb("auto_decimal_point",
+				gnc_set_auto_decimal_enabled,
+				NULL);
+  gnc_gconf_general_register_cb("auto_decimal_places",
+				gnc_set_auto_decimal_places,
+				NULL);
+ 
 }
 
 /* These implementations are rather lame. */
Index: gw-app-utils-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gw-app-utils-spec.scm,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/app-utils/gw-app-utils-spec.scm -Lsrc/app-utils/gw-app-utils-spec.scm -u -r1.19 -r1.20
--- src/app-utils/gw-app-utils-spec.scm
+++ src/app-utils/gw-app-utils-spec.scm
@@ -26,9 +26,6 @@
    ws
    (lambda (wrapset client-wrapset) 
      (list 
-      "#include <global-options.h>\n"
-      "#include <option-util.h>\n"
-      "#include <global-options.h>\n"
       "#include <option-util.h>\n"
       "#include <gnc-euro.h>\n"
       "#include <gnc-exp-parser.h>\n"
@@ -136,32 +133,6 @@
 
   (gw:wrap-function
    ws
-   'gnc:c-options-init
-   '<gw:void>
-   "gnc_options_init"
-   '()
-   "Initialize the C side options code.")
-
-  (gw:wrap-function
-   ws
-   'gnc:c-options-shutdown
-   '<gw:void>
-   "gnc_options_shutdown"
-   '()
-   "Shutdown the C side options code.")
-
-  (gw:wrap-function
-   ws
-   'gnc:set-option-selectable-by-name
-   '<gw:void>
-   "gnc_set_option_selectable_by_name"
-   '(((<gw:mchars> caller-owned const) section)
-     ((<gw:mchars> caller-owned const) name)
-     (<gw:bool> selectable))
-   "Set the appropriate option widget to be selectable or not selectable, depending on if <gw:bool> selectable is true or false respectively.")
-
-  (gw:wrap-function
-   ws
    'gnc:option-db-set-option-selectable-by-name
    '<gw:void>
    "gnc_option_db_set_option_selectable_by_name"
@@ -199,14 +170,6 @@
 
   (gw:wrap-function
    ws
-   'gnc:option-refresh-ui
-   '<gw:void>
-   "gncp_option_refresh_ui"
-   '((<gw:scm> option))
-   "Refresh the gui option with the current values.")
-
-  (gw:wrap-function
-   ws
    'gnc:option-invoke-callback
    '<gw:void>
    "gncp_option_invoke_callback"
Index: app-utils.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/app-utils.scm,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/app-utils/app-utils.scm -Lsrc/app-utils/app-utils.scm -u -r1.24 -r1.25
--- src/app-utils/app-utils.scm
+++ src/app-utils/app-utils.scm
@@ -15,6 +15,7 @@
 (export-syntax N_)
 (export gnc:make-string-database)
 
+;; options.scm
 (export gnc:make-option)
 (export gnc:option-section)
 (export gnc:option-name)
@@ -52,6 +53,7 @@
 (export gnc:make-complex-boolean-option)
 (export gnc:make-pixmap-option)
 (export gnc:make-date-option)
+(export gnc:make-budget-option)
 (export gnc:get-rd-option-data-subtype)
 (export gnc:get-rd-option-data-show-time)
 (export gnc:get-rd-option-data-rd-list)
@@ -118,16 +120,11 @@
 (export gnc:config-var-value-is-default?)
 
 ;; prefs.scm
-(export gnc:register-configuration-option)
-(export gnc:lookup-global-option)
-(export gnc:send-global-options)
-(export gnc:global-options-clear-changes)
-(export gnc:save-all-options)
 (export gnc:get-debit-string)
 (export gnc:get-credit-string)
-(export gnc:*options-entries*)
-(export gnc:config-file-format-version)
-(export gnc:*save-options-hook*)
+
+;; gw-engine-spec.scm
+(re-export gnc:*save-options-hook*)
 
 ;; date-utilities.scm
 
@@ -137,16 +134,22 @@
 (export gnc:timepair->date)
 (export gnc:date->timepair)
 (export gnc:date-get-year)
+(export gnc:date-get-quarter)
 (export gnc:date-get-month-day)
 (export gnc:date-get-month)
 (export gnc:date-get-week-day)
 (export gnc:date-get-year-day)
 (export gnc:timepair-get-year)
+(export gnc:timepair-get-quarter)
 (export gnc:timepair-get-month-day)
 (export gnc:timepair-get-month)
 (export gnc:timepair-get-week-day)
 (export gnc:timepair-get-year-day)
+(export gnc:date-get-year-string)
+(export gnc:date-get-quarter-string)
+(export gnc:date-get-quarter-year-string)
 (export gnc:date-get-month-string)
+(export gnc:date-get-month-year-string)
 (export gnc:leap-year?)
 (export gnc:days-in-year)
 (export gnc:days-in-month)
@@ -225,26 +228,19 @@
 (export gnc:reldate-initialize)
 
 ;; hooks 
-(export gnc:hook-define)
-(export gnc:hook-danglers-get)
-(export gnc:hook-danglers-set!)
-(export gnc:hook-danglers->list)
-(export gnc:hook-replace-danglers)
-(export gnc:hook-run-danglers)
-(export gnc:hook-lookup)
-(export gnc:hook-add-dangler)
-(export gnc:hook-remove-dangler)
-(export gnc:hook-description-get)
-(export gnc:hook-name-get)
-(export gnc:*startup-hook*)
-(export gnc:*shutdown-hook*)
-(export gnc:*ui-startup-hook*)
-(export gnc:*ui-post-startup-hook*)
-(export gnc:*ui-shutdown-hook*)
-(export gnc:*book-opened-hook*)
-(export gnc:*new-book-hook*)
-(export gnc:*book-closed-hook*)
-(export gnc:*report-hook*)
+(re-export gnc:hook-define)
+(export gnc:hook-run-danglers)		;; from hooks.scm
+(re-export gnc:hook-add-dangler)
+(re-export gnc:hook-remove-dangler)
+(re-export gnc:*startup-hook*)
+(re-export gnc:*shutdown-hook*)
+(re-export gnc:*ui-startup-hook*)
+(re-export gnc:*ui-post-startup-hook*)
+(re-export gnc:*ui-shutdown-hook*)
+(re-export gnc:*book-opened-hook*)
+(re-export gnc:*new-book-hook*)
+(re-export gnc:*book-closed-hook*)
+(re-export gnc:*report-hook*)
 
 ;; simple-obj
 (export make-simple-class)
@@ -275,10 +271,6 @@
 (gnc:hook-add-dangler gnc:*startup-hook*
                       (lambda ()
                         (begin
-                          ;; Initialize the C side options code.
-                          ;; Must come after the scheme options are loaded.
-                          (gnc:c-options-init)
-
                           ;; Initialize the expression parser.
                           ;; Must come after the C side options initialization.
                           (gnc:exp-parser-init))))
@@ -290,13 +282,5 @@
                           ;; Shutdown the expression parser
                           (gnc:exp-parser-shutdown)
 
-                          ;; This saves global options plus (for the
-                          ;; moment) saved report and account tree
-                          ;; window parameters. Reports and parameters
-                          ;; should probably be in a separate file,
-                          ;; with the main data file, or something
-                          ;; else.
-                          (gnc:save-all-options)
-
-                          ;; Shut down the C side options code
-                          (gnc:c-options-shutdown))))
+                          ;; This saves options. E.G. Stylesheets.
+			  (gnc:hook-run-danglers gnc:*save-options-hook*))))
Index: gfec.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gfec.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/app-utils/gfec.c -Lsrc/app-utils/gfec.c -u -r1.2 -r1.3
--- src/app-utils/gfec.c
+++ src/app-utils/gfec.c
@@ -32,16 +32,15 @@
   {
     result = scm_call_2(func, tag, throw_args);
     if (SCM_STRINGP(result))
-      msg = gh_scm2newstr(result, NULL);
+      msg = SCM_STRING_CHARS(result);
   }
 
   if (msg == NULL)
   {
-    msg = strdup("Error running guile function.");
-    assert(msg != NULL);
+    msg = "Error running guile function.";
   }
 
-  *(char**)data = msg;
+  *(char**)data = strdup(msg);
 
   return SCM_UNDEFINED;
 }
@@ -61,7 +60,7 @@
 {
   char *file = data;
 
-  return gh_eval_file(file);
+  return scm_c_primitive_load(file);
 }
 
 SCM
Index: gnc-component-manager.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/gnc-component-manager.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/gnc-component-manager.h -Lsrc/app-utils/gnc-component-manager.h -u -r1.6 -r1.7
--- src/app-utils/gnc-component-manager.h
+++ src/app-utils/gnc-component-manager.h
@@ -46,8 +46,8 @@
  *          GUIDs to EventInfo structs describing which
  *          events have been received. Entities not in
  *          the hash have not generated any events.
- *          Entities which have been destroyed may not
- *          exist.
+ *          Entities which have been destroyed will be in 
+ *          the hash, but may not exist anymore.
  *
  *          Note since refreshes may not occur with every change,
  *          an entity may have all three change values.
@@ -60,6 +60,15 @@
  *                      entities used by the component may have
  *                      already been deleted. 'Refreshing' the
  *                      component may require closing the component.
+ * 
+ * Notes on dealing with destroyed entities: As stated above, entities
+ * in the changes GHashTable may no longer exist.  So how can you
+ * determine if this has happened?  Well, it's a good idea to check
+ * for the GNC_EVENT_DESTROY bit in the EventInfo structure.  Of
+ * course, that means you need the hash key (GUID) for the destroyed
+ * entity.  How are you going to get the GUID from the entity if the
+ * entity has already been destroyed?  You're not.  So, you have to
+ * save a COPY of the key (GUID) away beforehand.
  *
  * user_data: user_data supplied when component was registered.
  */
@@ -169,8 +178,7 @@
  * component_id: id of component which is watching the entity
  * session:      the session this component is associated with
  */
-void
-gnc_gui_component_set_session (gint component_id, gpointer session);
+void gnc_gui_component_set_session (gint component_id, gpointer session);
 
 /* gnc_gui_component_watch_entity
  *   Add an entity to the list of those being watched by the component.
@@ -222,7 +230,7 @@
  *          if it is not found.
  */
 const EventInfo * gnc_gui_get_entity_events (GHashTable *changes,
-                                             GUID *entity);
+                                             const GUID *entity);
 
 /* gnc_gui_component_clear_watches
  *   Clear all watches for the component.
Index: hooks.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/hooks.scm,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/app-utils/hooks.scm -Lsrc/app-utils/hooks.scm -u -r1.5 -r1.6
--- src/app-utils/hooks.scm
+++ src/app-utils/hooks.scm
@@ -15,115 +15,8 @@
 ;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
 ;; Boston, MA  02111-1307,  USA       gnu at gnu.org
 
-;;; 
-;;; Code to support emacs-inspired hooks.
-;;;
-
-;;;; This is not functional yet, but it should be close...
-
-;;; Private
-
-;; Central repository for all hooks -- so we can look them up later by name.
-(define gnc:*hooks* '())
-
-;;; Developers
-
-(define (gnc:hook-define name description)
-  (let ((hook-data (vector name description '())))
-    (set! gnc:*hooks* (assoc-set! gnc:*hooks* name hook-data))
-    hook-data))
-
-(define (gnc:hook-danglers-get hook)
-  (vector-ref hook 2))
-
-(define (gnc:hook-danglers-set! hook danglers)
-  (vector-set! hook 2 danglers))
-
-(define (gnc:hook-danglers->list hook)
-  (gnc:hook-danglers-get hook))
-
-(define (gnc:hook-replace-danglers hook function-list)
-  (gnc:hook-danglers-set! hook function-list))
-
 (define (gnc:hook-run-danglers hook . args)
-  (gnc:debug "Running functions on hook " (gnc:hook-name-get hook))
-  (for-each (lambda (dangler)
-              (if (gnc:debugging?)
-                  (begin
-                    (display "  ") (display dangler) (newline)))
-              (apply dangler args))
-            (gnc:hook-danglers-get hook)))
-
-;;; Public
-
-(define (gnc:hook-lookup name)
-  (assoc-ref gnc:*hooks* name))
-
-(define (gnc:hook-add-dangler hook function)
-  (let ((danglers (gnc:hook-danglers-get hook)))
-    (gnc:hook-danglers-set! hook (append danglers (list function)))))
-
-(define (gnc:hook-remove-dangler hook function)
-  (let ((danglers (gnc:hook-danglers-get hook)))
-    (gnc:hook-danglers-set! hook (delq! function danglers))))
-
-(define (gnc:hook-description-get hook)
-  (vector-ref hook 1))
-
-(define (gnc:hook-name-get hook)
-  (vector-ref hook 0))
-
-(define gnc:*startup-hook*
-  (gnc:hook-define
-   'startup-hook
-   "Functions to run at startup.  Hook args: ()"))
-
-(define gnc:*shutdown-hook*
-  (gnc:hook-define 
-   'shutdown-hook
-   "Functions to run at guile shutdown.  Hook args: ()"))
-
-(define gnc:*ui-startup-hook*
-  (gnc:hook-define
-   'ui-startup-hook
-   "Functions to run when the ui comes up.  Hook args: ()"))
-
-(define gnc:*ui-post-startup-hook*
-  (gnc:hook-define
-   'ui-post-startup-hook
-   "Functions to run after the ui comes up.  Hook args: ()"))
-
-(define gnc:*ui-shutdown-hook*
-  (gnc:hook-define 
-   'ui-shutdown-hook
-   "Functions to run at ui shutdown.  Hook args: ()"))
-
-(define gnc:*book-opened-hook*
-  (gnc:hook-define 
-   'book-opened-hook
-   "Run after book open.  Hook args: <gnc:Session*>."))
-
-(define gnc:*new-book-hook*
-  (gnc:hook-define 
-   'new-book-hook
-   "Run after a new (empty) book is opened, before the book-opened-hook. Hook args: ()"))
-
-(define gnc:*book-closed-hook*
-  (gnc:hook-define 
-   'book-closed-hook
-   "Run before file close.  Hook args: <gnc:Session*>"))
-
-(define gnc:*report-hook*
-  (gnc:hook-define
-   'report-hook
-   "Run just before the reports are pushed into the menus.  Hook args: ()"))
-
-;;(let ((hook (gnc:hook-lookup 'startup-hook)))
-;;  (display (gnc:hook-name-get hook))
-;;  (newline)
-;;  (display (gnc:hook-description-get hook))
-;;  (newline)
-;;  (gnc:hook-add-dangler hook (lambda ()
-;;                                   (display "Running a simple startup hook")
-;;                                   (newline)))
-;;  (gnc:hook-run-danglers hook))
+  (if (null? args)
+      (set! args #f)
+      (set! args (car args)))
+  (gnc:hook-run-danglers-real hook args))
Index: options.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/options.scm,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/app-utils/options.scm -Lsrc/app-utils/options.scm -u -r1.13 -r1.14
--- src/app-utils/options.scm
+++ src/app-utils/options.scm
@@ -121,7 +121,7 @@
 (define (gnc:option-value-validator option)  
   (vector-ref option 11))
 (define (gnc:option-data option)
-    (vector-ref option 12))
+  (vector-ref option 12))
 (define (gnc:option-data-fns option)
   (vector-ref option 13))
 
@@ -301,6 +301,55 @@
       (lambda (x) (list #t x))
       #f #f #f #f)))
 
+;; budget option
+;; TODO: need to double-check this proc
+(define (gnc:make-budget-option
+	 section
+	 name
+	 sort-tag
+         documentation-string)
+
+  (define (budget->guid budget)
+    (if (string? budget)
+        budget
+        (gnc:budget-get-guid budget)))
+
+  (define (guid->budget budget)
+    (if (string? budget)
+        (gnc:budget-lookup budget (gnc:get-current-book))
+        budget))
+
+  (let* ((default-value (gnc:budget-get-default (gnc:get-current-book)))
+         (value (budget->guid default-value))
+         (option-set #f)
+         (value->string (lambda ()
+                          (string-append
+                           "'" (gnc:value->string (if option-set option #f)))))
+
+         )
+    (gnc:make-option
+     section name sort-tag 'budget documentation-string
+     ;; the getter should always return a budget pointer
+     (lambda () (guid->budget  ;; getter
+                 (if option-set
+                     value
+                     default-value))
+             )
+
+     (lambda (x) (set! value (budget->guid x))
+             (set! option-set #t)) ;; setter
+     (lambda ()
+       (guid->budget
+        (gnc:budget-get-default (gnc:get-current-book)))) ;; default-getter
+     (gnc:restore-form-generator value->string) ;; ??
+     (lambda (f p) (gnc:kvp-frame-set-slot-path f value p))
+     (lambda (f p)
+       (let ((v (gnc:kvp-frame-get-slot-path f p)))
+         (if (and v (string? v))
+             (set! value v))))
+     (lambda (x) (list #t x)) ;; value-validator
+     #f #f #f #f)))
+
 ;; commodity options use a specialized widget for entering commodities
 ;; in the GUI implementation.
 (define (gnc:make-commodity-option
@@ -427,7 +476,9 @@
              (list #f "pixmap-option: not a string"))))
      #f #f #f #f)))
 
-;; subtype should be on of 'relative 'absolute or 'both
+;; show-time is boolean
+;; subtype should be one of 'relative 'absolute or 'both
+;; if subtype is 'absolute then relative-date-list should be #f
 ;; relative-date-list should be the list of relative dates permitted
 ;; gnc:all-relative-dates contains a list of all relative dates.
 
Index: prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/prefs.scm,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/app-utils/prefs.scm -Lsrc/app-utils/prefs.scm -u -r1.34 -r1.35
--- src/app-utils/prefs.scm
+++ src/app-utils/prefs.scm
@@ -19,6 +19,7 @@
 
 (require 'sort)
 (require 'hash-table)
+(use-modules (g-wrapped gw-core-utils))
 
 ;; (define gnc:*double-entry-restriction*
 ;;   (gnc:make-config-var
@@ -56,48 +57,8 @@
 ;;    eq?
 ;;    #f))
 
-(define gnc:*options-entries* (gnc:new-options))
 
-(define (gnc:register-configuration-option new-option)
-  (gnc:register-option gnc:*options-entries* new-option))
-
-(define (gnc:lookup-global-option section name)
-  (gnc:lookup-option gnc:*options-entries* section name))
-
-(define (gnc:send-global-options) gnc:*options-entries*)
-
-(define (gnc:global-options-clear-changes)
-  (gnc:options-clear-changes gnc:*options-entries*))
-
-(define gnc:*save-options-hook*
-  (gnc:hook-define 
-   'save-options-hook
-   "Functions to run when saving options.  Hook args: ()"))
-
-;; save-all-options: this is the actual hook that gets called at
-;; shutdown.  right now, we put all the options in the same file so
-;; it's important to make sure it happens in this order.  later the
-;; hook should probably revert back to just save-global-options.
-(define (gnc:save-all-options)
-  (gnc:save-global-options)
-  (gnc:hook-run-danglers gnc:*save-options-hook*))
-
-(define (gnc:save-global-options)
-  (gnc:make-home-dir)
-  (gnc:save-options gnc:*options-entries*
-                    (symbol->string 'gnc:*options-entries*)
-                    gnc:current-config-auto
-                    (string-append
-                     "(gnc:config-file-format-version 1)\n\n"
-                     ";"
-                     (_ "GnuCash Configuration Options")
-                     "\n")
-                    #t))
-
-(define (gnc:config-file-format-version version) #t)
-
-
-;;;;;; Create default options and config vars
+;;;;;; Create config vars
 
 (define gnc:*debit-strings*
   (list (cons 'NO_TYPE   (N_ "Funds In"))
@@ -136,663 +97,3 @@
 
 (define (gnc:get-credit-string type)
   (_ (assoc-ref gnc:*credit-strings* type)))
-
-;; International options
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "International") (N_ "Date Format")
-  "a" (N_ "Date Format Display") 'locale
-  (list (list->vector (list 'us
-                            (N_ "US (12/31/2001)")
-                            (N_ "US-style: mm/dd/yyyy")))
-        (list->vector (list 'uk
-                            (N_ "UK (31/12/2001)")
-                            (N_ "UK-style dd/mm/yyyy")))
-        (list->vector (list 'ce
-                            (N_ "Europe (31.12.2001)")
-                            (N_ "Continental Europe: dd.mm.yyyy")))
-        (list->vector (list 'iso
-                            (N_ "ISO (2001-12-31)")
-                            (N_ "ISO Standard: yyyy-mm-dd")))
-        (list->vector (list 'locale
-                            (N_ "Locale")
-                            (N_ "Default system locale format"))))))
-
-(gnc:register-configuration-option
- (gnc:make-currency-option
-  (N_ "International") (N_ "New Account Default Currency")
-  "b1" (N_ "Default currency for new accounts")
-  (gnc:locale-default-iso-currency-code)))
-
-(gnc:register-configuration-option
- (gnc:make-currency-option
-  (N_ "International") (N_ "Default Report Currency")
-  "b2" (N_ "Default currency for reports")
-  (gnc:locale-default-iso-currency-code)))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "International") (N_ "Use 24-hour time format")
-  "c" (N_ "Use a 24 hour (instead of a 12 hour) time format.") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "International") (N_ "Enable EURO support")
-  "d" (N_ "Enables support for the European Union EURO currency") 
-  (gnc:is-euro-currency-code (gnc:locale-default-iso-currency-code))))
-
-(gnc:register-configuration-option
- (gnc:make-dateformat-option
-  (N_ "International") (N_ "Fancy Date Format")
-  "e" (N_ "The default date format used for fancy printed dates") #f))
-
-
-;;; Register options
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "Register") (N_ "Default Register Style")
-  "a" (N_ "Default style for register windows")
-  'ledger
-  (list (list->vector
-         (list 'ledger
-               (N_ "Basic Ledger")
-               (N_ "Show transactions on one or two lines")))
-        (list->vector
-         (list 'auto_ledger
-               (N_ "Auto-Split Ledger")
-               (N_ "Show transactions on one or two lines \
-and expand the current transaction")))
-        (list->vector
-         (list 'journal
-               (N_ "Transaction Journal")
-               (N_ "Show expanded transactions with all splits"))))))
-
-(gnc:register-configuration-option     
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "Double Line Mode")
-  "aa" (N_ "Show two lines of information for each transaction") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "'Enter' moves to blank transaction")
-  "g" (N_ "If selected, move to the blank transaction after the user presses \
-'Enter'. Otherwise, move down one row.") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Register") (N_ "Confirm before changing reconciled")
-  "h" (N_ "If selected, use a dialog to confirm a change to a reconciled \
-transaction.") #t))
-
-(define (string-take-n string n)
-  (substring string n (string-length string)))
-
-(gnc:register-configuration-option
- (gnc:make-font-option
-  (N_ "Register") (N_ "Register font")
-  "i" (N_ "The font to use in the register")
-  (string-take-n (_ "register-default-font:-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*") 22)))
-
-(gnc:register-configuration-option
- (gnc:make-font-option
-  (N_ "Register") (N_ "Register hint font")
-  "j" (N_ "The font used to show hints in the register")
-  (string-take-n (_ "register-hint-font:-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*") 19)))
-
-
-;; Register Color options
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Header color")
-  "a" (N_ "The header background color")
-  (list #x96 #xb2 #x84 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Primary color")
-  "b" (N_ "The default background color for register rows")
-  (list #xbf #xde #xba 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Secondary color")
-  "c" (N_ "The default secondary background color for register rows")
-  (list #xf6 #xff #xdb 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Primary active color")
-  "d" (N_ "The background color for the current register row")
-  (list #xff #xf0 #x99 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Secondary active color")
-  "e" (N_ "The secondary background color for the current register row")
-  (list #xff #xf0 #x99 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Split color")
-  "f" (N_ "The default background color for split rows in the register")
-  (list #xed #xe8 #xd4 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-color-option
-  (N_ "Register Colors") (N_ "Split active color")
-  "g" (N_ "The background color for the current split row in the register")
-  (list #xff #xf0 #x99 0)
-  255
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Register Colors") (N_ "Double mode colors alternate with transactions")
-  "h" (N_ "Alternate the primary and secondary colors with each transaction, \
-not each row")
-  #f))
-
-
-;;; Summarybar Options
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Summarybar") (N_ "Show grand total")
-  "a" (N_ "Show a grand total of all accounts converted to the default report currency")
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Summarybar") (N_ "Show non currency commodities")
-  "b" (N_ "Show non currency commodities")
-  #t))
-
-(gnc:options-make-date-interval!
- gnc:*options-entries* (N_ "Summarybar")
- (N_ "Start date") (N_ "Start date for profit/loss calculation")
- (N_ "End date") (N_ "End date for profit/loss and date for net assets calculation")
- "c")
-
-;;; Reconcile Options
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Reconcile") (N_ "Automatic interest transfer")
-  "a" (N_ "Prior to reconciling an account which charges or pays interest, \
-prompt the user to enter a transaction for the interest charge or payment.
-Currently only enabled for Bank, Credit, Mutual, Asset, Receivable, Payable, and Liability accounts.")
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Reconcile") (N_ "Automatic credit card payments")
-  "b" (N_ "After reconciling a credit card statement, prompt the user \
-to enter a credit card payment")
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Reconcile") (N_ "Check off cleared transactions")
-  "c" (N_ "Automatically check off cleared transactions when reconciling")
-  #t))
-
-
-;;; User Info Options
-
-;(gnc:register-configuration-option
-; (gnc:make-string-option
-;  (N_ "User Info") (N_ "User Name")
-;  "b" (N_ "The name of the user. This is used in some reports.") ""))
-
-;(gnc:register-configuration-option
-; (gnc:make-text-option
-;  (N_ "User Info") (N_ "User Address")
-;  "c" (N_ "The address of the user. This is used in some reports.") ""))
-
-
-;;; General Options
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Show Advanced Settings")
-  "a" (N_ "Allow modification of less commonly used settings.") #f))
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "General") (N_ "Toolbar Buttons")
-  "b" (N_ "Choose whether to display icons, text, or both for toolbar buttons")
-  'icons_and_text
-  (list (list->vector
-         (list 'icons_and_text
-               (N_ "Icons and Text")
-               (N_ "Show both icons and text")))
-        (list->vector
-         (list 'icons_only
-               (N_ "Icons only")
-               (N_ "Show icons only")))
-        (list->vector
-         (list 'text_only
-               (N_ "Text only")
-               (N_ "Show text only"))))))
-
-(gnc:register-configuration-option
- (gnc:make-radiobutton-option
-  (N_ "Accounts") (N_ "Account Separator")
-  "c" (N_ "The character used to separate fully-qualified account names")
-  'colon
-  (list (list->vector
-         (list 'colon
-               (N_ ": (Colon)")
-               (N_ "Income:Salary:Taxable")))
-        (list->vector
-         (list 'slash
-               (N_ "/ (Slash)")
-               (N_ "Income/Salary/Taxable")))
-        (list->vector
-         (list 'backslash
-               (N_ "\\ (Backslash)")
-               (N_ "Income\\Salary\\Taxable")))
-        (list->vector
-         (list 'dash
-               (N_ "- (Dash)")
-               (N_ "Income-Salary-Taxable")))
-        (list->vector
-         (list 'period
-               (N_ ". (Period)")
-               (N_ "Income.Salary.Taxable"))))))
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "Accounts") (N_ "Reversed-balance account types")
-  "d" (N_ "The types of accounts for which balances are sign-reversed")
- 'credit
-  (list (list->vector
-         (list 'income-expense
-               (N_ "Income & Expense")
-               (N_ "Reverse Income and Expense Accounts")))
-        (list->vector
-         (list 'credit
-               (N_ "Credit Accounts")
-               (N_ "Reverse Credit Card, Payable, Liability, Equity, and Income \
-Accounts")))
-        (list->vector
-         (list 'none
-               (N_ "None")
-               (N_ "Don't reverse any accounts"))))))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Accounts") (N_ "Use accounting labels")
-  "e" (N_ "Only use 'debit' and 'credit' instead of informal synonyms") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Display \"Tip of the Day\"")
-  "f" (N_ "Display hints for using GnuCash at startup") #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Display negative amounts in red")
-  "g" (N_ "Display negative amounts in red") #t))
-
-; this option also changes the next option so that its
-; selectability matches the state of this option.
-(gnc:register-configuration-option
- (gnc:make-complex-boolean-option
-  (N_ "General") (N_ "Automatic Decimal Point")
-  "h" 
-  (N_ "Automatically insert a decimal point into values that are entered \
-without one.") 
-  #f #f
-  (lambda (x) (gnc:set-option-selectable-by-name "General"
-                                                 "Auto Decimal Places"
-                                                 x))))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "General") (N_ "Auto Decimal Places")
-  "i" (N_ "How many automatic decimal places will be filled in.")
-    ;; current range is 1-8 with default from the locale
-    (gnc:locale-decimal-places) ;; default
-    1.0 ;; lower bound
-    8.0 ;; upper bound
-    0.0 ;; number of decimals used for this range calculation
-    1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "No account list setup on new file")
-  "j" (N_ "Don't popup the new account list dialog when you choose \"New File\" from the \"File\" menu") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "General") (N_ "Use file compression")
-  "k" (N_ "Compress the data file.")
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "General") (N_ "Days to retain log files")
-  "k" (N_ "Delete old log/backup files after this many days (0 = never).")
-    30.0 ;; default
-    0.0 ;; lower bound
-    99999.0 ;; upper bound
-    0.0 ;; number of decimals used for this range calculation
-    1.0 ;; step size
-  ))
-
-;; QIF Import options. 
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Online Banking & Importing") (N_ "QIF Verbose documentation")
-  "a" (N_ "Show some documentation-only pages in QIF Import druid")
-  #t))
-
-
-;; Network/security options 
-;;(gnc:register-configuration-option
-;; (gnc:make-simple-boolean-option
-;;  (N_ "Network") (N_ "Allow http network access")
-;;  "a" (N_ "Enable GnuCash's HTTP client support.")
-;;  #t))
-;;
-;;(gnc:register-configuration-option
-;; (gnc:make-simple-boolean-option
-;;  (N_ "Network") (N_ "Allow https connections using OpenSSL")
-;;  "b" (N_ "Enable secure HTTP connections using OpenSSL")
-;;  #t))
-;;
-;;(gnc:register-configuration-option
-;; (gnc:make-simple-boolean-option
-;;  (N_ "Network") (N_ "Enable GnuCash Network")
-;;  "c" (N_ "The GnuCash Network server provides support and other services")
-;;  #t))
-;;
-;;(gnc:register-configuration-option 
-;; (gnc:make-string-option
-;;  (N_ "Network") (N_ "GnuCash Network server") 
-;;  "d" (N_ "Host to connect to for user registration and support services")
-;;  "www.gnucash.org"))
-
-
-;; Scheduled|Recurring Transactions
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Scheduled Transactions")
-  (N_ "Run on GnuCash start")
-  "a" (N_ "Should the Since-Last-Run window appear on GnuCash startup?")
-  #t ))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Scheduled Transactions")
-  (N_ "Auto-Create new Scheduled Transactions by default")
-  "b" (N_ "Should new Scheduled Transactions have the 'Auto Create' flag set by default?")
-  #f ))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Scheduled Transactions")
-  (N_ "Notify on new, auto-created Scheduled Transactions")
-  "c" (N_ "Should new Scheduled Transactions with the 'AutoCreate' flag set also be set to notify?")
-  #t ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "Scheduled Transactions")
-  (N_ "Default number of days in advance to create")
-  "d" (N_ "Default number of days in advance to create new Scheduled Transactions.")
-  0 ; default
-  0 ; min
-  99999 ; max
-  0 ; num decimals
-  1 ; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "Scheduled Transactions")
-  (N_ "Default number of days in advance to remind")
-  "e" (N_ "Default number of days in advance to remind on new Scheduled Transactions.")
-  0 ; default
-  0 ; min
-  99999 ; max
-  0 ; num-decimals
-  1 ; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "Scheduled Transactions")
-  (N_ "Template Register Lines")
-  "f" (N_ "How many lines in the template register?")
-  6  ; default
-  1  ; min
-  50 ; max
-  0  ; num-decimals
-  1  ; step size
-  ))
-
-
-;;; Advanced Options
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Save Window Geometry")
-  "a" (N_ "Save window sizes and positions.") #t))
-
-(gnc:register-configuration-option
- (gnc:make-multichoice-option
-  (N_ "_+Advanced") (N_ "Application MDI mode")
-  "ba" (N_ "Choose how new windows are created for reports and account trees.")
-  'mdi-notebook
-  (list (list->vector
-         (list 'mdi-notebook
-               (N_ "Notebook")
-               (N_ "New windows are created as notebook tabs in the \
-current top-level window")))
-        (list->vector
-         (list 'mdi-toplevel
-               (N_ "Top-level")
-               (N_ "Create a new top-level window for each report \
-or account tree")))
-        (list->vector
-         (list 'mdi-modal
-               (N_ "Single window")
-               (N_ "One window is used for all displays (select contents \
-through Window menu)")))
-        (list->vector
-         (list 'mdi-default
-               (N_ "Use GNOME default")
-               (N_ "Default MDI mode can be set in the GNOME \
-Control Center"))))))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Show Vertical Borders")
-  "c" (N_ "By default, show vertical borders on the cells.") #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Show Horizontal Borders")
-  "d" (N_ "By default, show horizontal borders on the cells.") #f))
-
-(gnc:register-configuration-option     
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Auto-Raise Lists")
-  "e" (N_ "Automatically raise the list of accounts or actions during input.")
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "Show All Transactions")
-  "f" (N_ "By default, show every transaction in an account.") #t))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "_+Advanced") (N_ "Number of Rows")
-  "g" (N_ "Default number of register rows to display.")
-   20.0 ;; default
-    1.0 ;; lower bound
-  200.0 ;; upper bound
-    0.0 ;; number of decimals
-    1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  (N_ "_+Advanced") (N_ "New Search Limit")
-  "j" (N_ "Default to 'new search' if fewer than this number of items is returned.")
-    1.0 ;; default
-    1.0 ;; lower bound
-  100.0 ;; upper bound
-    0.0 ;; number of decimals
-    1.0 ;; step size
-  ))
-
-
-;;; Internal options -- Section names that start with "__" are not
-;;; displayed in option dialogs.
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "account_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "account_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodities_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodities_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "help_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "help_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "main_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "main_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "prices_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "prices_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_stock_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "reg_column_widths" '()))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "report_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "report_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "tax_info_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "tax_info_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_list_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_list_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_editor_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_editor_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_sincelast_win_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "sx_sincelast_win_height" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__exp_parser" "defined_variables" '()))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__new_user" "first_startup" #t))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gnc_network" "uid" ""))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Export Accounts" #f))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Import QIF" #f))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__paths"  "Import OFX" #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  "__gui" "search_for_active_only"
-  "" ""
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "commodity_include_iso" 0))
--- src/app-utils/global-options.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/********************************************************************\
- * global-options.c -- GNOME global option handling                 *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include "global-options.h"
-#include "option-util.h"
-#include "gnc-engine-util.h"
-#include "gnc-ui-util.h"
-
-
-/* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
-
-static GNCOptionDB *global_options = NULL;
-
-
-/********************************************************************\
- * gnc_options_init                                                 *
- *   initialize the options structures from the guile side          *
- *                                                                  *
- * Args: none                                                       *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_options_init(void)
-{
-  SCM func = scm_c_eval_string("gnc:send-global-options");
-  SCM options;
-
-  if (SCM_PROCEDUREP(func))
-    options = scm_call_0(func);
-  else
-  {
-    PERR("gnc_options_init: no guile options!");
-    return;
-  }
-
-  global_options = gnc_option_db_new(options);
-}
-
-
-/********************************************************************\
- * gnc_options_shutdown                                             *
- *   unregister the scheme options and free the structure memory    *
- *                                                                  *
- * Args: none                                                       *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_options_shutdown(void)
-{
-  gnc_option_db_destroy(global_options);
-  global_options = NULL;
-}
-
-
-/********************************************************************\
- * gnc_register_option_change_callback                              *
- *   register a callback to be called whenever an option changes    *
- *                                                                  *
- * Args: callback  - the callback function                          *
- *       user_data - the user data for the callback                 *
- *       section   - the section to get callbacks for.              *
- *                   If NULL, get callbacks for any section changes.*
- *       name      - the option name to get callbacks for.          *
- *                   If NULL, get callbacks for any option in the   *
- *                   section. Only used if section is non-NULL.     *
- * Returns: SCM handle for unregistering                            *
-\********************************************************************/
-SCM
-gnc_register_option_change_callback(GNCOptionChangeCallback callback,
-                                    gpointer user_data,
-                                    char *section,
-                                    char *name)
-{
-  return gnc_option_db_register_change_callback(global_options, callback,
-                                                user_data, section, name);
-}
-
-
-/********************************************************************\
- * gnc_unregister_option_change_callback_id                         *
- *   unregister the change callback associated with the given id    *
- *                                                                  *
- * Args: callback_id - the callback function id                     *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_unregister_option_change_callback_id(SCM callback_id)
-{
-  gnc_option_db_unregister_change_callback_id(global_options, callback_id);
-}
-
-
-/********************************************************************\
- * gnc_get_option_by_name                                           *
- *   returns an option given section name and name                  *
- *                                                                  *
- * Args: section_name - name of section to search for               *
- *       name         - name to search for                          *
- * Returns: given option, or NULL if none                           *
-\********************************************************************/
-GNCOption *
-gnc_get_option_by_name(const char *section_name, const char *name)
-{
-  return gnc_option_db_get_option_by_name(global_options,
-                                          section_name, name);
-}
-
-
-/********************************************************************\
- * gnc_get_option_by_SCM                                            *
- *   returns an option given SCM handle. Uses section and name.     *
- *                                                                  *
- * Args: guile_option - SCM handle of option                        *
- * Returns: given option, or NULL if none                           *
-\********************************************************************/
-GNCOption *
-gnc_get_option_by_SCM(SCM guile_option)
-{
-  return gnc_option_db_get_option_by_SCM(global_options, guile_option);
-}
-
-
-/********************************************************************\
- * gnc_lookup_option                                                *
- *   looks up an option. If present, returns its SCM value,         *
- *   otherwise returns the default.                                 *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: option value                                             *
-\********************************************************************/
-SCM
-gnc_lookup_option(const char *section, const char *name, SCM default_value)
-{
-  return gnc_option_db_lookup_option(global_options, section,
-                                     name, default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_boolean_option                                        *
- *   looks up a boolean option. If present, returns its value,      *
- *   otherwise returns the default.                                 *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: gboolean option value                                    *
-\********************************************************************/
-gboolean
-gnc_lookup_boolean_option(const char *section, const char *name,
-                          gboolean default_value)
-{
-  return gnc_option_db_lookup_boolean_option(global_options, section,
-                                             name, default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_string_option                                         *
- *   looks up a string option. If present, returns its malloc'ed    *
- *   value, otherwise returns the strdup'ed default, or NULL if     *
- *   default was NULL.                                              *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: char * option value                                      *
-\********************************************************************/
-char *
-gnc_lookup_string_option(const char *section, const char *name,
-                         const char *default_value)
-{
-  return gnc_option_db_lookup_string_option(global_options, section,
-                                            name, default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_font_option                                           *
- *   looks up a font option. If present, returns its malloc'ed      *
- *   string value, otherwise returns the strdup'ed default, or NULL *
- *   if default was NULL.                                           *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: char * option value                                      *
-\********************************************************************/
-char *
-gnc_lookup_font_option(const char *section, const char *name,
-                       const char *default_value)
-{
-  return gnc_option_db_lookup_font_option(global_options, section,
-                                          name, default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_multichoice_option                                    *
- *   looks up a multichoice option. If present, returns its         *
- *   name as a malloc'ed string                                     *
- *   value, otherwise returns the strdup'ed default, or NULL if     *
- *   default was NULL.                                              *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: char * option value                                      *
-\********************************************************************/
-char *
-gnc_lookup_multichoice_option(const char *section, const char *name,
-                              const char *default_value)
-{
-  return gnc_option_db_lookup_multichoice_option(global_options, section,
-                                                 name, default_value);
-}
-
-/********************************************************************\
- * gnc_lookup_date_option                                           *
- *   looks up a date option. If present, returns the absolute date  *
- *   represented in the set_ab_value argument provided, otherwise   *
- *   copies the default_value argument (if non-NULL) to the         *
- *   set_value argument. If the default_value argument is NULL,     *
- *   copies the current date to set_ab_value. Whatever value is     *
- *   stored in set_value is return as an approximate (no            *
- *   nanoseconds) time_t value. set_value may be NULL, in which     *
- *   case only the return value can be used. If is_relative is      *
- *   non-NULL, it is set to whether the date option is currently    *
- *   storing a relative date.  If it is, and set_rel_value          *
- *   is non-NULL, it returns a newly allocated string               *
- *   representing the scheme symbol for that relative date          *
- *                                                                  *
- * Args: section       - section name of option                     *
- *       name          - name of option                             *
- *       set_ab_value  - location to store absolute option value    *
- *       set_rel_value - location to store relative option value    *
- *       default       - default value if not found                 *
- * Return: time_t approximation of set_value                        *
-\********************************************************************/
-time_t 
-gnc_lookup_date_option(const char *section,
-		       const char *name,
-		       gboolean *is_relative,
-		       Timespec *set_ab_value,
-		       char **set_rel_value, 
-		       Timespec *default_value)
-{
-  return gnc_option_db_lookup_date_option(global_options, section, name,
-					  is_relative, set_ab_value,
-					  set_rel_value, default_value);
-}
-
-/********************************************************************\
- * gnc_lookup_number_option                                         *
- *   looks up a number option. If present, return its value         *
- *   as a gdouble, otherwise returns default_value.                 *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- *       default - default value if not found                       *
- * Return: char * option value                                      *
-\********************************************************************/
-gdouble
-gnc_lookup_number_option(const char *section, const char *name,
-                         gdouble default_value)
-{
-  return gnc_option_db_lookup_number_option(global_options, section,
-                                            name, default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_color_option                                          *
- *   looks up a color option. If present, returns its value in the  *
- *   color variable, otherwise leaves the color variable alone.     *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       red       - where to store the red value                   *
- *       blue      - where to store the blue value                  *
- *       green     - where to store the green value                 *
- *       alpha     - where to store the alpha value                 *
- * Return: true if option was found                                 *
-\********************************************************************/
-gboolean gnc_lookup_color_option(const char *section, const char *name,
-                                 gdouble *red, gdouble *green,
-                                 gdouble *blue, gdouble *alpha)
-{
-  return gnc_option_db_lookup_color_option(global_options, section, name,
-                                           red, green, blue, alpha);
-}
-
-
-/********************************************************************\
- * gnc_lookup_color_option_argb                                     *
- *   looks up a color option. If present, returns its argb value,   *
- *   otherwise returns the given default value.                     *
- *                                                                  *
- * Args: odb       - option database to search in                   *
- *       section   - section name of option                         *
- *       name      - name of option                                 *
- *       default_value - default value to return if problem         *
- * Return: argb value                                               *
-\********************************************************************/
-guint32
-gnc_lookup_color_option_argb(const char *section, const char *name,
-                             guint32 default_value)
-{
-  return gnc_option_db_lookup_color_option_argb(global_options, section, name,
-                                                default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_list_option                                           *
- *   looks up a list option. If present, returns its value as a     *
- *   list of strings representing the symbols.                      *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       default_value - default value to return if problem         *
- * Return: list of values                                           *
-\********************************************************************/
-GSList *
-gnc_lookup_list_option(const char *section, const char *name,
-                       GSList *default_value)
-{
-  return gnc_option_db_lookup_list_option(global_options, section, name,
-                                          default_value);
-}
-
-
-/********************************************************************\
- * gnc_lookup_currency_option                                       *
- *   looks up a currency option.                                    *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       default_value - default value to return if problem         *
- * Return: currency object or NULL                                  *
-\********************************************************************/
-gnc_commodity *
-gnc_lookup_currency_option(const char *section,
-                           const char *name,
-                           gnc_commodity *default_value)
-{
-  return gnc_option_db_lookup_currency_option(global_options, section, name,
-                                              default_value);
-}
-
-
-/********************************************************************\
- * gnc_default_currency                                             *
- *   Return the default currency set by the user.                   *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       default_value - default value to return if problem         *
- * Return: currency object or NULL                                  *
-\********************************************************************/
-gnc_commodity *
-gnc_default_currency (void)
-{
-  gnc_commodity *currency;
-
-  currency = gnc_lookup_currency_option ("International",
-                                         "New Account Default Currency", NULL);
-  if (currency)
-    return currency;
-
-  return gnc_locale_default_currency ();
-}
-
-gnc_commodity *
-gnc_default_report_currency (void)
-{
-  gnc_commodity *currency;
-
-  currency = gnc_lookup_currency_option ("International",
-                                         "Default Report Currency", NULL);
-  if (currency)
-    return currency;
-
-  return gnc_locale_default_currency ();
-}
-
-
-/********************************************************************\
- * gnc_set_option_default                                           *
- *   set the option to its default value                            *
- *                                                                  *
- * Args: section - section name of option                           *
- *       name    - name of option                                   *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_set_option_default(const char *section, const char *name)
-{
-  gnc_option_db_set_option_default(global_options, section, name);
-}
-
-
-/********************************************************************\
- * gnc_set_option                                                   *
- *   sets the option to the given value. If successful              *
- *   returns TRUE, otherwise FALSE.                                 *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       value     - value to set to                                *
- * Return: success indicator                                        *
-\********************************************************************/
-gboolean
-gnc_set_option(const char *section, const char *name, SCM value)
-{
-  return gnc_option_db_set_option(global_options, section, name, value);
-}
-
-
-/********************************************************************\
- * gnc_set_number_option                                            *
- *   sets the number option to the given value. If successful       *
- *   returns TRUE, otherwise FALSE.                                 *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       value     - value to set to                                *
- * Return: success indicator                                        *
-\********************************************************************/
-gboolean
-gnc_set_number_option(const char *section, const char *name, gdouble value)
-{
-  return gnc_option_db_set_number_option(global_options, section, name, value);
-}
-
-/********************************************************************\
- * gnc_set_boolean_option                                           *
- *   sets the boolean option to the given value. If successful      *
- *   returns TRUE, otherwise FALSE.                                 *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       value     - value to set to                                *
- * Return: success indicator                                        *
-\********************************************************************/
-gboolean
-gnc_set_boolean_option(const char *section, const char *name, gboolean value)
-{
-  return gnc_option_db_set_boolean_option(global_options, section, name, value);
-}
-
-
-/********************************************************************\
- * gnc_set_string_option                                            *
- *   sets the string option to the given value. If successful       *
- *   returns TRUE, otherwise FALSE.                                 *
- *                                                                  *
- * Args: section   - section name of option                         *
- *       name      - name of option                                 *
- *       value     - value to set to                                *
- * Return: success indicator                                        *
-\********************************************************************/
-gboolean
-gnc_set_string_option(const char *section, const char *name, const char *value)
-{
-  return gnc_option_db_set_string_option(global_options, section, name, value);
-}
-
-
-/********************************************************************\
- * _gnc_option_refresh_ui                                           *
- *   sets the GUI representation of an option with its              *
- *   current guile value.  Designed to be called from guile         *
- *                                                                  *
- * Args: option - SCM handle to option                              *
- * Return: nothing                                                  *
-\********************************************************************/
-void
-gncp_option_refresh_ui(SCM guile_option)
-{
-  GNCOption *option;
-
-  option = gnc_option_db_get_option_by_SCM(global_options, guile_option);
-  gnc_option_set_ui_value(option, FALSE);
-}
-
-/********************************************************************\
- *  gnc_option_refresh_ui_by_name                                   *
- *   sets the GUI representation of an option with its current      *
- *   current guile value.  Designed to be called from GUI           *
- *                                                                  *
- * Args: section_name: name of option's section                     *
- *       name        : name of option                               *
- * Return: nothing                                                  *
-\********************************************************************/
-void 
-gnc_option_refresh_ui_by_name(const char *section_name, const char *name)
-{
-  GNCOption *option;
-  option = gnc_option_db_get_option_by_name(global_options, section_name,
-					    name);
-  gnc_option_set_ui_value(option, FALSE);
-}
-
-/********************************************************************\
- *  gnc_set_option_selectable_by_name                               *
- *   sets the the sensitivity of a global option widget             *
- *                                                                  *
- * Args: section_name: name of option's section                     *
- *       name        : name of option                               *
- * Return: nothing                                                  *
-\********************************************************************/
-void
-gnc_set_option_selectable_by_name(const char *section_name, 
-                                  const char *name,
-                                  gboolean selectable)
-{
-  GNCOption *option;
-
-  option = gnc_option_db_get_option_by_name(global_options, section_name,
-                                            name);
-  if (option)
-    gnc_option_set_selectable (option, selectable);
-}
-
-/********************************************************************\
- * gnc_get_global_options                                           *
- *   returns the global options database. Should only be called     *
- *   be the options gui builder, nothing else                       *
- *                                                                  *
- * Args: none                                                       *
- * Return: global options database                                  *
-\********************************************************************/
-GNCOptionDB *
-gnc_get_global_options(void)
-{
-  return global_options;
-}
Index: config-var.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/config-var.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/app-utils/config-var.scm -Lsrc/app-utils/config-var.scm -u -r1.1 -r1.2
--- src/app-utils/config-var.scm
+++ src/app-utils/config-var.scm
@@ -15,7 +15,7 @@
 ;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
 ;; Boston, MA  02111-1307,  USA       gnu at gnu.org
 
-;;; config-var: You can create them, set values, find out of the value
+;;; config-var: You can create them, set values, find out if the value
 ;;; is different from the default, and you can get a description.  You
 ;;; can also specify an action function which will be called whenever
 ;;; the value is changed.  The action function receives the special
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/Makefile.am,v
retrieving revision 1.32
retrieving revision 1.33
diff -Lsrc/app-utils/Makefile.am -Lsrc/app-utils/Makefile.am -u -r1.32 -r1.33
--- src/app-utils/Makefile.am
+++ src/app-utils/Makefile.am
@@ -7,17 +7,28 @@
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/calculation \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
+  -I${top_srcdir}/lib/glib26 \
   ${GUILE_INCS} \
   ${G_WRAP_COMPILE_ARGS} \
   ${GLIB_CFLAGS} \
-  ${GNOME_INCLUDEDIR}
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS}
 
 libgncmod_app_utils_la_SOURCES = \
   file-utils.c \
   gfec.c \
-  global-options.c \
+  gnc-accounting-period.c \
   gnc-component-manager.c \
+  gnc-druid.c \
+  gnc-druid-cb.c \
+  gnc-druid-provider.c \
+  gnc-druid-provider-desc.c \
+  gnc-druid-provider-desc-edge.c \
+  gnc-druid-provider-desc-file.c \
+  gnc-druid-provider-desc-multifile.c \
+  gnc-druid-provider-file-cb.c \
   gnc-err-popup.c \
   gnc-euro.c \
   gnc-exp-parser.c \
@@ -32,8 +43,17 @@
 gncinclude_HEADERS = \
   file-utils.h \
   gfec.h \
-  global-options.h \
+  gnc-basic-gobject.h \
+  gnc-accounting-period.h \
   gnc-component-manager.h \
+  gnc-druid.h \
+  gnc-druid-cb.h \
+  gnc-druid-provider.h \
+  gnc-druid-provider-desc.h \
+  gnc-druid-provider-desc-edge.h \
+  gnc-druid-provider-desc-file.h \
+  gnc-druid-provider-desc-multifile.h \
+  gnc-druid-provider-file-cb.h \
   gnc-err-popup.h \
   gnc-euro.h \
   gnc-exp-parser.h \
@@ -48,17 +68,17 @@
 noinst_HEADERS = \
   gw-app-utils.h
 
-libgncmod_app_utils_la_LDFLAGS = -module
-
 libgncmod_app_utils_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/calculation/libgncmod-calculation.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
+  ${top_builddir}/lib/glib26/libgncglib.la \
   ${GUILE_LIBS} \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
 libgw_app_utils_la_SOURCES = gw-app-utils.c
-libgw_app_utils_la_LDFLAGS = -module
 
 gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
 gncmod_DATA = app-utils.scm 
Index: gncmod-utility-reports.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/utility-reports/gncmod-utility-reports.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/utility-reports/gncmod-utility-reports.c -Lsrc/report/utility-reports/gncmod-utility-reports.c -u -r1.5 -r1.6
--- src/report/utility-reports/gncmod-utility-reports.c
+++ src/report/utility-reports/gncmod-utility-reports.c
@@ -8,7 +8,6 @@
 #include "config.h"
 #include <stdio.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 #include <glib.h>
 
 #include "gnc-module.h"
Index: utility-reports.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/utility-reports/utility-reports.scm,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/report/utility-reports/utility-reports.scm -Lsrc/report/utility-reports/utility-reports.scm -u -r1.6 -r1.7
--- src/report/utility-reports/utility-reports.scm
+++ src/report/utility-reports/utility-reports.scm
@@ -13,4 +13,6 @@
 (use-modules (gnucash report view-column))
 (use-modules (gnucash report welcome-to-gnucash))
 
+(use-modules (gnucash report test-graphing))
+
 (re-export gnc:make-welcome-report)
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/utility-reports/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/report/utility-reports/Makefile.am -Lsrc/report/utility-reports/Makefile.am -u -r1.7 -r1.8
--- src/report/utility-reports/Makefile.am
+++ src/report/utility-reports/Makefile.am
@@ -26,7 +26,8 @@
   iframe-url.scm \
   utility-reports.scm \
   view-column.scm \
-  welcome-to-gnucash.scm 
+  welcome-to-gnucash.scm \
+  test-graphing.scm
 
 EXTRA_DIST = ${gncscmmod_DATA}
 
Index: gnc-ui.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-ui.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -Lsrc/gnc-ui.h -Lsrc/gnc-ui.h -u -r1.32 -r1.33
--- src/gnc-ui.h
+++ src/gnc-ui.h
@@ -18,6 +18,16 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
 \********************************************************************/
 
+
+/** @addtogroup GUI
+    @{ */
+
+/** @defgroup Dialogs Dialogs */
+/** @defgroup Druids Druids */
+
+/** @} */
+
+
 #ifndef GNC_UI_H
 #define GNC_UI_H
 
@@ -29,37 +39,33 @@
 
 
 /** Help Files ******************************************************/
-#define HH_ACC               "gnucash-help/usage.html#acct-create"
-#define HH_ACCEDIT           "gnucash-help/usage.html#acct-edit"
-#define HH_COMMODITY         "gnucash-help/usage.html#tool-commodity"
-#define HH_CUSTOMER          "gnucash-help/usage.html"
-#define HH_EMPLOYEE          "gnucash-help/usage.html"
-#define HH_FIND_TRANSACTIONS "gnucash-help/usage.html#tool-find"
-#define HH_GLOBPREFS         "gnucash-help/custom-gnucash.html#set-prefs"
-#define HH_HELP              "gnucash-help/help.html"
-#define HH_INVOICE           "gnucash-help/usage.html"
-#define HH_JOB               "gnucash-help/usage.html"
-#define HH_MAIN              "gnucash-guide/index.html"
-#define HH_ORDER             "gnucash-help/usage.html"
-#define HH_PRINTCHECK        "gnucash-help/usage.html#print-check"
-#define HH_QUICKSTART        "gnucash-guide/index.html"
-#define HH_RECNWIN           "gnucash-help/usage.html#acct-reconcile"
-#define HH_SXEDITOR          "gnucash-help/usage.html#tran-sched"
-#define HH_VENDOR            "gnucash-help/usage.html"
+#define HF_USAGE             "gnucash-help/usage.html"
+#define HF_CUSTOM            "gnucash-help/custom-gnucash.html"
+#define HF_GUIDE             "gnucash-guide/index.html"
+#define HF_HELP              "gnucash-help/help.html"
+
+/** Links in the Help Files *****************************************/
+#define HL_ACC               "acct-create"
+#define HL_ACCEDIT           "acct-edit"
+#define HL_COMMODITY         "tool-commodity"
+#define HL_FIND_TRANSACTIONS "tool-find"
+#define HL_GLOBPREFS         "set-prefs"
+#define HL_PRINTCHECK        "print-check"
+#define HL_RECNWIN           "acct-reconcile"
+#define HL_SXEDITOR          "tran-sched"
+#define HL_GCONF             "gconf"
+
+/* GTK Windows - Common Response Codes */
+
+#define GNC_RESPONSE_NEW    1
+#define GNC_RESPONSE_DELETE 2
+#define GNC_RESPONSE_EDIT   3
 
 /* Dialog windows ***************************************************/
 
-typedef enum
-{
-  GTK_RESPONSE_NO,
-  GTK_RESPONSE_YES,
-  GTK_RESPONSE_CANCEL,
-  GTK_RESPONSE_OK
-} GNCVerifyResult;
-
-extern GNCVerifyResult
+extern gint
 gnc_verify_cancel_dialog(gncUIWidget parent,
-			 GNCVerifyResult default_result,
+			 gint default_result,
 			 const char *format, ...) G_GNUC_PRINTF (3,4);
 
 
@@ -69,11 +75,15 @@
 		  gboolean yes_is_default,
 		  const char *format, ...) G_GNUC_PRINTF (3, 4);
 
+gint
+gnc_verify_remember_dialog(gncUIWidget parent, const gchar *gconf_key,
+			   const gchar *yes_label, const gchar *no_label,
+			   const gchar *format, ...) G_GNUC_PRINTF (5,6);
 
 
-extern GNCVerifyResult
+extern gint
 gnc_ok_cancel_dialog(gncUIWidget parent,
-		     GNCVerifyResult default_result,
+		     gint default_result,
 		     const char *format, ...) G_GNUC_PRINTF (3,4);
 
 
@@ -84,11 +94,19 @@
 
 
 
+gint
+gnc_warning_remember_dialog(gncUIWidget parent, const gchar *gconf_key,
+			   const gchar *yes_label, const gchar *no_label,
+			   const gchar *format, ...) G_GNUC_PRINTF (5,6);
+
+
 extern void
 gnc_error_dialog(GtkWidget *parent,
 		 const char *forrmat, ...) G_GNUC_PRINTF (2, 3);
 
 
+extern void
+gnc_gnome_help (const char *file_name, const char *target_link);
 
 int      gnc_choose_radio_option_dialog (gncUIWidget parent,
 					 const char *title,
@@ -99,7 +117,7 @@
 gboolean gnc_dup_trans_dialog (gncUIWidget parent, time_t *date_p,
                                const char *num, char **out_num);
 void     gnc_tax_info_dialog (gncUIWidget parent);
-void     gnc_stock_split_dialog (Account * initial);
+void     gnc_stock_split_dialog (gncUIWidget parent, Account * initial);
 
 typedef enum
 {
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/.cvsignore,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/.cvsignore -Lsrc/.cvsignore -u -r1.14 -r1.15
--- src/.cvsignore
+++ src/.cvsignore
@@ -8,3 +8,5 @@
 .deps
 .libs
 gnc-dir.h
+.DS_Store
+
Index: valgrind-gnucash.supp
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/valgrind-gnucash.supp,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/valgrind-gnucash.supp -Lsrc/valgrind-gnucash.supp -u -r1.2 -r1.3
--- src/valgrind-gnucash.supp
+++ src/valgrind-gnucash.supp
@@ -30,6 +30,7 @@
 #     Param Value1 Value2 Value4 Value8 Value16
 #     Free Addr1 Addr2 Addr4 Addr8 Addr16
 #     Cond (previously known as Value0)
+#     Leak
 #
 # and the optional extra info is:
 #     if Param: name of system call param
@@ -61,4 +62,221 @@
    fun:g_hash_table_lookup_extended
 }
 
+{
+   <insert a suppression name here>
+   Memcheck:Param
+   write(buf)
+   fun:__write_nocancel
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_X11TransWrite
+   obj:/usr/X11R6/lib/libX11.so.6.2
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   obj:/usr/lib/libORBit-2.so.0.0.0
+   fun:link_connection_writev
+   fun:giop_send_buffer_write
+}
+
+{
+   <insert a suppression name here>
+   core:PThread
+   fun:pthread_mutex_lock
+   fun:_IO_flockfile
+   fun:pango_read_line
+   fun:pango_find_map
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Param
+   writev(vector[...])
+   fun:writev
+   obj:/usr/X11R6/lib/libX11.so.6.2
+   fun:_X11TransWritev
+   fun:_XSend
+}
+
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   obj:/usr/lib/libguile.so.12.3.0
+   obj:/usr/lib/libguile.so.12.3.0
+   obj:/usr/lib/libguile.so.12.3.0
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:realloc
+   fun:scm_make_port_type
+   fun:scm_init_vports
+   obj:/usr/lib/libguile.so.12.3.0
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:realloc
+   obj:/usr/lib/libguile.so.12.3.0
+   fun:scm_gc_for_newcell
+   fun:scm_acons
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:register_state
+   fun:create_cd_newstate
+   fun:re_compile_internal
+}
+
+
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:*
+   fun:poptGetContext
+   fun:gnome_program_preinit
+   obj:/usr/lib/libgnome-2.so.0.800.0
+}
+
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:IceAddConnectionWatch
+   fun:gnome_ice_init
+   obj:/usr/lib/libgnomeui-2.so.0.800.0
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:g_malloc
+   fun:ORBit_alloc_string
+   fun:CORBA_string_dup
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:__gconv_open
+   fun:iconv_open
+   obj:/usr/lib/libglib-2.0.so.0.400.8
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:_dl_map_object_from_fd
+   fun:_dl_map_object
+   fun:openaux
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:FcFontSetCreate
+   fun:FcConfigBuildFonts
+   fun:FcInitLoadConfigAndFonts
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:*
+   obj:/usr/lib/libfontconfig.so.1.0.4
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:FT_New_Memory
+   fun:FT_Init_FreeType
+   fun:XftInitFtLibrary
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:XRenderFindDisplay
+   fun:XRenderQueryExtension
+   fun:_XftDisplayInfoGet
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   obj:/usr/X11R6/lib/libXft.so.2.1.2
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   obj:/usr/bin/esd
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   obj:/usr/bin/esd
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   obj:/lib/libasound.so.2.0.0
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:esd_get_socket_dirname
+   fun:esd_get_socket_name
+   fun:esd_open_sound
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:snd_config_update_r
+   fun:snd_config_update
+   fun:snd_pcm_open
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:calloc
+   fun:snd_output_stdio_attach
+   fun:esd_audio_open
+   obj:/usr/bin/esd
+}
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:malloc
+   fun:esd_get_socket_name
+   fun:esd_open_sound
+   obj:/usr/lib/libgnome-2.so.0.800.0
+}
+
+{
+   <insert a suppression name here>
+   Memcheck:Leak
+   fun:realloc
+   obj:/lib/libcrypto.so.0.9.7a
+}
+
+
 # ##----------------------------------------------------------------------##
Index: guile-mappings.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/guile-mappings.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/guile-mappings.h -Lsrc/guile-mappings.h -u -r1.2 -r1.3
--- src/guile-mappings.h
+++ src/guile-mappings.h
@@ -17,59 +17,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
 \********************************************************************/
 
-/*
- * This include should go away when guile 1.4 is no longer supported
- * and all the gh_xxx mappings have been removed.
- */
-#include <guile/gh.h>
-
-/*
- * Configure insists on a minimum version of guile of 1.3.4.
- */
-#if ((GNC_GUILE_MAJOR_VERSION == 1) && (GNC_GUILE_MINOR_VERSION < 6))
-  #define scm_int2num		gh_int2scm
-  #define scm_mem2string(a,b)	gh_str2scm((char *)a,b)
-  #define scm_c_eval_string	gh_eval_str
-  #define scm_num2int(a,b,c)	gh_scm2int(a)
-  #define scm_apply(a,b,c)	gh_apply(a,b)
-  #define scm_call_0(fn)	gh_call0(fn)
-  #define scm_call_1(fn,a)	gh_call1(fn,a)
-  #define scm_call_2(fn,a,b)	gh_call2(fn,a,b)
-  #define scm_call_3(fn,a,b,c)	gh_call3(fn,a,b,c)
-  #define scm_c_define_gsubr(nm,req,opt,rst,fn) \
-  	gh_new_procedure(nm,fn,req,opt,rst)
-  #define scm_num2long(a,b,c)	scm_num2long(a, (char *)b, c)
-  #define scm_num2ulong(a,b,c)	scm_num2ulong(a, (char *)b, c)
-  #define scm_gc_project_object(x) scm_protect_object(x)
-  #define scm_gc_unprotect_object(x) scm_unprotect_object(x)
-
-  #if ((GNC_GUILE_MAJOR_VERSION == 1) && (GNC_GUILE_MINOR_VERSION < 4))
-    #define scm_make_real	gh_double2scm
-    #define SCM_BOOL		gh_bool2scm
-    #define SCM_BOOLP		gh_boolean_p
-    #define SCM_EQ_P		gh_eq_p
-    #ifndef SCM_MAKE_CHAR
-       #define SCM_MAKE_CHAR	gh_char2scm
-    #endif
-    #define scm_str2symbol(a)	gh_symbol2scm((char *)a)
-
-    /* Workaround bugs in guile 1.3.4. */
-    #undef  SCM_CONSP
-    #define SCM_CONSP(x)	SCM_NFALSEP (scm_pair_p (x))
-    #undef  SCM_STRINGP
-    #define SCM_STRINGP(x)	gh_string_p(x)
-  #else
-    #define scm_str2symbol(a)	gh_symbol2scm(a)
-  #endif /* Guile < 1.4 */
-#else /* Guile >= 1.6 */
-
-/* This fixes some g-wrap problems..  Once g-wrap fixes this, we can remove this */
-#define scm_protect_object(x)	scm_gc_protect_object(x)
-#define scm_unprotect_object(x)	scm_gc_unprotect_object(x)
-
-#endif /* Guile < 1.6 */
-
-
 /* Convenience macros */
 
 #define SCM_EQUALP(obj1,obj2)	SCM_NFALSEP(scm_equal_p(obj1,obj2))
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/Makefile.am,v
retrieving revision 1.78
retrieving revision 1.79
diff -Lsrc/Makefile.am -Lsrc/Makefile.am -u -r1.78 -r1.79
--- src/Makefile.am
+++ src/Makefile.am
@@ -16,14 +16,12 @@
   tax \
   app-utils \
   gnome-utils \
-  gnome-search \
-  app-file
+  gnome-search
 
 GUI_SUBDIRS_2 = \
   register \
   gnome \
   import-export \
-  experimental \
   business \
   optional 
 
@@ -45,4 +43,5 @@
   .cvsignore \
   README.modules \
   gnc-test-env \
-  valgrind-gnucash.supp
+  valgrind-gnucash.supp \
+  guile-mappings.h
--- src/app-file/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.scm-links
-gw-app-file.scm
-gw-app-file.c
-gw-app-file.h
-gw-app-file.html
-*.lo
-*.la
-.deps
-.libs
--- src/app-file/gw-app-file-spec.scm
+++ /dev/null
@@ -1,73 +0,0 @@
-(define-module (g-wrapped gw-app-file-spec))
-(debug-set! maxdepth 100000)
-(debug-set! stack    2000000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-glib-spec))
-
-(use-modules (g-wrapped gw-engine-spec))
-
-(let ((ws (gw:new-wrapset "gw-app-file")))
-
-  (gw:wrapset-depends-on ws "gw-standard")
-  (gw:wrapset-depends-on ws "gw-glib")
-
-  (gw:wrapset-depends-on ws "gw-engine")
-
-  (gw:wrapset-set-guile-module! ws '(g-wrapped gw-app-file))
-
-  (gw:wrapset-add-cs-declarations!
-   ws
-   (lambda (wrapset client-wrapset)
-     (list
-      "#include <gnc-file.h>\n"
-      "#include <gnc-file-history.h>\n"
-      "#include <gnc-file-dialog.h>\n")))
-  
-  (gw:wrap-function
-   ws
-   'gnc:file-query-save
-   '<gw:bool>
-   "gnc_file_query_save"
-   '()
-   "Query the user whether to save the current file, and save
-if they say 'Yes'. The return is false if the user says 'Cancel'.")
-
-  (gw:wrap-function
-   ws
-   'gnc:file-quit
-   '<gw:void>
-   "gnc_file_quit"
-   '()
-   "Stop working with the current file.")
-
-  (gw:wrap-function
-   ws
-   'gnc:file-open-file
-   '<gw:bool>
-   "gnc_file_open_file"
-   '(((<gw:mchars> caller-owned const) filename))
-   "Open filename.")
-
-  (gw:wrap-function
-   ws
-   'gnc:history-get-last
-   '(<gw:mchars> callee-owned const)
-   "gnc_history_get_last"
-   '()
-   "Get the last file opened by the user.")
-
-  (gw:wrap-function
-   ws
-   'gnc:file-selection-dialog
-   '(<gw:mchars> callee-owned const)
-   "gnc_file_dialog"
-   '(((<gw:mchars> caller-owned const) title)
-     ((<gw:mchars> caller-owned const) filter)
-     ((<gw:mchars> caller-owned const) default))
-   "Lets the user select a file. Dialog has given title, filter,
-or default name. Either filter, default, or both should be NULL.")
-
-  )
--- src/app-file/gnc-file.c
+++ /dev/null
@@ -1,901 +0,0 @@
-/********************************************************************\
- * FileDialog.c -- file-handling utility dialogs for gnucash.       * 
- *                                                                  *
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (C) 1998, 1999, 2000 Linas Vepstas                     *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
-\********************************************************************/
-
-#include "config.h"
-
-#include <errno.h>
-#include <glib.h>
-#include <libguile.h>
-#include <string.h>
-#include <g-wrap-wct.h>
-
-#include "global-options.h"
-#include "gnc-commodity.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-engine.h"
-#include "gnc-event.h"
-#include "gnc-file-dialog.h"
-#include "gnc-file-history.h"
-#include "gnc-file-p.h"
-#include "gnc-filepath-utils.h"
-#include "gnc-gui-query.h"
-#include "gnc-ui.h"
-#include "gnc-ui-util.h"
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofsession.h"
-#include "messages.h"
-#include "TransLog.h"
-
-/** GLOBALS *********************************************************/
-/* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
-
-static GNCCanCancelSaveCB can_cancel_cb = NULL;
-static GNCShutdownCB shutdown_cb = NULL;
-
-static GNCHistoryAddFileFunc history_add_file_func = NULL;
-static GNCHistoryGetLastFunc history_get_last_func = NULL;
-
-static GNCFileDialogFunc file_dialog_func = NULL;
-static GNCFilePercentageFunc file_percentage_func = NULL;
-
-
-void
-gnc_file_set_handlers (GNCHistoryAddFileFunc history_add_file_func_in,
-                       GNCHistoryGetLastFunc history_get_last_func_in,
-                       GNCFileDialogFunc file_dialog_func_in)
-{
-  history_add_file_func = history_add_file_func_in;
-  history_get_last_func = history_get_last_func_in;
-  file_dialog_func = file_dialog_func_in;
-}
-
-void
-gnc_file_set_pct_handler (GNCFilePercentageFunc file_percentage_func_in)
-{
-  file_percentage_func = file_percentage_func_in;
-}
-
-void
-gnc_file_init (void)
-{
-  /* Make sure we have a current session. */
-  qof_session_get_current_session ();
-}
-
-static gboolean
-show_session_error (QofBackendError io_error, const char *newfile)
-{
-  GtkWidget *parent = gnc_ui_get_toplevel();
-  gboolean uh_oh = TRUE;
-  const char *fmt;
-
-  if (NULL == newfile) { newfile = _("(null)"); }
-
-  switch (io_error)
-  {
-    case ERR_BACKEND_NO_ERR:
-      uh_oh = FALSE;
-      break;
-
-    case ERR_BACKEND_NO_BACKEND:
-      fmt = _("The URL \n    %s\n"
-              "is not supported by this version of GnuCash.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_BAD_URL:
-      fmt = _("Can't parse the URL\n   %s\n");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_CANT_CONNECT:
-      fmt = _("Can't connect to\n   %s\n"
-              "The host, username or password were incorrect.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_CONN_LOST:
-      fmt = _("Can't connect to\n   %s\n"
-              "Connection was lost, unable to send data.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_TOO_NEW:
-      fmt = _("This file/URL appears to be from a newer version\n"
-              "of GnuCash. You must upgrade your version of GnuCash\n"
-              "to work with this data.");
-      gnc_error_dialog (parent, fmt);
-      break;
-
-    case ERR_BACKEND_NO_SUCH_DB:
-      fmt = _("The database\n"
-              "   %s\n"
-              "doesn't seem to exist. Do you want to create it?\n");
-      if (gnc_verify_dialog (parent, TRUE, fmt, newfile)) { uh_oh = FALSE; }
-      break;
-
-    case ERR_BACKEND_LOCKED:
-      fmt = _("GnuCash could not obtain the lock for\n"
-              "   %s.\n"
-              "That database may be in use by another user,\n"
-              "in which case you should not open the database.\n"
-              "\nDo you want to proceed with opening the database?");
-      if (gnc_verify_dialog (parent, TRUE, fmt, newfile)) { uh_oh = FALSE; }
-      break;
-
-    case ERR_BACKEND_READONLY:
-      fmt = _("GnuCash could not write to\n"
-              "   %s.\n"
-              "That database may be on a read-only file system,\n"
-              "or you may not have write permission for the directory.\n");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_DATA_CORRUPT:
-      fmt = _("The file/URL \n    %s\n"
-              "does not contain GnuCash data or the data is corrupt.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_SERVER_ERR:
-      fmt = _("The server at URL \n    %s\n"
-              "experienced an error or encountered bad or corrupt data.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_PERM:
-      fmt = _("You do not have permission to access\n    %s\n");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_BACKEND_MISC:
-      fmt = _("An error occurred while processing\n    %s\n");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_FILEIO_FILE_BAD_READ:
-      fmt = _("There was an error reading the file.\n"
-              "Do you want to continue?");
-      if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
-      break;
-
-    case ERR_FILEIO_PARSE_ERROR:
-      fmt = _("There was an error parsing the file \n    %s\n");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_FILEIO_FILE_EMPTY:
-      fmt = _("The file \n    %s\n is empty.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_FILEIO_FILE_NOT_FOUND:
-      fmt = _("The file \n    %s\n could not be found.");
-      gnc_error_dialog (parent, fmt, newfile);
-      break;
-
-    case ERR_FILEIO_FILE_TOO_OLD:
-      fmt = _("This file is from an older version of GnuCash.\n"
-              "Do you want to continue?");
-      if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
-      break;
-
-    case ERR_FILEIO_UNKNOWN_FILE_TYPE:
-      fmt = _("Unknown file type");
-      gnc_error_dialog(parent, fmt, newfile);
-      break;
-      
-    case ERR_SQL_DB_TOO_OLD:
-      fmt = _("This database is from an older version of GnuCash.\n"
-              "Do you want to want to upgrade the database "
-              "to the current version?");
-      if (gnc_verify_dialog (parent, TRUE, fmt)) { uh_oh = FALSE; }
-      break;
-
-    case ERR_SQL_DB_BUSY:
-      fmt = _("The SQL database is in use by other users, "
-              "and the upgrade cannot be performed until they logoff.\n"
-              "If there are currently no other users, consult the \n"
-              "documentation to learn how to clear out dangling login\n"
-              "sessions.");
-      gnc_error_dialog (parent, fmt);
-      break;
-
-    default:
-      PERR("FIXME: Unhandled error %d", io_error);
-      fmt = _("An unknown I/O error occurred.");
-      gnc_error_dialog (parent, fmt);
-      break;
-  }
-
-  return uh_oh;
-}
-
-static void
-gnc_add_history (QofSession * session)
-{
-  char *url;
-  char *file;
-
-  if (!session) return;
-  if (!history_add_file_func) return;
-
-  url = xaccResolveURL (qof_session_get_url (session));
-  if (!url)
-    return;
-
-  if (strncmp (url, "file:", 5) == 0)
-    file = url + 5;
-  else
-    file = url;
-
-  history_add_file_func (file);
-
-  g_free (url);
-}
-
-static void
-gnc_book_opened (void)
-{
-  QofSession *session = qof_session_get_current_session();
-  scm_call_2 (scm_c_eval_string("gnc:hook-run-danglers"),
-              scm_c_eval_string("gnc:*book-opened-hook*"),
-              (session ? 
-               gw_wcp_assimilate_ptr (session, scm_c_eval_string("<gnc:Session*>")) :
-               SCM_BOOL_F));
-}
-
-void
-gnc_file_new (void)
-{
-  QofSession *session;
-
-  /* If user attempts to start a new session before saving results of
-   * the last one, prompt them to clean up their act. */
-  if (!gnc_file_query_save ())
-    return;
-
-  session = qof_session_get_current_session ();
-
-  /* close any ongoing file sessions, and free the accounts.
-   * disable events so we don't get spammed by redraws. */
-  gnc_engine_suspend_events ();
-  
-  scm_call_2(scm_c_eval_string("gnc:hook-run-danglers"),
-             scm_c_eval_string("gnc:*book-closed-hook*"),
-             (session ?
-              gw_wcp_assimilate_ptr (session, scm_c_eval_string("<gnc:Session*>")) :
-              SCM_BOOL_F));
-
-  gnc_close_gui_component_by_session (session);
-  xaccLogDisable();
-  qof_session_destroy (session);
-  xaccLogEnable();
-
-  /* start a new book */
-  qof_session_get_current_session ();
-
-  scm_call_1(scm_c_eval_string("gnc:hook-run-danglers"),
-             scm_c_eval_string("gnc:*new-book-hook*"));
-
-  gnc_book_opened ();
-
-  gnc_engine_resume_events ();
-  gnc_gui_refresh_all ();
-}
-
-gboolean
-gnc_file_query_save (void)
-{
-  GtkWidget *parent = gnc_ui_get_toplevel();
-
-  /* If user wants to mess around before finishing business with
-   * the old file, give em a chance to figure out what's up.  
-   * Pose the question as a "while" loop, so that if user screws
-   * up the file-selection dialog, we don't blow em out of the water;
-   * instead, give them another chance to say "no" to the verify box.
-   */
-  while (qof_book_not_saved(qof_session_get_book (qof_session_get_current_session ())))
-  {
-    GNCVerifyResult result;
-    const char *message = _("Changes have been made since the last "
-                            "Save. Save the data to file?");
-
-    if (can_cancel_cb && can_cancel_cb ())
-      result = gnc_verify_cancel_dialog (parent, GTK_RESPONSE_YES, message);
-    else
-    {
-      gboolean do_save = gnc_verify_dialog (parent, TRUE, message);
-
-      result = do_save ? GTK_RESPONSE_YES : GTK_RESPONSE_NO;
-    }
-
-    if (result == GTK_RESPONSE_CANCEL)
-      return FALSE;
-
-    if (result == GTK_RESPONSE_NO)
-      return TRUE;
-
-    gnc_file_save ();
-  }
-
-  return TRUE;
-}
-
-/* private utilities for file open; done in two stages */
-
-static gboolean
-gnc_post_file_open (const char * filename)
-{
-  QofSession *current_session, *new_session;
-  gboolean uh_oh = FALSE;
-  char * newfile;
-  QofBackendError io_err = ERR_BACKEND_NO_ERR;
-
-  if (!filename) return FALSE;
-
-  newfile = xaccResolveURL (filename); 
-  if (!newfile)
-  {
-    show_session_error (ERR_FILEIO_FILE_NOT_FOUND, filename);
-    return FALSE;
-  }
-
-  /* disable events while moving over to the new set of accounts; 
-   * the mass deletetion of accounts and transactions during
-   * switchover would otherwise cause excessive redraws. */
-  gnc_engine_suspend_events ();
-
-  /* Change the mouse to a busy cursor */
-  gnc_set_busy_cursor (NULL, TRUE);
-
-  /* -------------- BEGIN CORE SESSION CODE ------------- */
-  /* -- this code is almost identical in FileOpen and FileSaveAs -- */
-  current_session  = qof_session_get_current_session();
-  scm_call_2(scm_c_eval_string("gnc:hook-run-danglers"),
-             scm_c_eval_string("gnc:*book-closed-hook*"),
-             (current_session ?
-              gw_wcp_assimilate_ptr (current_session,
-                                     scm_c_eval_string("<gnc:Session*>")) :
-              SCM_BOOL_F));
-  xaccLogDisable();
-  qof_session_destroy (current_session);
-  xaccLogEnable();
-
-  /* load the accounts from the users datafile */
-  /* but first, check to make sure we've got a session going. */
-  new_session = qof_session_new ();
-
-  qof_session_begin (new_session, newfile, FALSE, FALSE);
-  io_err = qof_session_get_error (new_session);
-
-  /* if file appears to be locked, ask the user ... */
-  if (ERR_BACKEND_LOCKED == io_err || ERR_BACKEND_READONLY == io_err)
-  {
-    const char *buttons[] = { N_("Quit"), N_("Open Anyway"),
-                              N_("Create New File"), NULL };
-    char *fmt = ((ERR_BACKEND_LOCKED == io_err) ?
-                 _("GnuCash could not obtain the lock for\n"
-                   "   %s.\n"
-                   "That database may be in use by another user,\n"
-                   "in which case you should not open the database.\n"
-                   "\nWhat would you like to do?") :
-                 _("WARNING!!!  GnuCash could not obtain the lock for\n"
-                   "   %s.\n"
-                   "That database may be on a read-only file system,\n"
-                   "or you may not have write permission for the directory.\n"
-                   "If you proceed you may not be able to save any changes.\n"
-                   "\nWhat would you like to do?")
-                 );
-    int rc;
-
-    if (shutdown_cb) {
-      rc = gnc_generic_question_dialog (NULL, buttons, fmt, newfile);
-    } else {
-      rc = gnc_generic_question_dialog (NULL, buttons+1, fmt, newfile)+1;
-    }
-
-    if (rc == 0)
-    {
-      if (shutdown_cb)
-        shutdown_cb(0);
-      g_assert(1);
-    }
-    else if (rc == 1)
-    {
-      /* user told us to ignore locks. So ignore them. */
-      qof_session_begin (new_session, newfile, TRUE, FALSE);
-    }
-    else
-    {
-      /* Can't use the given file, so just create a new
-       * database so that the user will get a window that
-       * they can click "Exit" on.
-       */
-      gnc_file_new ();
-    }
-  }
-
-  /* if the database doesn't exist, ask the user ... */
-  else if ((ERR_BACKEND_NO_SUCH_DB == io_err) ||
-           (ERR_SQL_DB_TOO_OLD == io_err))
-  {
-    if (FALSE == show_session_error (io_err, newfile))
-    {
-      /* user told us to create a new database. Do it. */
-      qof_session_begin (new_session, newfile, FALSE, TRUE);
-    }
-  }
-
-  /* Check for errors again, since above may have cleared the lock.
-   * If its still locked, still, doesn't exist, still too old, then
-   * don't bother with the message, just die. */
-  io_err = qof_session_get_error (new_session);
-  if ((ERR_BACKEND_LOCKED == io_err) ||
-      (ERR_BACKEND_READONLY == io_err) ||
-      (ERR_BACKEND_NO_SUCH_DB == io_err) ||
-      (ERR_SQL_DB_TOO_OLD == io_err))
-  {
-    uh_oh = TRUE;
-  }
-  else
-  {
-    uh_oh = show_session_error (io_err, newfile);
-  }
-
-  if (!uh_oh)
-  {
-    AccountGroup *new_group;
-
-    char * logpath = xaccResolveFilePath(newfile);
-    PINFO ("logpath=%s", logpath ? logpath : "(null)");
-    xaccLogSetBaseName (logpath);
-    xaccLogDisable();
-
-    if (file_percentage_func) {
-      file_percentage_func(_("Reading file..."), 0.0);
-      qof_session_load (new_session, file_percentage_func);
-      file_percentage_func(NULL, -1.0);
-    } else {
-      qof_session_load (new_session, NULL);
-    }
-    xaccLogEnable();
-
-    /* check for i/o error, put up appropriate error dialog */
-    io_err = qof_session_get_error (new_session);
-    uh_oh = show_session_error (io_err, newfile);
-
-    new_group = gnc_book_get_group (qof_session_get_book (new_session));
-    if (uh_oh) new_group = NULL;
-
-    /* Umm, came up empty-handed, but no error: 
-     * The backend forgot to set an error. So make one up. */
-    if (!uh_oh && !new_group) 
-    {
-      uh_oh = show_session_error (ERR_BACKEND_MISC, newfile);
-    }
-  }
-
-  gnc_unset_busy_cursor (NULL);
-
-  /* going down -- abandon ship */
-  if (uh_oh) 
-  {
-    xaccLogDisable();
-    qof_session_destroy (new_session);
-    xaccLogEnable();
-
-    /* well, no matter what, I think it's a good idea to have a
-     * topgroup around.  For example, early in the gnucash startup
-     * sequence, the user opens a file; if this open fails for any
-     * reason, we don't want to leave them high & dry without a
-     * topgroup, because if the user continues, then bad things will
-     * happen. */
-    qof_session_get_current_session ();
-
-    g_free (newfile);
-
-    gnc_engine_resume_events ();
-    gnc_gui_refresh_all ();
-
-    gnc_book_opened ();
-
-    return FALSE;
-  }
-
-  /* if we got to here, then we've successfully gotten a new session */
-  /* close up the old file session (if any) */
-  qof_session_set_current_session(new_session);
-
-  gnc_book_opened ();
-
-  /* --------------- END CORE SESSION CODE -------------- */
-
-  /* clean up old stuff, and then we're outta here. */
-  gnc_add_history (new_session);
-
-  g_free (newfile);
-
-  gnc_engine_resume_events ();
-  gnc_gui_refresh_all ();
-
-  return TRUE;
-}
-
-gboolean
-gnc_file_open (void)
-{
-  const char * newfile;
-  const char * last;
-  gboolean result;
-
-  if (!gnc_file_query_save ())
-    return FALSE;
-
-  if (!file_dialog_func)
-  {
-    PWARN ("no file dialog function");
-    return FALSE;
-  }
-
-  last = history_get_last_func ? history_get_last_func () : NULL;
-  newfile = file_dialog_func (_("Open"), NULL, last);
-  result = gnc_post_file_open (newfile);
-
-  /* This dialogue can show up early in the startup process. If the
-   * user fails to pick a file (by e.g. hitting the cancel button), we
-   * might be left with a null topgroup, which leads to nastiness when
-   * user goes to create their very first account. So create one. */
-  qof_session_get_current_session ();
-
-  return result;
-}
-
-gboolean
-gnc_file_open_file (const char * newfile)
-{
-  if (!newfile) return FALSE;
-
-  if (!gnc_file_query_save ())
-    return FALSE;
-
-  return gnc_post_file_open (newfile);
-}
-
-void
-gnc_file_export_file(const char * newfile)
-{
-  QofSession *current_session, *new_session;
-  gboolean ok;
-  QofBackendError io_err = ERR_BACKEND_NO_ERR;
-  char *default_dir;
-
-  default_dir = gnc_lookup_string_option("__paths", "Export Accounts", NULL);
-  if (default_dir == NULL)
-    gnc_init_default_directory(&default_dir);
-
-  if (!newfile) {
-    if (!file_dialog_func) {
-      PWARN ("no file dialog function");
-      return;
-    }
-
-    newfile =  file_dialog_func (_("Export"), NULL, default_dir);
-    if (!newfile)
-      return;
-  }
-
-  /* Remember the directory as the default. */
-  gnc_extract_directory(&default_dir, newfile);
-  gnc_set_string_option("__paths", "Export Accounts", default_dir);
-  g_free(default_dir);
-  
-  gnc_engine_suspend_events();
-
-  /* -- this session code is NOT identical in FileOpen and FileSaveAs -- */
-
-  new_session = qof_session_new ();
-  qof_session_begin (new_session, newfile, FALSE, FALSE);
-
-  io_err = qof_session_get_error (new_session);
-
-  /* if file appears to be locked, ask the user ... */
-  if (ERR_BACKEND_LOCKED == io_err || ERR_BACKEND_READONLY == io_err) 
-  {
-    if (FALSE == show_session_error (io_err, newfile))
-    {
-       /* user told us to ignore locks. So ignore them. */
-      qof_session_begin (new_session, newfile, TRUE, FALSE);
-    }
-  }
-
-  /* --------------- END CORE SESSION CODE -------------- */
-
-  /* oops ... file already exists ... ask user what to do... */
-  if (qof_session_save_may_clobber_data (new_session))
-  {
-    const char *format = _("The file \n    %s\n already exists.\n"
-                           "Are you sure you want to overwrite it?");
-
-    /* if user says cancel, we should break out */
-    if (!gnc_verify_dialog (NULL, FALSE, format, newfile))
-    {
-      return;
-    }
-
-    /* Whoa-ok. Blow away the previous file. */
-  }
-
-  /* use the current session to save to file */
-  gnc_set_busy_cursor (NULL, TRUE);
-  current_session = qof_session_get_current_session();
-  if (file_percentage_func) {
-    file_percentage_func(_("Exporting file..."), 0.0);
-    ok = qof_session_export (new_session, current_session,
-                             file_percentage_func);
-    file_percentage_func(NULL, -1.0);
-  } else {
-    ok = qof_session_export (new_session, current_session, NULL);
-  }
-  gnc_unset_busy_cursor (NULL);
-  xaccLogDisable();
-  qof_session_destroy (new_session);
-  xaccLogEnable();
-  gnc_engine_resume_events();
-
-  if (!ok)
-  {
-    /* %s is the strerror(3) error string of the error that occurred. */
-    const char *format = _("There was an error saving the file.\n\n%s");
-
-    gnc_error_dialog (NULL, format, strerror(errno));
-    return;
-  }
-}
-
-static gboolean been_here_before = FALSE;
-
-void
-gnc_file_save (void)
-{
-  QofBackendError io_err;
-  const char * newfile;
-  QofSession *session;
-  ENTER (" ");
-
-  /* hack alert -- Somehow make sure all in-progress edits get committed! */
-
-  /* If we don't have a filename/path to save to get one. */
-  session = qof_session_get_current_session ();
-
-  if (!qof_session_get_file_path (session))
-  {
-    gnc_file_save_as ();
-    return;
-  }
-
-  /* use the current session to save to file */
-  gnc_set_busy_cursor (NULL, TRUE);
-  if (file_percentage_func) {
-    file_percentage_func(_("Writing file..."), 0.0);
-    qof_session_save (session, file_percentage_func);
-    file_percentage_func(NULL, -1.0);
-  } else {
-    qof_session_save (session, NULL);
-  }
-  gnc_unset_busy_cursor (NULL);
-
-  /* Make sure everything's OK - disk could be full, file could have
-     become read-only etc. */
-  newfile = qof_session_get_file_path (session);
-  io_err = qof_session_get_error (session);
-  if (ERR_BACKEND_NO_ERR != io_err)
-  {
-    show_session_error (io_err, newfile);
-
-    if (been_here_before) return;
-    been_here_before = TRUE;
-    gnc_file_save_as ();   /* been_here prevents infinite recursion */
-    been_here_before = FALSE;
-    return;
-  }
-
-  gnc_add_history (session);
-
-  /* save the main window state */
-  scm_call_1 (scm_c_eval_string("gnc:main-window-save-state"),
-              (session ?
-               gw_wcp_assimilate_ptr (session, scm_c_eval_string("<gnc:Session*>")) :
-               SCM_BOOL_F));
-
-  LEAVE (" ");
-}
-
-void
-gnc_file_save_as (void)
-{
-  QofSession *new_session;
-  QofSession *session;
-  const char *filename;
-  char *default_dir = NULL;        /* Default to last open */
-  const char *last;
-  char *newfile;
-  const char *oldfile;
-  QofBackendError io_err = ERR_BACKEND_NO_ERR;
-
-  ENTER(" ");
-
-  if (!file_dialog_func)
-  {
-    PWARN ("no file dialog func");
-    return;
-  }
-
-  last = history_get_last_func ? history_get_last_func() : NULL;
-  if (last)
-    gnc_extract_directory(&default_dir, last);
-  else
-    gnc_init_default_directory(&default_dir);
-  filename = file_dialog_func (_("Save"), "*.gnc", default_dir);
-  if (default_dir)
-    free(default_dir);
-  if (!filename) return;
-
-  /* Check to see if the user specified the same file as the current
-   * file. If so, then just do that, instead of the below, which
-   * assumes a truly new name was given. */
-  newfile = xaccResolveURL (filename);
-  if (!newfile)
-  {
-     show_session_error (ERR_FILEIO_FILE_NOT_FOUND, filename);
-     return;
-  }
-
-  session = qof_session_get_current_session ();
-  oldfile = qof_session_get_file_path (session);
-  if (oldfile && (strcmp(oldfile, newfile) == 0))
-  {
-    g_free (newfile);
-    gnc_file_save ();
-    return;
-  }
-
-  /* -- this session code is NOT identical in FileOpen and FileSaveAs -- */
-
-  new_session = qof_session_new ();
-  qof_session_begin (new_session, newfile, FALSE, FALSE);
-
-  io_err = qof_session_get_error (new_session);
-
-  /* if file appears to be locked, ask the user ... */
-  if (ERR_BACKEND_LOCKED == io_err || ERR_BACKEND_READONLY == io_err) 
-  {
-    if (FALSE == show_session_error (io_err, newfile))
-    {
-       /* user told us to ignore locks. So ignore them. */
-      qof_session_begin (new_session, newfile, TRUE, FALSE);
-    }
-  }
-
-  /* if the database doesn't exist, ask the user ... */
-  else if ((ERR_BACKEND_NO_SUCH_DB == io_err) ||
-           (ERR_SQL_DB_TOO_OLD == io_err))
-  {
-    if (FALSE == show_session_error (io_err, newfile))
-    {
-      /* user told us to create a new database. Do it. */
-      qof_session_begin (new_session, newfile, FALSE, TRUE);
-    }
-  }
-
-  /* check again for session errors (since above dialog may have 
-   * cleared a file lock & moved things forward some more) 
-   * This time, errors will be fatal.
-   */
-  io_err = qof_session_get_error (new_session);
-  if (ERR_BACKEND_NO_ERR != io_err) 
-  {
-    show_session_error (io_err, newfile);
-    xaccLogDisable();
-    qof_session_destroy (new_session);
-    xaccLogEnable();
-    g_free (newfile);
-    return;
-  }
-
-  /* if we got to here, then we've successfully gotten a new session */
-  /* close up the old file session (if any) */
-  qof_session_swap_data (session, new_session);
-  xaccLogDisable();
-  qof_session_destroy (session);
-  xaccLogEnable();
-  session = NULL;
-
-  /* XXX At this point, we should really mark the data in the new session
-   * as being 'dirty', since we haven't saved it at all under the new
-   * session. But I'm lazy...
-   */
-  qof_session_set_current_session(new_session);
-
-  /* --------------- END CORE SESSION CODE -------------- */
-
-  /* oops ... file already exists ... ask user what to do... */
-  if (qof_session_save_may_clobber_data (new_session))
-  {
-    const char *format = _("The file \n    %s\n already exists.\n"
-                           "Are you sure you want to overwrite it?");
-
-    /* if user says cancel, we should break out */
-    if (!gnc_verify_dialog (NULL, FALSE, format, newfile))
-    {
-      g_free (newfile);
-      return;
-    }
-
-    /* Whoa-ok. Blow away the previous file. */
-  }
-
-  gnc_file_save ();
-
-  g_free (newfile);
-  LEAVE (" ");
-}
-
-void
-gnc_file_quit (void)
-{
-  QofSession *session;
-
-  session = qof_session_get_current_session ();
-
-  /* disable events; otherwise the mass deletetion of accounts and
-   * transactions during shutdown would cause massive redraws */
-  gnc_engine_suspend_events ();
-
-  scm_call_2(scm_c_eval_string("gnc:hook-run-danglers"),
-             scm_c_eval_string("gnc:*book-closed-hook*"),
-             (session ?
-              gw_wcp_assimilate_ptr (session, scm_c_eval_string("<gnc:Session*>")) :
-              SCM_BOOL_F));
-  
-  xaccLogDisable();
-  qof_session_destroy (session);
-  xaccLogEnable();
-
-  qof_session_get_current_session ();
-
-  gnc_engine_resume_events ();
-}
-
-void
-gnc_file_set_can_cancel_callback (GNCCanCancelSaveCB cb)
-{
-  can_cancel_cb = cb;
-}
-
-void
-gnc_file_set_shutdown_callback (GNCShutdownCB cb)
-{
-  shutdown_cb = cb;
-}
--- src/app-file/gnc-file-p.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/********************************************************************\
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (C) 1998, 1999, 2000 Linas Vepstas (linas at linas.org)   *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
-\********************************************************************/
-
-#ifndef GNC_FILE_P_H
-#define GNC_FILE_P_H
-
-#include "gnc-file.h"
-
-void gnc_file_init (void);
-
-typedef void (*GNCHistoryAddFileFunc) (const char *filename);
-typedef const char * (*GNCHistoryGetLastFunc) (void);
-
-typedef const char * (*GNCFileDialogFunc) (const char * title,
-                                           const char * filter,
-                                           const char * default_name);
-
-void gnc_file_set_handlers (GNCHistoryAddFileFunc history_add_file_func,
-                            GNCHistoryGetLastFunc history_get_last_func,
-                            GNCFileDialogFunc file_dialog_func);
-
-#endif
--- src/app-file/gnc-file-history.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/********************************************************************\
- * gnc-file-history.h -- functions to maintain file-history menu    *
- * Copyright (C) 2000 Robby Stephenson         	                    *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_FILE_HISTORY_H
-#define GNC_FILE_HISTORY_H
-
-#include "gnc-ui-common.h"
-
-#define MAX_HISTORY 4
-
-void gnc_history_add_file (const char *filename);
-void gnc_history_update_menu (gncUIWidget app);
-const char * gnc_history_get_last (void);
-
-#endif
--- src/app-file/gnc-file-dialog.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/********************************************************************\
- * gnc-file-dialog.c -- the file dialog dialog                      *
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (c) 2001 Linux Developers Group                        *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
-\********************************************************************/
-
-#ifndef GNC_FILE_DIALOG_H
-#define GNC_FILE_DIALOG_H
-
-#include "config.h"
-
-/** PROTOTYPES ******************************************************/
-const char * gnc_file_dialog (const char * title,
-                              const char * filter,
-                              const char * default_name);
-
-#endif
--- src/app-file/gnc-file.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/********************************************************************\
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (C) 1998, 1999, 2000 Linas Vepstas (linas at linas.org)   *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, write to the Free Software      *
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.        *
-\********************************************************************/
-
-/*
- * FILE: gnc-file.h
- *
- * FUNCTION:
- * A set of file-handling utilities for GnuCash applications.
- * These utilities will "do the right thing" when used in the "File..."
- * pulldown menu, for the "New", "Open", "Save", "SaveAs", etc. menu entries.
- * In particular, they will verify that old files don't get clobbered,
- * they'll put up dialogue boxes to ask the user to confirm their actions,
- * etc. 
- * 
- * These utilities are written in a GUI-independent fashion, and should
- * work just fine with the Motif, gnome/gtk and Qt interfaces.
- * These utilities are appropriate for direct invocation from guile.
- * (they should be wrapped by g-wrap).
- *
- * These GUI utilities implement and maintain a single global "session"
- * that defines the currently edited account group.  In a sense, these
- * functions provide the GUI for the xaccSession object.  The session
- * is essentially a file that is open for editing, with locks on it
- * to prevent other readers and writers from accessing it as long as its
- * open.
- *
- *
- * The gnc_file_save() routine will check for an existing edit session,
- *    and if one exists, it will save the account info to a file.
- *    If an error occurs, a popup dialogue will inform the user of 
- *    the error.  If there is no existing filename open, then the
- *    user will be prompted for a file to save to (using the
- *    gnc_file_save_as() routine).  The existing session will remain 
- *    open for further editing.
- *
- * The gnc_file_save_as() routine will prompt the user for a filename
- *    to save the account data to (using the standard GUI file dialogue
- *    box).  If the user specifies a filename, the account data will be
- *    saved. If an error occurs, a popup dialogue will inform the user 
- *    of the error.  One possible error is that another user has 
- *    the indicated file already locked up in a different session
- *    (in which case it is up to the user to try again, or to pick
- *    a different filename).  If it is possible to save without 
- *    an error, then a new session is started for the indicated 
- *    filename, locking out other users.  This new session remains
- *    open for further editing.
- *
- * The gnc_file_query_save() routine will display a popup dialog asking
- *    the user if they wish to save their current work. If they answer
- *    "yes", their work will be saved (using the gncFileSave function),
- *    otherwise no action will be performed. If there is no currently
- *    locked session, a popup will query the user for a filename
- *    (using the gnc_file_save_as() routine). The routine will return
- *    TRUE if the user hits "Yes" or "No" and FALSE if the user
- *    hits "Cancel". If nothing needed to be saved, the routine
- *    will return TRUE.
- *
- * The gnc_file_new() routine will check for an existing edit session.
- *    If one exists, it will ask the user if they want to save it, 
- *    (using the gnc_file_query_save_as() dialogue).  Then the current 
- *    session will be destroyed, file locks will be removed, and 
- *    account group structures will be set up for a new session.
- *
- * The gnc_file_open() routine check for an existing edit session.
- *    If one exists, it will ask the user if they want to save it.
- *    (using the gnc_file_query_save() dialogue).  Next, the user will
- *    be prompted with a GUI standard file-selection dialogue to 
- *    to pick a new file.  If no file is picked, this routine returns.
- *    If a new file was picked, then the current session will be 
- *    destroyed and file locks on it will be removed.  The new
- *    file will then be opened for editing, establishing locks, etc.
- *    If an error occurs, the user will be informed with a pop-up
- *    dialogue.  If the file cannot be found, or if a read
- *    error occurs, a popup describing the error will pop up.
- *    One possible error is that another user has the indicated 
- *    file already locked up in a different session (in which 
- *    case it is up to the user to try again, or to pick
- *    a different filename).
- *
- * The gnc_file_open_file() routine behaves much like the gnc_file_open()
- *    routine, except that the new file to open is passed as a char *
- *    argument.
- *
- * The gnc_file_export_file() routine will check for an existing edit
- *    session, and if one exists, it will save just the commodities
- *    and accounts to a file.  If an error occurs, a popup dialogue
- *    will inform the user of the error.
- *
- * The gnc_file_quit() routine will close out and destroy the current session.
- *    The user WILL NOT BE PROMPTED to confirm this action, or do do
- *    any kind of saving beforehand.
- *
- * HISTORY:
- * Derived from Rob Clark's original MainWindow.c code, Dec 1998
- */
-
-#ifndef GNC_FILE_H
-#define GNC_FILE_H
-
-#include <glib.h>
-
-void gnc_file_new (void);
-gboolean gnc_file_open (void);
-void gnc_file_save (void);
-void gnc_file_save_as (void);
-
-gboolean gnc_file_open_file (const char *filename);
-void gnc_file_export_file(const char * filename);
-
-gboolean gnc_file_query_save (void);
-
-void gnc_file_quit (void);
-
-typedef gboolean (*GNCCanCancelSaveCB) (void);
-void gnc_file_set_can_cancel_callback (GNCCanCancelSaveCB cb);
-
-typedef void (*GNCFilePercentageFunc) (const char *message, double percent);
-void gnc_file_set_pct_handler (GNCFilePercentageFunc file_percentage_func);
-
-typedef void (*GNCShutdownCB) (int);
-void gnc_file_set_shutdown_callback (GNCShutdownCB cb);
-
-#endif /* GNC_FILE_H */
--- src/app-file/Makefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-SUBDIRS = gnome . test
-PWD := $(shell pwd)
-
-pkglib_LTLIBRARIES = libgncmod-app-file.la libgw-app-file.la
-
-AM_CFLAGS = \
-  -I${top_srcdir}/src/gnc-module \
-  -I${top_srcdir}/src \
-  -I${top_srcdir}/src/engine \
-  -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/gnome-utils \
-  ${GNOME_INCLUDEDIR} \
-  ${GUILE_INCS} \
-  ${GLIB_CFLAGS} \
-  ${G_WRAP_COMPILE_ARGS}
-
-libgncmod_app_file_la_SOURCES = \
-  gnc-file.c \
-  gncmod-app-file.c
-
-gncincludedir = ${GNC_INCLUDE_DIR}
-gncinclude_HEADERS = \
-  gnc-file.h \
-  gnc-file-dialog.h \
-  gnc-file-history.h
-
-noinst_HEADERS = \
-  gnc-file-p.h \
-  gw-app-file.h
-
-libgncmod_app_file_la_LDFLAGS = -module
-
-libgncmod_app_file_la_LIBADD = \
-  ../gnc-module/libgncmodule.la \
-  ../engine/libgncmod-engine.la \
-  ../gnome-utils/libgncmod-gnome-utils.la \
-  gnome/libgnc-app-file-gnome.la \
-  ../app-utils/libgncmod-app-utils.la \
-  ${GUILE_LIBS} \
-  ${GLIB_LIBS}
-
-libgw_app_file_la_SOURCES = gw-app-file.c
-libgw_app_file_la_LDFLAGS = -module
-
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-app-file-spec.scm gw-app-file.scm
-
-noinst_DATA = .scm-links
-
-EXTRA_DIST = \
-  ${gwmod_DATA}
-
-if GNUCASH_SEPARATE_BUILDDIR
-#Only needed when srcdir and builddir are different
-SCM_FILE_LINKS = gw-app-file-spec.scm
-endif
-
-.scm-links: 
-	rm -f gnucash g-wrapped
-	ln -sf . gnucash 
-	ln -sf . g-wrapped 
-if GNUCASH_SEPARATE_BUILDDIR
-	for X in ${SCM_FILE_LINKS} ; do \
-	  ln -sf ${srcdir}/$$X . ; \
-	done
-endif
-	touch .scm-links
-
-gw-app-file.scm gw-app-file.c gw-app-file.h: \
-  .scm-links gw-app-file-spec.scm ${top_builddir}/config.status
-	FLAVOR=gnome guile -c \
-	 "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
-	  (set! %load-path (cons \"${PWD}\" %load-path)) \
-	  (set! %load-path (cons \"${top_builddir}/src/engine\" %load-path)) \
-	  (primitive-load \"./gw-app-file-spec.scm\") \
-	  (gw:generate-wrapset \"gw-app-file\")"
-
-BUILT_SOURCES = gw-app-file.scm gw-app-file.c gw-app-file.h
-DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
-	gw-app-file.html
--- src/app-file/gncmod-app-file.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*********************************************************************
- * gncmod-app-file.c
- * module definition/initialization app-level file interface 
- * 
- * Copyright (c) 2001 Linux Developers Group, Inc. 
- *********************************************************************/
-
-#include <stdio.h>
-#include <glib.h>
-#include <libguile.h>
-#include "guile-mappings.h"
-
-#include "gnc-file-p.h"
-#include "gnc-file-history.h"
-#include "gnc-file-dialog.h"
-#include "gnc-mdi-utils.h"
-#include "gnc-module.h"
-#include "gnc-module-api.h"
-
-/* version of the gnc module system interface we require */
-int libgncmod_app_file_LTX_gnc_module_system_interface = 0;
-
-/* module versioning uses libtool semantics. */
-int libgncmod_app_file_LTX_gnc_module_current  = 0;
-int libgncmod_app_file_LTX_gnc_module_revision = 0;
-int libgncmod_app_file_LTX_gnc_module_age      = 0;
-
-/* forward references */
-char *libgncmod_app_file_LTX_gnc_module_path(void);
-char *libgncmod_app_file_LTX_gnc_module_description(void);
-int libgncmod_app_file_LTX_gnc_module_init(int refcount);
-int libgncmod_app_file_LTX_gnc_module_end(int refcount);
-
-
-char *
-libgncmod_app_file_LTX_gnc_module_path(void) 
-{
-  return g_strdup("gnucash/app-file");
-}
-
-char * 
-libgncmod_app_file_LTX_gnc_module_description(void) 
-{
-  return g_strdup("Application level file interface");
-}
-
-static void
-lmod(char * mn) 
-{
-  char * form = g_strdup_printf("(use-modules %s)\n", mn);
-  scm_c_eval_string(form);
-  g_free(form);
-}
-
-int
-libgncmod_app_file_LTX_gnc_module_init(int refcount) 
-{
-  /* load the engine (we depend on it) */
-  if(!gnc_module_load("gnucash/engine", 0)) {
-    return FALSE;
-  }
-
-  /* load the calculation module (we depend on it) */
-  if(!gnc_module_load("gnucash/app-utils", 0)) {
-    return FALSE;
-  }
-
-  lmod ("(g-wrapped gw-app-file)");
-
-  if (refcount == 0)
-  {
-    gnc_file_set_handlers (gnc_history_add_file,
-                           gnc_history_get_last,
-                           gnc_file_dialog);    
-
-    gnc_file_set_pct_handler (gnc_mdi_show_progress);
-
-    gnc_file_init ();
-  }
-
-  return TRUE;
-}
-
-int
-libgncmod_app_file_LTX_gnc_module_end(int refcount) 
-{
-  if(refcount == 0) 
-  {
-    gnc_file_set_handlers (NULL, NULL, NULL);
-    gnc_file_set_pct_handler (NULL);
-  }
-  return TRUE;
-}
--- src/app-file/gnome/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-*.lo
-*.la
-.deps
-.libs
-.scm-links
--- src/app-file/gnome/gnc-file-dialog.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/********************************************************************\
- * gnc-file-dialog.c -- the file dialog box                         *
- * Copyright (C) 1997 Robin D. Clark <rclark at cs.hmc.edu>            *
- * Copyright (C) 1998-99 Rob Browning <rlb at cs.utexas.edu>           *
- * Copyright (C) 2000 Linas Vepstas  <linas at linas.org>              *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-
-#include "gnc-engine-util.h"
-#include "gnc-file-dialog.h"
-#include "gnc-file-history.h"
-#include "gnc-ui.h"
-#include "messages.h"
-
-typedef struct
-{
-  GtkFileSelection *file_box;
-  char *file_name;
-} FileBoxInfo;
-
-/* Global filebox information */
-static FileBoxInfo fb_info = {NULL, NULL};
-
-/* This static indicates the debugging module that this .o belongs to.   */
-static short module = MOD_GUI;
-
-
-/** PROTOTYPES ******************************************************/
-static void store_filename(GtkWidget *w, gpointer data);
-static void gnc_file_box_close_cb(GtkWidget *w, gpointer data);
-static gboolean gnc_file_box_delete_cb(GtkWidget *widget, GdkEvent *event,
-				       gpointer user_data);
-
-
-/********************************************************************\
- * gnc_file_dialog                                                  * 
- *   Pops up a file selection dialog (either a "Save As" or an      * 
- *   "Open"), and returns the name of the file the user selected.   *
- *   (This function does not return until the user selects a file   * 
- *   or presses "Cancel" or the window manager destroy button)      * 
- *                                                                  * 
- * Args:   title        - the title of the window                   *
- *         filter       - the file filter to use                    * 
- *         default_name - the default name to use                   *
- * Return: containing the name of the file the user selected        *
-\********************************************************************/
-
-const char *
-gnc_file_dialog (const char * title,
-                 const char * filter,
-                 const char *default_name)
-{
-  ENTER("\n");
-
-  /* Set a default title if nothing was passed in */  
-  if (title == NULL)
-    title = _("Open");
-
-  if (fb_info.file_name != NULL)
-    g_free(fb_info.file_name);
-
-  fb_info.file_box = GTK_FILE_SELECTION(gtk_file_selection_new(title));
-  fb_info.file_name = NULL;
-
-  if (default_name)
-    gtk_file_selection_set_filename(fb_info.file_box, default_name);
-
-  /* hack alert - this was filtering directory names as well as file 
-   * names, so I think we should not do this by default (rgmerk) */
-#if 0
-  if (filter != NULL)
-    gtk_file_selection_complete(fb_info.file_box, filter);
-#endif
-
-  gtk_window_set_modal(GTK_WINDOW(fb_info.file_box), TRUE);
-  gtk_window_set_transient_for(GTK_WINDOW(fb_info.file_box),
-			       GTK_WINDOW(gnc_ui_get_toplevel()));
-
-  gtk_signal_connect(GTK_OBJECT(fb_info.file_box->ok_button),
-		     "clicked", GTK_SIGNAL_FUNC(store_filename),
-		     (gpointer) &fb_info);
-
-  /* Ensure that the dialog box is destroyed when the user clicks a button. */
-  gtk_signal_connect(GTK_OBJECT(fb_info.file_box->ok_button),
-		     "clicked", GTK_SIGNAL_FUNC(gnc_file_box_close_cb),
-		     (gpointer) &fb_info);
-
-  gtk_signal_connect(GTK_OBJECT(fb_info.file_box->cancel_button),
-		     "clicked", GTK_SIGNAL_FUNC(gnc_file_box_close_cb),
-		     (gpointer) &fb_info);
-
-  gtk_signal_connect(GTK_OBJECT(fb_info.file_box), "delete_event",
-		     GTK_SIGNAL_FUNC(gnc_file_box_delete_cb), NULL);
-
-  gtk_signal_connect(GTK_OBJECT(fb_info.file_box), "destroy_event",
-		     GTK_SIGNAL_FUNC(gnc_file_box_delete_cb), NULL);
-
-  gtk_widget_show(GTK_WIDGET(fb_info.file_box));
-
-  gtk_main();
-
-  gtk_widget_destroy(GTK_WIDGET(fb_info.file_box));
-
-  LEAVE("\n");
-
-  return fb_info.file_name;
-}
-
-
-/********************************************************************\
- * store_filename                                                   * 
- *   callback that saves the name of the file                       * 
- *                                                                  * 
- * Args:   w - the widget that called us                            * 
- *         data - pointer to filebox info structure                 * 
- * Return: none                                                     * 
-\********************************************************************/
-static void
-store_filename (GtkWidget *w, gpointer data)
-{
-  FileBoxInfo *fb_info = data;
-  GtkFileSelection *fs;
-  char *file_name;
-
-  fs = GTK_FILE_SELECTION (fb_info->file_box);
-
-  file_name = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry));
-
-  if (!strstr (file_name, "://"))
-    file_name = gtk_file_selection_get_filename (fb_info->file_box);
-
-  fb_info->file_name = g_strdup (file_name);
-}
-
-static void
-gnc_file_box_close_cb(GtkWidget *w, gpointer data)
-{
-  gtk_widget_hide(GTK_WIDGET(fb_info.file_box));
-
-  gtk_main_quit();
-}
-
-static gboolean
-gnc_file_box_delete_cb(GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
-  gtk_widget_hide(GTK_WIDGET(fb_info.file_box));
-
-  gtk_main_quit();
-
-  /* Don't delete the window, we'll handle things ourselves. */
-  return TRUE;
-}
--- src/app-file/gnome/gnc-file-history.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/********************************************************************\
- * gnc-file-history.c -- functions to maintain file history menu    *
- * Copyright (C) 2000 Robby Stephenson         	                    *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-
-#include "gnc-file-history-gnome.h"
-#include "gnc-file.h"
-
-static GSList *history_list = NULL;
-static gint num_menu_entries = -1;
-static char *add_after_string = NULL;
-
-
-void
-gnc_file_history_add_after (const char *menu_string)
-{
-  g_free (add_after_string);
-  add_after_string = g_strdup (menu_string);
-}
-
-static void
-gnc_history_config_write (void)
-{
-  int max_files, i = 0;
-  char *key;
-  GSList *tmp;
-
-  if (history_list == NULL)
-    return;
-
-  key = g_strdup_printf ("/GnuCash/History/MaxFiles=%d", MAX_HISTORY);
-  max_files = gnome_config_get_int (key);
-  g_free (key);
-
-  gnome_config_clean_section ("/GnuCash/History/");
-  gnome_config_push_prefix ("/GnuCash/History/");
-  gnome_config_set_int ("MaxFiles", max_files);
-
-  for (tmp = history_list; tmp != NULL; tmp = tmp->next)
-  {
-    key = g_strdup_printf ("File%d", i);
-    gnome_config_set_string (key, tmp->data);
-    g_free(key);
-    i++;
-  }
-
-  gnome_config_sync ();
-  gnome_config_pop_prefix ();
-}
-
-static void
-gnc_history_get_list (void)
-{
-  int max_files, i;
-  char *key, *filename;
-
-  key = g_strdup_printf ("/GnuCash/History/MaxFiles=%d", MAX_HISTORY);
-  max_files = gnome_config_get_int (key);
-  g_free (key);
-
-  gnome_config_push_prefix ("/GnuCash/History/");
-
-  for (i = 0; i < max_files; i++)
-  {
-    key = g_strdup_printf ("File%d", i);
-    filename = gnome_config_get_string (key);
-
-    if(filename == NULL)
-    {
-      g_free(key);
-      break;
-    }
-
-    history_list = g_slist_prepend (history_list, filename);
-    g_free (key);
-  }
-
-  gnome_config_pop_prefix ();
-
-  history_list = g_slist_reverse (history_list);
-}
-
-static void
-gnc_history_file_cb (GtkWidget *w, char *data)
-{
-  gnc_file_open_file (data);
-}
-
-void
-gnc_history_add_file (const char *newfile)
-{
-  int i, max_files;
-  gboolean used_default, matched = FALSE;
-  char *key = NULL;
-  GSList *tmp, *new_list = NULL;
-
-  if (newfile == NULL)
-    return;
-
-  gnome_config_push_prefix ("/GnuCash/History/");
-  key = g_strdup_printf ("/GnuCash/History/MaxFiles=%d", MAX_HISTORY);
-  max_files = gnome_config_get_int_with_default (key, &used_default);
-  g_free (key);
-
-  if (used_default)
-    gnome_config_set_int ("MaxFiles", max_files);
-
-  if (history_list == NULL)
-    gnc_history_get_list ();
-
-  i = 0;
-  tmp = history_list;
-  while (tmp != NULL && i < max_files)
-  {
-    if (!matched &&                                     /* no match yet */
-        ((i == max_files - 1) ||                        /* last entry */
-         (strcmp(newfile, (char *)tmp->data) == 0)))    /* filename match */
-    {
-      g_free (tmp->data);
-      matched = TRUE;
-    }
-    else
-    {
-      new_list = g_slist_prepend (new_list, tmp->data);
-    }
-
-    i++;
-    tmp = tmp->next;
-  }
-
-  new_list = g_slist_reverse (new_list);
-  new_list = g_slist_prepend (new_list, g_strdup (newfile));
-  g_slist_free (history_list);
-  history_list = new_list;
-
-  gnc_history_config_write ();
-
-  /* Update apps immediately */
-  {
-    GList *containers = gtk_container_get_toplevels ();
-  
-    while (containers)
-    {
-      GtkWidget *w = containers->data;
-
-      if (GNOME_IS_APP (w))
-        gnc_history_update_menu (w);
-
-      containers = containers->next;
-    }
-  }
-}
-
-const char *
-gnc_history_get_last (void)
-{
-  if (history_list == NULL)
-    gnc_history_get_list ();
-
-  if (history_list == NULL)
-    return NULL;
-
-  return history_list->data;
-}
-
-void
-gnc_history_update_menu (GtkWidget * app_w)
-{
-  GnomeUIInfo *menu;
-  GnomeDockItem *di;
-  GtkWidget *menushell;
-  GnomeApp *app;
-  gpointer data;
-  char *path;
-  char *file;
-  char *name;
-  char *p, *q;
-  int count;
-  int i, n;
-  int pos;
-
-  if (!app_w)
-    return;
-
-  g_return_if_fail (GNOME_IS_APP (app_w));
-  g_return_if_fail (add_after_string != NULL);
-
-  app = GNOME_APP (app_w);
-
-  di = gnome_app_get_dock_item_by_name (app, GNOME_APP_MENUBAR_NAME);
-  if (di == NULL)
-    return;
-
-  menushell = gnome_dock_item_get_child (di);
-  if (menushell == NULL)
-    return;
-
-  if (!gnome_app_find_menu_pos (menushell, GNOME_MENU_FILE_PATH, &pos))
-    return;
-
-  path = g_strdup_printf ("%s%s", GNOME_MENU_FILE_PATH, add_after_string);
-
-  if (!gnome_app_find_menu_pos (menushell, path, &pos))
-    return;
-
-  data = gtk_object_get_data (GTK_OBJECT (app), "gnc_set_history");
-  if (data)
-  {
-    int num_entries;
-
-    data = gtk_object_get_data (GTK_OBJECT (app), "gnc_num_history");
-    num_entries = GPOINTER_TO_INT (data);
-
-    gnome_app_remove_menu_range (app, path, 0, num_entries);
-  }
-
-  if (history_list == NULL)
-    gnc_history_get_list ();
-
-  if (history_list == NULL)
-    return;
-
-  n = g_slist_length (history_list);
-  /* one for each filename entry, plus one for end */
-  menu = g_new (GnomeUIInfo, n + 1);
-
-  for (i = 0; i < n; i++)
-  {
-    (menu+i)->type = GNOME_APP_UI_ITEM;
-
-    /* get the file name */
-    file = g_slist_nth_data (history_list, i);
-    if (file == NULL)
-      file = "";
-
-    /* count the underscores */
-    count = 0;
-    for (p = file; *p != '\0'; p++)
-      if (*p == '_')
-        count++;
-
-    /* make the name, doubling the underscores to prevent underlining */
-    name = g_new (char, strlen(file) + count + 1);
-    for (p = file, q = name; *p != '\0'; p++)
-    {
-      *q++ = *p;
-      if (*p == '_')
-        *q++ = '_';
-    }
-    *q = '\0';
-
-    (menu+i)->label = g_strdup_printf ("_%d. %s", i+1, name);
-
-    g_free (name);
-
-    (menu+i)->hint = NULL;
-
-    (menu+i)->moreinfo = gnc_history_file_cb;
-    (menu+i)->user_data = file;
-    (menu+i)->unused_data = NULL;
-    (menu+i)->pixmap_type = 0;
-    (menu+i)->pixmap_info = NULL;
-    (menu+i)->accelerator_key = 0;    
-  }
-  (menu+i)->type = GNOME_APP_UI_ENDOFINFO;
-
-  gnome_app_insert_menus (GNOME_APP(app), path, menu);
-  num_menu_entries = n;
-
-  gtk_object_set_data (GTK_OBJECT (app), "gnc_set_history", app);
-  gtk_object_set_data (GTK_OBJECT (app), "gnc_num_history",
-                       GINT_TO_POINTER (num_menu_entries));
-
-  for (i = 0; i < n; i++)
-    g_free ((menu+i)->label);
-
-  g_free (menu);
-  g_free (path);
-}
--- src/app-file/gnome/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-lib_LTLIBRARIES = libgnc-app-file-gnome.la
-
-AM_CFLAGS = \
-  -I${top_srcdir}/src \
-  -I${top_srcdir}/src/app-file \
-  -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/engine \
-  ${GUILE_INCS} \
-  ${G_WRAP_COMPILE_ARGS} \
-  ${GLIB_CFLAGS} \
-  ${GNOME_INCLUDEDIR}
-
-libgnc_app_file_gnome_la_SOURCES = \
-  gnc-file-dialog.c \
-  gnc-file-history.c 
-
-gncincludedir = ${GNC_INCLUDE_DIR}
-gncinclude_HEADERS = \
-  gnc-file-history-gnome.h
-
-libgnc_app_file_gnome_la_LIBADD = \
-  ${GUILE_LIBS} \
-  ${GNOMEUI_LIBS} \
-  ${GNOME_LIBDIR} \
-  ${GLIB_LIBS}
--- src/app-file/gnome/gnc-file-history-gnome.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************\
- * gnc-file-history-gnome.h -- functions to maintain file-history   *
- * Copyright (C) 2001 Linux Developers Group  	                    *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_FILE_HISTORY_GNOME_H
-#define GNC_FILE_HISTORY_GNOME_H
-
-#include "gnc-file-history.h"
-
-void gnc_file_history_add_after (const char *menu_string);
-
-#endif
--- src/app-file/test/test-load-module
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh 
-exec guile -s $0
-!#
-
-(use-modules (gnucash gnc-module))
-(gnc:module-system-init)
-
-(display "  testing app-file module load ... ")
-(gnc:module-load "gnucash/app-file" 0)
-
-(display "  ok\n")
--- src/app-file/test/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.deps
-.libs
-Makefile
-Makefile.in
-test-link
--- src/app-file/test/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-TESTS = test-link test-load-module 
-
-GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
-  --gnc-module-dir ${top_builddir}/src/gnc-module \
-  --gnc-module-dir ${top_builddir}/src/engine \
-  --gnc-module-dir ${top_builddir}/src/calculation \
-  --gnc-module-dir ${top_builddir}/src/app-utils \
-  --gnc-module-dir ${top_builddir}/src/app-file \
-  --gnc-module-dir ${top_builddir}/src/gnome-utils \
-  --gnc-module-dir ${top_builddir}/src/scm \
-  --gnc-module-dir ${top_srcdir}/src/engine \
-  --guile-load-dir ${G_WRAP_MODULE_DIR} \
-  --guile-load-dir ${top_srcdir}/src/scm \
-  --guile-load-dir ${top_srcdir}/src/gnome \
-  --guile-load-dir ${top_builddir}/src/gnome \
-  --guile-load-dir ${top_srcdir}/src/gnome-utils \
-  --guile-load-dir ${top_srcdir}/src/app-utils \
-  --library-dir    ${top_builddir}/src/gnome \
-  --library-dir    ${top_builddir}/src/gnome-utils \
-  --library-dir    ${G_WRAP_LIB_DIR}
-
-TESTS_ENVIRONMENT := \
-  $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
-
-noinst_PROGRAMS = test-link
-
-test_link_SOURCES = test-link.c
-test_link_LDADD = ../libgncmod-app-file.la 
-
-EXTRA_DIST = \
-  test-load-module
-
-testit: 
-	${TESTS_ENVIRONMENT} gdb guile
--- src/app-file/test/test-link.c
+++ /dev/null
@@ -1,6 +0,0 @@
-int
-main(int argc, char ** argv) 
-{
-  return 0;
-}
-
Index: test-scm-query-string.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/test/test-scm-query-string.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/test/test-scm-query-string.c -Lsrc/app-utils/test/test-scm-query-string.c -u -r1.6 -r1.7
--- src/app-utils/test/test-scm-query-string.c
+++ src/app-utils/test/test-scm-query-string.c
@@ -19,7 +19,7 @@
   SCM res_q;
   SCM args = SCM_EOL;
   Query *q2;
-  char * str;
+  const gchar * str;
 
   scm_q = gnc_query2scm (q);
   args = scm_cons (scm_q, SCM_EOL);
@@ -28,7 +28,7 @@
   args = scm_cons (scm_makfrom0str ("'"), scm_cons (str_q, SCM_EOL));
   str_q = scm_string_append (args);
 
-  str = gh_scm2newstr (str_q, NULL);
+  str = SCM_STRING_CHARS (str_q);
 
   if (str) {
     res_q = scm_c_eval_string (str);
@@ -43,7 +43,8 @@
     failure ("queries don't match");
     fprintf (stderr, "%s\n\n", str ? str : "(null)");
     scm_q = gnc_query2scm (q2);
-    gh_display (scm_q); gh_newline ();
+    scm_display (scm_q, SCM_UNDEFINED);
+    scm_newline (SCM_UNDEFINED);
     exit (1);
   }
   else
@@ -51,7 +52,6 @@
     success ("queries match");
   }
   if (q2) xaccFreeQuery (q2);
-  if (str) free (str);
 }
 
 static void
Index: test-exp-parser.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/test/test-exp-parser.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/app-utils/test/test-exp-parser.c -Lsrc/app-utils/test/test-exp-parser.c -u -r1.6 -r1.7
--- src/app-utils/test/test-exp-parser.c
+++ src/app-utils/test/test-exp-parser.c
@@ -4,8 +4,7 @@
 #include <stdio.h>
 
 #include <libguile.h>
-#include "guile-mappings.h"
-
+#include "gnc-gconf-utils.h"
 #include "gnc-exp-parser.h"
 #include "gnc-numeric.h"
 #include "test-stuff.h"
Index: test-print-queries.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/test/test-print-queries.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/app-utils/test/test-print-queries.c -Lsrc/app-utils/test/test-print-queries.c -u -r1.2 -r1.3
--- src/app-utils/test/test-print-queries.c
+++ src/app-utils/test/test-print-queries.c
@@ -25,7 +25,9 @@
   args = scm_cons (scm_makfrom0str ("'"), scm_cons (str_q, SCM_EOL));
   str_q = scm_string_append (args);
 
-  gh_display (str_q); gh_newline (); gh_newline ();
+  scm_display (str_q, SCM_UNDEFINED);
+  scm_newline (SCM_UNDEFINED);
+  scm_newline (SCM_UNDEFINED);
 }
 
 static void
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/app-utils/test/Makefile.am,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/app-utils/test/Makefile.am -Lsrc/app-utils/test/Makefile.am -u -r1.24 -r1.25
--- src/app-utils/test/Makefile.am
+++ src/app-utils/test/Makefile.am
@@ -6,6 +6,14 @@
   test-scm-query-string \
   test-print-parse-amount
 
+test_exp_parser_SOURCES = \
+  ${top_builddir}/src/core-utils/gnc-gconf-utils.c \
+  test-exp-parser.c
+
+test_print_parse_amount_SOURCES = \
+  ${top_builddir}/src/core-utils/gnc-gconf-utils.c \
+  test-print-parse-amount.c
+
 GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/engine \
@@ -26,13 +34,16 @@
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
 LDADD = \
-   ../../engine/libgncmod-engine.la \
-   ../../gnc-module/libgncmodule.la \
-   ../libgncmod-app-utils.la \
-   ../../engine/libgw-engine.la \
+   ${top_builddir}/src/engine/libgncmod-engine.la \
+   ${top_builddir}/src/gnc-module/libgncmodule.la \
+   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+   ${top_builddir}/src/engine/libgw-engine.la \
    ${top_builddir}/src/test-core/libgncmod-test.la \
    ${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
-   ${GUILE_LIBS}
+   ${top_builddir}/src/core-utils/libcore-utils.la \
+   ${GUILE_LIBS} \
+   ${QOF_LIBS} \
+   ${GCONF_LIBS}
 
 noinst_PROGRAMS = \
   test-link-module \
@@ -52,5 +63,8 @@
   -I${top_srcdir}/src/engine/test-core \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnc-module \
+  -I${top_srcdir}/src/core-utils \
   ${GUILE_INCS} \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${GCONF_CFLAGS}
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/backend/.cvsignore -Lsrc/backend/.cvsignore -u -r1.2 -r1.3
--- src/backend/.cvsignore
+++ src/backend/.cvsignore
@@ -1,2 +1,4 @@
 Makefile
 Makefile.in
+.DS_Store
+
Index: gnc-backend-api.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/gnc-backend-api.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/gnc-backend-api.h -Lsrc/backend/gnc-backend-api.h -u -r1.4 -r1.5
--- src/backend/gnc-backend-api.h
+++ src/backend/gnc-backend-api.h
@@ -27,7 +27,5 @@
 #include "qofbackend.h"
 
 QofBackend * gnc_backend_new (void);
-void gnc_file_be_set_retention_days (int days);
-void gnc_file_be_set_compression (gboolean compress);
 
 #endif
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/Makefile.am -Lsrc/backend/Makefile.am -u -r1.4 -r1.5
--- src/backend/Makefile.am
+++ src/backend/Makefile.am
@@ -1,5 +1,10 @@
-SUBDIRS=file ${SQL_DIR} ${RPC_DIR}
 
-DIST_SUBDIRS=file net postgres rpc
+if USE_LIBQOF
+SUBDIRS = qsf file ${SQL_DIR} ${RPC_DIR}
+DIST_SUBDIRS = qsf file net postgres rpc
+else
+SUBDIRS = file ${SQL_DIR} ${RPC_DIR}
+DIST_SUBDIRS = qsf file net postgres rpc
+endif
 
 noinst_HEADERS = gnc-backend-api.h
Index: gnc-account-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-account-xml-v2.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/backend/file/gnc-account-xml-v2.c -Lsrc/backend/file/gnc-account-xml-v2.c -u -r1.19 -r1.20
--- src/backend/file/gnc-account-xml-v2.c
+++ src/backend/file/gnc-account-xml-v2.c
@@ -30,7 +30,6 @@
 #include <string.h>
 
 #include "gnc-xml-helper.h"
-
 #include "sixtp.h"
 #include "sixtp-utils.h"
 #include "sixtp-parsers.h"
@@ -45,10 +44,9 @@
 #include "sixtp-dom-parsers.h"
 #include "AccountP.h"
 #include "Account.h"
-#include "gnc-engine-util.h"
 #include "Group.h"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *account_version_string = "2.0.0";
 
@@ -82,8 +80,8 @@
 
     ENTER ("(account=%p)", act);
 
-    ret = xmlNewNode(NULL, gnc_account_string);
-    xmlSetProp(ret, "version", account_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_account_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST account_version_string);
 
     xmlAddChild(ret, text_to_dom_tree(act_name_string,
                                       xaccAccountGetName(act)));
@@ -101,7 +99,7 @@
                                      xaccAccountGetCommoditySCUi(act)));
     
     if (xaccAccountGetNonStdSCU(act))
-      xmlNewChild(ret, NULL, act_non_standard_scu_string, NULL);
+      xmlNewChild(ret, NULL, BAD_CAST act_non_standard_scu_string, NULL);
     
     str = xaccAccountGetCode(act);
     if (str && strlen(str) > 0)
@@ -134,22 +132,22 @@
 	      !gnc_commodity_is_iso(com) &&
 	      gnc_commodity_get_quote_flag(com)) {
 	    if (!kvpnode)
-	      kvpnode= xmlNewNode(NULL, act_slots_string);
+	      kvpnode= xmlNewNode(NULL, BAD_CAST act_slots_string);
 
-	    slot_node = xmlNewChild(kvpnode, NULL, "slot", NULL);
-	    xmlNewTextChild(slot_node, NULL, "slot:key", "old-price-source");
+	    slot_node = xmlNewChild(kvpnode, NULL, BAD_CAST "slot", NULL);
+	    xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:key", BAD_CAST "old-price-source");
 
 	    source = gnc_commodity_get_quote_source(com);
-	    val_node = xmlNewTextChild(slot_node, NULL, "slot:value",
-				       gnc_quote_source_get_old_internal_name(source));
-	    xmlSetProp(val_node, "type", "string");
+	    val_node = xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:value",
+				       BAD_CAST gnc_quote_source_get_old_internal_name(source));
+	    xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "string");
 
 	    tz = gnc_commodity_get_quote_tz(com);
 	    if (tz) {
-	      slot_node = xmlNewChild(kvpnode, NULL, "slot", NULL);
-	      xmlNewTextChild(slot_node, NULL, "slot:key", "old-quote-tz");
-	      val_node = xmlNewTextChild(slot_node, NULL, "slot:value", tz);
-	      xmlSetProp(val_node, "type", "string");
+	      slot_node = xmlNewChild(kvpnode, NULL, BAD_CAST "slot", NULL);
+	      xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:key", BAD_CAST "old-quote-tz");
+	      val_node = xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:value", BAD_CAST tz);
+	      xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "string");
 	    }
 	  }
 	}
@@ -171,7 +169,7 @@
     PINFO ("lot list=%p", n);
     if (n && !exporting)
     {
-       xmlNodePtr toaddto = xmlNewChild(ret, NULL, act_lots_string, NULL);
+       xmlNodePtr toaddto = xmlNewChild(ret, NULL, BAD_CAST act_lots_string, NULL);
 
        for (; n; n=n->next)
        {
@@ -234,7 +232,7 @@
     int type;
     char *string;
 
-    string = xmlNodeGetContent (node->xmlChildrenNode);
+    string = (char*) xmlNodeGetContent (node->xmlChildrenNode);
     xaccAccountStringToType(string, &type);
     xmlFree (string);
 
@@ -329,14 +327,9 @@
 account_slots_handler (xmlNodePtr node, gpointer act_pdata)
 {
     struct account_pdata *pdata = act_pdata;
-    gboolean success;
-
-    success = dom_tree_to_kvp_frame_given
-      (node, xaccAccountGetSlots (pdata->account));
 
-    g_return_val_if_fail(success, FALSE);
-    
-    return TRUE;
+    return dom_tree_to_kvp_frame_given
+        (node, xaccAccountGetSlots (pdata->account));
 }
 
 static gboolean
@@ -392,7 +385,7 @@
     {
         GNCLot *lot;
         
-        if(safe_strcmp("text", mark->name) == 0)
+        if(safe_strcmp("text", (char*) mark->name) == 0)
           continue;
 
         lot = dom_tree_to_lot(mark, pdata->book);
Index: io-gncxml-v1.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v1.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/backend/file/io-gncxml-v1.c -Lsrc/backend/file/io-gncxml-v1.c -u -r1.31 -r1.32
--- src/backend/file/io-gncxml-v1.c
+++ src/backend/file/io-gncxml-v1.c
@@ -45,9 +45,6 @@
 #include "TransLog.h"
 #include "gnc-pricedb.h"
 #include "gnc-pricedb-p.h"
-#include "gnc-engine-util.h"
-#include "qofbook.h"
-
 #include "io-gncxml.h"
 
 #include "sixtp.h"
@@ -134,7 +131,7 @@
 
 */
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /* ================================================================= */
 /* <version> (lineage <gnc>)
@@ -1933,7 +1930,8 @@
     if(!cpi->name) cpi->name = g_strdup("");
     if(!cpi->xcode) cpi->xcode = g_strdup("");
 
-    comm = gnc_commodity_new(cpi->name,
+    comm = gnc_commodity_new(pstatus->book,
+			     cpi->name,
                              cpi->space,
                              cpi->id,
                              cpi->xcode,
@@ -3567,34 +3565,34 @@
 
   gnc_price_begin_edit (p);
 
-  if(safe_strcmp("price:id", sub_node->name) == 0) {
+  if(safe_strcmp("price:id", (char*)sub_node->name) == 0) {
     GUID *c = dom_tree_to_guid(sub_node);
     if(!c) return FALSE; 
     gnc_price_set_guid(p, c);
     g_free(c);
-  } else if(safe_strcmp("price:commodity", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:commodity", (char*)sub_node->name) == 0) {
     gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
     if(!c) return FALSE;
     gnc_price_set_commodity(p, c);
-  } else if(safe_strcmp("price:currency", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:currency", (char*)sub_node->name) == 0) {
     gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
     if(!c) return FALSE;
     gnc_price_set_currency(p, c);
-  } else if(safe_strcmp("price:time", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:time", (char*)sub_node->name) == 0) {
     Timespec t = dom_tree_to_timespec(sub_node);
-    if(!is_valid_timespec(t)) return FALSE;
+    if (!dom_tree_valid_timespec(&t, sub_node->name)) return FALSE;
     gnc_price_set_time(p, t);
-  } else if(safe_strcmp("price:source", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:source", (char*)sub_node->name) == 0) {
     char *text = dom_tree_to_text(sub_node);
     if(!text) return FALSE;
     gnc_price_set_source(p, text);
     g_free(text);
-  } else if(safe_strcmp("price:type", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:type", (char*)sub_node->name) == 0) {
     char *text = dom_tree_to_text(sub_node);
     if(!text) return FALSE;
     gnc_price_set_type(p, text);
     g_free(text);
-  } else if(safe_strcmp("price:value", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:value", (char*)sub_node->name) == 0) {
     gnc_numeric *value = dom_tree_to_gnc_numeric(sub_node);
     if(!value) return FALSE;
     gnc_price_set_value(p, *value);
Index: sixtp-dom-parsers.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-dom-parsers.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/backend/file/sixtp-dom-parsers.h -Lsrc/backend/file/sixtp-dom-parsers.h -u -r1.13 -r1.14
--- src/backend/file/sixtp-dom-parsers.h
+++ src/backend/file/sixtp-dom-parsers.h
@@ -36,7 +36,7 @@
 #include "kvp_frame.h"
 #include "qofbook.h"
 #include "qofid.h"
-
+#include "gnc-budget.h"
 
 GUID* dom_tree_to_guid(xmlNodePtr node);
 
@@ -44,9 +44,10 @@
 gnc_commodity *dom_tree_to_commodity_ref_no_engine(xmlNodePtr node, QofBook *);
 
 FreqSpec* dom_tree_to_freqSpec( xmlNodePtr node, QofBook *book);
+Recurrence* dom_tree_to_recurrence(xmlNodePtr node);
 
 Timespec dom_tree_to_timespec(xmlNodePtr node);
-#define is_valid_timespec(ts) (ts.tv_sec || ts.tv_nsec)
+gboolean dom_tree_valid_timespec(Timespec *ts, const gchar *name);
 GDate* dom_tree_to_gdate(xmlNodePtr node);
 gnc_numeric* dom_tree_to_gnc_numeric(xmlNodePtr node);
 gchar * dom_tree_to_text(xmlNodePtr tree);
@@ -67,12 +68,15 @@
 kvp_value* dom_tree_to_frame_kvp_value(xmlNodePtr node);
 
 gboolean dom_tree_to_integer(xmlNodePtr node, gint64 *daint);
+gboolean dom_tree_to_guint16(xmlNodePtr node, guint16 *i);
+gboolean dom_tree_to_guint(xmlNodePtr node, guint *i);
 
 /* higher level structures */
 Account* dom_tree_to_account(xmlNodePtr node, QofBook *book);
 QofBook* dom_tree_to_book   (xmlNodePtr node, QofBook *book);
 GNCLot*  dom_tree_to_lot    (xmlNodePtr node, QofBook *book);
 Transaction* dom_tree_to_transaction(xmlNodePtr node, QofBook *book);
+GncBudget* dom_tree_to_budget(xmlNodePtr node, QofBook *book);
 
 struct dom_tree_handler
 {
Index: sixtp-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-utils.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/backend/file/sixtp-utils.c -Lsrc/backend/file/sixtp-utils.c -u -r1.11 -r1.12
--- src/backend/file/sixtp-utils.c
+++ src/backend/file/sixtp-utils.c
@@ -35,21 +35,22 @@
 
 #include "sixtp.h"
 #include "sixtp-utils.h"
-#include "core-utils.h"
-
-#include "gnc-date.h"
-#include "gnc-engine-util.h"
-#include "gnc-numeric.h"
-#include "guid.h"
+#include <time.h>
+#include <errno.h>
 
+#ifdef GNUCASH_MAJOR_VERSION
+#ifndef HAVE_SETENV
+#include "setenv.h"
+#endif
 #ifndef HAVE_STRPTIME
 #include "strptime.h"
 #endif
 #ifndef HAVE_LOCALTIME_R
 #include "localtime_r.h"
 #endif
+#endif
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 gboolean
 isspace_str(const gchar *str, int nomorethan)
@@ -210,7 +211,8 @@
 /*********/
 /* gint64
  */
-
+/* Maybe there should be a comment here explaining why this function
+   doesn't call g_ascii_strtoull, because it's not so obvious. -CAS */
 gboolean
 string_to_gint64(const gchar *str, gint64 *v)
 {
@@ -388,27 +390,23 @@
 gnc_timegm (struct tm *tm)
 {
   time_t result;
-  char *put_str;
   char *old_tz;
 
   old_tz = getenv ("TZ");
-
   /* FIXME: there's no way to report this error to the caller. */
-  if(gnc_setenv("TZ", "UTC", 1) != 0)
+  if(setenv("TZ", "UTC", 1) != 0)
     PERR ("couldn't switch the TZ.");
-
   result = mktime (tm);
-
   if(old_tz)
   {
     /* FIXME: there's no way to report this error to the caller. */
-    if(gnc_setenv("TZ", old_tz, 1) != 0)
+    if(setenv("TZ", old_tz, 1) != 0)
       PERR ("couldn't switch the TZ back.");
   }
   else
   {
     /* FIXME: there's no way to report this error to the caller. */
-    gnc_unsetenv("TZ");
+    unsetenv("TZ");
     if(errno != 0)
       PERR ("couldn't restore the TZ to undefined.");
   }
Index: gnc-backend-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lsrc/backend/file/gnc-backend-file.c -Lsrc/backend/file/gnc-backend-file.c -u -r1.41 -r1.42
--- src/backend/file/gnc-backend-file.c
+++ src/backend/file/gnc-backend-file.c
@@ -19,7 +19,7 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
 \********************************************************************/
 /** @file gnc-backend-file.c
- *  @breif load and save data to files 
+ *  @brief load and save data to files 
  *  @author Copyright (c) 2000 Gnumatic Inc.
  *  @author Copyright (c) 2002 Derek Atkins <warlord at MIT.EDU>
  *  @author Copyright (c) 2003 Linas Vepstas <linas at linas.org>
@@ -43,37 +43,67 @@
 
 #include "TransLog.h"
 #include "gnc-engine.h"
-#include "gnc-date.h"
-#include "gnc-trace.h"
-#include "gnc-engine-util.h"
+
 #include "gnc-filepath-utils.h"
 
 #include "io-gncxml.h"
 #include "io-gncbin.h"
 #include "io-gncxml-v2.h"
-
+#include "messages.h"
 #include "gnc-backend-api.h"
 #include "gnc-backend-file.h"
 
-#include "qofbackend-p.h"
-#include "qofbook-p.h"
-#include "qofsession.h"
+#define GNC_BE_DAYS "file_retention_days"
+#define GNC_BE_ZIP  "file_compression"
 
-static short module = MOD_BACKEND;
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
-static int file_retention_days = 0;
+static gint file_retention_days = 0;
 static gboolean file_compression = FALSE;
 
-void
-gnc_file_be_set_retention_days (int days)
+static void option_cb (QofBackendOption *option, gpointer data)
 {
-    file_retention_days = days;
+	if(0 == safe_strcmp(GNC_BE_DAYS, option->option_name)) {
+		file_retention_days = *(gint*)option->value;
+	}
+	if(0 == safe_strcmp(GNC_BE_ZIP, option->option_name)) {
+		file_compression = (gboolean)qof_util_bool_to_int(option->value);
+	}
 }
 
-void
-gnc_file_be_set_compression (gboolean compress)
+/* lookup the options and modify the frame */
+static void
+gnc_file_be_set_config(QofBackend *be, KvpFrame *config)
+{
+	qof_backend_option_foreach(config, option_cb, NULL);
+}
+
+static KvpFrame*
+gnc_file_be_get_config(QofBackend *be)
 {
-    file_compression = compress;
+	QofBackendOption *option;
+
+	qof_backend_prepare_frame(be);
+	option = g_new0(QofBackendOption, 1);
+	option->option_name = GNC_BE_DAYS;
+	option->description = _("Number of days to retain old files");
+	option->tooltip = _("GnuCash keeps backups of old files, "
+		"this setting dictates how long each is kept");
+	option->type = KVP_TYPE_GINT64;
+	option->value = (gpointer)&file_retention_days;
+	qof_backend_prepare_option(be, option);
+	g_free(option);
+	option = g_new0(QofBackendOption, 1);
+	option->option_name = GNC_BE_ZIP;
+	option->description = _("Compress output files?");
+	option->tooltip = _("GnuCash can save data files with compression."
+		" Enable this option to compress your data file. ");
+	option->type = KVP_TYPE_STRING;
+	if(file_compression) { option->value = (gpointer)"TRUE"; }
+	else { option->value = (gpointer)"FALSE"; }
+	qof_backend_prepare_option(be, option);
+	g_free(option);
+	return qof_backend_complete_frame(be);
 }
 
 /* ================================================================= */
@@ -390,17 +420,39 @@
 static QofBookFileType
 gnc_file_be_determine_file_type(const char *path)
 {
-    if(gnc_is_xml_data_file_v2(path)) {
+	if(gnc_is_xml_data_file_v2(path)) {
         return GNC_BOOK_XML2_FILE;
     } else if(gnc_is_xml_data_file(path)) {
         return GNC_BOOK_XML1_FILE;
     } else if(is_gzipped_file(path)) {
         return GNC_BOOK_XML2_FILE;
-    } else {
-        return GNC_BOOK_BIN_FILE;
-    }
+	}
+	else if(gnc_is_bin_file(path)) { return GNC_BOOK_BIN_FILE; }
+	return GNC_BOOK_NOT_OURS;
 }
 
+static gboolean
+gnc_determine_file_type (const char *path)
+{
+	struct stat sbuf;
+	int rc;
+	FILE *t;
+
+	if (!path) { return FALSE; }
+	if (0 == safe_strcmp(path, QOF_STDOUT)) { return FALSE; }
+	t = fopen(path, "r");
+	if(!t) { PINFO (" new file"); return TRUE; }
+	fclose(t);
+	rc = stat(path, &sbuf);
+	if(rc < 0) { return FALSE; }
+	if (sbuf.st_size == 0)    { PINFO (" empty file"); return TRUE; }
+	if(gnc_is_xml_data_file_v2(path))   { return TRUE; } 
+	else if(gnc_is_xml_data_file(path)) { return TRUE; } 
+	else if(is_gzipped_file(path))      { return TRUE; }
+	else if(gnc_is_bin_file(path))      { return TRUE; }
+	PINFO (" %s is not a gnc file", path);
+	return FALSE;
+}	
 
 static gboolean
 gnc_file_be_backup_file(FileBackend *be)
@@ -798,7 +850,7 @@
 /* ---------------------------------------------------------------------- */
 
 
-/* Load financial data from a file into the book, automtically
+/* Load financial data from a file into the book, automatically
    detecting the format of the file, if possible.  Return FALSE on
    error, and set the error parameter to indicate what went wrong if
    it's not NULL.  This function does not manage file locks in any
@@ -807,10 +859,11 @@
 static void
 gnc_file_be_load_from_file (QofBackend *bend, QofBook *book)
 {
-    QofBackendError error = ERR_BACKEND_NO_ERR;
+    QofBackendError error;
     gboolean rc;
     FileBackend *be = (FileBackend *) bend;
 
+	error = ERR_BACKEND_NO_ERR;
     be->primary_book = book;
 
     switch (gnc_file_be_determine_file_type(be->fullpath))
@@ -824,13 +877,10 @@
         rc = qof_session_load_from_xml_file (book, be->fullpath);
         if (FALSE == rc) error = ERR_FILEIO_PARSE_ERROR;
         break;
-
     case GNC_BOOK_BIN_FILE:
-        /* presume it's an old-style binary file */
         qof_session_load_from_binfile(book, be->fullpath);
         error = gnc_get_binfile_io_error();
         break;
-
     default:
         PWARN("File not any known type");
         error = ERR_FILEIO_UNKNOWN_FILE_TYPE;
@@ -852,13 +902,11 @@
 gnc_file_be_save_may_clobber_data (QofBackend *bend)
 {
   struct stat statbuf;
-
   if (!bend->fullpath) return FALSE;
 
   /* FIXME: Make sure this doesn't need more sophisticated semantics
    * in the face of special file, devices, pipes, symlinks, etc. */
   if (stat(bend->fullpath, &statbuf) == 0) return TRUE;
-                                                                                
   return FALSE;
 }
 
@@ -873,53 +921,97 @@
 }
 
 /* ================================================================= */
-
+#if 0 //def GNUCASH_MAJOR_VERSION
 QofBackend *
 libgncmod_backend_file_LTX_gnc_backend_new(void)
 {
-    FileBackend *fbe;
-    QofBackend *be;
-    
-    fbe = g_new0(FileBackend, 1);
-    be = (QofBackend*)fbe;
-    qof_backend_init(be);
-    
-    be->session_begin = file_session_begin;
-    be->session_end = file_session_end;
-    be->destroy_backend = file_destroy_backend;
-
-    be->load = gnc_file_be_load_from_file;
-    be->save_may_clobber_data = gnc_file_be_save_may_clobber_data;
-
-    /* The file backend treats accounting periods transactionally. */
-    be->begin = file_begin_edit;
-    be->commit = file_commit_edit;
-    be->rollback = file_rollback_edit;
-
-    /* The file backend always loads all data ... */
-    be->compile_query = NULL;
-    be->free_query = NULL;
-    be->run_query = NULL;
-    be->price_lookup = NULL;
-
-    be->counter = NULL;
-
-    /* The file backend will never be multi-user... */
-    be->events_pending = NULL;
-    be->process_events = NULL;
-
-    be->sync = file_sync_all;
-    be->export = gnc_file_be_write_accounts_to_file;
 
     fbe->dirname = NULL;
     fbe->fullpath = NULL;
     fbe->lockfile = NULL;
     fbe->linkfile = NULL;
+    fbe->price_lookup = NULL;
     fbe->lockfd = -1;
 
     fbe->primary_book = NULL;
 
     return be;
 }
+#endif
+QofBackend*
+gnc_backend_new(void)
+{
+	FileBackend *gnc_be;
+	QofBackend *be;
+
+	gnc_be = g_new0(FileBackend, 1);
+	be = (QofBackend*) gnc_be;
+	qof_backend_init(be);
+
+	be->session_begin = file_session_begin;
+	be->session_end = file_session_end;
+	be->destroy_backend = file_destroy_backend;
+
+	be->load = gnc_file_be_load_from_file;
+	be->save_may_clobber_data = gnc_file_be_save_may_clobber_data;
+
+	/* The file backend treats accounting periods transactionally. */
+	be->begin = file_begin_edit;
+	be->commit = file_commit_edit;
+	be->rollback = file_rollback_edit;
+
+	/* The file backend always loads all data ... */
+	be->compile_query = NULL;
+	be->free_query = NULL;
+	be->run_query = NULL;
+
+	be->counter = NULL;
+
+	/* The file backend will never be multi-user... */
+	be->events_pending = NULL;
+	be->process_events = NULL;
+
+	be->sync = file_sync_all;
+	be->load_config = gnc_file_be_set_config;
+	be->get_config = gnc_file_be_get_config;
+
+	gnc_be->export = gnc_file_be_write_accounts_to_file;
+	gnc_be->dirname = NULL;
+	gnc_be->fullpath = NULL;
+	gnc_be->lockfile = NULL;
+	gnc_be->linkfile = NULL;
+	gnc_be->lockfd = -1;
+
+	gnc_be->primary_book = NULL;
+	return be;
+}
+
+static void
+gnc_provider_free (QofBackendProvider *prov)
+{
+        prov->provider_name = NULL;
+        prov->access_method = NULL;
+        g_free (prov);
+}
+
+void
+gnc_provider_init(void)
+{
+	QofBackendProvider *prov;
+#ifdef ENABLE_NLS
+	setlocale (LC_ALL, "");
+	bindtextdomain (GETTEXT_PACKAGE, LOCALE_DIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+	textdomain (GETTEXT_PACKAGE);
+#endif
+        prov = g_new0 (QofBackendProvider, 1);
+        prov->provider_name = "GnuCash File Backend Version 2";
+        prov->access_method = "file";
+        prov->partial_book_supported = FALSE;
+        prov->backend_new = gnc_backend_new;
+        prov->provider_free = gnc_provider_free;
+	prov->check_data_type = gnc_determine_file_type;
+        qof_backend_register_provider (prov);
+}
 
 /* ========================== END OF FILE ===================== */
Index: gnc-pricedb-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-pricedb-xml-v2.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/gnc-pricedb-xml-v2.c -Lsrc/backend/file/gnc-pricedb-xml-v2.c -u -r1.8 -r1.9
--- src/backend/file/gnc-pricedb-xml-v2.c
+++ src/backend/file/gnc-pricedb-xml-v2.c
@@ -1,5 +1,5 @@
 /********************************************************************
- * gnc-pricedb-xml-v1.c -- xml routines for price db                *
+ * gnc-pricedb-xml-v2.c -- xml routines for price db                *
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
@@ -25,8 +25,6 @@
 
 #include <string.h>
 
-#include "gnc-engine-util.h"
-
 #include "gnc-xml.h"
 #include "sixtp.h"
 #include "sixtp-utils.h"
@@ -39,7 +37,7 @@
 #include "gnc-pricedb-p.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /* Read and Write the pricedb as XML -- something like this:
 
@@ -92,34 +90,34 @@
   if(!p || !sub_node) return FALSE;
 
   gnc_price_begin_edit (p);
-  if(safe_strcmp("price:id", sub_node->name) == 0) {
+  if(safe_strcmp("price:id", (char*)sub_node->name) == 0) {
     GUID *c = dom_tree_to_guid(sub_node);
     if(!c) return FALSE; 
     gnc_price_set_guid(p, c);
     g_free(c);
-  } else if(safe_strcmp("price:commodity", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:commodity", (char*)sub_node->name) == 0) {
     gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
     if(!c) return FALSE;
     gnc_price_set_commodity(p, c);
-  } else if(safe_strcmp("price:currency", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:currency", (char*)sub_node->name) == 0) {
     gnc_commodity *c = dom_tree_to_commodity_ref(sub_node, book);
     if(!c) return FALSE;
     gnc_price_set_currency(p, c);
-  } else if(safe_strcmp("price:time", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:time", (char*)sub_node->name) == 0) {
     Timespec t = dom_tree_to_timespec(sub_node);
-    if(!is_valid_timespec(t)) return FALSE;
+    if (!dom_tree_valid_timespec(&t, sub_node->name)) return FALSE;
     gnc_price_set_time(p, t);
-  } else if(safe_strcmp("price:source", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:source", (char*)sub_node->name) == 0) {
     char *text = dom_tree_to_text(sub_node);
     if(!text) return FALSE;
     gnc_price_set_source(p, text);
     g_free(text);
-  } else if(safe_strcmp("price:type", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:type", (char*)sub_node->name) == 0) {
     char *text = dom_tree_to_text(sub_node);
     if(!text) return FALSE;
     gnc_price_set_type(p, text);
     g_free(text);
-  } else if(safe_strcmp("price:value", sub_node->name) == 0) {
+  } else if(safe_strcmp("price:value", (char*)sub_node->name) == 0) {
     gnc_numeric *value = dom_tree_to_gnc_numeric(sub_node);
     if(!value) return FALSE;
     gnc_price_set_value(p, *value);
@@ -233,6 +231,7 @@
   QofBook *book = gdata->bookdata;
   GNCPriceDB *db = gnc_pricedb_create(book);
   g_return_val_if_fail(db, FALSE);
+  gnc_pricedb_set_bulk_update(db, TRUE);
   *result = db;
   return(TRUE);
 }
@@ -307,6 +306,8 @@
     gdata->cb(tag, gdata->parsedata, db);
     *result = NULL;
 
+    gnc_pricedb_set_bulk_update(db, FALSE);
+
     return TRUE;
 }
 
@@ -366,7 +367,7 @@
 }
 
 static xmlNodePtr
-gnc_price_to_dom_tree(const char *tag, GNCPrice *price)
+gnc_price_to_dom_tree(const xmlChar *tag, GNCPrice *price)
 {  
   xmlNodePtr price_xml;
   const gchar *typestr, *sourcestr;
@@ -424,7 +425,7 @@
   xmlNodePtr xml_node = (xmlNodePtr) data;
   
   if(p) {
-    xmlNodePtr price_xml = gnc_price_to_dom_tree("price", p);
+    xmlNodePtr price_xml = gnc_price_to_dom_tree(BAD_CAST "price", p);
     if(!price_xml) return FALSE;
     xmlAddChild(xml_node, price_xml);
     return TRUE;
@@ -434,7 +435,7 @@
 }
 
 static xmlNodePtr
-gnc_pricedb_to_dom_tree(const char *tag, GNCPriceDB *db)
+gnc_pricedb_to_dom_tree(const xmlChar *tag, GNCPriceDB *db)
 {
   xmlNodePtr db_xml = NULL;
 
@@ -443,7 +444,7 @@
   db_xml= xmlNewNode(NULL, tag);
   if(!db_xml) return NULL;
 
-  xmlSetProp(db_xml, "version", "1");
+  xmlSetProp(db_xml, BAD_CAST "version", BAD_CAST "1");
 
   if(!gnc_pricedb_foreach_price(db, xml_add_gnc_price_adapter, db_xml, TRUE))
   {
@@ -464,5 +465,5 @@
 xmlNodePtr
 gnc_pricedb_dom_tree_create(GNCPriceDB *db)
 {
-    return gnc_pricedb_to_dom_tree("gnc:pricedb", db);
+    return gnc_pricedb_to_dom_tree(BAD_CAST "gnc:pricedb", db);
 }
Index: io-gncbin.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncbin.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/file/io-gncbin.h -Lsrc/backend/file/io-gncbin.h -u -r1.5 -r1.6
--- src/backend/file/io-gncbin.h
+++ src/backend/file/io-gncbin.h
@@ -30,24 +30,36 @@
 #include "qofbook.h"
 
 /* @file io-gncbin.h
- * @breif read (old X-Accountant format) binary datafile
+ * @brief read (old X-Accountant format) binary datafile
  * @author Copyright (C) 1997 Robin D. Clark
  * @author Copyright (C) 1998, 1999 Linas Vepstas <linas at linas.org>
- *
- * NOTE: These routines should not be used directly for file IO.  They
- *    are not inherently safe against file-locking errors.  For direct
- *    file IO, the QofBook's higher level functions should be used.
- *
- * qof_session_load_from_binfile() will load the financial data
- *   represented by the book's file_path into the indicated book.
- *
- * gnc_get_binfile_io_error() will return an error code for any error
- * detected that occured during reading or writing.  It will reset the
- * error code after being called.  The current implementation can be
- * thought of as a "stack of depth one", and this routine as a "pop".
- * Future implementations may have a deeper stack.
+
+  @note These routines should not be used directly for file IO.  They
+    are not inherently safe against file-locking errors.  For direct
+    file IO, the QofBook's higher level functions should be used.
 */
+/** Load the financial data represented by the book's file_path
+into the indicated book.*/
 void            qof_session_load_from_binfile(QofBook *, const char * filepath);
+
+/** Error handler.
+
+\return an error code for any error
+  detected that occured during reading or writing.
+ 
+The error code will be reset after the call.
+  
+ The current implementation can be
+ thought of as a "stack of depth one", and this routine as a "pop".
+*/
 QofBackendError gnc_get_binfile_io_error(void);
 
+/** \brief Attempt to identify the binary format.
+
+Instead of assuming that anything not v1 or v2 XML is the gnc
+binary format, this function tries to load the version token
+from the file.
+*/
+gboolean gnc_is_bin_file (const gchar *name);
+
 #endif /* IO_GNCBIN_H */
Index: sixtp.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/backend/file/sixtp.h -Lsrc/backend/file/sixtp.h -u -r1.6 -r1.7
--- src/backend/file/sixtp.h
+++ src/backend/file/sixtp.h
@@ -30,6 +30,7 @@
 #include <stdarg.h>
 
 #include "gnc-xml-helper.h"
+#include "gnc-engine.h"
 
 typedef struct _sixtp_child_result sixtp_child_result;
 
@@ -171,7 +172,7 @@
 void sixtp_destroy(sixtp *sp);
 
 void sixtp_handle_catastrophe(sixtp_sax_data *sax_data);
-xmlEntityPtr sixtp_sax_get_entity_handler(void *user_data, const CHAR *name);
+xmlEntityPtr sixtp_sax_get_entity_handler(void *user_data, const xmlChar *name);
 
 gboolean sixtp_parse_file(sixtp *sixtp, const char *filename,
                           gpointer data_for_top_level, gpointer global_data,
Index: gnc-backend-file.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-backend-file.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/backend/file/gnc-backend-file.h -Lsrc/backend/file/gnc-backend-file.h -u -r1.2 -r1.3
--- src/backend/file/gnc-backend-file.h
+++ src/backend/file/gnc-backend-file.h
@@ -19,7 +19,7 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
 \********************************************************************/
 /** @file gnc-backend-file.h
- *  @breif load and save data to files 
+ *  @brief load and save data to files 
  *  @author Copyright (c) 2000 Gnumatic Inc.
  *  @author Copyright (c) 2002 Derek Atkins <warlord at MIT.EDU>
  *  @author Copyright (c) 2003 Linas Vepstas <linas at linas.org>
@@ -31,8 +31,7 @@
 #ifndef GNC_BACKEND_FILE_H_
 #define GNC_BACKEND_FILE_H_
 
-#include "qofbackend.h"
-#include "qofbackend-p.h"
+#include "qof.h"
 
 struct FileBackend_struct
 {
@@ -43,6 +42,22 @@
     char *lockfile;
     char *linkfile;
     int lockfd;
+   /** \deprecated 
+	XXX price_lookup should be removed during the redesign
+   * of the SQL backend... prices can now be queried using
+   * the generic query mechanism.
+   *
+   * Note the correct signature for this call is
+   * void (*price_lookup) (QofBackend *, GNCPriceLookup *);
+   * we use gpointer to avoid an unwanted include file dependency.
+   */  
+    void (*price_lookup) (QofBackend *, gpointer);
+  /** XXX Export should really _NOT_ be here, but is left here for now.
+   * I'm not sure where this should be going to. It should be
+   * removed ASAP.   This is a temporary hack-around until period-closing
+   * is fully implemented.
+   */
+    void (*export) (QofBackend *, QofBook *);
 
     QofBook *primary_book;  /* The primary, main open book */
 };
@@ -55,8 +70,13 @@
     GNC_BOOK_BIN_FILE,
     GNC_BOOK_XML1_FILE,
     GNC_BOOK_XML2_FILE,
+    QSF_GNC_OBJECT,
+    QSF_OBJECT,
+    QSF_MAP,
 } QofBookFileType;
 
 QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
 
+void gnc_provider_init(void);
+
 #endif /* GNC_BACKEND_FILE_H_ */
Index: gnc-xml.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-xml.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/backend/file/gnc-xml.h -Lsrc/backend/file/gnc-xml.h -u -r1.10 -r1.11
--- src/backend/file/gnc-xml.h
+++ src/backend/file/gnc-xml.h
@@ -29,9 +29,10 @@
 
 #include "FreqSpec.h"
 #include "SchedXaction.h"
-#include "gnc-book.h"
+#include "qofbook.h"
 #include "gnc-engine.h"
 #include "gnc-pricedb.h"
+#include "gnc-budget.h"
 #include "gnc-xml-helper.h"
 #include "sixtp.h"
 
@@ -58,8 +59,8 @@
 xmlNodePtr gnc_schedXaction_dom_tree_create( SchedXaction *sx );
 sixtp* gnc_schedXaction_sixtp_parser_create(void);
 
-xmlNodePtr split_to_dom_tree(const gchar *tag, Split *spl);
-Split* dom_tree_to_split(xmlNodePtr node, QofBook *book);
+xmlNodePtr gnc_budget_dom_tree_create( GncBudget *bgt );
+sixtp* gnc_budget_sixtp_parser_create(void);
 
 xmlNodePtr gnc_transaction_dom_tree_create(Transaction *txn);
 sixtp* gnc_transaction_sixtp_parser_create(void);
Index: gnc-commodity-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-commodity-xml-v2.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/gnc-commodity-xml-v2.c -Lsrc/backend/file/gnc-commodity-xml-v2.c -u -r1.8 -r1.9
--- src/backend/file/gnc-commodity-xml-v2.c
+++ src/backend/file/gnc-commodity-xml-v2.c
@@ -37,7 +37,6 @@
 #include "sixtp-dom-generators.h"
 
 #include "gnc-xml.h"
-#include "gnc-engine-util.h"
 #include "io-gncxml-gen.h"
 
 #include "sixtp-dom-parsers.h"
@@ -45,7 +44,7 @@
 #include "Account.h"
 #include "Group.h"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *commodity_version_string = "2.0.0";
 
@@ -67,9 +66,9 @@
     const char *string;
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, gnc_commodity_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_commodity_string);
 
-    xmlSetProp(ret, "version", commodity_version_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST commodity_version_string);
     
     xmlAddChild(ret, text_to_dom_tree(cmdty_namespace,
                                       gnc_commodity_get_namespace(com)));
@@ -94,7 +93,7 @@
                                      gnc_commodity_get_fraction(com)));
 
     if (gnc_commodity_get_quote_flag(com)) {
-      xmlNewChild(ret, NULL, cmdty_get_quotes, NULL);
+      xmlNewChild(ret, NULL, BAD_CAST cmdty_get_quotes, NULL);
       source = gnc_commodity_get_quote_source(com);
       if (source)
 	xmlAddChild(ret, text_to_dom_tree(cmdty_quote_source,
@@ -126,28 +125,28 @@
 static void
 set_commodity_value(xmlNodePtr node, gnc_commodity* com)
 {
-    if(safe_strcmp(node->name, cmdty_fraction) == 0)
+    if(safe_strcmp((char*) node->name, cmdty_fraction) == 0)
     {
         gint64 val;
         char *string;
 
-        string = xmlNodeGetContent (node->xmlChildrenNode);
+        string = (char*) xmlNodeGetContent (node->xmlChildrenNode);
         if(string_to_gint64(string, &val))
         {
             gnc_commodity_set_fraction(com, val);
         }
         xmlFree (string);
     }
-    else if(safe_strcmp(node->name, cmdty_get_quotes) == 0)
+    else if(safe_strcmp((char*)node->name, cmdty_get_quotes) == 0)
     {
 	gnc_commodity_set_quote_flag(com, TRUE);
     }
-    else if(safe_strcmp(node->name, cmdty_quote_source) == 0)
+    else if(safe_strcmp((char*)node->name, cmdty_quote_source) == 0)
     {
         gnc_quote_source *source;
         char *string;
 
-        string = xmlNodeGetContent (node->xmlChildrenNode);
+        string = (char*) xmlNodeGetContent (node->xmlChildrenNode);
 	source = gnc_quote_source_lookup_by_internal(string);
 	if (!source)
 	  source = gnc_quote_source_add_new(string, FALSE);
@@ -160,7 +159,7 @@
 
         for(mark = com_handlers; mark->tag; mark++)
         {
-            if(safe_strcmp(mark->tag, node->name) == 0)
+            if(safe_strcmp(mark->tag, (char*)node->name) == 0)
             {
                 gchar* val = dom_tree_to_text(node);
                 g_strstrip(val);
@@ -203,6 +202,7 @@
     xmlNodePtr achild;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
+    QofBook *book = gdata->bookdata;
 
     if(parent_data)
     {
@@ -218,7 +218,7 @@
     
     g_return_val_if_fail(tree, FALSE);
     
-    com = gnc_commodity_new(NULL, NULL, NULL, NULL, 0); 
+    com = gnc_commodity_new(book, NULL, NULL, NULL, NULL, 0); 
 
     for(achild = tree->xmlChildrenNode; achild; achild = achild->next)
     {
Index: sixtp-dom-parsers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-dom-parsers.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/backend/file/sixtp-dom-parsers.c -Lsrc/backend/file/sixtp-dom-parsers.c -u -r1.18 -r1.19
--- src/backend/file/sixtp-dom-parsers.c
+++ src/backend/file/sixtp-dom-parsers.c
@@ -1,5 +1,5 @@
 /********************************************************************
- * sixtp-dom-parsers.h                                              *
+ * sixtp-dom-parsers.c                                              *
  * Copyright 2001 Gnumatic, Inc.                                    *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
@@ -27,15 +27,11 @@
 #include <string.h>
 
 #include "gnc-xml-helper.h"
-#include "gnc-engine-util.h"
-#include "gnc-commodity.h"
 #include "gnc-engine.h"
-#include "qofid.h"
-
 #include "sixtp-utils.h"
 #include "sixtp-dom-parsers.h"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 GUID*
 dom_tree_to_guid(xmlNodePtr node)
@@ -45,7 +41,7 @@
         return NULL;
     }
 
-    if(strcmp(node->properties->name, "type") != 0)
+    if(strcmp((char*) node->properties->name, "type") != 0)
     {
         PERR("Unknown attribute for id tag: %s",
              node->properties->name ?
@@ -56,7 +52,7 @@
     {
         char *type;
 
-        type = xmlNodeGetContent (node->properties->xmlAttrPropertyValue);
+        type = (char*)xmlNodeGetContent (node->properties->xmlAttrPropertyValue);
 
         /* handle new and guid the same for the moment */
         if((safe_strcmp("guid", type) == 0) || (safe_strcmp("new", type) == 0))
@@ -64,7 +60,7 @@
             GUID *gid = g_new(GUID, 1);
             char *guid_str;
 
-            guid_str = xmlNodeGetContent (node->xmlChildrenNode);
+            guid_str = (char*)xmlNodeGetContent (node->xmlChildrenNode);
             string_to_guid(guid_str, gid);
             xmlFree (guid_str);
             xmlFree (type);
@@ -115,6 +111,33 @@
     return ret;
 }
 
+gboolean
+dom_tree_to_guint16(xmlNodePtr node, guint16 *i)
+{
+    gboolean ret;
+    guint j = 0;
+
+    ret = dom_tree_to_guint(node, &j);
+    *i = (guint16) j;
+    return ret;
+}
+
+gboolean
+dom_tree_to_guint(xmlNodePtr node, guint *i)
+{
+    gchar *text, *endptr;
+    gboolean ret;
+
+    text = dom_tree_to_text(node);
+    /* In spite of the strange string_to_gint64 function, I'm just
+       going to use strtoul here until someone shows me the error of
+       my ways. -CAS */
+    *i = (guint) strtoul(text, &endptr, 0);
+    ret = (endptr != text);
+    g_free(text);
+    return ret;
+}
+
 kvp_value*
 dom_tree_to_double_kvp_value(xmlNodePtr node)
 {
@@ -274,7 +297,7 @@
     {
         kvp_value *new_val;
 
-        if (safe_strcmp (mark->name, "text") == 0)
+        if (safe_strcmp ((char*)mark->name, "text") == 0)
           continue;
 
         new_val = dom_tree_to_kvp_value(mark);
@@ -335,10 +358,10 @@
     struct kvp_val_converter *mark;
     kvp_value *ret = NULL;
 
-    xml_type = xmlGetProp(node, "type");
+    xml_type = xmlGetProp(node, BAD_CAST "type");
     if(xml_type)
     {
-        type = g_strdup (xml_type);
+        type = g_strdup ((char*) xml_type);
         xmlFree (xml_type);
     }
     else
@@ -372,7 +395,7 @@
 
     for(mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if(safe_strcmp(mark->name, "slot") == 0)
+        if(safe_strcmp((char*)mark->name, "slot") == 0)
         {
             xmlNodePtr mark2;
             gchar *key = NULL;
@@ -380,11 +403,11 @@
 
             for(mark2 = mark->xmlChildrenNode; mark2; mark2 = mark2->next)
             {
-                if(safe_strcmp(mark2->name, "slot:key") == 0)
+                if(safe_strcmp((char*)mark2->name, "slot:key") == 0)
                 {
                     key = dom_tree_to_text(mark2);
                 }
-                else if(safe_strcmp(mark2->name, "slot:value") == 0)
+                else if(safe_strcmp((char*)mark2->name, "slot:value") == 0)
                 {
                     val = dom_tree_to_kvp_value(mark2);
                 }
@@ -456,7 +479,7 @@
       return g_strdup("");
   }
 
-  temp = xmlNodeListGetString (NULL, tree->xmlChildrenNode, TRUE);
+  temp = (char*)xmlNodeListGetString (NULL, tree->xmlChildrenNode, TRUE);
   if (!temp) 
   {
     PINFO ("Null string");
@@ -529,7 +552,7 @@
     case XML_TEXT_NODE:
       break;
     case XML_ELEMENT_NODE:
-      if(safe_strcmp("ts:date", n->name) == 0) {
+      if(safe_strcmp("ts:date", (char*)n->name) == 0) {
         if(seen_s)
         {
             return timespec_failure(ret);
@@ -550,7 +573,7 @@
           seen_s = TRUE;
         }
       }
-      else if(safe_strcmp("ts:ns", n->name) == 0) {
+      else if(safe_strcmp("ts:ns", (char*)n->name) == 0) {
         if(seen_ns)
         {
             return timespec_failure(ret);
@@ -612,7 +635,7 @@
     case XML_TEXT_NODE:
       break;
     case XML_ELEMENT_NODE:
-      if(safe_strcmp("gdate", n->name) == 0) {
+      if(safe_strcmp("gdate", (char*)n->name) == 0) {
         if(seen_date) {
             goto failure;
         } else {
@@ -681,7 +704,7 @@
     case XML_TEXT_NODE:
       break;
     case XML_ELEMENT_NODE:
-      if(safe_strcmp("cmdty:space", n->name) == 0) {
+      if(safe_strcmp("cmdty:space", (char*)n->name) == 0) {
         if(space_str) {
           return NULL;
         } else {
@@ -689,7 +712,7 @@
           if(!content) return NULL;
           space_str = content;
         }
-      } else if(safe_strcmp("cmdty:id", n->name) == 0) {
+      } else if(safe_strcmp("cmdty:id", (char*)n->name) == 0) {
         if(id_str) {
           return NULL;
         } else {
@@ -710,7 +733,7 @@
   } else {
     g_strstrip(space_str);
     g_strstrip(id_str);
-    c = gnc_commodity_new(NULL, space_str, id_str, NULL, 0);
+    c = gnc_commodity_new(book, NULL, space_str, id_str, NULL, 0);
   }
 
   g_free(space_str);
@@ -808,10 +831,10 @@
     for(achild = node->xmlChildrenNode; achild; achild = achild->next)
     {
         /* ignore stray text nodes */
-        if (safe_strcmp (achild->name, "text") == 0)
+        if (safe_strcmp ((char*)achild->name, "text") == 0)
           continue;
 
-        if(!gnc_xml_set_data(achild->name, achild, data, handlers))
+        if(!gnc_xml_set_data((char*)achild->name, achild, data, handlers))
         {
             PERR("gnc_xml_set_data failed");
             successful = FALSE;
@@ -827,3 +850,15 @@
 
     return successful;
 }
+
+gboolean
+dom_tree_valid_timespec (Timespec *ts, const gchar *name)
+{
+
+  if (ts->tv_sec || ts->tv_nsec)
+    return TRUE;
+
+  g_warning("Invalid timestamp in data file.  Look for a '%s' entry "
+	    "with a date of 1969-12-31 or 1970-01-01.", name);
+  return FALSE;
+}
Index: io-gncxml.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/file/io-gncxml.h -Lsrc/backend/file/io-gncxml.h -u -r1.4 -r1.5
--- src/backend/file/io-gncxml.h
+++ src/backend/file/io-gncxml.h
@@ -22,9 +22,9 @@
  *                                                                  *
 \********************************************************************/
 
-/*
+/**
  * @file io-gncxml.h
- * @breif api for Version 1 XML-based file format
+ * @brief api for Version 1 XML-based file format
  *
  * Initial code by Rob L. Browning 4Q 2000
  * Tuneups by James LewisMoss Dec 2000
Index: sixtp-dom-generators.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-dom-generators.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/file/sixtp-dom-generators.h -Lsrc/backend/file/sixtp-dom-generators.h -u -r1.4 -r1.5
--- src/backend/file/sixtp-dom-generators.h
+++ src/backend/file/sixtp-dom-generators.h
@@ -34,6 +34,7 @@
 #include "gnc-commodity.h"
 #include "gnc-date.h"
 #include "gnc-numeric.h"
+#include "Recurrence.h"
 #include "kvp_frame.h"
 #include "qofid.h"
 
@@ -44,10 +45,11 @@
 xmlNodePtr timespec_to_dom_tree(const char *tag, const Timespec *spec);
 gchar * timespec_nsec_to_string(const Timespec *ts);
 gchar * timespec_sec_to_string(const Timespec *ts);
-xmlNodePtr gdate_to_dom_tree(const char *tag, GDate *spec);
+xmlNodePtr gdate_to_dom_tree(const char *tag, const GDate *spec);
 xmlNodePtr gnc_numeric_to_dom_tree(const char *tag, const gnc_numeric *num);
 xmlNodePtr kvp_frame_to_dom_tree(const char *tag, const kvp_frame *frame);
 xmlNodePtr guint_to_dom_tree(const char *tag, guint an_int);
+xmlNodePtr recurrence_to_dom_tree(const gchar *tag, const Recurrence *r);
 
 gchar* double_to_string(double value);
 
Index: io-gncxml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v2.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -Lsrc/backend/file/io-gncxml-v2.c -Lsrc/backend/file/io-gncxml-v2.c -u -r1.43 -r1.44
--- src/backend/file/io-gncxml-v2.c
+++ src/backend/file/io-gncxml-v2.c
@@ -28,9 +28,7 @@
 #include <zlib.h>
 
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "gnc-pricedb-p.h"
-#include "gncObject.h"
 #include "Group.h"
 #include "GroupP.h"
 #include "Scrub.h"
@@ -39,10 +37,6 @@
 #include "Transaction.h"
 #include "TransactionP.h"
 #include "TransLog.h"
-#include "qofbackend-p.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-
 #include "sixtp-dom-parsers.h"
 #include "io-gncxml-v2.h"
 #include "io-gncxml-gen.h"
@@ -53,8 +47,7 @@
 #include "gnc-xml.h"
 #include "io-utils.h"
 
-
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /* Callback structure */
 struct file_backend {
@@ -82,9 +75,9 @@
 static void
 clear_up_account_commodity(
     gnc_commodity_table *tbl, Account *act,
-    gnc_commodity * (*getter) (Account *account),
+    gnc_commodity * (*getter) (const Account *account),
     void (*setter) (Account *account, gnc_commodity *comm),
-    int (*scu_getter) (Account *account),
+    int (*scu_getter) (const Account *account),
     void (*scu_setter) (Account *account, int scu))
 {
     gnc_commodity *gcom;
@@ -116,10 +109,10 @@
     }
     else
     {
-        gnc_commodity_destroy(com);
         setter(act, gcom);
         if (old_scu != 0 && scu_setter)
           scu_setter(act, old_scu);
+        gnc_commodity_destroy(com);
     }
 }
 
@@ -152,10 +145,10 @@
     }
     else
     {
-        gnc_commodity_destroy(com);
         xaccTransBeginEdit(trans);
         setter(trans, gcom);
         xaccTransCommitEdit(trans);
+        gnc_commodity_destroy(com);
     }
 }
 
@@ -280,7 +273,7 @@
             xaccGetAccountFromName( acctGroup,
                                     xaccAccountGetName( (Account*)n->data ) );
             if ( tmpAcct != NULL ) {
-/* XXX hack alert FIXME .... Should the be 'Remove', or 'Destroy'?
+/* XXX hack alert FIXME .... Should this be 'Remove', or 'Destroy'?
  * If we just remove, then this seems to be a memory leak to me, since
  * it is never reparented.  Shouldn't it be a Destroy ???
  */
@@ -354,7 +347,7 @@
     
     g_return_val_if_fail(tree, FALSE);
 
-    type = xmlGetProp(tree, "cd:type");
+    type = (char*)xmlGetProp(tree, BAD_CAST "cd:type");
     strval = dom_tree_to_text(tree);
     if(!string_to_gint64(strval, &val))
     {
@@ -386,6 +379,10 @@
     {
         sixdata->counter.schedXactions_total = val;
     }
+    else if(safe_strcmp(type, "budget") == 0)
+    {
+        sixdata->counter.budgets_total = val;
+    }
     else
     {
       struct file_backend be_data;
@@ -393,7 +390,7 @@
       be_data.ok = FALSE;
       be_data.tag = type;
 
-      gncObjectForeachBackend (GNC_FILE_BACKEND, do_counter_cb, &be_data);
+      qof_object_foreach_backend (GNC_FILE_BACKEND, do_counter_cb, &be_data);
 
       if (be_data.ok == FALSE)
       {
@@ -428,6 +425,8 @@
            data->commodities_total, data->commodities_loaded);
     PINFO("Scheduled Tansactions: Total: %d, Loaded: %d",
            data->schedXactions_total, data->schedXactions_loaded);
+    PINFO("Budgets: Total: %d, Loaded: %d",
+	  data->budgets_total, data->budgets_loaded);
 }
 
 static void
@@ -443,13 +442,15 @@
     counter = &gd->counter;
     loaded = counter->transactions_loaded + counter->accounts_loaded +
       counter->books_loaded + counter->commodities_loaded +
-      counter->schedXactions_loaded;
+      counter->schedXactions_loaded + counter->budgets_loaded;
     total = counter->transactions_total + counter->accounts_total +
       counter->books_total + counter->commodities_total +
-      counter->schedXactions_total;
+      counter->schedXactions_total + counter->budgets_total;
 
     percentage = (loaded * 100)/total;
     if (percentage > 100) {
+      /* FIXME: Perhaps the below should be replaced by:
+	 print_counter_data(counter); */
       printf("Transactions: Total: %d, Loaded: %d\n",
              counter->transactions_total, counter->transactions_loaded);
       printf("Accounts: Total: %d, Loaded: %d\n",
@@ -460,6 +461,8 @@
              counter->commodities_total, counter->commodities_loaded);
       printf("Scheduled Tansactions: Total: %d, Loaded: %d\n",
              counter->schedXactions_total, counter->schedXactions_loaded);
+      printf("Budgets: Total: %d, Loaded: %d\n",
+	     counter->budgets_total, counter->budgets_loaded);
     }
     percentage = MIN(percentage, 100);
     gd->gui_display_fn(NULL, percentage);
@@ -475,6 +478,7 @@
 static const char *TRANSACTION_TAG = "gnc:transaction";
 static const char *SCHEDXACTION_TAG = "gnc:schedxaction";
 static const char *TEMPLATE_TRANSACTION_TAG = "gnc:template-transactions";
+static const char *BUDGET_TAG = "gnc:budget";
 
 static void
 add_item_cb (const char *type, gpointer data_p, gpointer be_data_p)
@@ -521,10 +525,14 @@
     {
         add_schedXaction_local(gd, (SchedXaction*)data);
     }
-    else if(safe_strcmp(tag, TEMPLATE_TRANSACTION_TAG ) == 0 )
+    else if(safe_strcmp(tag, TEMPLATE_TRANSACTION_TAG) == 0)
     {
         add_template_transaction_local( gd, (gnc_template_xaction_data*)data );
     }
+    else if(safe_strcmp(tag, BUDGET_TAG) == 0)
+    {
+        // Nothing needed here.
+    }
     else
     {
       struct file_backend be_data;
@@ -534,7 +542,7 @@
       be_data.gd = gd;
       be_data.data = data;
 
-      gncObjectForeachBackend (GNC_FILE_BACKEND, add_item_cb, &be_data);
+      qof_object_foreach_backend (GNC_FILE_BACKEND, add_item_cb, &be_data);
 
       if (be_data.ok == FALSE)
       {
@@ -619,6 +627,8 @@
     gd->counter.prices_total = 0;
     gd->counter.schedXactions_loaded = 0;
     gd->counter.schedXactions_total = 0;
+    gd->counter.budgets_loaded = 0;
+    gd->counter.budgets_total = 0;
     gd->exporting = exporting;
     gd->countCallback = countcallback;
     gd->gui_display_fn = gui_display_fn;
@@ -677,6 +687,7 @@
            PRICEDB_TAG, gnc_pricedb_sixtp_parser_create(),
            COMMODITY_TAG, gnc_commodity_sixtp_parser_create(),
            ACCOUNT_TAG, gnc_account_sixtp_parser_create(),
+           BUDGET_TAG, gnc_budget_sixtp_parser_create(),
            TRANSACTION_TAG, gnc_transaction_sixtp_parser_create(),
            SCHEDXACTION_TAG, gnc_schedXaction_sixtp_parser_create(),
            TEMPLATE_TRANSACTION_TAG, gnc_template_transaction_sixtp_parser_create(),
@@ -687,7 +698,7 @@
 
     be_data.ok = TRUE;
     be_data.parser = book_parser;
-    gncObjectForeachBackend (GNC_FILE_BACKEND, add_parser_cb, &be_data);
+    qof_object_foreach_backend (GNC_FILE_BACKEND, add_parser_cb, &be_data);
     if (be_data.ok == FALSE)
       goto bail;
 
@@ -717,7 +728,7 @@
     /* Call individual scrub functions */
     memset(&be_data, 0, sizeof(be_data));
     be_data.book = book;
-    gncObjectForeachBackend (GNC_FILE_BACKEND, scrub_cb, &be_data);
+    qof_object_foreach_backend (GNC_FILE_BACKEND, scrub_cb, &be_data);
 
     /* fix price quote sources */
     grp = gnc_book_get_group(book);
@@ -753,7 +764,6 @@
     char *type;
 
     va_start(ap, out);
-
     type = va_arg(ap, char *);
 
     while(type)
@@ -766,9 +776,9 @@
         {
             val = g_strdup_printf("%d", amount);
 
-            node = xmlNewNode(NULL, COUNT_DATA_TAG);
-            xmlSetProp(node, "cd:type", type);
-            xmlNodeAddContent(node, val);
+            node = xmlNewNode(NULL, BAD_CAST COUNT_DATA_TAG);
+            xmlSetProp(node, BAD_CAST "cd:type", BAD_CAST type);
+            xmlNodeAddContent(node, BAD_CAST val);
 
             xmlElemDump(out, NULL, node);
             fprintf(out, "\n");
@@ -804,6 +814,7 @@
 static void write_transactions (FILE *out, QofBook *book, sixtp_gdv2 *gd);
 static void write_template_transaction_data (FILE *out, QofBook *book, sixtp_gdv2 *gd);
 static void write_schedXactions(FILE *out, QofBook *book, sixtp_gdv2 *gd);
+static void write_budget (QofEntity *ent, gpointer data);
 
 static void
 write_counts_cb (const char *type, gpointer data_p, gpointer be_data_p)
@@ -854,17 +865,28 @@
     }
     
     xmlElemDump(out, NULL, node);
-    fprintf(out, "\n");
+    if(fprintf(out, "\n") < 0)
+	{
+		qof_backend_set_error(qof_book_get_backend(book), ERR_FILEIO_WRITE_ERROR);
+		return;
+	}
 
     xmlFreeNode(node);
 #endif
 
     be_data.out = out;
     be_data.book = book;
-
-    fprintf( out, "<%s version=\"%s\">\n", BOOK_TAG, gnc_v2_book_version_string );
+    be_data.gd = gd;
+    if(fprintf( out, "<%s version=\"%s\">\n", BOOK_TAG, gnc_v2_book_version_string) < 0)
+	{
+		qof_backend_set_error(qof_book_get_backend(book), ERR_FILEIO_WRITE_ERROR);
+		return;
+	}
     write_book_parts (out, book);
 
+    /* gd->counter.{foo}_total fields should have all these totals
+       already collected.  I don't know why we're re-calling all these
+       functions.  */
     write_counts(out,
                  "commodity",
                  gnc_commodity_table_get_size(
@@ -875,9 +897,11 @@
                  gnc_book_count_transactions(book),
                  "schedxaction",
                  g_list_length( gnc_book_get_schedxactions(book) ),
-                 NULL);
+		 "budget", qof_collection_count(
+                     qof_book_get_collection(book, GNC_ID_BUDGET)),
+		 NULL);
 
-    gncObjectForeachBackend (GNC_FILE_BACKEND, write_counts_cb, &be_data);
+    qof_object_foreach_backend (GNC_FILE_BACKEND, write_counts_cb, &be_data);
 
     write_commodities(out, book, gd);
     write_pricedb(out, book, gd);
@@ -886,9 +910,14 @@
     write_template_transaction_data(out, book, gd);
     write_schedXactions(out, book, gd);
 
-    gncObjectForeachBackend (GNC_FILE_BACKEND, write_data_cb, &be_data);
+    qof_collection_foreach(qof_book_get_collection(book, GNC_ID_BUDGET), 
+        write_budget, &be_data);
 
-    fprintf( out, "</%s>\n", BOOK_TAG );
+    qof_object_foreach_backend (GNC_FILE_BACKEND, write_data_cb, &be_data);
+
+    if(fprintf( out, "</%s>\n", BOOK_TAG ) < 0) {
+		qof_backend_set_error(qof_book_get_backend(book), ERR_FILEIO_WRITE_ERROR);
+	}
 }
 
 void
@@ -1033,30 +1062,64 @@
     } while ( (schedXactions = schedXactions->next) );
 }
 
-#if 0
 static void
-write_namespace_decl (FILE *out, const char *namespace)
+write_budget (QofEntity *ent, gpointer data)
+{
+    xmlNodePtr node;
+    struct file_backend* be = data;
+
+    GncBudget *bgt = GNC_BUDGET(ent);
+    node = gnc_budget_dom_tree_create(bgt);
+    xmlElemDump( be->out, NULL, node );
+    fprintf( be->out, "\n" );
+    xmlFreeNode( node );
+    
+    be->gd->counter.budgets_loaded++;
+    run_callback(be->gd, "budgets");    
+}
+
+void
+gnc_xml2_write_namespace_decl (FILE *out, const char *namespace)
 {
   g_return_if_fail (namespace);
-  fprintf(out, " xmlns:%s=\"\"", namespace);
+  fprintf(out, "\n     xmlns:%s=\"http://www.gnucash.org/XML/%s\"",
+          namespace, namespace);
+}
+
+static void
+do_write_namespace_cb (const char *type, gpointer data_p, gpointer file_p)
+{
+  GncXmlDataType_t *data = data_p;
+  FILE *out = file_p;
+
+  g_return_if_fail (type && data && out);
+  g_return_if_fail (data->version == GNC_FILE_BACKEND_VERS);
+
+  if (data->ns)
+    (data->ns)(out);
 }
-#endif
 
 static void
 write_v2_header (FILE *out)
 {
     fprintf(out, "<?xml version=\"1.0\"?>\n");
     fprintf(out, "<" GNC_V2_STRING);
-    /*
-    write_namespace_decl (out, "cd");
-    write_namespace_decl (out, "gnc");
-    write_namespace_decl (out, "act");
-    write_namespace_decl (out, "cmdty");
-    write_namespace_decl (out, "trn");
-    write_namespace_decl (out, "ts");
-    write_namespace_decl (out, "split");
-    write_namespace_decl (out, "sx");
-    */
+    
+    gnc_xml2_write_namespace_decl (out, "gnc");
+    gnc_xml2_write_namespace_decl (out, "act");
+    gnc_xml2_write_namespace_decl (out, "book");
+    gnc_xml2_write_namespace_decl (out, "cd");
+    gnc_xml2_write_namespace_decl (out, "cmdty");
+    gnc_xml2_write_namespace_decl (out, "price");
+    gnc_xml2_write_namespace_decl (out, "slot");
+    gnc_xml2_write_namespace_decl (out, "split");
+    gnc_xml2_write_namespace_decl (out, "sx");
+    gnc_xml2_write_namespace_decl (out, "trn");
+    gnc_xml2_write_namespace_decl (out, "ts");
+
+    /* now cope with the plugins */
+    qof_object_foreach_backend (GNC_FILE_BACKEND, do_write_namespace_cb, out);
+
     fprintf(out, ">\n");
 }
 
@@ -1083,6 +1146,8 @@
     gd->counter.transactions_total = gnc_book_count_transactions(book);
     gd->counter.schedXactions_total =
       g_list_length( gnc_book_get_schedxactions(book));
+    gd->counter.budgets_total = qof_collection_count(
+        qof_book_get_collection(book, GNC_ID_BUDGET));
 
     write_book(out, book, gd);
 
@@ -1149,12 +1214,6 @@
   if (!use_gzip)
     return fopen(filename, perms);
 
-//gboolean
-//gnc_lookup_boolean_option( const char *section,
-//                                    const char *name,
-//                                    gboolean default_value)
-//
-
   if (pipe(filedes) < 0) {
     PWARN("Pipe call failed. Opening uncompressed file.");
     return fopen(filename, perms);
@@ -1194,7 +1253,7 @@
     FILE *out;
 
     out = try_gz_open(filename, "w", compress);
-     if (out == NULL)
+    if (out == NULL)
     {
         return FALSE;
     }
Index: sixtp-stack.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-stack.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/file/sixtp-stack.c -Lsrc/backend/file/sixtp-stack.c -u -r1.5 -r1.6
--- src/backend/file/sixtp-stack.c
+++ src/backend/file/sixtp-stack.c
@@ -181,5 +181,9 @@
 {
     sixtp_stack_frame_destroy(context->top_frame);
     g_slist_free(context->data.stack);
+    context->data.saxParserCtxt->userData = NULL;
+    context->data.saxParserCtxt->sax = NULL;    
+    xmlFreeParserCtxt(context->data.saxParserCtxt);
+    context->data.saxParserCtxt = NULL;
     g_free(context);
 }
Index: io-gncxml-v2.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncxml-v2.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/backend/file/io-gncxml-v2.h -Lsrc/backend/file/io-gncxml-v2.h -u -r1.16 -r1.17
--- src/backend/file/io-gncxml-v2.h
+++ src/backend/file/io-gncxml-v2.h
@@ -22,10 +22,9 @@
  *                                                                  *
 \********************************************************************/
 
-/*
- * @file io-gncxml.h
- * @breif api for GnuCash version 2 XML-based file format
- *
+/**
+ * @file io-gncxml-v2.h
+ * @brief api for GnuCash version 2 XML-based file format
  * @author Initial code by James LewisMoss, 2001
  */
 
@@ -59,6 +58,9 @@
 
     int schedXactions_total;
     int schedXactions_loaded;
+
+    int budgets_total;
+    int budgets_loaded;
 } load_counter;
 
 typedef struct sixtp_gdv2 sixtp_gdv2;
@@ -91,6 +93,9 @@
  *
  * The scrub() method will take a completed, parsed QofBook* and post process
  *   the data, allowing you to 'scrub' the data.
+ *
+ * The ns() method will output XML namespace information for the selected
+ *   plug-in object.
  */
 #define GNC_FILE_BACKEND	"gnc:file:2"
 #define GNC_FILE_BACKEND_VERS	2
@@ -104,6 +109,7 @@
   int	      (*get_count) (QofBook *);
   void		(*write) (FILE*, QofBook*);
   void		(*scrub) (QofBook *);
+  void		(*ns) (FILE*);
 } GncXmlDataType_t;
 
 /**
@@ -119,24 +125,29 @@
 	QofBook *book;
 } gnc_template_xaction_data;
 
-/* Call after loading each record */
+/** Call after loading each record */
 void run_callback(sixtp_gdv2 *data, const char *type);
 
-/* read in an account group from a file */
+/** read in an account group from a file */
 gboolean qof_session_load_from_xml_file_v2(FileBackend *, QofBook *);
 
 /* write all book info to a file */
 gboolean gnc_book_write_to_xml_filehandle_v2(QofBook *book, FILE *fh);
 gboolean gnc_book_write_to_xml_file_v2(QofBook *book, const char *filename, gboolean compress);
 
-/* write just the commodities and accounts to a file */
+/** write just the commodities and accounts to a file */
 gboolean gnc_book_write_accounts_to_xml_filehandle_v2(QofBackend *be, QofBook *book, FILE *fh);
 gboolean gnc_book_write_accounts_to_xml_file_v2(QofBackend * be, QofBook *book,
 						const char *filename);
 
-/* The is_gncxml_file() routine checks to see if the first few 
+/** The is_gncxml_file() routine checks to see if the first few 
  * chars of the file look like gnc-xml data.
  */
 gboolean gnc_is_xml_data_file_v2(const gchar *name);
 
+/** Write a name-space declaration for the provided namespace data type
+ * within the GNC XML namespace at http://www.gnucash.org/XML.
+ */
+void gnc_xml2_write_namespace_decl (FILE *out, const char *namespace);
+
 #endif /* __IO_GNCXML_V2_H__ */
Index: gnc-freqspec-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-freqspec-xml-v2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/backend/file/gnc-freqspec-xml-v2.c -Lsrc/backend/file/gnc-freqspec-xml-v2.c -u -r1.9 -r1.10
--- src/backend/file/gnc-freqspec-xml-v2.c
+++ src/backend/file/gnc-freqspec-xml-v2.c
@@ -29,7 +29,7 @@
 #include <string.h>
 
 #include "gnc-xml-helper.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
 
 #include "sixtp.h"
 #include "sixtp-utils.h"
@@ -154,8 +154,8 @@
         xmlNodePtr                ret;
         xmlNodePtr                xmlSub;
 
-        ret = xmlNewNode( NULL, "gnc:freqspec" );
-        xmlSetProp( ret, "version", freqspec_version_string );
+        ret = xmlNewNode( NULL, BAD_CAST "gnc:freqspec" );
+        xmlSetProp( ret, BAD_CAST "version", BAD_CAST freqspec_version_string );
 
         xmlAddChild( ret, guid_to_dom_tree( "fs:id", &fs->entity.guid ) );
 
@@ -166,11 +166,11 @@
         switch( fs->type ) {
 
         case INVALID: {
-                xmlSub = xmlNewNode( NULL, "fs:none" );
+                xmlSub = xmlNewNode( NULL, BAD_CAST "fs:none" );
         } break;
 
         case ONCE: {
-                xmlSub = xmlNewNode( NULL, "fs:once" );
+                xmlSub = xmlNewNode( NULL, BAD_CAST "fs:once" );
                 xmlAddChild( xmlSub, 
                              gdate_to_dom_tree( "fs:date", 
                                                 &fs->s.once.date ) );
@@ -178,7 +178,7 @@
         } break;
 
         case DAILY: {
-                        xmlSub = xmlNewNode( NULL, "fs:daily" );
+                        xmlSub = xmlNewNode( NULL, BAD_CAST "fs:daily" );
                         xmlAddChild( xmlSub, 
                                      guint_to_dom_tree(
                                              "fs:interval", 
@@ -193,7 +193,7 @@
         } break;
         
         case WEEKLY: {
-                xmlSub = xmlNewNode( NULL, "fs:weekly" );
+                xmlSub = xmlNewNode( NULL, BAD_CAST "fs:weekly" );
                 xmlAddChild( xmlSub, 
                              guint_to_dom_tree( 
                                      "fs:interval", 
@@ -208,7 +208,7 @@
         } break;
         
         case MONTHLY: {
-                xmlSub = xmlNewNode( NULL, "fs:monthly" );
+                xmlSub = xmlNewNode( NULL, BAD_CAST "fs:monthly" );
                 xmlAddChild( xmlSub, 
                              guint_to_dom_tree( 
                                      "fs:interval", 
@@ -228,7 +228,7 @@
         } break;
         
         case MONTH_RELATIVE: {
-                xmlSub = xmlNewNode( NULL, "fs:month_relative" );
+                xmlSub = xmlNewNode( NULL, BAD_CAST "fs:month_relative" );
                 xmlAddChild( xmlSub, 
                              guint_to_dom_tree( 
                                      "fs:interval", 
@@ -255,7 +255,7 @@
         case COMPOSITE: {
                 GList *subelts;
                 xmlNodePtr xmlComposites;
-                xmlComposites = xmlNewNode( NULL, "fs:composite" );
+                xmlComposites = xmlNewNode( NULL, BAD_CAST "fs:composite" );
                 subelts = fs->s.composites.subSpecs;
                 while( subelts ) {
                         xmlAddChild( xmlComposites,
Index: io-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-utils.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/io-utils.c -Lsrc/backend/file/io-utils.c -u -r1.8 -r1.9
--- src/backend/file/io-utils.c
+++ src/backend/file/io-utils.c
@@ -32,7 +32,6 @@
 #include "gnc-xml.h"
 #include "gnc-xml.h"
 #include "io-utils.h"
-#include "qofbook.h"
 
 /*
   <!-- Local variables: -->
Index: gnc-lot-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-lot-xml-v2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/file/gnc-lot-xml-v2.c -Lsrc/backend/file/gnc-lot-xml-v2.c -u -r1.5 -r1.6
--- src/backend/file/gnc-lot-xml-v2.c
+++ src/backend/file/gnc-lot-xml-v2.c
@@ -41,13 +41,11 @@
 #include "gnc-xml.h"
 #include "io-gncxml-gen.h"
 #include "io-gncxml-v2.h"
-
 #include "sixtp-dom-parsers.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
-#include "gnc-engine-util.h"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *lot_version_string = "2.0.0";
 
@@ -63,8 +61,8 @@
     kvp_frame *kf;
 
 	 ENTER("(lot=%p)", lot);
-    ret = xmlNewNode(NULL, gnc_lot_string);
-    xmlSetProp(ret, "version", lot_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_lot_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST lot_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(lot_id_string, gnc_lot_get_guid(lot)));
 
Index: sixtp-to-dom-parser.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-to-dom-parser.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/file/sixtp-to-dom-parser.c -Lsrc/backend/file/sixtp-to-dom-parser.c -u -r1.4 -r1.5
--- src/backend/file/sixtp-to-dom-parser.c
+++ src/backend/file/sixtp-to-dom-parser.c
@@ -45,7 +45,7 @@
 
     if(parent_data == NULL)
     {
-        thing = xmlNewNode(global_namespace, tag);
+        thing = xmlNewNode(global_namespace, BAD_CAST tag);
         /* only publish the result if we're the parent */
         *result = thing;
     }
@@ -53,7 +53,7 @@
     {
         thing = xmlNewChild((xmlNodePtr) parent_data,
                             global_namespace,
-                            tag,
+                            BAD_CAST tag,
                             NULL);
         *result = NULL;
     }
@@ -63,7 +63,7 @@
     {
         while(*atptr != 0)
         {
-            xmlSetProp(thing, atptr[0], atptr[1]);
+            xmlSetProp(thing, BAD_CAST atptr[0], BAD_CAST atptr[1]);
             atptr += 2;
         }
     }
@@ -88,7 +88,7 @@
 {
     if(length > 0)
     {
-        xmlNodeAddContentLen((xmlNodePtr)parent_data, text, length);
+        xmlNodeAddContentLen((xmlNodePtr)parent_data, BAD_CAST text, length);
     }
     return TRUE;
 }
Index: sixtp.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/backend/file/sixtp.c -Lsrc/backend/file/sixtp.c -u -r1.9 -r1.10
--- src/backend/file/sixtp.c
+++ src/backend/file/sixtp.c
@@ -33,10 +33,7 @@
 #include "sixtp-parsers.h"
 #include "sixtp-stack.h"
 
-#include "gnc-engine-util.h"
-
-
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /************************************************************************/
 gboolean
@@ -431,11 +428,11 @@
                                           pdata->global_data,
                                           &(current_frame->frame_data),
                                           current_frame->tag,
-                                          name);
+                                          (gchar*) name);
   }
 
   /* now allocate the new stack frame and shift to it */
-  new_frame = sixtp_stack_frame_new(next_parser, g_strdup(name));
+  new_frame = sixtp_stack_frame_new( next_parser, g_strdup((char*) name));
 
   new_frame->line = getLineNumber( pdata->saxParserCtxt );
   new_frame->col  = getColumnNumber( pdata->saxParserCtxt );
@@ -450,7 +447,7 @@
                                  pdata->global_data,
                                  &new_frame->data_for_children,
                                  &new_frame->frame_data,
-                                 name,
+                                 (gchar*) name,
                                  (gchar**)attrs);
   }
 }
@@ -471,7 +468,7 @@
                                         frame->data_for_children,
                                         pdata->global_data,
                                         &result,
-                                        text,
+                                        (gchar*) text,
                                         len);
     if(pdata->parsing_ok && result)
     {
@@ -504,13 +501,13 @@
 
   /* time to make sure we got the right closing tag.  Is this really
      necessary? */
-  if(safe_strcmp(current_frame->tag, name) != 0) 
+  if(safe_strcmp(current_frame->tag, (gchar*) name) != 0) 
   {
     PWARN ("bad closing tag (start <%s>, end <%s>)", current_frame->tag, name);
     pdata->parsing_ok = FALSE;
 
     /* See if we're just off by one and try to recover */
-    if(safe_strcmp(parent_frame->tag, name) == 0) {
+    if(safe_strcmp(parent_frame->tag, (gchar*) name) == 0) {
       pdata->stack = sixtp_pop_and_destroy_frame(pdata->stack);
       current_frame = (sixtp_stack_frame *) pdata->stack->data;
       parent_frame = (sixtp_stack_frame *) pdata->stack->next->data;
@@ -594,7 +591,7 @@
 }
 
 xmlEntityPtr
-sixtp_sax_get_entity_handler(void *user_data, const CHAR *name) 
+sixtp_sax_get_entity_handler(void *user_data, const xmlChar *name) 
 {
   return xmlGetPredefinedEntity(name);
 }
@@ -729,9 +726,11 @@
                  gpointer global_data,
                  gpointer *parse_result) 
 {
-  xmlParserCtxtPtr context = xmlCreateFileParserCtxt( filename );
-  return sixtp_parse_file_common(sixtp, context, data_for_top_level,
-				 global_data, parse_result);
+    gboolean ret;
+    xmlParserCtxtPtr context = xmlCreateFileParserCtxt( filename );
+    ret = sixtp_parse_file_common(sixtp, context, data_for_top_level,
+                                  global_data, parse_result);
+    return ret;
 }
 
 gboolean
@@ -742,9 +741,11 @@
                    gpointer global_data,
                    gpointer *parse_result) 
 {
-  xmlParserCtxtPtr context = xmlCreateMemoryParserCtxt( bufp, bufsz );
-  return sixtp_parse_file_common(sixtp, context, data_for_top_level,
-				 global_data, parse_result);
+    gboolean ret;
+    xmlParserCtxtPtr context = xmlCreateMemoryParserCtxt( bufp, bufsz );
+    ret = sixtp_parse_file_common(sixtp, context, data_for_top_level,
+                                  global_data, parse_result);
+    return ret;
 }
 
 /***********************************************************************/
@@ -797,8 +798,9 @@
   g_return_val_if_fail(first_tag, FALSE);
   
   f = fopen(filename, "r");
-  if (f == NULL)
+  if (f == NULL) {
     return FALSE;
+  }
 
   num_read = fread(first_chunk, sizeof(char), sizeof(first_chunk) - 1, f);
   fclose(f);
Index: io-example-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-example-account.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/backend/file/io-example-account.c -Lsrc/backend/file/io-example-account.c -u -r1.15 -r1.16
--- src/backend/file/io-example-account.c
+++ src/backend/file/io-example-account.c
@@ -35,7 +35,6 @@
 #include "sixtp.h"
 
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "gnc-xml.h"
 #include "io-example-account.h"
 #include "io-gncxml-gen.h"
@@ -48,7 +47,7 @@
 #include "Scrub.h"
 #include "TransLog.h"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 #define GNC_ACCOUNT_STRING "gnc-account-example"
 #define GNC_ACCOUNT_SHORT "gnc-act:short-description"
@@ -92,7 +91,7 @@
 static void
 clear_up_account_commodity(
     gnc_commodity_table *tbl, Account *act,
-    gnc_commodity * (*getter) (Account *account),
+    gnc_commodity * (*getter) (const Account *account),
     void (*setter) (Account *account, gnc_commodity *comm))
 {
     gnc_commodity *gcom;
@@ -121,8 +120,8 @@
     }
     else
     {
-        gnc_commodity_destroy(com);
         setter(act, gcom);
+        gnc_commodity_destroy(com);
     }
 }
 
Index: sixtp-dom-generators.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/sixtp-dom-generators.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/sixtp-dom-generators.c -Lsrc/backend/file/sixtp-dom-generators.c -u -r1.8 -r1.9
--- src/backend/file/sixtp-dom-generators.c
+++ src/backend/file/sixtp-dom-generators.c
@@ -33,23 +33,19 @@
 #include "sixtp-dom-generators.h"
 #include "sixtp-utils.h"
 
-#include "gnc-engine-util.h"
-#include "kvp_frame.h"
-#include "qofid.h"
-
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 xmlNodePtr
 text_to_dom_tree(const char *tag, const char *str)
 {
-  xmlNodePtr result;
+    xmlNodePtr result;
 
-  g_return_val_if_fail(tag, NULL);
-  g_return_val_if_fail(str, NULL);
-  result = xmlNewNode(NULL, tag);
-  g_return_val_if_fail(result, NULL);
-  xmlNodeAddContent(result, str);
-  return result;
+    g_return_val_if_fail(tag, NULL);
+    g_return_val_if_fail(str, NULL);
+    result = xmlNewNode(NULL, BAD_CAST tag);
+    g_return_val_if_fail(result, NULL);
+    xmlNodeAddContent(result, BAD_CAST str);
+    return result;
 }
 
 xmlNodePtr
@@ -58,29 +54,44 @@
     gchar *text;
     xmlNodePtr result;
 
-    text = g_strdup_printf("%lld", (long long int) val);
+    text = g_strdup_printf("%" G_GINT64_FORMAT, val);
+    g_return_val_if_fail(text, NULL);
     result = text_to_dom_tree(tag, text);
     g_free(text);
     return result;
 }
+
+xmlNodePtr
+guint_to_dom_tree(const char *tag, guint an_int)
+{
+    gchar *text;
+    xmlNodePtr result;
     
+    text = g_strdup_printf("%u", an_int );
+    g_return_val_if_fail(text, NULL);
+    result = text_to_dom_tree(tag, text);
+    g_free(text);
+    return result;
+}
+
+
 xmlNodePtr
 guid_to_dom_tree(const char *tag, const GUID* gid)
 {
     char guid_str[GUID_ENCODING_LENGTH + 1];
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, tag);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
 
-    xmlSetProp(ret, "type", "guid");
+    xmlSetProp(ret, BAD_CAST "type", BAD_CAST "guid");
 
     if (!guid_to_string_buff(gid, guid_str))
     {
-        PERR("guid_to_string failed\n");
+        PERR("guid_to_string_buff failed\n");
         return NULL;
     }
 
-    xmlNodeAddContent(ret, guid_str);
+    xmlNodeAddContent(ret, BAD_CAST guid_str);
 
     return ret;
 }
@@ -92,15 +103,15 @@
 
     g_return_val_if_fail(c, NULL);
     
-    ret = xmlNewNode(NULL, tag);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
 
     if(!gnc_commodity_get_namespace(c) || !gnc_commodity_get_mnemonic(c))
     {
         return NULL;
     }
     
-    xmlNewTextChild(ret, NULL, "cmdty:space", gnc_commodity_get_namespace(c));
-    xmlNewTextChild(ret, NULL, "cmdty:id", gnc_commodity_get_mnemonic(c));
+    xmlNewTextChild(ret, NULL, BAD_CAST "cmdty:space", BAD_CAST gnc_commodity_get_namespace(c));
+    xmlNewTextChild(ret, NULL, BAD_CAST "cmdty:id", BAD_CAST gnc_commodity_get_mnemonic(c));
 
     return ret;
 }
@@ -142,14 +153,14 @@
 		return NULL;
 	}
     
-	ret = xmlNewNode(NULL, tag);
+	ret = xmlNewNode(NULL, BAD_CAST tag);
     
-	xmlNewTextChild(ret, NULL, "ts:date", date_str);
+	xmlNewTextChild(ret, NULL, BAD_CAST "ts:date", BAD_CAST date_str);
 
 	if(spec->tv_nsec > 0){
 		ns_str = timespec_nsec_to_string(spec);
 		if(ns_str){
-			xmlNewTextChild(ret, NULL, "ts:ns", ns_str);
+			xmlNewTextChild(ret, NULL, BAD_CAST "ts:ns", BAD_CAST ns_str);
 		}
 	}
 
@@ -162,7 +173,7 @@
 }
 
 xmlNodePtr
-gdate_to_dom_tree(const char *tag, GDate *date)
+gdate_to_dom_tree(const char *tag, const GDate *date)
 {
 	xmlNodePtr ret;
 	gchar *date_str = NULL;
@@ -172,9 +183,9 @@
 
 	g_date_strftime( date_str, 512, "%Y-%m-%d", date );
 
-	ret = xmlNewNode(NULL, tag);
+	ret = xmlNewNode(NULL, BAD_CAST tag);
 
-	xmlNewTextChild(ret, NULL, "gdate", date_str);
+	xmlNewTextChild(ret, NULL, BAD_CAST "gdate", BAD_CAST date_str);
 
 	g_free(date_str);
 
@@ -192,9 +203,9 @@
     numstr = gnc_numeric_to_string(*num);
     g_return_val_if_fail(numstr, NULL);
 
-    ret = xmlNewNode(NULL, tag);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
 
-    xmlNodeAddContent(ret, numstr);
+    xmlNodeAddContent(ret, BAD_CAST numstr);
 
     g_free(numstr);
 
@@ -234,8 +245,8 @@
 static void
 add_text_to_node(xmlNodePtr node, gchar *type, gchar *val)
 {
-    xmlSetProp(node, "type", type);
-    xmlNodeSetContent(node, val);
+    xmlSetProp(node, BAD_CAST "type", BAD_CAST type);
+    xmlNodeSetContent(node, BAD_CAST val);
     g_free(val);
 }
 
@@ -254,18 +265,17 @@
     kvp_type = kvp_value_get_type(val);
 
     if (kvp_type == KVP_TYPE_STRING)
-      val_node = xmlNewTextChild(node, NULL, tag, kvp_value_get_string(val));
+      val_node = xmlNewTextChild(node, NULL, BAD_CAST tag, BAD_CAST kvp_value_get_string(val));
     else if (kvp_type == KVP_TYPE_TIMESPEC)
       val_node = NULL;
     else
-      val_node = xmlNewTextChild(node, NULL, tag, NULL);
+      val_node = xmlNewTextChild(node, NULL, BAD_CAST tag, NULL);
 
     switch(kvp_value_get_type(val))
     {
     case KVP_TYPE_GINT64:
         add_text_to_node(val_node, "integer",
-                         g_strdup_printf("%lld",
-                                         (long long int)
+                         g_strdup_printf("%" G_GINT64_FORMAT,
                                          kvp_value_get_gint64(val)));
         break;
     case KVP_TYPE_DOUBLE:
@@ -277,9 +287,10 @@
                          gnc_numeric_to_string(kvp_value_get_numeric(val)));
         break;
     case KVP_TYPE_STRING:
-        xmlSetProp(val_node, "type", "string");
+        xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "string");
         break;
     case KVP_TYPE_GUID:
+        /* THREAD-UNSAFE */
         add_text_to_node(val_node,"guid",
                          g_strdup(guid_to_string(kvp_value_get_guid(val))));
         break;
@@ -288,7 +299,7 @@
       Timespec ts = kvp_value_get_timespec (val);
 
       val_node = timespec_to_dom_tree (tag, &ts);
-      xmlSetProp (val_node, "type", "timespec");
+      xmlSetProp (val_node, BAD_CAST "type", BAD_CAST "timespec");
       xmlAddChild (node, val_node);
     }
     break;
@@ -296,10 +307,10 @@
     {
         guint64 size;
         void *binary_data = kvp_value_get_binary(val, &size);
-        xmlSetProp(val_node, "type", "binary");
+        xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "binary");
         g_return_if_fail(binary_data);
         tmp_str1 = binary_to_string(binary_data, size);
-        xmlNodeSetContent(val_node, tmp_str1);
+        xmlNodeSetContent(val_node, BAD_CAST tmp_str1);
         g_free(tmp_str1);
     }
     break;
@@ -307,7 +318,7 @@
     {
         GList *cursor;
         
-        xmlSetProp(val_node, "type", "list");
+        xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "list");
         for(cursor = kvp_value_get_glist(val); cursor; cursor = cursor->next)
         {
             kvp_value *val = (kvp_value*)cursor->data;
@@ -320,7 +331,7 @@
     {
         kvp_frame *frame;
 
-        xmlSetProp(val_node, "type", "frame");
+        xmlSetProp(val_node, BAD_CAST "type", BAD_CAST "frame");
 
         frame = kvp_value_get_frame (val);
         if (!frame || !kvp_frame_get_hash (frame))
@@ -342,9 +353,9 @@
     xmlNodePtr slot_node;
     xmlNodePtr node = (xmlNodePtr)data;
 
-    slot_node = xmlNewChild(node, NULL, "slot", NULL);
+    slot_node = xmlNewChild(node, NULL, BAD_CAST "slot", NULL);
 
-    xmlNewTextChild(slot_node, NULL, "slot:key", (gchar*)key);
+    xmlNewTextChild(slot_node, NULL, BAD_CAST "slot:key", (xmlChar*)key);
 
     add_kvp_value_node(slot_node, "slot:value", (kvp_value*)value);
 }
@@ -369,27 +380,10 @@
         return NULL;
     }
     
-    ret = xmlNewNode(NULL, tag);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
     
     g_hash_table_foreach(kvp_frame_get_hash(frame), add_kvp_slot, ret);
     
     return ret;
 }
 
-xmlNodePtr guint_to_dom_tree(const char *tag, guint an_int)
-{
-    xmlNodePtr ret;
-    gchar *numstr;
-
-    numstr = g_strdup_printf( "%u", an_int );
-    g_return_val_if_fail(numstr, NULL);
-
-    ret = xmlNewNode(NULL, tag);
-
-    xmlNodeAddContent(ret, numstr);
-
-    g_free(numstr);
-
-    return ret;
-}
-
Index: gnc-book-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-book-xml-v2.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/backend/file/gnc-book-xml-v2.c -Lsrc/backend/file/gnc-book-xml-v2.c -u -r1.10 -r1.11
--- src/backend/file/gnc-book-xml-v2.c
+++ src/backend/file/gnc-book-xml-v2.c
@@ -46,8 +46,6 @@
 #include "sixtp-dom-parsers.h"
 #include "gnc-engine-util.h"
 #include "Group.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
 
 /* non-static because it's used in io-gncxml-v2.c */
 const gchar *gnc_v2_book_version_string = "2.0.0";
@@ -57,7 +55,7 @@
 #define book_id_string "book:id"
 #define book_slots_string "book:slots"
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /* ================================================================ */
 
@@ -108,8 +106,8 @@
 {
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, gnc_book_string);
-    xmlSetProp(ret, "version", gnc_v2_book_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_book_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST gnc_v2_book_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(book_id_string, qof_book_get_guid(book)));
 
@@ -158,7 +156,11 @@
 
     domnode = guid_to_dom_tree(book_id_string, qof_book_get_guid(book));
     xmlElemDump(out, NULL, domnode);
-    fprintf(out, "\n");
+    if(fprintf(out, "\n") < 0) {
+		qof_backend_set_error(qof_book_get_backend(book), ERR_FILEIO_WRITE_ERROR);
+		xmlFreeNode (domnode);
+		return;
+	}
     xmlFreeNode (domnode);
 
     if(qof_book_get_slots(book))
@@ -174,6 +176,7 @@
     }
 }
 
+
 /* ================================================================ */
 
 static gboolean
@@ -183,8 +186,7 @@
     GUID *guid;
 
     guid = dom_tree_to_guid(node);
-    qof_book_set_guid(book, guid);
-
+    qof_entity_set_guid(QOF_ENTITY(book), guid);
     g_free(guid);
     
     return TRUE;
@@ -327,4 +329,3 @@
 {
     return sixtp_dom_parser_new(gnc_book_slots_end_handler, NULL, NULL);
 }
-
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/backend/file/Makefile.am -Lsrc/backend/file/Makefile.am -u -r1.19 -r1.20
--- src/backend/file/Makefile.am
+++ src/backend/file/Makefile.am
@@ -1,27 +1,30 @@
 SUBDIRS = . test
 
-pkglib_LTLIBRARIES = libgncmod-backend-file.la
+#Now a shared GModule, not a package library.
+lib_LTLIBRARIES = libgnc-backend-file.la
 
 AM_CFLAGS = \
   -I.. -I../.. \
+  -DLOCALE_DIR=\""$(datadir)/locale"\" \
   -I${top_srcdir}/src/backend \
   -I${top_srcdir}/src/engine \
-  -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/core-utils\
   -I${top_srcdir}/lib/libc\
-  ${GNOME_XML_CFLAGS} \
-  ${GLIB_CFLAGS}
+  ${XML_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${GLIB_CFLAGS} \
+  ${GCONF_CFLAGS}
 
-
-libgncmod_backend_file_la_SOURCES = \
-  gncmod-backend-file.c \
+libgnc_backend_file_la_SOURCES = \
   gnc-account-xml-v2.c \
   gnc-backend-file.c \
   gnc-book-xml-v2.c \
+  gnc-budget-xml-v2.c \
   gnc-commodity-xml-v2.c \
   gnc-freqspec-xml-v2.c \
   gnc-lot-xml-v2.c \
   gnc-pricedb-xml-v2.c \
+  gnc-recurrence-xml-v2.c \
   gnc-schedxaction-xml-v2.c \
   gnc-transaction-xml-v2.c \
   io-example-account.c \
@@ -54,7 +57,8 @@
   sixtp-stack.h \
   sixtp-utils.h
 
-libgncmod_backend_file_la_LDFLAGS = -module
-libgncmod_backend_file_la_LIBADD = \
-   ${GLIB_LIBS} ${GNOME_XML_LIB} \
-   ${top_builddir}/src/engine/libgncmod-engine.la 
+libgnc_backend_file_la_LDFLAGS = -module
+libgnc_backend_file_la_LIBADD = \
+   ${GLIB_LIBS} ${GCONF_LIBS} ${XML_LIBS} \
+   ${top_builddir}/src/engine/libgncmod-engine.la \
+   ${QOF_LIBS}
Index: gnc-schedxaction-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-schedxaction-xml-v2.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/backend/file/gnc-schedxaction-xml-v2.c -Lsrc/backend/file/gnc-schedxaction-xml-v2.c -u -r1.22 -r1.23
--- src/backend/file/gnc-schedxaction-xml-v2.c
+++ src/backend/file/gnc-schedxaction-xml-v2.c
@@ -31,7 +31,6 @@
 #include "SX-book.h"
 
 #include "gnc-xml-helper.h"
-#include "gnc-engine-util.h"
 
 #include "sixtp.h"
 #include "sixtp-utils.h"
@@ -47,7 +46,7 @@
 
 #include "sixtp-dom-parsers.h"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /**
  * The XML output should look something like:
@@ -155,20 +154,20 @@
     templ_acc_guid = xaccAccountGetGUID(sx->template_acct);
 
     /* FIXME: this should be the same as the def in io-gncxml-v2.c */
-    ret = xmlNewNode( NULL, GNC_SCHEDXACTION_TAG );
+    ret = xmlNewNode( NULL, BAD_CAST GNC_SCHEDXACTION_TAG );
 
-    xmlSetProp( ret, "version", schedxaction_version_string );
+    xmlSetProp( ret, BAD_CAST "version", BAD_CAST schedxaction_version_string );
 
     xmlAddChild( ret,
                  guid_to_dom_tree(SX_ID,
                                   xaccSchedXactionGetGUID(sx)) );
 
-    xmlNewTextChild( ret, NULL, SX_NAME, xaccSchedXactionGetName(sx) );
+    xmlNewTextChild( ret, NULL, BAD_CAST SX_NAME, BAD_CAST xaccSchedXactionGetName(sx) );
 
-    xmlNewTextChild( ret, NULL, SX_AUTOCREATE,
-                     ( sx->autoCreateOption ? "y" : "n" ) );
-    xmlNewTextChild( ret, NULL, SX_AUTOCREATE_NOTIFY,
-                     ( sx->autoCreateNotify ? "y" : "n" ) );
+    xmlNewTextChild( ret, NULL, BAD_CAST SX_AUTOCREATE,
+                     BAD_CAST ( sx->autoCreateOption ? "y" : "n" ) );
+    xmlNewTextChild( ret, NULL, BAD_CAST SX_AUTOCREATE_NOTIFY,
+                     BAD_CAST ( sx->autoCreateNotify ? "y" : "n" ) );
     xmlAddChild(ret, int_to_dom_tree(SX_ADVANCE_CREATE_DAYS,
                                      sx->advanceCreateDays));
     xmlAddChild(ret, int_to_dom_tree(SX_ADVANCE_REMIND_DAYS,
@@ -206,7 +205,7 @@
 				  templ_acc_guid));
 				  
     /* output freq spec */
-    fsNode = xmlNewNode(NULL, SX_FREQSPEC);
+    fsNode = xmlNewNode(NULL, BAD_CAST SX_FREQSPEC);
     xmlAddChild( fsNode,
                  gnc_freqSpec_dom_tree_create(
                          xaccSchedXactionGetFreqSpec(sx)) );
@@ -221,7 +220,7 @@
             for ( l = gnc_sx_get_defer_instances( sx ); l; l = l->next ) {
                     tsd = (temporalStateData*)l->data;
 
-                    instNode = xmlNewNode( NULL, SX_DEFER_INSTANCE );
+                    instNode = xmlNewNode( NULL, BAD_CAST SX_DEFER_INSTANCE );
                     if ( g_date_valid( &tsd->last_date ) )
                     {
                       xmlAddChild( instNode, gdate_to_dom_tree( SX_LAST,
@@ -646,6 +645,7 @@
                change re: storing template accounts. */
             /* Fix: get account with name of our GUID from the template
                accounts group.  Make that our template_acct pointer. */
+            /* THREAD-UNSAFE */
             id = guid_to_string( xaccSchedXactionGetGUID( sx ) );
             ag = gnc_book_get_template_group(book);
             if ( ag == NULL )
@@ -712,7 +712,8 @@
                            away at some point, but the same concern still
                            applies for
                            SchedXaction.c:xaccSchedXactionInit... */
-                        com = gnc_commodity_new( "template", "template",
+                        com = gnc_commodity_new( txd->book,
+						 "template", "template",
                                                  "template", "template",
                                                  1 );
                         xaccAccountSetCommodity( acc, com );
Index: io-gncbin-r.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/io-gncbin-r.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/backend/file/io-gncbin-r.c -Lsrc/backend/file/io-gncbin-r.c -u -r1.31 -r1.32
--- src/backend/file/io-gncbin-r.c
+++ src/backend/file/io-gncbin-r.c
@@ -20,7 +20,7 @@
  *                                                                  *
  ********************************************************************
  * @file io-gncbin-r.c
- * @breif read (old X-Accountant format) binary datafile 
+ * @brief read (old X-Accountant format) binary datafile 
  * @author Copyright (C) 1997 Robin D. Clark
  * @author Copyright (C) 1997-2001 Linas Vepstas <linas at linas.org>
  * @author Copyright (C) 1999-2000 Rob Browning
@@ -93,7 +93,6 @@
 
 #include "config.h"
 
-#include "kvp_frame.h"
 #include "Account.h"
 #include "AccountP.h"
 #include "io-gncbin.h"
@@ -103,13 +102,7 @@
 #include "Transaction.h"
 #include "TransactionP.h"
 #include "TransLog.h"
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "gnc-commodity.h"
-#include "gnc-date.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "gnc-pricedb.h"
 #include "gnc-pricedb-p.h"
 
@@ -126,7 +119,7 @@
  */
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 /** GLOBALS *********************************************************/
 
@@ -392,7 +385,7 @@
                                      currency_name);
     
     if(!old) {
-      old = gnc_commodity_new(currency_name, 
+      old = gnc_commodity_new(book, currency_name,
                               GNC_COMMODITY_NS_LEGACY, currency_name,
                               0, 100000);
       old = gnc_commodity_table_insert(table, old);
@@ -409,6 +402,26 @@
  ********************** LOAD DATA ***********************************
 \********************************************************************/
 
+gboolean gnc_is_bin_file (const gchar *name)
+{
+  int  fd, err, token;
+
+  err = 0;
+  token = 0;
+  fd = open( name, RFLAGS, 0 );
+
+  /* check for valid file descriptor */
+  if( 0 > fd ) { return FALSE; }
+
+  /* Read in the file format token */
+  err = read( fd, &token, sizeof(int) );
+  if( sizeof(int) != err ) { return FALSE; }
+  XACC_FLIP_INT (token);
+  close(fd);
+  if(token == VERSION ) { return TRUE; }
+  return FALSE;
+}
+
 /********************************************************************\
  *   reads in the data from file descriptor                         *
  *                                                                  * 
Index: gnc-transaction-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-transaction-xml-v2.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/backend/file/gnc-transaction-xml-v2.c -Lsrc/backend/file/gnc-transaction-xml-v2.c -u -r1.12 -r1.13
--- src/backend/file/gnc-transaction-xml-v2.c
+++ src/backend/file/gnc-transaction-xml-v2.c
@@ -28,7 +28,6 @@
 #include <string.h>
 
 #include "gnc-xml-helper.h"
-#include "gnc-engine-util.h"
 
 #include "sixtp.h"
 #include "sixtp-utils.h"
@@ -65,12 +64,12 @@
     }
 }
 
-xmlNodePtr
+static xmlNodePtr
 split_to_dom_tree(const gchar *tag, Split *spl)
 {
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, tag);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
 
     xmlAddChild(ret, guid_to_dom_tree("split:id", xaccSplitGetGUID(spl)));
     
@@ -79,7 +78,7 @@
 
         if(memo && safe_strcmp(memo, "") != 0)
         {
-            xmlNewTextChild(ret, NULL, "split:memo", memo);
+            xmlNewTextChild(ret, NULL, BAD_CAST "split:memo", (xmlChar*)memo);
         }
     }
 
@@ -88,7 +87,7 @@
 
         if(action && safe_strcmp(action, "") != 0)
         {
-            xmlNewTextChild(ret, NULL, "split:action", action);
+            xmlNewTextChild(ret, NULL, BAD_CAST "split:action", (xmlChar*)action);
         }
     }
 
@@ -98,7 +97,7 @@
         tmp[0] = xaccSplitGetReconcile(spl);
         tmp[1] = '\0';
 
-        xmlNewTextChild(ret, NULL, "split:reconciled-state", tmp);
+        xmlNewTextChild(ret, NULL, BAD_CAST "split:reconciled-state", (xmlChar*)tmp);
     }
 
     add_timespec(ret, "split:reconcile-date",
@@ -141,7 +140,7 @@
     GList *n;
     xmlNodePtr toaddto;
 
-    toaddto = xmlNewChild(node, NULL, "trn:splits", NULL);
+    toaddto = xmlNewChild(node, NULL, BAD_CAST "trn:splits", NULL);
     
     for (n=xaccTransGetSplitList(trn); n; n=n->next)
     {
@@ -155,9 +154,9 @@
 {
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, "gnc:transaction");
+    ret = xmlNewNode(NULL, BAD_CAST "gnc:transaction");
 
-    xmlSetProp(ret, "version", transaction_version_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST transaction_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree("trn:id", xaccTransGetGUID(trn)));
 
@@ -166,7 +165,7 @@
 
     if(xaccTransGetNum(trn) && (safe_strcmp(xaccTransGetNum(trn), "") != 0))
     {
-        xmlNewTextChild(ret, NULL, "trn:num", xaccTransGetNum(trn));
+        xmlNewTextChild(ret, NULL, BAD_CAST "trn:num", (xmlChar*)xaccTransGetNum(trn));
     }
 
     add_timespec(ret, "trn:date-posted", xaccTransRetDatePostedTS(trn), TRUE);
@@ -176,8 +175,8 @@
 
     if(xaccTransGetDescription(trn))
     {
-        xmlNewTextChild(ret, NULL, "trn:description",
-                        xaccTransGetDescription(trn));
+        xmlNewTextChild(ret, NULL, BAD_CAST "trn:description",
+                        (xmlChar*)xaccTransGetDescription(trn));
     }
     
     {
@@ -278,7 +277,7 @@
     Timespec ts;
 
     ts = dom_tree_to_timespec(node);
-    g_return_val_if_fail(is_valid_timespec(ts), FALSE);
+    if (!dom_tree_valid_timespec(&ts, node->name)) return FALSE;
 
     xaccSplitSetDateReconciledTS(pdata->split, &ts);
 
@@ -379,7 +378,7 @@
     { NULL, NULL, 0, 0 },
 };
 
-Split*
+static Split*
 dom_tree_to_split(xmlNodePtr node, QofBook *book)
 {
     struct split_pdata pdata;
@@ -438,7 +437,7 @@
 
     tm = dom_tree_to_timespec(node);
 
-    g_return_val_if_fail(is_valid_timespec(tm), FALSE);
+    if (!dom_tree_valid_timespec(&tm, node->name)) return FALSE;
     
     func(trn, &tm);
 
@@ -538,10 +537,10 @@
     {
         Split *spl;
         
-        if(safe_strcmp("text", mark->name) == 0)
+        if(safe_strcmp("text", (char*)mark->name) == 0)
           continue;
 
-        if(safe_strcmp("trn:split", mark->name))
+        if(safe_strcmp("trn:split", (char*)mark->name))
         {
             return FALSE;
         }
Index: gnc-xml-helper.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/gnc-xml-helper.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/backend/file/gnc-xml-helper.h -Lsrc/backend/file/gnc-xml-helper.h -u -r1.3 -r1.4
--- src/backend/file/gnc-xml-helper.h
+++ src/backend/file/gnc-xml-helper.h
@@ -27,11 +27,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_XML_VERSION_HEADER
 #include <libxml/xmlversion.h>
-#endif
-
-#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000
 
 #  include <libxml/SAX.h>
 #  include <libxml/tree.h>
@@ -48,23 +44,5 @@
 #    define xmlAttrPropertyValue children
 #  endif /* ifndef xmlAttrPropertyValue */
 
-#else /* defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000 */
-
-#  include <gnome-xml/SAX.h>
-#  include <gnome-xml/tree.h>
-#  include <gnome-xml/parser.h>
-#  include <gnome-xml/xmlmemory.h>
-#  include <gnome-xml/parserInternals.h>
-#  ifndef xmlChildrenNode
-#    define xmlChildrenNode childs
-#  endif /* ifndef xmlChildrenNode */
-#  ifndef xmlRootNode
-#    define xmlRootNode root
-#  endif /* ifndef xmlRootNode */
-#  ifndef xmlAttrPropertyValue
-#    define xmlAttrPropertyValue val
-#  endif /* ifndef xmlAttrPropertyValue */
-
-#endif /* defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000 */
 
 #endif /* _GNC_XML_HELPER_H_ */
--- src/backend/file/test/test-load-module
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-exec guile -s "$0"
-!#
-
-(display "  testing file backend load ... ")
-(use-modules (gnucash gnc-module))
-(gnc:module-system-init)
-
-(gnc:module-load "gnucash/engine" 0)
-
-(if (gnc:module-load "gnucash/backend/file" 0)
-    (begin 
-      (display "ok\n")
-      (exit 0))
-    (begin 
-      (display "failed\n")
-      (exit -1)))
Index: test-xml-pricedb.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-xml-pricedb.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/backend/file/test/test-xml-pricedb.c -Lsrc/backend/file/test/test-xml-pricedb.c -u -r1.9 -r1.10
--- src/backend/file/test/test-xml-pricedb.c
+++ src/backend/file/test/test-xml-pricedb.c
@@ -1,15 +1,36 @@
+/***************************************************************************
+ *            test-xml-pricedb.c
+ *
+ *  Fri Oct  7 21:24:15 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include "config.h"
 
 #include <glib.h>
-#include <libguile.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
-#include "gnc-module.h"
 #include "gnc-xml-helper.h"
 #include "gnc-xml.h"
-#include "gnc-engine-util.h"
+#include "cashobjects.h"
 #include "gnc-engine.h"
 #include "gnc-pricedb.h"
 
@@ -20,8 +41,6 @@
 #include "test-engine-stuff.h"
 #include "test-file-stuff.h"
 
-#include "qofbook.h"
-
 static QofSession *session;
 
 struct pricedb_data_struct
@@ -109,33 +128,33 @@
   for (i = 0; i < 20; i++)
   {
     GNCPriceDB *db;
-
+    g_message("i=%d", i);
+    session = qof_session_new();
     db = get_random_pricedb (qof_session_get_book (session));
-
+    if (!db) {
+      failure_args ("gnc_random_price_db returned NULL",
+                    __FILE__, __LINE__, "%d", i);
+      return;
+    }
     if (gnc_pricedb_get_num_prices (db))
       test_db (i, db);
 
     gnc_pricedb_destroy (db);
+    qof_session_end(session);
   }
 }
 
-static void
-guile_main (void *closure, int argc, char **argv)
+int
+main (int argc, char ** argv)
 {
-  gnc_module_system_init();
-  gnc_module_load("gnucash/engine", 0);
-
+   qof_init();
+   cashobjects_register();
+   qof_log_init_filename("/tmp/gnctest.trace");
+   qof_log_set_default(GNC_LOG_DETAIL);
+   gnc_set_log_level(GNC_MOD_PRICE, GNC_LOG_DETAIL);
   session = qof_session_new ();
-
   test_generation ();
-
   print_test_results ();
-  exit (get_rv ());
-}
-
-int
-main (int argc, char ** argv)
-{
-  scm_boot_guile (argc, argv, guile_main, NULL);
+   qof_close();
   return 0;
 }
Index: test-xml-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-xml-account.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/backend/file/test/test-xml-account.c -Lsrc/backend/file/test/test-xml-account.c -u -r1.16 -r1.17
--- src/backend/file/test/test-xml-account.c
+++ src/backend/file/test/test-xml-account.c
@@ -1,17 +1,37 @@
+/***************************************************************************
+ *            test-xml-account.c
+ *
+ *  Sun Oct  9 15:37:26 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include "config.h"
 
 #include <glib.h>
-#include <libguile.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
-#include "gnc-module.h"
 #include "gnc-xml-helper.h"
 #include "gnc-xml.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
-
+#include "cashobjects.h"
 #include "sixtp-parsers.h"
 #include "sixtp-dom-parsers.h"
 
@@ -22,48 +42,49 @@
 #include "Account.h"
 #include "Group.h"
 #include "Scrub.h"
-#include "gnc-book.h"
 
-static GNCBook *book;
+static QofBook *sixbook;
 
 static gchar*
 node_and_account_equal(xmlNodePtr node, Account *act)
 {
     xmlNodePtr mark;
 
-    while (safe_strcmp (node->name, "text") == 0)
+    while (safe_strcmp ((char*)node->name, "text") == 0)
+	{
       node = node->next;
+	}
 
     if(!check_dom_tree_version(node, "2.0.0"))
     {
         return g_strdup("version wrong.  Not 2.0.0 or not there");
     }
 
-    if(!node->name || safe_strcmp(node->name, "gnc:account"))
+    if(!node->name || safe_strcmp((char*)node->name, "gnc:account"))
     {
         return g_strdup("Name of toplevel node is bad");
     }
 
     for(mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if(safe_strcmp(mark->name, "text") == 0)
+        if(safe_strcmp((char*)mark->name, "text") == 0)
         {
         }
-        else if(safe_strcmp(mark->name, "act:name") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:name") == 0)
         {
             if(!equals_node_val_vs_string(mark, xaccAccountGetName(act)))
             {
                 return g_strdup("names differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:id") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:id") == 0)
         {
             if(!equals_node_val_vs_guid(mark, xaccAccountGetGUID(act)))
             {
                 return g_strdup("ids differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:type") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:type") == 0)
         {
             gchar *txt;
             int type;
@@ -89,7 +110,7 @@
                 g_free(txt);
             }
         }
-        else if(safe_strcmp(mark->name, "act:commodity") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:commodity") == 0)
         {
             if(!equals_node_val_vs_commodity(
                    mark, xaccAccountGetCommodity(act), xaccAccountGetBook(act)))
@@ -97,14 +118,14 @@
                 return g_strdup("commodities differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:code") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:code") == 0)
         {
             if(!equals_node_val_vs_string(mark, xaccAccountGetCode(act)))
             {
                 return g_strdup("codes differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:description") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:description") == 0)
         {
             if(!equals_node_val_vs_string(
                    mark, xaccAccountGetDescription(act)))
@@ -112,7 +133,7 @@
                 return g_strdup("descriptions differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:slots") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:slots") == 0)
         {
             /* xaccAccountDeleteOldData (act); */
 
@@ -121,7 +142,7 @@
                 return g_strdup("slots differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:parent") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:parent") == 0)
         {
             if(!equals_node_val_vs_guid(
                    mark, xaccAccountGetGUID(xaccGroupGetParentAccount(
@@ -130,7 +151,7 @@
                 return g_strdup("parent ids differ");
             }
         }
-        else if(safe_strcmp(mark->name, "act:commodity-scu") == 0)
+        else if(safe_strcmp((char*)mark->name, "act:commodity-scu") == 0)
         {
             if(!equals_node_val_vs_int(mark, xaccAccountGetCommoditySCU(act)))
             {
@@ -173,16 +194,15 @@
 
     com = xaccAccountGetCommodity (account);
 
-    t = gnc_book_get_commodity_table (book);
+    t = gnc_book_get_commodity_table (sixbook);
 
     new_com = gnc_commodity_table_lookup (t,
                                           gnc_commodity_get_namespace (com),
                                           gnc_commodity_get_mnemonic (com));
 
-    if (new_com)
-      xaccAccountSetCommodity (account, new_com);
+    if (new_com) { xaccAccountSetCommodity (account, new_com); }
 
-    do_test_args(xaccAccountEqual((Account*)data, (Account*)(gdata->act),
+    do_test_args(xaccAccountEqual((Account*)account, (Account*)(gdata->act),
                                   TRUE),
                         "gnc_account_sixtp_parser_create", 
                  __FILE__, __LINE__, "%d", gdata->value );
@@ -240,7 +260,7 @@
         parser = gnc_account_sixtp_parser_create();
             
         if(!gnc_xml_parse_file(parser, filename1, test_add_account,
-                               &data, book))
+                               &data, sixbook))
         {
             failure_args("gnc_xml_parse_file returned FALSE",
                          __FILE__, __LINE__, "%d", i);
@@ -257,7 +277,7 @@
 }
 
 static void
-test_generation(void)
+test_generation()
 {
     int i;
 
@@ -265,7 +285,7 @@
     {
         Account *ran_act;
 
-        ran_act = get_random_account(book);
+        ran_act = get_random_account(sixbook);
 
         test_account(i, ran_act);
 
@@ -276,7 +296,7 @@
         /* empty some things. */
         Account *act;
 
-        act = get_random_account(book);
+        act = get_random_account(sixbook);
 
         xaccAccountSetCode(act, "");
         xaccAccountSetDescription(act, "");
@@ -313,7 +333,7 @@
 
     if(!xaccAccountGetParent(act))
     {
-        xaccGroupInsertAccount(xaccGetAccountGroup(book), act);
+        xaccGroupInsertAccount(xaccGetAccountGroup(sixbook), act);
     }
 
     msg = node_and_account_equal((xmlNodePtr)global_data, act);
@@ -324,19 +344,20 @@
     return TRUE;
 }
 
-static void
-guile_main (void *closure, int argc, char **argv)
+int
+main (int argc, char ** argv)
 {
-    gnc_module_system_init();
-    gnc_module_load("gnucash/engine", 0);
-
-    book = gnc_book_new ();
+    QofSession *session;
 
+    qof_init();
+    cashobjects_register();
+    session = qof_session_new();
+    sixbook = qof_session_get_book (session);
     if(argc > 1)
     {
         test_files_in_dir(argc, argv, test_real_account, 
                           gnc_account_sixtp_parser_create(),
-                          "gnc:account", book);
+                          "gnc:account", sixbook);
     }
     else
     {
@@ -344,12 +365,6 @@
     }
         
     print_test_results();
-    exit(get_rv());
-}
-
-int
-main (int argc, char ** argv)
-{
-  scm_boot_guile (argc, argv, guile_main, NULL);
+    qof_close();
   return 0;
 }
Index: test-dom-converters1.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-dom-converters1.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/backend/file/test/test-dom-converters1.c -Lsrc/backend/file/test/test-dom-converters1.c -u -r1.6 -r1.7
--- src/backend/file/test/test-dom-converters1.c
+++ src/backend/file/test/test-dom-converters1.c
@@ -1,3 +1,26 @@
+/***************************************************************************
+ *            test-dom-converters1.c
+ *
+ *  Fri Oct  7 20:51:06 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include "config.h"
 
 #include <stdlib.h>
@@ -8,9 +31,9 @@
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "test-file-stuff.h"
-
+#include "cashobjects.h"
 #include "gnc-xml-helper.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "sixtp.h"
 #include "sixtp-parsers.h"
 #include "sixtp-utils.h"
@@ -31,14 +54,17 @@
         gchar *test_str2;
         gnc_commodity *test_com2;
         xmlNodePtr test_node;
+        QofBook *book;
+
+        book = qof_book_new ();
 
         test_str1 = get_random_string();
         test_str2 = get_random_string();
         
-        test_com1 = gnc_commodity_new(NULL, test_str1, test_str2, NULL, 0);
+        test_com1 = gnc_commodity_new(book, NULL, test_str1, test_str2, NULL, 0);
         test_node = commodity_ref_to_dom_tree("test-com", test_com1);
 
-        test_com2 = dom_tree_to_commodity_ref_no_engine(test_node, NULL);
+        test_com2 = dom_tree_to_commodity_ref_no_engine(test_node, book);
 
         do_test(gnc_commodity_equiv(test_com1, test_com2),
                             "dom_tree_to_commodity_ref_no_engine");
@@ -48,6 +74,8 @@
         gnc_commodity_destroy(test_com2);
         g_free(test_str1);
         g_free(test_str2);
+
+	qof_book_destroy (book);
     }
 }
 
@@ -62,10 +90,10 @@
         gchar *test_string2;
         xmlNodePtr test_node;
 
-        test_node = xmlNewNode(NULL, "test-node");
+        test_node = xmlNewNode(NULL, BAD_CAST "test-node");
         test_string1 = get_random_string();
 
-        xmlNodeAddContent(test_node, test_string1);
+        xmlNodeAddContent(test_node, BAD_CAST test_string1);
 
         test_string2 = dom_tree_to_text(test_node);
 
@@ -109,7 +137,7 @@
 
         test_spec2 = dom_tree_to_timespec(test_node);
 
-        if(!is_valid_timespec(test_spec2))
+	if (!dom_tree_valid_timespec(&test_spec2, "test-spec"))
         {
             failure_args("dom_tree_to_timespec",
                          __FILE__, __LINE__, "NULL return");
@@ -240,6 +268,8 @@
 int
 main(int argc, char **argv)
 {
+     qof_init();
+     cashobjects_register();
     test_dom_tree_to_guid();
     fflush(stdout);
     test_dom_tree_to_commodity_ref();
@@ -251,5 +281,6 @@
     test_dom_tree_to_gnc_numeric();
     fflush(stdout);
     print_test_results();
+     qof_close();
     exit(get_rv());
 }
Index: test-save-in-lang.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-save-in-lang.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/test/test-save-in-lang.c -Lsrc/backend/file/test/test-save-in-lang.c -u -r1.8 -r1.9
--- src/backend/file/test/test-save-in-lang.c
+++ src/backend/file/test/test-save-in-lang.c
@@ -11,7 +11,9 @@
 #include "test-engine-stuff.h"
 #include "test-file-stuff.h"
 
-#include "core-utils.h"
+#ifndef HAVE_SETENV
+#include "setenv.h"
+#endif
 #include "qofbook.h"
 #include "gnc-engine.h"
 #include "TransLog.h"
@@ -93,8 +95,8 @@
             return g_strdup_printf("qof_session_load errorid %d", err);
         }
 
-        if(gnc_setenv("LANG", possible_envs[i], 1) != 0)
-          return g_strdup_printf("gnc_setenv for LANG");
+        if(setenv("LANG", possible_envs[i], 1) != 0)
+          return g_strdup_printf("setenv for LANG");
 
         new_session = qof_session_new();
         
@@ -165,10 +167,10 @@
                 break;
             }
 
-            if(gnc_setenv("LANG", base_env, 1) != 0)
+            if(setenv("LANG", base_env, 1) != 0)
             {
-              failure_args("gnc_setenv", __FILE__, __LINE__,
-                           "gnc_setenv of LANG failed");
+              failure_args("setenv", __FILE__, __LINE__,
+                           "setenv of LANG failed");
               g_free(filename);
               break;
             }
Index: test-string-converters.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-string-converters.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/file/test/test-string-converters.c -Lsrc/backend/file/test/test-string-converters.c -u -r1.5 -r1.6
--- src/backend/file/test/test-string-converters.c
+++ src/backend/file/test/test-string-converters.c
@@ -5,16 +5,12 @@
 #include "sixtp-dom-parsers.h"
 #include "sixtp-dom-generators.h"
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "test-file-stuff.h"
 
-#include "gnc-date.h"
-#include "gnc-numeric.h"
-#include "guid.h"
-
 static void
 test_binary()
 {
@@ -47,8 +43,8 @@
         if(test_data2_len != test_data1->len)
         {
             failure_args("binary_data", __FILE__, __LINE__, 
-                         "lengths don't match: %lld vs %d",
-                         (long long int) test_data2_len, test_data1->len);
+                         "lengths don't match: %" G_GINT64_FORMAT " vs %d",
+                         test_data2_len, test_data1->len);
             continue;
         }
         
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/file/test/.cvsignore -Lsrc/backend/file/test/.cvsignore -u -r1.5 -r1.6
--- src/backend/file/test/.cvsignore
+++ src/backend/file/test/.cvsignore
@@ -5,6 +5,7 @@
 test-string-converters
 test-xml-account
 test-xml2-is-file
+test-load-backend
 test-load-xml2
 test-load-example-account
 test-xml-commodity
@@ -16,3 +17,5 @@
 Makefile.in
 *.la
 *.lo
+test_file_*
+translog.*.log
Index: test-xml-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-xml-commodity.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/backend/file/test/test-xml-commodity.c -Lsrc/backend/file/test/test-xml-commodity.c -u -r1.10 -r1.11
--- src/backend/file/test/test-xml-commodity.c
+++ src/backend/file/test/test-xml-commodity.c
@@ -24,14 +24,14 @@
 
 #include "Account.h"
 
-static GNCBook *book;
+static QofBook *book;
 
 static gchar*
 node_and_commodity_equal(xmlNodePtr node, const gnc_commodity *com)
 {
     xmlNodePtr mark;
 
-    while (safe_strcmp (node->name, "text") == 0)
+    while (safe_strcmp ((char*)node->name, "text") == 0)
       node = node->next;
 
     if(!check_dom_tree_version(node, "2.0.0"))
@@ -39,17 +39,17 @@
         return "version wrong.  Not 2.0.0 or not there";
     }
 
-    if(!node->name || safe_strcmp(node->name, "gnc:commodity"))
+    if(!node->name || safe_strcmp((char*)node->name, "gnc:commodity"))
     {
         return "Name of toplevel node is bad";
     }
 
     for(mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if(safe_strcmp(mark->name, "text") == 0)
+        if(safe_strcmp((char*)mark->name, "text") == 0)
         {
         }
-        else if(safe_strcmp(mark->name, "cmdty:space") == 0)
+        else if(safe_strcmp((char*)mark->name, "cmdty:space") == 0)
         {
             if(!equals_node_val_vs_string(
                    mark, gnc_commodity_get_namespace(com)))
@@ -57,7 +57,7 @@
                 return "namespaces differ";
             }
         }
-        else if(safe_strcmp(mark->name, "cmdty:id") == 0)
+        else if(safe_strcmp((char*)mark->name, "cmdty:id") == 0)
         {
             if(!equals_node_val_vs_string(
                    mark, gnc_commodity_get_mnemonic(com)))
@@ -65,7 +65,7 @@
                 return "mnemonic differ";
             }
         }
-        else if(safe_strcmp(mark->name, "cmdty:name") == 0)
+        else if(safe_strcmp((char*)mark->name, "cmdty:name") == 0)
         {
             if(!equals_node_val_vs_string(
                    mark, gnc_commodity_get_fullname(com)))
@@ -73,7 +73,7 @@
                 return "names differ";
             }
         }
-        else if(safe_strcmp(mark->name, "cmdty:xcode") == 0)
+        else if(safe_strcmp((char*)mark->name, "cmdty:xcode") == 0)
         {
             if(!equals_node_val_vs_string(
                    mark, gnc_commodity_get_exchange_code(com)))
@@ -81,7 +81,7 @@
                 return "exchange codes differ";
             }
         }
-        else if(safe_strcmp(mark->name, "cmdty:fraction") == 0)
+        else if(safe_strcmp((char*)mark->name, "cmdty:fraction") == 0)
         {
             gchar *txt;
             gint64 type;
@@ -228,7 +228,7 @@
     gnc_module_system_init();
     gnc_module_load("gnucash/engine", 0);
 
-    book = gnc_book_new ();
+    book = qof_book_new ();
 
     if(argc > 1)
     {
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/Makefile.am,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/backend/file/test/Makefile.am -Lsrc/backend/file/test/Makefile.am -u -r1.31 -r1.32
--- src/backend/file/test/Makefile.am
+++ src/backend/file/test/Makefile.am
@@ -1,11 +1,172 @@
 SUBDIRS = test-files
 
+test_date_converting_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  test-date-converting.c
+
+test_dom_converters1_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  test-dom-converters1.c
+
+test_kvp_frames_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  test-kvp-frames.c
+
+# the file backend is now a GModule - this test does
+# not load it as a module and cannot link to it
+# and remain portable.
+
+test_load_example_account_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-example-account.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-v2.c \
+  ${top_srcdir}/src/backend/file/io-utils.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-budget-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  test-load-example-account.c
+
+test_string_converters_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  test-string-converters.c
+  
+test_xml_account_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  test-xml-account.c
+
+test_xml_commodity_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  test-xml-commodity.c
+
+test_xml_pricedb_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  test-xml-pricedb.c
+
+test_xml_transaction_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-budget-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-v2.c \
+  ${top_srcdir}/src/backend/file/io-utils.c \
+  test-xml-transaction.c
+
+test_xml2_is_file_SOURCES = \
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-budget-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-v2.c \
+  ${top_srcdir}/src/backend/file/io-utils.c \
+  test-xml2-is-file.c
+
 TESTS = \
   test-date-converting \
   test-dom-converters1 \
   test-kvp-frames \
   test-load-example-account \
-  test-load-module \
+  test-load-backend \
   test-load-xml2 \
   test-real-data.sh \
   test-string-converters \
@@ -18,7 +179,6 @@
 GNC_TEST_DEPS := \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/engine \
-  --gnc-module-dir ${top_builddir}/src/backend/file \
   --gnc-module-dir ${top_srcdir}/src/gnc-module \
   --gnc-module-dir ${top_srcdir}/src/engine \
   --guile-load-dir ${G_WRAP_MODULE_DIR} \
@@ -38,6 +198,7 @@
   test-date-converting \
   test-dom-converters1 \
   test-kvp-frames \
+  test-load-backend \
   test-load-example-account \
   test-load-xml2 \
   test-save-in-lang \
@@ -56,10 +217,13 @@
         ${top_builddir}/src/engine/libgw-engine.la \
         ${top_builddir}/src/engine/libgw-kvp.la \
         ${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
-        ${top_builddir}/src/backend/file/libgncmod-backend-file.la \
-        ./libgnc-test-file-stuff.la 
+        ./libgnc-test-file-stuff.la \
+        ${LIBXML2_LIBS} \
+        ${QOF_LIBS} \
+        ${top_builddir}/lib/libc/libc-missing.la
 
 AM_CFLAGS = \
+  -I${top_srcdir}/lib/libc \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/gnc-module \
@@ -67,12 +231,14 @@
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/engine/test-core \
   -I${top_srcdir}/src/backend/file \
+  -I${top_srcdir}/src/backend/qsf \
+  ${XML_CFLAGS} \
   ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GUILE_INCS}
 
 EXTRA_DIST = \
   grab-types.pl \
   test-dom-parser1.c \
-  test-load-module \
   test-real-data.sh \
   test-xml2-is-file.c
Index: test-file-stuff.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-file-stuff.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/backend/file/test/test-file-stuff.c -Lsrc/backend/file/test/test-file-stuff.c -u -r1.9 -r1.10
--- src/backend/file/test/test-file-stuff.c
+++ src/backend/file/test/test-file-stuff.c
@@ -1,3 +1,25 @@
+/***************************************************************************
+ *            test-file-stuff.c
+ *
+ *  Thu Sep 29 22:50:50 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include "config.h"
 
 #include <unistd.h>
@@ -10,7 +32,7 @@
 #include <string.h>
 #include <glib.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "sixtp-dom-parsers.h"
 #include "sixtp-parsers.h"
 #include "test-file-stuff.h"
@@ -97,7 +119,7 @@
     g_return_val_if_fail(node->properties->xmlAttrPropertyValue->content,
                          FALSE);
 
-    verteststr = node->properties->xmlAttrPropertyValue->content;
+    verteststr = (char*) node->properties->xmlAttrPropertyValue->content;
     if(safe_strcmp(verstr, verteststr) == 0)
     {
         return TRUE;
@@ -335,7 +357,7 @@
         return;
     }
 
-    if(!gnc_xml_parse_file(top_parser, filename, cb, node->childs, book))
+    if(!gnc_xml_parse_file(top_parser, filename, cb, node->children, book))
     {
         failure_args("failure to parse file", __FILE__, __LINE__,
                      "%s", filename);
Index: test-load-example-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-load-example-account.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/backend/file/test/test-load-example-account.c -Lsrc/backend/file/test/test-load-example-account.c -u -r1.8 -r1.9
--- src/backend/file/test/test-load-example-account.c
+++ src/backend/file/test/test-load-example-account.c
@@ -1,3 +1,25 @@
+/***************************************************************************
+ *            test-load-example-account.c
+ *
+ *  Thu Sep 29 22:52:32 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <glib.h>
 #include <libguile.h>
 #include <string.h>
@@ -9,10 +31,8 @@
 #include <dirent.h>
 
 #include "gnc-module.h"
-#include "gnc-engine-util.h"
-#include "io-gncxml-v2.h"
 #include "gnc-engine.h"
-#include "gnc-book.h"
+#include "io-gncxml-v2.h"
 
 #include "io-example-account.h"
 
@@ -23,7 +43,7 @@
 static const gchar *da_ending = ".gnucash-xea";
 
 static void
-test_load_file(GNCBook *book, const char *filename)
+test_load_file(QofBook *book, const char *filename)
 {
     GncExampleAccount *gea;
 
@@ -47,7 +67,7 @@
     const char *location = getenv("GNC_ACCOUNT_PATH");
     GSList *list = NULL;
     DIR *ea_dir;
-    GNCBook *book;
+    QofBook *book;
 
     if (!location)
     {
@@ -57,7 +77,7 @@
     gnc_module_system_init();
     gnc_module_load("gnucash/engine", 0);
 
-    book = gnc_book_new ();
+    book = qof_book_new ();
 
     if((ea_dir = opendir(location)) == NULL)
     {
Index: test-xml-transaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-xml-transaction.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/backend/file/test/test-xml-transaction.c -Lsrc/backend/file/test/test-xml-transaction.c -u -r1.21 -r1.22
--- src/backend/file/test/test-xml-transaction.c
+++ src/backend/file/test/test-xml-transaction.c
@@ -1,7 +1,29 @@
+/***************************************************************************
+ *            test-xml-transaction.c
+ *
+ *  Fri Oct  7 21:26:59 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include "config.h"
 
 #include <glib.h>
-#include <libguile.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -10,12 +32,10 @@
 #include <dirent.h>
 #include <sys/stat.h>
 
-#include "gnc-module.h"
 #include "gnc-xml-helper.h"
 #include "gnc-xml.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
-
+#include "cashobjects.h"
 #include "sixtp-parsers.h"
 
 #include "sixtp-dom-parsers.h"
@@ -30,7 +50,7 @@
 #include "Transaction.h"
 #include "TransactionP.h"
 
-static GNCBook *book;
+static QofBook *book;
 
 extern gboolean gnc_transaction_xml_v2_testing;
 
@@ -47,7 +67,7 @@
 
         for(mark2 = mark->xmlChildrenNode; mark2; mark2 = mark2->next)
         {
-            if(safe_strcmp(mark2->name, "split:value") == 0)
+            if(safe_strcmp((char*)mark2->name, "split:value") == 0)
             {
                 gnc_numeric *num = dom_tree_to_gnc_numeric(mark2);
 
@@ -58,7 +78,7 @@
 
                 g_free(num);
             }
-            else if(safe_strcmp(mark2->name, "split:account") == 0)
+            else if(safe_strcmp((char*)mark2->name, "split:account") == 0)
             {
                 GUID *accid = dom_tree_to_guid(mark2);
                 Account *account = xaccSplitGetAccount (spl);
@@ -85,9 +105,9 @@
 {
     xmlNodePtr mark;
     
-    for(mark = node->childs; mark != NULL; mark = mark->next)
+    for(mark = node->children; mark != NULL; mark = mark->next)
     {
-        if(safe_strcmp(mark->name, "split:id") == 0)
+        if(safe_strcmp((char*)mark->name, "split:id") == 0)
         {
             GUID *id = dom_tree_to_guid(mark);
 
@@ -98,7 +118,7 @@
             }
             g_free(id);
         }
-        else if(safe_strcmp(mark->name, "split:memo") == 0)
+        else if(safe_strcmp((char*)mark->name, "split:memo") == 0)
         {
             char *memo = dom_tree_to_text(mark);
 
@@ -109,7 +129,7 @@
             }
             g_free(memo);
         }
-        else if(safe_strcmp(mark->name, "split:reconciled-state") == 0)
+        else if(safe_strcmp((char*)mark->name, "split:reconciled-state") == 0)
         {
             char *rs = dom_tree_to_text(mark);
 
@@ -120,7 +140,7 @@
             }
             g_free(rs);
         }
-        else if(safe_strcmp(mark->name, "split:value") == 0)
+        else if(safe_strcmp((char*)mark->name, "split:value") == 0)
         {
             gnc_numeric *num = dom_tree_to_gnc_numeric(mark);
             gnc_numeric val = xaccSplitGetValue(spl);
@@ -128,32 +148,39 @@
             if(!gnc_numeric_equal(*num, val))
             {
                 g_free(num);
-                return g_strdup_printf ("values differ: %lld/%lld v %lld/%lld",
+                return g_strdup_printf ("values differ: %" G_GINT64_FORMAT "/%"
+					G_GINT64_FORMAT " v %" G_GINT64_FORMAT
+					"/%" G_GINT64_FORMAT,
                                         (*num).num, (*num).denom,
                                         val.num, val.denom);
             }
             g_free(num);
         }
-        else if(safe_strcmp(mark->name, "split:quantity") == 0)
+        else if(safe_strcmp((char*)mark->name, "split:quantity") == 0)
         {
             gnc_numeric *num = dom_tree_to_gnc_numeric(mark);
             gnc_numeric val = xaccSplitGetAmount(spl);
 
             if (!gnc_numeric_equal(*num, val)) {
-              return g_strdup_printf( "quantities differ under _equal: %lld/%lld v %lld/%lld",
+              return g_strdup_printf( "quantities differ under _equal: %"
+				      G_GINT64_FORMAT "/%" G_GINT64_FORMAT
+				      " v %" G_GINT64_FORMAT "/%"
+				      G_GINT64_FORMAT,
                                       (*num).num, (*num).denom,
                                       val.num, val.denom );
             }
             if(!gnc_numeric_equal(*num, val))
             {
                 g_free(num);
-                return g_strdup_printf ("quantities differ: %lld/%lld v %lld/%lld",
+                return g_strdup_printf ("quantities differ: %" G_GINT64_FORMAT
+					"/%" G_GINT64_FORMAT " v %"
+					G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
                                         (*num).num, (*num).denom,
                                         val.num, val.denom);
             }
             g_free(num);
         }
-        else if(safe_strcmp(mark->name, "split:account") == 0)
+        else if(safe_strcmp((char*)mark->name, "split:account") == 0)
         {
             GUID *id = dom_tree_to_guid(mark);
             Account *account = xaccSplitGetAccount (spl);
@@ -206,7 +233,7 @@
 {
     xmlNodePtr mark;
     
-    while (safe_strcmp (node->name, "text") == 0)
+    while (safe_strcmp ((char*)node->name, "text") == 0)
       node = node->next;
 
     if(!check_dom_tree_version(node, "2.0.0"))
@@ -214,24 +241,24 @@
         return "version wrong.  Not 2.0.0 or not there";
     }
 
-    if(!node->name || safe_strcmp(node->name, "gnc:transaction"))
+    if(!node->name || safe_strcmp((char*)node->name, "gnc:transaction"))
     {
         return "Name of toplevel node is bad";
     }
 
     for(mark = node->xmlChildrenNode; mark; mark = mark->next)
     {
-        if(safe_strcmp(mark->name, "text") == 0)
+        if(safe_strcmp((char*)mark->name, "text") == 0)
         {
         }
-        else if(safe_strcmp(mark->name, "trn:id") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:id") == 0)
         {
             if(!equals_node_val_vs_guid(mark, xaccTransGetGUID(trn)))
             {
                 return "ids differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:currency") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:currency") == 0)
         {
             if(!equals_node_val_vs_commodity(
                    mark, xaccTransGetCurrency(trn), xaccTransGetBook(trn)))
@@ -239,42 +266,42 @@
                 return g_strdup("currencies differ");
             }
         }
-        else if(safe_strcmp(mark->name, "trn:num") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:num") == 0)
         {
             if(!equals_node_val_vs_string(mark, xaccTransGetNum(trn)))
             {
                 return "nums differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:date-posted") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:date-posted") == 0)
         {
             if(!equals_node_val_vs_date(mark, xaccTransRetDatePostedTS(trn)))
             {
                 return "posted dates differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:date-entered") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:date-entered") == 0)
         {
             if(!equals_node_val_vs_date(mark, xaccTransRetDateEnteredTS(trn)))
             {
                 return "entered dates differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:description") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:description") == 0)
         {
             if(!equals_node_val_vs_string(mark, xaccTransGetDescription(trn)))
             {
                 return "descriptions differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:slots") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:slots") == 0)
         {
             if(!equals_node_val_vs_kvp_frame(mark, xaccTransGetSlots(trn)))
             {
                 return "slots differ";
             }
         }
-        else if(safe_strcmp(mark->name, "trn:splits") == 0)
+        else if(safe_strcmp((char*)mark->name, "trn:splits") == 0)
         {
             char *msg = equals_node_val_vs_splits (mark, trn);
             if(msg != NULL)
@@ -337,13 +364,21 @@
     for(i = 0; i < 50; i++)
     {
         Transaction *ran_trn;
+        AccountGroup *grp;
         xmlNodePtr test_node;
         gnc_commodity *com;
         gchar *compare_msg;
         gchar *filename1;
         int fd;
 
+        grp = get_random_group(book);
         ran_trn = get_random_transaction(book);
+        if(!ran_trn)
+        {
+            failure_args("transaction_xml", __FILE__, __LINE__,
+                         "get_random_transaction returned NULL");
+            return;
+       }
 
         {
           /* xaccAccountInsertSplit can reorder the splits. */
@@ -457,17 +492,16 @@
     return TRUE;
 }
 
-static void
-guile_main (void *closure, int argc, char **argv)
+int
+main (int argc, char ** argv)
 {
-    gnc_module_system_init();
-    gnc_module_load("gnucash/engine", 0);
-
+    qof_init();
+    cashobjects_register();
     xaccLogDisable();
 
     gnc_transaction_xml_v2_testing = TRUE;
 
-    book = gnc_book_new ();
+    book = qof_book_new ();
 
     if(argc > 1)
     {
@@ -481,12 +515,6 @@
     }
 
     print_test_results();
-    exit(get_rv());
-}
-
-int
-main (int argc, char ** argv)
-{
-  scm_boot_guile (argc, argv, guile_main, NULL);
+    qof_close();
   return 0;
 }
Index: test-load-xml2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-load-xml2.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/backend/file/test/test-load-xml2.c -Lsrc/backend/file/test/test-load-xml2.c -u -r1.15 -r1.16
--- src/backend/file/test/test-load-xml2.c
+++ src/backend/file/test/test-load-xml2.c
@@ -1,10 +1,31 @@
-
+/***************************************************************************
+ *            test-load-xml2.c
+ *
+ *  Fri Oct  7 20:51:46 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 /* @file test-load-xml2.c
- * @breif test the loading of a vrsion-2 gnucash XML file
+ * @brief test the loading of a version-2 gnucash XML file
  */
 
 #include <glib.h>
-#include <libguile.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
@@ -12,20 +33,20 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <string.h>
-
-#include "qofsession.h"
+#include "cashobjects.h"
 #include "Group.h"
 #include "TransLog.h"
 #include "gnc-engine.h"
 #include "gnc-backend-file.h"
-#include "qofsession-p.h"
-#include "gnc-module.h"
 #include "io-gncxml-v2.h"
 
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "test-file-stuff.h"
 
+#define GNC_LIB_NAME "libgnc-backend-file.la"
+#define GNC_LIB_INIT "gnc_provider_init"
+
 static void
 remove_files_pattern(const char *begining, const char *ending)
 {
@@ -54,21 +75,21 @@
 {
     QofSession *session;
     QofBook *book;
-    QofBackend *be;
+    AccountGroup *grp;
     gboolean ignore_lock;
 
     session = qof_session_new();
 
     remove_locks(filename);
 
-    ignore_lock = (strcmp(getenv("SRCDIR"), ".") != 0);
+    ignore_lock = (safe_strcmp(getenv("SRCDIR"), ".") != 0);
     qof_session_begin(session, filename, ignore_lock, FALSE);
 
+    qof_session_load(session, NULL);
     book = qof_session_get_book (session);
-    be = qof_session_get_backend (session);
-    qof_session_load_from_xml_file_v2((FileBackend *)be, book);
 
-    do_test (xaccGroupGetBook (xaccGetAccountGroup (book)) == book,
+    grp = xaccGetAccountGroup(book);
+    do_test (xaccGroupGetBook (grp) == book,
              "book and group don't match");
 
     do_test_args(
@@ -76,22 +97,26 @@
         "session load xml2", __FILE__, __LINE__, "%d for file %s",
         qof_session_get_error(session), filename);
 
-    qof_session_destroy(session);
+    qof_session_end(session);
 }
 
-static void
-guile_main (void *closure, int argc, char **argv)
+int
+main (int argc, char ** argv)
 {
     const char *location = getenv("GNC_TEST_FILES");
     DIR *xml2_dir;
 
+	qof_init();
+	cashobjects_register();
+	do_test(
+		qof_load_backend_library ("../", GNC_LIB_NAME, GNC_LIB_INIT),
+		" loading gnc-backend-file GModule failed");
+
     if (!location)
     {
         location = "test-files/xml2";
     }
 
-    gnc_module_system_init();
-    gnc_module_load("gnucash/engine", 0);
 
     xaccLogDisable();
     
@@ -129,15 +154,6 @@
     closedir(xml2_dir);
 
     print_test_results();
-    exit(get_rv());
-}
-
-int
-main (int argc, char ** argv)
-{
-  /*  getchar (); */
-
-  scm_boot_guile(argc, argv, guile_main, NULL);
-
-  return 0;
+    qof_close();
+    return 0;
 }
Index: hierachical-data-file.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/hierachical-data-file.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/hierachical-data-file.gml2 -Lsrc/backend/file/test/test-files/xml2/hierachical-data-file.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/hierachical-data-file.gml2
+++ src/backend/file/test/test-files/xml2/hierachical-data-file.gml2
@@ -1,16 +1,41 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">8</gnc:count-data>
 <gnc:count-data cd:type="transaction">6</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>Bank Accounts</act:name>
   <act:id type="guid">ec511fd83bdb2fb877d7b23042968c7e</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -22,11 +47,11 @@
   <act:name>Bank 1</act:name>
   <act:id type="guid">c8ceb48e3378ae638357508a041ca61a</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -39,11 +64,11 @@
   <act:name>Credit Card B</act:name>
   <act:id type="guid">f5423230f8cb39ef01fc0a2696627d5d</act:id>
   <act:type>CREDIT</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -55,11 +80,11 @@
   <act:name>Liabilities</act:name>
   <act:id type="guid">7241c921241f5ccb8f8fade580109f75</act:id>
   <act:type>LIABILITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -71,11 +96,11 @@
   <act:name>Credit card A</act:name>
   <act:id type="guid">9b2119ed0a2eb7449d0209137a2410de</act:id>
   <act:type>CREDIT</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -88,11 +113,11 @@
   <act:name>Liability 1</act:name>
   <act:id type="guid">37bdf5369928876a5f20900458bc84a8</act:id>
   <act:type>LIABILITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -105,11 +130,11 @@
   <act:name>Liability 2</act:name>
   <act:id type="guid">4178e5b449bdec62dd02ff69d45795ef</act:id>
   <act:type>LIABILITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -122,11 +147,11 @@
   <act:name>Equity</act:name>
   <act:id type="guid">7f7955a48b6a2436d8f4d0d31ca4f6c8</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
Index: carols-data-file.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/carols-data-file.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/carols-data-file.gml2 -Lsrc/backend/file/test/test-files/xml2/carols-data-file.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/carols-data-file.gml2
+++ src/backend/file/test/test-files/xml2/carols-data-file.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">40</gnc:count-data>
 <gnc:count-data cd:type="account">18</gnc:count-data>
 <gnc:count-data cd:type="transaction">19</gnc:count-data>
@@ -247,11 +272,11 @@
   <act:name>Checking</act:name>
   <act:id type="guid">7cce1d8ee29f0e4c30c949f77bb2a447</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -276,11 +301,11 @@
   <act:name>Savings</act:name>
   <act:id type="guid">7117b00944ea5def8959751832990c9e</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -292,11 +317,11 @@
   <act:name>Cash</act:name>
   <act:id type="guid">15468df1e7097e7c317fb7a541010d69</act:id>
   <act:type>CASH</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -308,11 +333,11 @@
   <act:name>Credit Card</act:name>
   <act:id type="guid">bdc5ed7168216d6df0f8d00767299bc7</act:id>
   <act:type>CREDIT</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -333,11 +358,11 @@
   <act:name>Salary</act:name>
   <act:id type="guid">d77f5ecb0a800748fdbae42e98908a85</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -349,11 +374,11 @@
   <act:name>Clothes</act:name>
   <act:id type="guid">52c89f4b1d0b7b445e0793278fd5ff62</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -365,11 +390,11 @@
   <act:name>Dining</act:name>
   <act:id type="guid">f4472ff237862ece69a1d3a58f293220</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -381,11 +406,11 @@
   <act:name>FICA</act:name>
   <act:id type="guid">1b211cffcf23b31e80666dadf57a37b0</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -397,11 +422,11 @@
   <act:name>FedTax</act:name>
   <act:id type="guid">9372c7685bfaf9086cb3cb53190b2ce2</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -413,11 +438,11 @@
   <act:name>Finance Charge</act:name>
   <act:id type="guid">4ca91a8240c1df8068fa4dc7c1da147e</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -429,11 +454,11 @@
   <act:name>Fuel</act:name>
   <act:id type="guid">a13c10f2c32dc74c2e70f894351ef209</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -445,11 +470,11 @@
   <act:name>Groceries</act:name>
   <act:id type="guid">17e25505b81c735adec6d10aa1536a0a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -461,11 +486,11 @@
   <act:name>Household</act:name>
   <act:id type="guid">62479a9add5ae8bb253da6ab3d713083</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -477,11 +502,11 @@
   <act:name>Service Charges</act:name>
   <act:id type="guid">630a8066fdf69ac977808b2295ed9f68</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -493,11 +518,11 @@
   <act:name>Tools</act:name>
   <act:id type="guid">126f38b941cfe865f811e1c011e5bc51</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -509,11 +534,11 @@
   <act:name>Utilities</act:name>
   <act:id type="guid">00adc8fb6cc29e7ae5de56d6f8624ac5</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -525,11 +550,11 @@
   <act:name>Electric</act:name>
   <act:id type="guid">554b4134fc4a9c0361e9c8ca8f744229</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -542,11 +567,11 @@
   <act:name>Opening Balances</act:name>
   <act:id type="guid">f61553abd3d8029455441267f6530f3d</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
Index: Money95bank_fr.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/Money95bank_fr.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/Money95bank_fr.gml2 -Lsrc/backend/file/test/test-files/xml2/Money95bank_fr.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/Money95bank_fr.gml2
+++ src/backend/file/test/test-files/xml2/Money95bank_fr.gml2
@@ -1,557 +1,582 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">52</gnc:count-data>
 <gnc:count-data cd:type="transaction">143</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>Compte courant</act:name>
   <act:id type="guid">de3be9d4e8f598584db381c56092f351</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Livret bleu</act:name>
   <act:id type="guid">cfb34c39585b58904baa3c1f9be9b8c4</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Salaire</act:name>
   <act:id type="guid">547e0f4df1fb2f3a124f09cddd90add4</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Primes</act:name>
   <act:id type="guid">4840ebbf3d52f81ad87acd6f79b4cb6d</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">547e0f4df1fb2f3a124f09cddd90add4</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Salaire net</act:name>
   <act:id type="guid">6de38f0a8881dd2368610d32363fb463</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">547e0f4df1fb2f3a124f09cddd90add4</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Alimentation</act:name>
   <act:id type="guid">fb45010dd73162faf7870d23451773e7</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Epicerie</act:name>
   <act:id type="guid">63ab8d5de094c6ac7c11ae06645ea667</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">fb45010dd73162faf7870d23451773e7</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Restaurant</act:name>
   <act:id type="guid">b9e482629dfadf0675facd9bbf76d4f3</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">fb45010dd73162faf7870d23451773e7</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Assurance</act:name>
   <act:id type="guid">24e0d1cb0af579d19129ec79f16f9205</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Automobile</act:name>
   <act:id type="guid">e89232e4cdd3a66a5c3b229cea2d0fda</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">24e0d1cb0af579d19129ec79f16f9205</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Multi-risques habitation</act:name>
   <act:id type="guid">472918bd0bf48e41f507878041efcb4d</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">24e0d1cb0af579d19129ec79f16f9205</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Automobile</act:name>
   <act:id type="guid">343f5c0ccf4c7a3d54443ece59073d4c</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Cr&#233;dit auto</act:name>
   <act:id type="guid">56c0e0eae313a1804d8d1183166a34af</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">343f5c0ccf4c7a3d54443ece59073d4c</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Essence</act:name>
   <act:id type="guid">b5ff22c2b91ca04c20a36782d9c750cc</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">343f5c0ccf4c7a3d54443ece59073d4c</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Cadeaux</act:name>
   <act:id type="guid">324d517fa7427163088ed8a2422b4943</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Divers</act:name>
   <act:id type="guid">d9f9dda3d1a61bd15b3b4c67b40c2769</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Fournitures diverses</act:name>
   <act:id type="guid">cbfd18621567322c77b9a5b3d6aa3a49</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">d9f9dda3d1a61bd15b3b4c67b40c2769</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>D&#233;placements prof.</act:name>
   <act:id type="guid">3af7ef0f555aa2a41d75d034c6afd436</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Frais de transport</act:name>
   <act:id type="guid">96f0ca2b62ae6909cac058d1b876f6ef</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">3af7ef0f555aa2a41d75d034c6afd436</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Frais bancaires</act:name>
   <act:id type="guid">011ba398b7c38291d50cd10de44d4710</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Personnels</act:name>
   <act:id type="guid">ef0041623a6b317860e84b847af785c7</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">011ba398b7c38291d50cd10de44d4710</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Frais financiers</act:name>
   <act:id type="guid">e6501ba2005ac400866b117379443af3</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Autres frais</act:name>
   <act:id type="guid">a673b6830d9fdc782ed408168f6b4f06</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">e6501ba2005ac400866b117379443af3</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Habillement</act:name>
   <act:id type="guid">674e7f3ba414c8c31b93282247b04213</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Imp&#244;ts</act:name>
   <act:id type="guid">0a5c854c367926d4ce7ffaa60f99a85a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Imp&#244;ts sur le revenu</act:name>
   <act:id type="guid">0a5d0546390d60dab623114e6f136d7a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">0a5c854c367926d4ce7ffaa60f99a85a</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Logement</act:name>
   <act:id type="guid">436e114c09ccaa489be81be1a24f1656</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Loyer</act:name>
   <act:id type="guid">779db6be3d2098d0a2561322f43612c9</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">436e114c09ccaa489be81be1a24f1656</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Loisirs</act:name>
   <act:id type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Canal Plus-C&#226;ble</act:name>
   <act:id type="guid">6a2a8fed6fbad778df8a5292148d1582</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Cin&#233;ma-Th&#233;&#226;tre</act:name>
   <act:id type="guid">b2a4e65fd87146b8199f46c31fa215f1</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Disques-cassettes</act:name>
   <act:id type="guid">52a3df54b9e7fb80b22e64a2572a89bb</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Equipement</act:name>
   <act:id type="guid">d7620d56c56e8b2cb0e052411f12cd0a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Livres-Journaux</act:name>
   <act:id type="guid">6406d28576114d95f1a6d9561a0b65e3</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Photographie</act:name>
   <act:id type="guid">9c0f50a450219f9275d7c4ae3b3cbaa9</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">ae47cf420aa54ba58fb1906b4edba98f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Maison</act:name>
   <act:id type="guid">a648b21f385e784fbe2b26cb3f718a79</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Chauffage</act:name>
   <act:id type="guid">d04143b5e1486b50f154614b3369ba9c</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">a648b21f385e784fbe2b26cb3f718a79</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Electricit&#233;</act:name>
   <act:id type="guid">a74cdda295ca3f404ca97a5e94a564c3</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">a648b21f385e784fbe2b26cb3f718a79</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>T&#233;l&#233;phone</act:name>
   <act:id type="guid">3a6503c7c577f1beb48a620e905b207d</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">a648b21f385e784fbe2b26cb3f718a79</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Mobilier</act:name>
   <act:id type="guid">8f5104499ca8138b3c48f5c900d7b285</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Cuisine-Salle de bains</act:name>
   <act:id type="guid">d0a283d1c384e5ee67f2135f308688bb</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">8f5104499ca8138b3c48f5c900d7b285</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Eclairage</act:name>
   <act:id type="guid">11f39397fe9ff09741bb4d9530b21945</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">8f5104499ca8138b3c48f5c900d7b285</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Electro-m&#233;nager</act:name>
   <act:id type="guid">3b925233706cf676b2e8f40054f34a68</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">8f5104499ca8138b3c48f5c900d7b285</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Sant&#233;</act:name>
   <act:id type="guid">1c3053f62d72017f9faacec828e3b874</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Dentiste</act:name>
   <act:id type="guid">5816cdbc45a11a5747f7ca286550c73a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">1c3053f62d72017f9faacec828e3b874</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Ordonnances</act:name>
   <act:id type="guid">672b9edafeae9eb5c17316688678ee3d</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">1c3053f62d72017f9faacec828e3b874</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Soins personnels</act:name>
   <act:id type="guid">5d9afede4f8d14de29b0f64ebd23a649</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Coiffeur</act:name>
   <act:id type="guid">1e52527b3d343c4719a265a454753df7</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">5d9afede4f8d14de29b0f64ebd23a649</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Vacances</act:name>
   <act:id type="guid">37563222f8bfa2ef6edb653a3b492d0b</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Devises</act:name>
   <act:id type="guid">13e72266b7b88c8bb23d747dbd3ebd23</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">37563222f8bfa2ef6edb653a3b492d0b</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Voyage</act:name>
   <act:id type="guid">592d53a1ecb323212d3e1da50239473f</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">37563222f8bfa2ef6edb653a3b492d0b</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Retained Earnings</act:name>
   <act:id type="guid">afe841ab5436faa629103cfbb93c6a74</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">9643f159a0522e203df526c2125ccdd4</trn:id>
Index: pricedb1.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/pricedb1.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/pricedb1.gml2 -Lsrc/backend/file/test/test-files/xml2/pricedb1.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/pricedb1.gml2
+++ src/backend/file/test/test-files/xml2/pricedb1.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">12</gnc:count-data>
 <gnc:commodity version="2.0.0">
   <cmdty:space>AMEX</cmdty:space>
Index: Money95mutual.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/Money95mutual.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/Money95mutual.gml2 -Lsrc/backend/file/test/test-files/xml2/Money95mutual.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/Money95mutual.gml2
+++ src/backend/file/test/test-files/xml2/Money95mutual.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">1</gnc:count-data>
 <gnc:count-data cd:type="account">5</gnc:count-data>
 <gnc:count-data cd:type="transaction">3</gnc:count-data>
@@ -13,31 +38,31 @@
   <act:name>Livret bleu</act:name>
   <act:id type="guid">3bcb236af583d5bd7b6e0153fe97e7e3</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>FRF</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Money95mfunds fr</act:name>
   <act:id type="guid">89e091b3489a50957b400a868f101d59</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>FRF</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>O-Sicav Plus</act:name>
   <act:id type="guid">e0e954412d6b31dfa1fcbb9937a125b0</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>FRF</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>O-Sicav Plus</cmdty:id>
@@ -49,21 +74,21 @@
   <act:name>Commissions</act:name>
   <act:id type="guid">41b9e953585cd5662712d62848e71789</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>FRF</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Money95mfunds fr</act:name>
   <act:id type="guid">c7a4746248d0677c6421077833477bba</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>FRF</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">41b9e953585cd5662712d62848e71789</act:parent>
 </gnc:account>
 <gnc:transaction version="2.0.0">
Index: abcall.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/abcall.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/abcall.gml2 -Lsrc/backend/file/test/test-files/xml2/abcall.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/abcall.gml2
+++ src/backend/file/test/test-files/xml2/abcall.gml2
@@ -1,81 +1,106 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">7</gnc:count-data>
 <gnc:count-data cd:type="transaction">10</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>ABC Bank</act:name>
   <act:id type="guid">eda56e3c0c402d1816f845430caf362e</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Some Old Bank Acct</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Swipe Brokers</act:name>
   <act:id type="guid">729ae65a6c202a83a5335bcd32709888</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>My Investment Account</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>pocket cash</act:name>
   <act:id type="guid">5d0b89cb9bcc5074cda514d0d4c10af4</act:id>
   <act:type>CASH</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>SlaveCardt</act:name>
   <act:id type="guid">2b804a30e16e54a97da593fc1f71c386</act:id>
   <act:type>CREDIT</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>my credit card</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Gift Received</act:name>
   <act:id type="guid">04b5cbc4192f4790fac0586c5cc152f4</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Gift Received</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Invest Inc</act:name>
   <act:id type="guid">d4f69b07cf7bb1a77c134f1b2c128684</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Investment Income</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Other Inc</act:name>
   <act:id type="guid">0a241ed16a10c3be1836ce37f8a069e9</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Other Income</act:description>
 </gnc:account>
 <gnc:transaction version="2.0.0">
Index: Money95invst.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/Money95invst.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/Money95invst.gml2 -Lsrc/backend/file/test/test-files/xml2/Money95invst.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/Money95invst.gml2
+++ src/backend/file/test/test-files/xml2/Money95invst.gml2
@@ -1,36 +1,61 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">3</gnc:count-data>
 <gnc:count-data cd:type="transaction">10</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>Compte courant</act:name>
   <act:id type="guid">a68387e637bb8e7405bc949764b9aefd</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Livret bleu</act:name>
   <act:id type="guid">cec92cd077aee62305910cfd929cc341</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Retained Earnings</act:name>
   <act:id type="guid">afed1334dfcdc53865cafe61edbb0fc6</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">ad7c592d0603871110acb8f2c7bcd215</trn:id>
Index: goonies-file.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/goonies-file.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/goonies-file.gml2 -Lsrc/backend/file/test/test-files/xml2/goonies-file.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/goonies-file.gml2
+++ src/backend/file/test/test-files/xml2/goonies-file.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">2</gnc:count-data>
 <gnc:count-data cd:type="account">4</gnc:count-data>
 <gnc:count-data cd:type="transaction">4</gnc:count-data>
@@ -19,11 +44,11 @@
   <act:name>Bank Account</act:name>
   <act:id type="guid">117841ae858b1700a017d752b7f02b09</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
@@ -35,11 +60,11 @@
   <act:name>HAL Stock</act:name>
   <act:id type="guid">3619a4f1c902a2f6e39ed311321034c3</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>HAL</cmdty:id>
@@ -56,11 +81,11 @@
   <act:name>HN Stock</act:name>
   <act:id type="guid">b0a11711e0f804f7a51981f32556191d</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>HN</cmdty:id>
@@ -77,11 +102,11 @@
   <act:name>Initial Equity</act:name>
   <act:id type="guid">c421c81f4c3c4c8337b9c9bcac82c8d5</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:slots>
     <slot>
       <slot:key>notes</slot:key>
Index: ms-money.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/ms-money.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/ms-money.gml2 -Lsrc/backend/file/test/test-files/xml2/ms-money.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/ms-money.gml2
+++ src/backend/file/test/test-files/xml2/ms-money.gml2
@@ -1,414 +1,439 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">39</gnc:count-data>
 <gnc:count-data cd:type="transaction">347</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>Cathy Bank</act:name>
   <act:id type="guid">7be24f20929f644872ca1718cdd80bee</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>New Bank</act:name>
   <act:id type="guid">ab52d1a8fbd5883a788d51bd29c77e84</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>School Credit</act:name>
   <act:id type="guid">6cdb61279507abc41065ae0cfc49e314</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Dividend</act:name>
   <act:id type="guid">4ac81d62b599798f057b2dd83a5d89fb</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Other Income</act:name>
   <act:id type="guid">fd1d2d2d58ceefc149f572a1e6936cec</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Credit balance</act:name>
   <act:id type="guid">65adcfc02d0f936916bb49b994895c89</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">fd1d2d2d58ceefc149f572a1e6936cec</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Refund</act:name>
   <act:id type="guid">c1c71598e096d9ab5565f096db36ed59</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Reimbursement</act:name>
   <act:id type="guid">60a59d2467d55241a1f13d5c0c43fa1b</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Camcorder</act:name>
   <act:id type="guid">56c1924305fc9b5667ff93ed389f571a</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">60a59d2467d55241a1f13d5c0c43fa1b</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Tax Refund</act:name>
   <act:id type="guid">15a7de112614d62d993dfcc43ff70142</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Unspecified</act:name>
   <act:id type="guid">9defb6c42135fa2f4036762c8926c8ca</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>WS</act:name>
   <act:id type="guid">4da6e3f697287c126a6827efd63a0b43</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>A</act:name>
   <act:id type="guid">74446cb1e9d9fb729f0d002aea325430</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Insurance</act:name>
   <act:id type="guid">73f01092a778ac5f25d1f95c1f34a6eb</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">74446cb1e9d9fb729f0d002aea325430</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>M</act:name>
   <act:id type="guid">2dba4680e7c14b4f1b3f60cc75959daa</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">74446cb1e9d9fb729f0d002aea325430</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Membership</act:name>
   <act:id type="guid">f5b32f79be8cc4952e6e2ddd4077b0fa</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">74446cb1e9d9fb729f0d002aea325430</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>T</act:name>
   <act:id type="guid">ee3d0e82c9b191091e61d4d1bc8da9f3</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">74446cb1e9d9fb729f0d002aea325430</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>W</act:name>
   <act:id type="guid">3451d55fd6957c001991ac7b98402b04</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">74446cb1e9d9fb729f0d002aea325430</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Bank Charges</act:name>
   <act:id type="guid">94f1725a16858da2a9832cec4d7c78fa</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Bills</act:name>
   <act:id type="guid">b978ff4097c571ecbbd134bd50cb439f</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Electricity</act:name>
   <act:id type="guid">92b05cc5070282b02b05e60f161a5882</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">b978ff4097c571ecbbd134bd50cb439f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Natural Gas</act:name>
   <act:id type="guid">51feb1a2384a8b12a1738d5561c9ea7a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">b978ff4097c571ecbbd134bd50cb439f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Rent</act:name>
   <act:id type="guid">329b2c5196efdaf54e1321e05b9f0875</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">b978ff4097c571ecbbd134bd50cb439f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Telephone</act:name>
   <act:id type="guid">8d9a8e4928257f0b0aaee042057d8012</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">b978ff4097c571ecbbd134bd50cb439f</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Clothing</act:name>
   <act:id type="guid">baaf4f690ee338fe4b0cf67dd6c2bf8a</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Clothing</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Credit Card</act:name>
   <act:id type="guid">5fc1c6a2a79889318f644120ac82c8ee</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Education</act:name>
   <act:id type="guid">f981711ab9d0c5ca6b75d0b5a8ee261b</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Education</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Food</act:name>
   <act:id type="guid">073d73615847b401ef859cc852509ab7</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Groceries</act:name>
   <act:id type="guid">594ee4adb251ad1515794a77837ae15c</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">073d73615847b401ef859cc852509ab7</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Healthcare</act:name>
   <act:id type="guid">60845136829c50ec4a09675a08c2da24</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Insurance</act:name>
   <act:id type="guid">2f38dff5dceaa7e0ee4d645a19215103</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>A</act:name>
   <act:id type="guid">cc640e911a739a6f58675333704ce9de</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">2f38dff5dceaa7e0ee4d645a19215103</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Leisure</act:name>
   <act:id type="guid">246d4bbc03fd4ebfc817afda54011ebc</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Photo</act:name>
   <act:id type="guid">9963d86a4c411a32c1991a9b91f634fd</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">246d4bbc03fd4ebfc817afda54011ebc</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Misc</act:name>
   <act:id type="guid">e9b94c2baee4d4f9489a856f4a8a06e0</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Miscellaneous</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Miscellaneous</act:name>
   <act:id type="guid">96d92c6744c5df991da54c700630fe72</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Student account</act:name>
   <act:id type="guid">a4267ec85727c7c75d9ddea58f2fd26e</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">96d92c6744c5df991da54c700630fe72</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>TD</act:name>
   <act:id type="guid">c791e88d9c25ef9cbdab5d4b9f51fde9</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Retained Earnings</act:name>
   <act:id type="guid">c4eb84e774bfe977982edc87793e44cf</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>USD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">58a96777671bde4e1352e2b061edd814</trn:id>
Index: abc.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/abc.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/abc.gml2 -Lsrc/backend/file/test/test-files/xml2/abc.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/abc.gml2
+++ src/backend/file/test/test-files/xml2/abc.gml2
@@ -1,48 +1,73 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">4</gnc:count-data>
 <gnc:count-data cd:type="transaction">7</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>Swipe Brokers</act:name>
   <act:id type="guid">8a2778a7eef9bc606de8a12b489f737c</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>EUR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>My Investment Account</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>abc</act:name>
   <act:id type="guid">8c054c66321f7be82287dbb0c6b7b8a2</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>EUR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Gift Received</act:name>
   <act:id type="guid">07212c5f31968d8d55144f1fd5651d8c</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>EUR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Gift Received</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Other Inc</act:name>
   <act:id type="guid">a2d8b63955baad46ddca87bbd96d399f</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>EUR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Other Income</act:description>
 </gnc:account>
 <gnc:transaction version="2.0.0">
Index: cbb-export.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/cbb-export.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/cbb-export.gml2 -Lsrc/backend/file/test/test-files/xml2/cbb-export.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/cbb-export.gml2
+++ src/backend/file/test/test-files/xml2/cbb-export.gml2
@@ -1,131 +1,156 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="account">12</gnc:count-data>
 <gnc:count-data cd:type="transaction">9</gnc:count-data>
 <gnc:account version="2.0.0">
   <act:name>cbb export</act:name>
   <act:id type="guid">504a8f7f0ff8e1e53c6df8b1bb714c47</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Gifts</act:name>
   <act:id type="guid">8cd43c12f1dc32ea8a51ec997fcf35ef</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Gift Expenses</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Reimbursements</act:name>
   <act:id type="guid">4f502fe69043087c2186dcac27cc56bf</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Salary</act:name>
   <act:id type="guid">077894556323647344da06d5f5fe6449</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Salary Income</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Clothing</act:name>
   <act:id type="guid">37539261eaf4bcf82c17eba0a5bf5949</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Clothing</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Credit Card</act:name>
   <act:id type="guid">3b09243ca91d85c7b2984dd5f2490701</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Dining-Out</act:name>
   <act:id type="guid">cd6d68365b6c9f80e4b68a552b71950b</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Entertainment</act:name>
   <act:id type="guid">47585dff7df1969ea961e4b1a7fa9f27</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Household</act:name>
   <act:id type="guid">46d28144c136899835833bca6cda4e52</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Household Misc. Exp</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Personal Cash</act:name>
   <act:id type="guid">98e07d070ecce19416db949e9124a45d</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Telephone</act:name>
   <act:id type="guid">72e555d138c8a1e7c5e8c7953a54a55e</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:description>Telephone Expense</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Textbooks</act:name>
   <act:id type="guid">224840878e17f4f7c6a5d6418747cafa</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>HRK</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">9d2c18d552ab4a405bee914ca188eb70</trn:id>
Index: conrads-file.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/conrads-file.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/conrads-file.gml2 -Lsrc/backend/file/test/test-files/xml2/conrads-file.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/conrads-file.gml2
+++ src/backend/file/test/test-files/xml2/conrads-file.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">1</gnc:count-data>
 <gnc:count-data cd:type="account">6</gnc:count-data>
 <gnc:count-data cd:type="transaction">12</gnc:count-data>
@@ -13,21 +38,21 @@
   <act:name>Imbalance-AUD</act:name>
   <act:id type="guid">ca36693eb25a602c171d07cb682b3e1b</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Assets</act:name>
   <act:id type="guid">a947017cbd3b26198484086f8d93863b</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:code>A0000</act:code>
   <act:slots>
     <slot>
@@ -40,11 +65,11 @@
   <act:name>Stock1</act:name>
   <act:id type="guid">33181c172f50aaa24792256f2db4690e</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:code>A0001</act:code>
   <act:security>
     <cmdty:space>AMEX</cmdty:space>
@@ -63,11 +88,11 @@
   <act:name>Stock2</act:name>
   <act:id type="guid">4ca39e2f16ccf288ea0d956d2371bf82</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:code>A0002</act:code>
   <act:security>
     <cmdty:space>AMEX</cmdty:space>
@@ -86,11 +111,11 @@
   <act:name>Cash</act:name>
   <act:id type="guid">dd0cfd17078251ec6ef03da8a081f2a3</act:id>
   <act:type>ASSET</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:code>C0000</act:code>
   <act:slots>
     <slot>
@@ -103,11 +128,11 @@
   <act:name>Bank</act:name>
   <act:id type="guid">6f8df62ae08403ee2a8eb5aa61cec772</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>AUD</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:code>C0001</act:code>
   <act:slots>
     <slot>
Index: Money95stocks.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/Money95stocks.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/Money95stocks.gml2 -Lsrc/backend/file/test/test-files/xml2/Money95stocks.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/Money95stocks.gml2
+++ src/backend/file/test/test-files/xml2/Money95stocks.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">2</gnc:count-data>
 <gnc:count-data cd:type="account">8</gnc:count-data>
 <gnc:count-data cd:type="transaction">28</gnc:count-data>
@@ -19,31 +44,31 @@
   <act:name>Livret bleu</act:name>
   <act:id type="guid">21db466b6be8b3f6a3043d0c0316de8c</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Money95stocks fr</act:name>
   <act:id type="guid">2a42eb5710ad4ddbf9352f070d603fe2</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Microsoft</act:name>
   <act:id type="guid">c28902afc0e2168dab793b63dbf56e1f</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>MSFT</cmdty:id>
@@ -55,11 +80,11 @@
   <act:name>Usinor/Sacilor</act:name>
   <act:id type="guid">b3955645bed5651123986f415d0e81d6</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>USSA</cmdty:id>
@@ -71,42 +96,42 @@
   <act:name>Unspecified</act:name>
   <act:id type="guid">37d287c3550ab2810c386d1b33cc2d0b</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Commissions</act:name>
   <act:id type="guid">5efcfb966ef97810de2fbaaa2b352205</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Money95stocks fr</act:name>
   <act:id type="guid">da8e001155343694bd34f6aa248b1c28</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
   <act:parent type="guid">5efcfb966ef97810de2fbaaa2b352205</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Retained Earnings</act:name>
   <act:id type="guid">1aaa099850fe7a07e2b5ae97f18b9af2</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>BRL</cmdty:id>
-  </act:currency>
-  <act:currency-scu>100</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>100</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">67da2dc62331fb318640aa5a1a3da937</trn:id>
Index: every.gml2
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/file/test/test-files/xml2/every.gml2,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/backend/file/test/test-files/xml2/every.gml2 -Lsrc/backend/file/test/test-files/xml2/every.gml2 -u -r1.1 -r1.2
--- src/backend/file/test/test-files/xml2/every.gml2
+++ src/backend/file/test/test-files/xml2/every.gml2
@@ -1,5 +1,30 @@
 <?xml version="1.0"?>
-<gnc-v2>
+<gnc-v2
+     xmlns:gnc="http://www.gnucash.org/XML/gnc"
+     xmlns:act="http://www.gnucash.org/XML/act"
+     xmlns:book="http://www.gnucash.org/XML/book"
+     xmlns:cd="http://www.gnucash.org/XML/cd"
+     xmlns:cmdty="http://www.gnucash.org/XML/cmdty"
+     xmlns:price="http://www.gnucash.org/XML/price"
+     xmlns:slot="http://www.gnucash.org/XML/slot"
+     xmlns:split="http://www.gnucash.org/XML/split"
+     xmlns:sx="http://www.gnucash.org/XML/sx"
+     xmlns:trn="http://www.gnucash.org/XML/trn"
+     xmlns:ts="http://www.gnucash.org/XML/ts"
+     xmlns:cust="http://www.gnucash.org/XML/cust"
+     xmlns:job="http://www.gnucash.org/XML/job"
+     xmlns:addr="http://www.gnucash.org/XML/addr"
+     xmlns:owner="http://www.gnucash.org/XML/owner"
+     xmlns:taxtable="http://www.gnucash.org/XML/taxtable"
+     xmlns:tte="http://www.gnucash.org/XML/tte"
+     xmlns:employee="http://www.gnucash.org/XML/employee"
+     xmlns:order="http://www.gnucash.org/XML/order"
+     xmlns:billterm="http://www.gnucash.org/XML/billterm"
+     xmlns:bt-days="http://www.gnucash.org/XML/bt-days"
+     xmlns:bt-prox="http://www.gnucash.org/XML/bt-prox"
+     xmlns:invoice="http://www.gnucash.org/XML/invoice"
+     xmlns:entry="http://www.gnucash.org/XML/entry"
+     xmlns:vendor="http://www.gnucash.org/XML/vendor">
 <gnc:count-data cd:type="commodity">5</gnc:count-data>
 <gnc:count-data cd:type="account">27</gnc:count-data>
 <gnc:count-data cd:type="transaction">161</gnc:count-data>
@@ -37,22 +62,22 @@
   <act:name>Fidelity Inv</act:name>
   <act:id type="guid">1b791374ee19ad07b06c3e0a99aeb4fa</act:id>
   <act:type>BANK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:description>Mutual Fund Family</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>FID Cap &amp; Income</act:name>
   <act:id type="guid">31123b56c4780f491050562fc2bbdc20</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Cap &amp; Income</cmdty:id>
@@ -64,11 +89,11 @@
   <act:name>FID Eq Inc II</act:name>
   <act:id type="guid">db2182ba7d730b4e90c755d29c64c894</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Eq Inc II</cmdty:id>
@@ -80,11 +105,11 @@
   <act:name>FID Govt Res</act:name>
   <act:id type="guid">504f743d68e663efff21fc66b85cc491</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Govt Res</cmdty:id>
@@ -96,11 +121,11 @@
   <act:name>FID Growth &amp; Inc</act:name>
   <act:id type="guid">ebec8d5a26522f4a0865fa5f837af17b</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Growth &amp; Inc</cmdty:id>
@@ -112,11 +137,11 @@
   <act:name>FID NewMkt Inc</act:name>
   <act:id type="guid">0fac2553ae5a682f5ae978d081566ea5</act:id>
   <act:type>STOCK</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID NewMkt Inc</cmdty:id>
@@ -128,43 +153,43 @@
   <act:name>Dummy Cash</act:name>
   <act:id type="guid">049676696675474217124e24f44fbaa7</act:id>
   <act:type>CASH</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:description>Reconcile Accounts</act:description>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Cap. gain (long)</act:name>
   <act:id type="guid">1ade3e58381c463d8a8c2703d134ccea</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Fidelity Inv</act:name>
   <act:id type="guid">b7eaa97e2760274bd7eb5104a3f6fd84</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:parent type="guid">1ade3e58381c463d8a8c2703d134ccea</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>FID Eq Inc II</act:name>
   <act:id type="guid">2998f1baa86deced08bf21cb73d4d194</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Eq Inc II</cmdty:id>
@@ -176,11 +201,11 @@
   <act:name>FID Growth &amp; Inc</act:name>
   <act:id type="guid">5b7c74145709c67b9fa6d33ea12c9163</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Growth &amp; Inc</cmdty:id>
@@ -192,32 +217,32 @@
   <act:name>Cap. gain (short)</act:name>
   <act:id type="guid">fec86ac037ee8dd3cfe9512f7fced74b</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Fidelity Inv</act:name>
   <act:id type="guid">57e365b7b895c5a9ef328a69367c49e5</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:parent type="guid">fec86ac037ee8dd3cfe9512f7fced74b</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>FID Eq Inc II</act:name>
   <act:id type="guid">f9599ed5ecf62d2c9326766617d6e5e7</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Eq Inc II</cmdty:id>
@@ -229,11 +254,11 @@
   <act:name>FID Growth &amp; Inc</act:name>
   <act:id type="guid">d023c36ca9c320b873c5be9993078451</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Growth &amp; Inc</cmdty:id>
@@ -245,11 +270,11 @@
   <act:name>FID NewMkt Inc</act:name>
   <act:id type="guid">5f4d3dd84f8df6527d5091152aadb4d6</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID NewMkt Inc</cmdty:id>
@@ -261,32 +286,32 @@
   <act:name>Dividends</act:name>
   <act:id type="guid">0406079e56613a22d8112b8dbfbed622</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Fidelity Inv</act:name>
   <act:id type="guid">928026d717b302da3d24fb64f086b18a</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:parent type="guid">0406079e56613a22d8112b8dbfbed622</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>FID Cap &amp; Income</act:name>
   <act:id type="guid">98a3d87a9305f733420ceee444cbfbe4</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Cap &amp; Income</cmdty:id>
@@ -298,11 +323,11 @@
   <act:name>FID Eq Inc II</act:name>
   <act:id type="guid">6344d1b4710050ba1fd600c56eee740b</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Eq Inc II</cmdty:id>
@@ -314,11 +339,11 @@
   <act:name>FID Govt Res</act:name>
   <act:id type="guid">11709b1c45e84450d7a282228e69b56c</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Govt Res</cmdty:id>
@@ -330,11 +355,11 @@
   <act:name>FID Growth &amp; Inc</act:name>
   <act:id type="guid">55d69cebd7b9b64b6e9678b6588e64a1</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID Growth &amp; Inc</cmdty:id>
@@ -346,11 +371,11 @@
   <act:name>FID NewMkt Inc</act:name>
   <act:id type="guid">4ed39bec2d9009028bc277e7ca58b372</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:security>
     <cmdty:space>NYSE</cmdty:space>
     <cmdty:id>FID NewMkt Inc</cmdty:id>
@@ -362,42 +387,42 @@
   <act:name>Unspecified</act:name>
   <act:id type="guid">5f856918b8284a11ebc757485d853667</act:id>
   <act:type>INCOME</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Commissions</act:name>
   <act:id type="guid">c4ab48d47126697c3ee461627fedbc86</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Fidelity Inv</act:name>
   <act:id type="guid">01ebde432dcc5dee900ce670743eab41</act:id>
   <act:type>EXPENSE</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
   <act:parent type="guid">c4ab48d47126697c3ee461627fedbc86</act:parent>
 </gnc:account>
 <gnc:account version="2.0.0">
   <act:name>Retained Earnings</act:name>
   <act:id type="guid">7914214426a5a0d6f1d6d64c6614f80a</act:id>
   <act:type>EQUITY</act:type>
-  <act:currency>
+  <act:commodity>
     <cmdty:space>ISO4217</cmdty:space>
     <cmdty:id>IRR</cmdty:id>
-  </act:currency>
-  <act:currency-scu>1</act:currency-scu>
+  </act:commodity>
+  <act:commodity-scu>1</act:commodity-scu>
 </gnc:account>
 <gnc:transaction version="2.0.0">
   <trn:id type="guid">d6e78e4275e257da6c333a9876c3b644</trn:id>
Index: NetIO.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/net/NetIO.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/backend/net/NetIO.c -Lsrc/backend/net/NetIO.c -u -r1.2 -r1.3
--- src/backend/net/NetIO.c
+++ src/backend/net/NetIO.c
@@ -21,6 +21,12 @@
  *                                                                  *
 \********************************************************************/
 
+/********************************************************************\
+ * 2003-03-11 TomF changes for Gnome-2 branch, 6th batch            *
+ * src/backend/net/NetIO.c: Remove include ghttp.h                  *
+ * to bypass missing ghttp.  The functions were already disabled.   *
+\********************************************************************/
+
 /*
  * Rudimentary implmentation right now; good enough for a demo, 
  * but that's all.
@@ -33,7 +39,6 @@
 
 #include "config.h"
 
-#include <ghttp.h>
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: price.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/price.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/backend/postgres/price.c -Lsrc/backend/postgres/price.c -u -r1.23 -r1.24
--- src/backend/postgres/price.c
+++ src/backend/postgres/price.c
@@ -30,15 +30,11 @@
 #include <string.h>
 #include <libpq-fe.h>  
 
-#include "qofbook.h"
-#include "qofbook-p.h"
+#include "qof.h"
 #include "gnc-commodity.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
 #include "gnc-pricedb.h"
 #include "gnc-pricedb-p.h"
-#include "guid.h"
 
 #include "PostgresBackend.h"
 #include "base-autogen.h"
@@ -46,7 +42,7 @@
 #include "price.h"
 #include "putil.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 /* ============================================================= */
 /* ============================================================= */
@@ -79,7 +75,8 @@
       if (com) continue;
    
       /* no we don't ... restore it */
-      com = gnc_commodity_new (DB_GET_VAL("fullname",j),
+      com = gnc_commodity_new (book,
+			       DB_GET_VAL("fullname",j),
                                DB_GET_VAL("namespace",j),
                                DB_GET_VAL("mnemonic",j),
                                DB_GET_VAL("code",j),
@@ -200,7 +197,7 @@
 static gboolean
 commodity_mark_cb (gnc_commodity *cm, gpointer user_data)
 {
-   gint32 v = ((gint32) user_data) & 0xffff;
+   gint32 v = ((gint32) GPOINTER_TO_INT(user_data)) & 0xffff;
    gnc_commodity_set_mark (cm, (gint16) v);
    return TRUE;
 }
Index: txn.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/txn.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lsrc/backend/postgres/txn.c -Lsrc/backend/postgres/txn.c -u -r1.29 -r1.30
--- src/backend/postgres/txn.c
+++ src/backend/postgres/txn.c
@@ -37,6 +37,7 @@
 #include "Group.h"
 #include "GroupP.h"
 #include "gnc-commodity.h"
+#include "gnc-engine.h"
 #include "gnc-engine-util.h"
 #include "gnc-event.h"
 #include "gnc-pricedb.h"
@@ -54,7 +55,7 @@
 
 #include "putil.h"
 
-static short module = MOD_TXN; 
+static QofLogModule log_module = GNC_MOD_TXN;
 
 /* ============================================================= */
 /* ============================================================= */
Index: table.m4
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/table.m4,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/backend/postgres/table.m4 -Lsrc/backend/postgres/table.m4 -u -r1.11 -r1.12
--- src/backend/postgres/table.m4
+++ src/backend/postgres/table.m4
@@ -13,15 +13,15 @@
        commodity,      , char *, gnc_commodity_get_unique_name(xaccAccountGetCommodity(ptr)),
        version,        , int32,  xaccAccountGetVersion(ptr),
        iguid,          , int32,  ptr->idata,
-       bookGUID,       , GUID *, qof_book_get_guid(xaccAccountGetBook(ptr)),
+       bookGUID,       , GUID *, qof_entity_get_guid((QofEntity*)xaccAccountGetBook(ptr)),
        parentGUID,     , GUID *, xaccAccountGetGUID(xaccAccountGetParentAccount(ptr)),
        accountGUID, KEY, GUID *, xaccAccountGetGUID(ptr),
        ')
 
 define(`book', `gncBook, Book, QofBook, b,
-       book_open,      , char,   ptr->book_open,
-       version,        , int32,  ptr->version,
-       iguid,          , int32,  ptr->idata,
+       book_open,      , char,   qof_book_get_open_marker(ptr),
+       version,        , int32,  qof_book_get_version(ptr),
+       iguid,          , int32,  qof_book_get_idata(ptr),
        bookGUID,    KEY, GUID *, qof_book_get_guid(ptr),
        ')
 
Index: txnmass.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/txnmass.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/backend/postgres/txnmass.c -Lsrc/backend/postgres/txnmass.c -u -r1.18 -r1.19
--- src/backend/postgres/txnmass.c
+++ src/backend/postgres/txnmass.c
@@ -37,11 +37,7 @@
 #include "Group.h"
 #include "GroupP.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
-#include "guid.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
+#include "gnc-engine.h"
 #include "Transaction.h"
 #include "TransactionP.h"
 
@@ -52,7 +48,7 @@
 
 #include "putil.h"
 
-static short module = MOD_TXN;
+static QofLogModule log_module = GNC_MOD_TXN;
 
 /* ============================================================= */
 
Index: putil.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/putil.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/backend/postgres/putil.c -Lsrc/backend/postgres/putil.c -u -r1.6 -r1.7
--- src/backend/postgres/putil.c
+++ src/backend/postgres/putil.c
@@ -41,7 +41,7 @@
 #include "gnc-engine-util.h" 
 #include "PostgresBackend.h"
 
-static short module = MOD_BACKEND;
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 #include "putil.h"
 
Index: builder.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/builder.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/postgres/builder.c -Lsrc/backend/postgres/builder.c -u -r1.5 -r1.6
--- src/backend/postgres/builder.c
+++ src/backend/postgres/builder.c
@@ -45,9 +45,10 @@
 #include "gnc-date.h"
 #include "escape.h"
 #include "builder.h"
+#include "gnc-engine.h"
 #include "gnc-engine-util.h"
 
-static short module = MOD_BACKEND;
+static QofLogModule log_module = GNC_MOD_BACKEND; 
 
 /* ================================================ */
 
@@ -272,7 +273,7 @@
    char val[100];
    if (!b || !tag) return;
 
-   snprintf (val, 100, "%lld", (long long int) nval);
+   snprintf (val, 100, "%" G_GINT64_FORMAT, nval);
    if (b->tag_need_comma) b->ptag = stpcpy(b->ptag, ", ");
    b->tag_need_comma = 1;
 
Index: checkpoint.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/checkpoint.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/backend/postgres/checkpoint.c -Lsrc/backend/postgres/checkpoint.c -u -r1.13 -r1.14
--- src/backend/postgres/checkpoint.c
+++ src/backend/postgres/checkpoint.c
@@ -58,7 +58,7 @@
 
 #include "putil.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND; 
 
 /* ============================================================= */
 /* include autogenerated code */
@@ -468,10 +468,10 @@
    DEBUGCMD({
       char buf[80];
       gnc_timespec_to_iso8601_buff (chk.date_start, buf);
-      PINFO("%s balance to %s baln=%lld/%lld clr=%lld/%lld rcn=%lld/%lld", 
+      PINFO("%s balance to %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, 
         xaccAccountGetDescription (acc), buf,
         b, deno, cl_b, deno, rec_b, deno);
-      })
+     });
 
    /* add up loose entries since the checkpoint */
    pgendAccountGetPartialBalance (be, &chk);
@@ -490,10 +490,10 @@
    DEBUGCMD ({
       char buf[80];
       gnc_timespec_to_iso8601_buff (as_of_date, buf);
-      LEAVE("be=%p %s %s baln=%lld/%lld clr=%lld/%lld rcn=%lld/%lld", be, 
+      LEAVE("be=%p %s %s baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " clr=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT " rcn=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, be, 
         xaccAccountGetDescription (acc), buf,
         b, deno, cl_b, deno, rec_b, deno);
-      })
+     });
 }
 
 /* ============================================================= */
Index: putil.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/putil.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/backend/postgres/putil.h -Lsrc/backend/postgres/putil.h -u -r1.16 -r1.17
--- src/backend/postgres/putil.h
+++ src/backend/postgres/putil.h
@@ -318,7 +318,7 @@
 #define COMP_INT64(sqlname,fun,ndiffs) { 			\
    if (strtoll (DB_GET_VAL(sqlname,0), NULL, 0) != fun) {	\
       PINFO("mis-match: %s sql='%s', eng='%lld'", sqlname, 	\
-         DB_GET_VAL (sqlname,0), fun); 				\
+	 DB_GET_VAL (sqlname,0), (long long int) fun);	\
       ndiffs++; 						\
    }								\
 }
@@ -362,7 +362,7 @@
       for (node=be->blist; node; node=node->next)                \
       {                                                          \
          book = node->data;                                      \
-         if (guid_equal (&book->inst.entity.guid, &book_guid)) break; \
+         if (guid_equal (qof_entity_get_guid((QofEntity*)book), &book_guid)) break; \
          book = NULL;                                            \
       }                                                          \
       if (!book) return data;                                    \
Index: PostgresBackend.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/PostgresBackend.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -Lsrc/backend/postgres/PostgresBackend.c -Lsrc/backend/postgres/PostgresBackend.c -u -r1.54 -r1.55
--- src/backend/postgres/PostgresBackend.c
+++ src/backend/postgres/PostgresBackend.c
@@ -44,18 +44,8 @@
 #include "GroupP.h"
 #include "gnc-commodity.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
-#include "gnc-event-p.h"
 #include "gnc-pricedb.h"
 #include "gnc-pricedb-p.h"
-#include "guid.h"
-#include "qofbackend.h"
-#include "qofbackend-p.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
 #include "TransactionP.h"
 
 #include "account.h"
@@ -72,7 +62,7 @@
 #include "txnmass.h"
 #include "upgrade.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 #include "putil.h"
 
@@ -2543,8 +2533,30 @@
    be = g_new0 (PGBackend, 1);
    pgendInit (be);
 
-   LEAVE(" ")
+   LEAVE(" ");
    return (QofBackend *) be;
 }
 
+static void
+pg_provider_free (QofBackendProvider *prov)
+{
+        prov->provider_name = NULL;
+        prov->access_method = NULL;
+        g_free (prov);
+}
+
+void pgend_provider_init(void)
+{
+	QofBackendProvider *prov;
+
+	prov = g_new0(QofBackendProvider, 1);
+	prov->provider_name = "The Postgres backend for Gnucash";
+	prov->access_method = "sql";
+	prov->partial_book_supported = FALSE;
+	prov->backend_new = pgendNew;
+	prov->provider_free = pg_provider_free;
+	prov->check_data_type = NULL;
+	qof_backend_register_provider (prov);
+}
+
 /* ======================== END OF FILE ======================== */
Index: upgrade.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/upgrade.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/backend/postgres/upgrade.c -Lsrc/backend/postgres/upgrade.c -u -r1.17 -r1.18
--- src/backend/postgres/upgrade.c
+++ src/backend/postgres/upgrade.c
@@ -36,7 +36,7 @@
 
 #include "putil.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 /* ============================================================= */
 
@@ -126,7 +126,7 @@
 get_iguid_cb (PGBackend *be, PGresult *result, int j, gpointer data)
 {
    int fin = atoi(DB_GET_VAL ("iguid", j));
-   return (gpointer) fin;
+   return GINT_TO_POINTER(fin);
 }
 
 
@@ -150,7 +150,7 @@
 
    p = "SELECT iguid FROM gncGUIDCache ORDER BY iguid DESC LIMIT 1;";
    SEND_QUERY (be,p, );
-   iguid = (guint32) pgendGetResults (be, get_iguid_cb, 0);
+   iguid = (guint32) GPOINTER_TO_UINT(pgendGetResults (be, get_iguid_cb, 0));
    iguid ++;
 
    sprintf(buff, "CREATE SEQUENCE gnc_iguid_seq START %d;", iguid);
Index: account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/account.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -Lsrc/backend/postgres/account.c -Lsrc/backend/postgres/account.c -u -r1.27 -r1.28
--- src/backend/postgres/account.c
+++ src/backend/postgres/account.c
@@ -32,17 +32,11 @@
 #include <libpq-fe.h>  
  
 #include "AccountP.h"
-#include "qofbackend.h"
-#include "qofbackend-p.h"
+#include "qof.h"
 #include "Group.h"
 #include "GroupP.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
 #include "gnc-pricedb.h"
-#include "guid.h"
 
 #include "account.h"
 #include "book.h"
@@ -51,7 +45,7 @@
 #include "PostgresBackend.h"
 #include "price.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND; 
 
 #include "putil.h"
 
Index: book.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/book.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/backend/postgres/book.c -Lsrc/backend/postgres/book.c -u -r1.12 -r1.13
--- src/backend/postgres/book.c
+++ src/backend/postgres/book.c
@@ -31,13 +31,9 @@
 
 #include <libpq-fe.h>  
  
-#include "qofbackend.h"
-#include "qofbackend-p.h"
+#include "qof.h"
 #include "book.h"
-#include "qofbook-p.h"
-#include "gnc-engine-util.h"
 #include "gnc-pricedb.h"
-#include "guid.h"
 #include "kvp-sql.h"
 #include "PostgresBackend.h"
 
@@ -46,7 +42,7 @@
 
 #include "putil.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND; 
 
 /* ============================================================= */
 /* ============================================================= */
@@ -76,6 +72,7 @@
 pgendStoreBookNoLock (PGBackend *be, QofBook *book,
                          gboolean do_check_version)
 {
+   gint32 idata;
    if (!be || !book) return;
 
    ENTER ("book=%p", book);
@@ -84,20 +81,20 @@
    {
      if (0 < pgendBookCompareVersion (be, book)) return;
    }
-   book->version ++;  /* be sure to update the version !! */
+   qof_book_set_version(book, (qof_book_get_version(book) +1));  /* be sure to update the version !! */
 
-   if ((0 == book->idata) &&
+   if ((0 == qof_book_get_idata(book)) &&
        (FALSE == kvp_frame_is_empty (qof_book_get_slots(book))))
    {
-      book->idata = pgendNewGUIDidx(be);
+      qof_book_set_idata(book, pgendNewGUIDidx(be));
    }
 
    pgendPutOneBookOnly (be, book);
-
-   if (book->idata)
+   idata = qof_book_get_idata(book);
+   if ( idata > 0)
    {
-      pgendKVPDelete (be, book->idata);
-      pgendKVPStore (be, book->idata, book->inst.kvp_data);
+      pgendKVPDelete (be, idata);
+      pgendKVPStore (be, idata, qof_instance_get_slots((QofInstance*)book));
    }
    LEAVE(" ");
 }
@@ -145,15 +142,25 @@
    guid = nullguid;  /* just in case the read fails ... */
    string_to_guid (DB_GET_VAL("bookGuid",j), &guid);
 
-   qof_book_set_guid (book, &guid);
+   qof_entity_set_guid ((QofEntity*)book, &guid);
 
-   book->book_open = (DB_GET_VAL("book_open",j))[0];
-   book->version = atoi(DB_GET_VAL("version",j));
-   book->idata = atoi(DB_GET_VAL("iguid",j));
+   if((DB_GET_VAL("book_open",j))[0] == 'n')
+   {
+   		qof_book_mark_closed(book);
+   }
+   qof_book_set_version(book, atoi(DB_GET_VAL("version",j)));
+   qof_book_set_idata(book, atoi(DB_GET_VAL("iguid",j)));
 
    return book;
 }
 
+static void pg_kvp_helper (const char* key, KvpValue *value, gpointer data)
+{
+	QofBook *book = (QofBook*)data;
+	kvp_frame_set_slot_nc(qof_instance_get_slots((QofInstance*)book),
+		key, value);
+}
+
 void
 pgendBookRestore (PGBackend *be, QofBook *book)
 {
@@ -170,9 +177,13 @@
    SEND_QUERY (be, bufp, );
    pgendGetResults (be, get_one_book_cb, book);
 
-   if (0 != book->idata) 
+   if (0 != qof_book_get_idata(book)) 
    {
-      book->inst.kvp_data = pgendKVPFetch (be, book->idata, book->inst.kvp_data);
+	  KvpFrame *pg_frame;
+	  
+	  pg_frame = pgendKVPFetch (be, qof_book_get_idata(book), 
+	   	qof_instance_get_slots((QofInstance*)book));
+	  kvp_frame_for_each_slot(pg_frame, pg_kvp_helper, book);	   
    }
 
    LEAVE (" ");
@@ -200,19 +211,23 @@
    for (node=blist; node; node=node->next)
    {
       book = node->data;
-      if (guid_equal (&book->inst.entity.guid, &guid)) break;
+      if (guid_equal (qof_entity_get_guid((QofEntity*)book), &guid)) break;
       book = NULL;
    }
    
    if (!book) 
    {
       book = qof_book_new();
-      qof_book_set_guid (book, &guid);
+      qof_entity_set_guid ((QofEntity*)book, &guid);
    }
 
-   book->book_open = (DB_GET_VAL("book_open",j))[0];
-   book->version = atoi(DB_GET_VAL("version",j));
-   book->idata = atoi(DB_GET_VAL("iguid",j));
+   if((DB_GET_VAL("book_open",j))[0] == 'n')
+   {
+	   qof_book_mark_closed(book);
+   }
+//   book->book_open = (DB_GET_VAL("book_open",j))[0];
+   qof_book_set_version(book, atoi(DB_GET_VAL("version",j)));
+   qof_book_set_idata(book, atoi(DB_GET_VAL("iguid",j)));
 
    return blist;
 }
@@ -235,10 +250,18 @@
    for (node=blist; node; node=node->next)
    {
       QofBook *book = node->data;
-      if (0 != book->idata) 
+      if (0 != qof_book_get_idata(book)) 
       {
-         book->inst.kvp_data = pgendKVPFetch (be, book->idata, book->inst.kvp_data);
+	  	KvpFrame *pg_frame;
+	  
+		  pg_frame = pgendKVPFetch (be, qof_book_get_idata(book), 
+		   	qof_instance_get_slots((QofInstance*)book));
+		  kvp_frame_for_each_slot(pg_frame, pg_kvp_helper, book);	   
       }
+/*      if (0 != book->idata) 
+      {
+         book->inst.kvp_data = pgendKVPFetch (be, book->idata, book->inst.kvp_data);
+      }*/
    }
 
    LEAVE (" ");
Index: escape.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/escape.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/postgres/escape.c -Lsrc/backend/postgres/escape.c -u -r1.5 -r1.6
--- src/backend/postgres/escape.c
+++ src/backend/postgres/escape.c
@@ -34,10 +34,11 @@
 #include <glib.h>
 #include <string.h>
 
+#include "gnc-engine.h"
 #include "gnc-engine-util.h"
 #include "escape.h"
 
-static short module = MOD_BACKEND; 
+static QofLogModule log_module = GNC_MOD_BACKEND; 
 
 /* ================================================ */
 
Index: gncquery.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/gncquery.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lsrc/backend/postgres/gncquery.c -Lsrc/backend/postgres/gncquery.c -u -r1.35 -r1.36
--- src/backend/postgres/gncquery.c
+++ src/backend/postgres/gncquery.c
@@ -44,18 +44,18 @@
 #include "Account.h"
 #include "Transaction.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-
-#include "qofquery.h"
+/** \todo Code dependent on the private query headers 
+qofquery-p.h and qofquerycore-p.h may need to be modified.
+These files are temporarily exported for QOF 0.6.0 but
+cannot be considered "standard" or public parts of QOF. */
 #include "qofquery-p.h"
 #include "qofquerycore-p.h"
-#include "qofclass.h"
 
 #include "gncquery.h"
 #include "builder.h"
 #include "escape.h"
 
-static short module = MOD_BACKEND;
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 
 struct _gnc_query {
@@ -519,8 +519,8 @@
 
         case KVP_TYPE_NUMERIC:{
             gnc_numeric n = kvp_value_get_numeric(value);
-            return g_strdup_printf("(%lld::int8 * %s.num::int8)",
-                                   (long long int)n.denom, kvptable);
+            return g_strdup_printf("(%" G_GINT64_FORMAT "::int8 * %s.num::int8)",
+                                   n.denom, kvptable);
         }
 
         default:
@@ -542,14 +542,14 @@
 
     switch (value_t) {
         case KVP_TYPE_GINT64:
-            return g_strdup_printf("%lld",
-                                   (long long int)
+            return g_strdup_printf("%" G_GINT64_FORMAT,
                                    kvp_value_get_gint64(value));
 
         case KVP_TYPE_DOUBLE:
             return g_strdup_printf(SQL_DBL_FMT, kvp_value_get_double(value));
 
         case KVP_TYPE_GUID:{
+            /* THREAD-UNSAFE */
             const char *guid = guid_to_string(kvp_value_get_guid(value));
             char *s = g_strdup_printf("'%s'", guid);
             return s;
@@ -569,8 +569,8 @@
 
         case KVP_TYPE_NUMERIC:{
             gnc_numeric n = kvp_value_get_numeric(value);
-            return g_strdup_printf("(%lld::int8 * %s.denom::int8)",
-                                   (long long int)n.num, kvptable);
+            return g_strdup_printf("(%" G_GINT64_FORMAT "::int8 * %s.denom::int8)",
+                                   n.num, kvptable);
         }
 
         default:
Index: PostgresBackend.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/PostgresBackend.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/backend/postgres/PostgresBackend.h -Lsrc/backend/postgres/PostgresBackend.h -u -r1.11 -r1.12
--- src/backend/postgres/PostgresBackend.h
+++ src/backend/postgres/PostgresBackend.h
@@ -37,12 +37,13 @@
 #include <libpq-fe.h>
 
 #include "Group.h"
-#include "guid.h"
+#include "qof.h"
 #include "Transaction.h"
 
 #include "builder.h"
-#include "qofbackend-p.h"
-#include "qofbook.h"
+#include "qof.h"
+
+#define GNC_MOD_TXN    "gnucash-postgres-transaction"
 
 typedef struct _pgend PGBackend;
 
@@ -131,4 +132,6 @@
 void pgendDisable (PGBackend *be);
 void pgendEnable (PGBackend *be);
 
+void pgend_provider_init(void);
+
 #endif /* POSTGRES_BACKEND_H */
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/backend/postgres/Makefile.am -Lsrc/backend/postgres/Makefile.am -u -r1.20 -r1.21
--- src/backend/postgres/Makefile.am
+++ src/backend/postgres/Makefile.am
@@ -1,14 +1,15 @@
 SUBDIRS = . test
 
-pkglib_LTLIBRARIES = libgncmod-backend-postgres.la 
+lib_LTLIBRARIES = libgnc-backend-postgres.la 
 
-libgncmod_backend_postgres_la_LDFLAGS = -module 
+libgnc_backend_postgres_la_LDFLAGS = -module 
 
-libgncmod_backend_postgres_la_LIBADD  =  ${PGSQL_LIBS} -lpq  \
+libgnc_backend_postgres_la_LIBADD  =  ${PGSQL_LIBS} -lpq  \
   ${top_builddir}/src/engine/libgncmod-engine.la \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
-libgncmod_backend_postgres_la_SOURCES = \
+libgnc_backend_postgres_la_SOURCES = \
   PostgresBackend.c \
   account.c \
   book.c \
@@ -17,7 +18,6 @@
   escape.c \
   events.c \
   gncquery.c \
-  gncmod-backend-postgres.c \
   kvp-sql.c \
   price.c \
   txn.c \
@@ -26,7 +26,7 @@
   putil.c
 
 ## Distributed autogenerated and #included files
-EXTRA_libgncmod_backend_postgres_la_SOURCES = \
+EXTRA_libgnc_backend_postgres_la_SOURCES = \
   base-autogen.c \
   check-autogen.c \
   kvp-autogen.c \
@@ -96,8 +96,8 @@
 	-I.. -I${srcdir}/.. \
 	-I../.. -I${srcdir}/../.. \
 	-I../../engine -I${srcdir}/../../engine \
-	-I../../gnc-module -I${srcdir}/../../gnc-module \
 	${PGSQL_CFLAGS} \
+	${QOF_CFLAGS} \
 	${GLIB_CFLAGS}
 
 $(M4_SRC): table.m4
@@ -111,4 +111,3 @@
 .sql.c:
 	echo "\"-- DO NOT EDIT THIS FILE. IT IS AUTOGENERATED.\"" > $@
 	cat $< >> $@
-
--- src/backend/postgres/gncmod-backend-postgres.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*********************************************************************
- * gncmod-file-postgres.c
- * module definition/initialization for the postgres backend module
- * 
- * Copyright (c) 2001 Linux Developers Group, Inc. 
- *********************************************************************/
-
-#include <stdio.h>
-#include <glib.h>
-
-#include "qofbackend.h"
-#include "PostgresBackend.h"
-
-#include "gnc-backend-api.h"
-#include "gnc-module.h"
-#include "gnc-module-api.h"
-
-/* version of the gnc module system interface we require */
-int libgncmod_backend_postgres_LTX_gnc_module_system_interface = 0;
-
-/* module versioning uses libtool semantics. */
-int libgncmod_backend_postgres_LTX_gnc_module_current  = 0;
-int libgncmod_backend_postgres_LTX_gnc_module_revision = 0;
-int libgncmod_backend_postgres_LTX_gnc_module_age      = 0;
-
-static GNCModule engine;
-
-/* forward references */
-char *libgncmod_backend_postgres_LTX_gnc_module_path(void);
-char *libgncmod_backend_postgres_LTX_gnc_module_description(void);
-int libgncmod_backend_postgres_LTX_gnc_module_init(int refcount);
-int libgncmod_backend_postgres_LTX_gnc_module_end(int refcount);
-QofBackend * libgncmod_backend_postgres_LTX_gnc_backend_new(void);
-
-char *
-libgncmod_backend_postgres_LTX_gnc_module_path(void) 
-{
-  return g_strdup("gnucash/backend/postgres");
-}
-
-char * 
-libgncmod_backend_postgres_LTX_gnc_module_description(void) 
-{
-  return g_strdup("The Postgres backend for Gnucash");
-}
-
-int
-libgncmod_backend_postgres_LTX_gnc_module_init(int refcount) 
-{  
-  engine = gnc_module_load("gnucash/engine", 0);
-  if(!engine) return FALSE;
-
-  return TRUE;
-}
-
-int
-libgncmod_backend_postgres_LTX_gnc_module_end(int refcount) 
-{
-  int unload = TRUE;
-
-  if (engine)
-    unload = gnc_module_unload(engine);    
-
-  if (refcount == 0)
-    engine = NULL;
-
-  return unload;
-}
-
-
-/****************************************************************
- * gnc_backend_new 
- * this is the init function that must be defined by every dynamically
- * loadable backend.  the postgres backend doesn't follow backend
- * loader naming conventions yet so we wrap its initializer function
- * temporarily 
- ****************************************************************/
-
-QofBackend * 
-libgncmod_backend_postgres_LTX_gnc_backend_new(void) {
-  return pgendNew();
-}
Index: kvp-sql.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/kvp-sql.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/backend/postgres/kvp-sql.c -Lsrc/backend/postgres/kvp-sql.c -u -r1.15 -r1.16
--- src/backend/postgres/kvp-sql.c
+++ src/backend/postgres/kvp-sql.c
@@ -38,12 +38,13 @@
 #include <string.h>
 
 #include "escape.h"
+#include "gnc-engine.h"
 #include "gnc-engine-util.h"
 #include "kvp-sql.h"
 #include "PostgresBackend.h"
 #include "putil.h"
 
-static short module = MOD_KVP; 
+static QofLogModule log_module = QOF_MOD_KVP;
 
 /* =========================================================== */
 /* get a unique iguid index */
@@ -120,7 +121,7 @@
 ival_cb (PGBackend *be, PGresult *result, int j, gpointer data)
 {
   int ival = atoi (DB_GET_VAL ("ipath", 0));
-  return (gpointer) ival;
+  return GINT_TO_POINTER(ival);
 }
 
 
@@ -142,7 +143,7 @@
    p = stpcpy (p, "';");
 
    SEND_QUERY (be,be->buff, 0);
-   ival = (int) pgendGetResults (be, ival_cb, (gpointer) 0);
+   ival = GPOINTER_TO_INT(pgendGetResults (be, ival_cb, (gpointer) 0));
    if (ival) return ival;
 
    /* Else, this guid has never been stored before. 
@@ -211,7 +212,7 @@
    char *path_save;
 
    path_save = cb_data->path;
-   cb_data->path = g_strjoin ("/", path_save, key, 0);
+   cb_data->path = g_strjoin ("/", path_save, key, NULL);
 
    ipath = pgendGetPathCache (be, cb_data->path, cb_data->escape);
    cb_data->ipath = ipath;
@@ -224,9 +225,9 @@
          case KVP_TYPE_GINT64:
             {
                gint64 ival = kvp_value_get_gint64 (val);
-               PINFO ("path=%s type=gint64 val=%lld",
+               PINFO ("path=%s type=gint64 val=%" G_GINT64_FORMAT,
                       cb_data->path,
-                      (long long int) ival);
+                      ival);
 
                cb_data->stype = "int8";
                cb_data->u.ival = ival;
@@ -248,10 +249,10 @@
          case KVP_TYPE_NUMERIC:
             {
                gnc_numeric ival = kvp_value_get_numeric (val);
-               PINFO ("path=%s type=numeric val=%lld/%lld",
+               PINFO ("path=%s type=numeric val=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
                       cb_data->path,
-                      (long long int) ival.num,
-                      (long long int) ival.denom);
+                      ival.num,
+                      ival.denom);
 
                cb_data->stype = "frac";
                cb_data->u.numeric = ival;
Index: events.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/events.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/backend/postgres/events.c -Lsrc/backend/postgres/events.c -u -r1.19 -r1.20
--- src/backend/postgres/events.c
+++ src/backend/postgres/events.c
@@ -29,21 +29,14 @@
 #include <stdlib.h>  
 
 #include "events.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
-#include "gnc-event-p.h"
-#include "guid.h"
-#include "qofbackend.h"
-#include "qofbackend-p.h"
-#include "qofid.h"
-#include "qofid-p.h"
-
+#include "gnc-engine.h"
+#include "Transaction.h"
 #include "PostgresBackend.h"
 #include "account.h"
 #include "putil.h"
 #include "txn.h"
 
-static short module = MOD_EVENT; 
+static QofLogModule log_module = "gnucash-postgres-event";
 
 
 /* ============================================================= */
@@ -121,7 +114,7 @@
       } 
       else
       {
-         PERR ("unexpected notify %s", note->relname)
+         PERR ("unexpected notify %s", note->relname);
       }
 
       /* get the next one */
@@ -269,7 +262,9 @@
    {
       Event *ev = (Event *) node->data;
       QofIdType local_obj_type;
+      QofEntity *ent;
 
+      ent = NULL;
       /* lets see if the local cache has this item in it */
       local_obj_type = pgendGUIDType (be, &(ev->guid));
       if ((local_obj_type != GNC_ID_NONE) && 
@@ -299,6 +294,7 @@
                /* if the remote user created an account, mirror it here */
                acc = pgendCopyAccountToEngine (be, &(ev->guid));
                xaccGroupMarkSaved (xaccAccountGetRoot(acc));
+               ent = (QofEntity*)acc;
                break;
             }
             case GNC_EVENT_DESTROY: {
@@ -307,6 +303,7 @@
                xaccAccountBeginEdit (acc);
                xaccAccountDestroy (acc);
                xaccGroupMarkSaved (topgrp);
+               ent = (QofEntity*)acc;
                break;
             }
          }
@@ -323,19 +320,29 @@
             default:
                PERR ("transaction: cant' happen !!!!!!!");
                break;
-            case GNC_EVENT_CREATE:
+            case GNC_EVENT_CREATE: {
+               Transaction *trans;
                /* don't mirror transaction creations. If a register needs
                 * it, it will do a query. */
+               trans = pgendTransLookup (be, &(ev->guid));
+               ent = (QofEntity*)trans;
                PINFO ("create transaction");
                break;
-            case GNC_EVENT_MODIFY: 
+			}
+            case GNC_EVENT_MODIFY: {
+               Transaction *trans;
+               trans = pgendTransLookup (be, &(ev->guid));
                pgendCopyTransactionToEngine (be, &(ev->guid));
+               ent = (QofEntity*)trans;
                break;
+			}
             case GNC_EVENT_DESTROY: {
                Transaction *trans = pgendTransLookup (be, &(ev->guid));
                xaccTransBeginEdit (trans);
+               /* mark trans for freeing */
                xaccTransDestroy (trans);
                xaccTransCommitEdit (trans);
+               ent = (QofEntity*)trans;
                break;
             }
          }
@@ -368,7 +375,7 @@
          local_obj_type = pgendGUIDType (be, &(ev->guid));
          if (GNC_ID_NONE != local_obj_type)
          {
-            gnc_engine_generate_event (&(ev->guid), local_obj_type, GNC_EVENT_CREATE);
+              gnc_engine_gen_event(ent, GNC_EVENT_CREATE);
          }
       }
       else 
@@ -376,11 +383,11 @@
          local_obj_type = pgendGUIDType (be, &(ev->guid));
          if (GNC_ID_NONE != local_obj_type)
          {
-            gnc_engine_generate_event (&(ev->guid), local_obj_type, GNC_EVENT_MODIFY);
+              gnc_engine_gen_event(ent, GNC_EVENT_MODIFY);
          }
          else
          {
-            gnc_engine_generate_event (&(ev->guid), local_obj_type, GNC_EVENT_DESTROY);
+              gnc_engine_gen_event(ent, GNC_EVENT_DESTROY);
          }
       }
    
--- src/backend/postgres/test/test-load-module
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh
-exec guile -s "$0"
-!#
-
-(display "  testing postgres backend load ... ")
-(use-modules (gnucash gnc-module))
-(gnc:module-system-init)
-
-(if (gnc:module-load "gnucash/backend/postgres" 0)
-    (begin 
-      (display "ok\n")
-      (exit 0))
-    (begin 
-      (display "failed\n")
-      (exit -1)))
Index: test-db.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/test/test-db.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -Lsrc/backend/postgres/test/test-db.c -Lsrc/backend/postgres/test/test-db.c -u -r1.56 -r1.57
--- src/backend/postgres/test/test-db.c
+++ src/backend/postgres/test/test-db.c
@@ -1,5 +1,20 @@
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <glib.h>
-#include <libguile.h>
 #include <libpq-fe.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -7,21 +22,19 @@
 #include <unistd.h>
 
 #include "AccountP.h"
-#include "qofbackend.h"
+#include "qof.h"
 #include "PostgresBackend.h"
 #include "TransactionP.h"
 #include "TransLog.h"
-#include "qofbook.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-module.h"
-#include "qofsession-p.h"
 #include "gncquery.h"
-#include "qofquery.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 
-static short module = MOD_TEST;
+#define PG_LIB_NAME "libgnc-backend-postgres.la"
+#define PG_LIB_INIT "pgend_provider_init"
+
+static QofLogModule log_module = GNC_MOD_TEST;
 
 struct _dbinfo {
     char *host;
@@ -140,6 +153,7 @@
 load_db_file(QofSession * session, DbInfo *dbinfo, gboolean end_session)
 {
     QofBackendError io_err;
+    QofBook *book;
     PGBackend *be;
     char *filename;
 
@@ -148,8 +162,8 @@
     filename = db_file_url(dbinfo);
 
     qof_session_begin(session, filename, FALSE, FALSE);
-    
-    be = (PGBackend *)qof_session_get_backend(session);
+    book = qof_session_get_book(session);
+    be = (PGBackend *)qof_book_get_backend(book);
     dbinfo->conn = be->connection;
 
     io_err = qof_session_get_error(session);
@@ -485,16 +499,17 @@
 {
     const char *sql_query_string;
     PGresult *result;
+    QofBook *book;
     PGBackend *be;
     sqlQuery *sq;
     gboolean ok;
     QofQuery *qn = q;
 
     g_return_val_if_fail(session && q, FALSE);
+    book = qof_session_get_book(session);
+    be = (PGBackend *) qof_book_get_backend(book);
 
-    be = (PGBackend *) qof_session_get_backend(session);
-
-    if (gnc_should_log(module, GNC_LOG_DETAIL))
+    if (gnc_should_log(log_module, GNC_LOG_DETAIL))
         qof_query_print(qn);
 
     sq = sqlQuery_new();
@@ -1074,14 +1089,15 @@
 }
 #endif
 
-static void
-guile_main (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
     DbInfo *dbinfo;
     
-    GNCModule *mod;
-    gnc_module_system_init();
-    mod = gnc_module_load("gnucash/engine", 0);
+    qof_init();
+    do_test(
+	qof_load_backend_library (QOF_LIB_DIR, PG_LIB_NAME, PG_LIB_INIT),
+	" loading gnc-backend-postgres GModule failed");
 
     dbinfo = g_new0(DbInfo, 1);
     
@@ -1126,12 +1142,6 @@
     run_test(dbinfo);
 
     print_test_results();
-    exit(get_rv());
-}
 
-int
-main (int argc, char **argv)
-{
-    scm_boot_guile(argc, argv, guile_main, NULL);
     return 0;
 }
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/test/.cvsignore,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/backend/postgres/test/.cvsignore -Lsrc/backend/postgres/test/.cvsignore -u -r1.12 -r1.13
--- src/backend/postgres/test/.cvsignore
+++ src/backend/postgres/test/.cvsignore
@@ -6,4 +6,5 @@
 test-escape
 test_file_*
 test-period
+test-load-backend
 .libs
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/test/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/backend/postgres/test/Makefile.am -Lsrc/backend/postgres/test/Makefile.am -u -r1.28 -r1.29
--- src/backend/postgres/test/Makefile.am
+++ src/backend/postgres/test/Makefile.am
@@ -1,5 +1,5 @@
 TESTS = \
-  test-load-module \
+  test-load-backend \
   test-escape \
   run-tests.sh
 
@@ -17,6 +17,7 @@
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
 noinst_PROGRAMS = \
+  test-load-backend \
   test-db \
   test-escape \
   test-period
@@ -28,13 +29,12 @@
         ${top_builddir}/src/engine/libgw-engine.la \
         ${top_builddir}/src/engine/libgw-kvp.la \
         ${top_builddir}/src/engine/test-core/libgncmod-test-engine.la \
-	${top_builddir}/src/backend/postgres/libgncmod-backend-postgres.la \
-	${top_builddir}/src/backend/file/libgncmod-backend-file.la \
+	${top_builddir}/src/backend/postgres/libgnc-backend-postgres.la \
         -lltdl
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
-  -I${top_srcdir}/src/gnc-module \
+  ${QOF_CFLAGS} \
   -I${top_srcdir}/src/test-core \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/engine/test-core \
@@ -45,6 +45,5 @@
   ${GUILE_INCS} 
 
 EXTRA_DIST = \
-  test-load-module \
   db-control.sh \
   run-tests.sh
Index: test-period.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/postgres/test/test-period.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/backend/postgres/test/test-period.c -Lsrc/backend/postgres/test/test-period.c -u -r1.4 -r1.5
--- src/backend/postgres/test/test-period.c
+++ src/backend/postgres/test/test-period.c
@@ -1,29 +1,40 @@
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 /* 
  * Test file created by Linas Vepstas <linas at linas.org>
  * Minimal test to see if a book can be split into two periods
  * without crashing.  Book is written to the database.
  * December 2001
- * License: GPL
  */
 
 #include <ctype.h>
 #include <glib.h>
-#include <libguile.h>
 #include <time.h>
 
 #include "Account.h"
 #include "Group.h"
 #include "Period.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "gnc-engine-util.h"
-#include "gnc-module.h"
+#include "qof.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "Transaction.h"
 
-
+#define PG_LIB_NAME "libgnc-backend-postgres.la"
+#define PG_LIB_INIT "pgend_provider_init"
 
 static void
 run_test (void)
@@ -40,13 +51,9 @@
   Timespec tsfirst, tslast, tsmiddle;
   char * test_url;
   
-
-
-  if(!gnc_module_load("gnucash/engine", 0))
-  {
-    failure("couldn't load gnucash/engine");
-    exit(get_rv());
-  }
+  do_test( qof_load_backend_library (QOF_LIB_DIR, 
+			PG_LIB_NAME, PG_LIB_INIT),
+			" loading gnc-backend-postgres GModule failed");
 
   session = get_random_session ();
 
@@ -123,9 +130,8 @@
   io_err = qof_session_get_error (session);
   g_return_if_fail (io_err == ERR_BACKEND_NO_ERR);
 
-  // stdout is broken with guile for some reason
-  // gnc_set_logfile (stdout);
-  // gnc_set_log_level_global (GNC_LOG_INFO);
+  gnc_set_logfile (stdout);
+  gnc_set_log_level_global (GNC_LOG_INFO);
   closedbook = gnc_book_close_period (openbook, tsmiddle, 
                   NULL, "this is opening balance dude");
 
@@ -146,18 +152,13 @@
   success ("periods lightly tested and seem to work");
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
+  qof_init();
   run_test ();
 
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile(argc, argv, main_helper, NULL);
+  qof_close();
   return 0;
 }
Index: RpcUtils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/backend/rpc/RpcUtils.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/backend/rpc/RpcUtils.c -Lsrc/backend/rpc/RpcUtils.c -u -r1.5 -r1.6
--- src/backend/rpc/RpcUtils.c
+++ src/backend/rpc/RpcUtils.c
@@ -778,13 +778,15 @@
 void rpcend_load_gnccommodity (gnc_commodity_table *ct, gncCommodity *com)
 {
   gnc_commodity *gc;
+  QofBook * book = gnc_get_current_book ();
 
   if (!ct || !com)
     return;
 
   if ((gc = gnc_commodity_table_lookup (ct, com->namespace, com->mnemonic))
       == NULL) {
-    gc = gnc_commodity_new (com->fullname, com->namespace,
+    gc = gnc_commodity_new (book,
+			    com->fullname, com->namespace,
 			    com->mnemonic, com->exchange_code, com->fraction);
     gnc_commodity_table_insert (ct, gc);	
   }
Index: generate-gnc-script
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/generate-gnc-script,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/bin/generate-gnc-script -Lsrc/bin/generate-gnc-script -u -r1.3 -r1.4
--- src/bin/generate-gnc-script
+++ src/bin/generate-gnc-script
@@ -12,7 +12,7 @@
 PATH="${GNC_OVERRIDES_DIR}:\${PATH}"
 export PATH
 
-GUILE_WARN_DEPRECATED="detailed"
+GUILE_WARN_DEPRECATED="no"
 export GUILE_WARN_DEPRECATED
 
 exec "${TARGET_SCRIPT}" "\$@"
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/bin/.cvsignore -Lsrc/bin/.cvsignore -u -r1.4 -r1.5
--- src/bin/.cvsignore
+++ src/bin/.cvsignore
@@ -12,3 +12,4 @@
 gnucash-make-guids
 gnucash-run-script
 strsub
+update-gnucash-gconf
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/bin/Makefile.am -Lsrc/bin/Makefile.am -u -r1.9 -r1.10
--- src/bin/Makefile.am
+++ src/bin/Makefile.am
@@ -8,7 +8,7 @@
 # directories in their path can still invoke these commands via their
 # full path, say /some/dir/not/in/path/gnucash and still have the
 # right thing happen (i.e. they'll still get the right guile, and the
-# right scripts if the sub-exec anything from their scripts).  If you
+# right scripts if they sub-exec anything from their scripts).  If you
 # want to add another gnucash script, please add the name here (which
 # will cause the bindir wrapper to be created, and then put the actual
 # code in a script of the same name in ./overrides.  Oh, and don't
@@ -20,15 +20,26 @@
 # by these top-level "common" scripts.
 gnc_common_scripts = gnucash gnucash-env gnucash-run-script gnucash-make-guids
 
-bin_SCRIPTS = ${gnc_common_scripts}
+bin_SCRIPTS = ${gnc_common_scripts} update-gnucash-gconf
 
 # if you change gncoverridedir, make sure you change ./overrides/Makefile.am too.
 gncoverridesdir = ${GNC_LIBEXECDIR}/overrides
 
-EXTRA_DIST = .cvsignore generate-gnc-script
+EXTRA_DIST = .cvsignore generate-gnc-script update-gnucash-gconf.in
 
 ## Gnucash scripts -- real code is in overrides, these just get you there.
 ${gnc_common_scripts}: generate-gnc-script
 	${srcdir}/generate-gnc-script $@ "${gncoverridesdir}"
 
-CLEANFILES = ${gnc_common_scripts}
+CLEANFILES = ${gnc_common_scripts} update-gnucash-gconf
+
+## We borrow guile's convention and use @-...-@ as the substitution
+## brackets here, instead of the usual @... at .  This prevents autoconf
+## from substituting the values directly into the left-hand sides of
+## the sed substitutions.
+update-gnucash-gconf: update-gnucash-gconf.in ${top_builddir}/config.status
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+	    -e 's:@-GCONF_SCHEMA_FILE_DIR-@:${GCONF_SCHEMA_FILE_DIR}:g'
+	mv $@.tmp $@
+	chmod +x $@
Index: gnucash-valgrind
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/overrides/gnucash-valgrind,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/bin/overrides/gnucash-valgrind -Lsrc/bin/overrides/gnucash-valgrind -u -r1.3 -r1.4
--- src/bin/overrides/gnucash-valgrind
+++ src/bin/overrides/gnucash-valgrind
@@ -4,6 +4,8 @@
 # with the valgrind memory-allocation debugger.  This is a slightly
 # modified version of the overrides/gnucash shell script (and should
 # be kept in sync with that).
+# 
+# Other potentially useful options: --tool=memcheck --trace-children=yes
 #
 exec ./src/bin/overrides/gnucash-build-env valgrind -v \
         --suppressions=./src/valgrind-gnucash.supp  \
Index: test-version
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/test/test-version,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/bin/test/test-version -Lsrc/bin/test/test-version -u -r1.1 -r1.2
--- src/bin/test/test-version
+++ src/bin/test/test-version
@@ -1,3 +1,3 @@
 #!/bin/sh
 
-exec gnucash --version
+exec ../gnucash --version
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/.cvsignore -Lsrc/business/.cvsignore -u -r1.2 -r1.3
--- src/business/.cvsignore
+++ src/business/.cvsignore
@@ -1,2 +1,4 @@
 Makefile
 Makefile.in
+.DS_Store
+
Index: gncEmployee.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEmployee.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -Lsrc/business/business-core/gncEmployee.c -Lsrc/business/business-core/gncEmployee.c -u -r1.45 -r1.46
--- src/business/business-core/gncEmployee.c
+++ src/business/business-core/gncEmployee.c
@@ -31,26 +31,10 @@
 #include <glib.h>
 #include <string.h>
 
-#include "guid.h"
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-
 #include "Account.h"
 #include "messages.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-
 #include "gncAddressP.h"
-#include "gncBusiness.h"
 #include "gncEmployee.h"
 #include "gncEmployeeP.h"
 
@@ -71,16 +55,12 @@
   Account *        ccard_acc;
 };
 
-static short        module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME        GNC_ID_EMPLOYEE
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 G_INLINE_FUNC void mark_employee (GncEmployee *employee);
-G_INLINE_FUNC void
-mark_employee (GncEmployee *employee)
+void mark_employee (GncEmployee *employee)
 {
   employee->inst.dirty = TRUE;
   qof_collection_mark_dirty (employee->inst.entity.collection);
@@ -279,6 +259,20 @@
   gncEmployeeCommitEdit (employee);
 }
 
+void
+qofEmployeeSetAddr (GncEmployee *employee, QofEntity *addr_ent)
+{
+	GncAddress *addr;
+
+	if(!employee || !addr_ent) { return; }
+	addr = (GncAddress*)addr_ent;
+	if(addr == employee->addr) { return; }
+	if(employee->addr != NULL) { gncAddressDestroy(employee->addr); }
+	gncEmployeeBeginEdit(employee);
+	employee->addr = addr;
+	gncEmployeeCommitEdit(employee);
+}
+
 /* ============================================================== */
 /* Get Functions */
 const char * gncEmployeeGetID (GncEmployee *employee)
@@ -425,7 +419,8 @@
 	{ EMPLOYEE_WORKDAY, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEmployeeGetWorkday,
 		(QofSetterFunc)gncEmployeeSetWorkday },
 	{ EMPLOYEE_RATE, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEmployeeGetRate, (QofSetterFunc)gncEmployeeSetRate },
-    { EMPLOYEE_ADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncEmployeeGetAddr, NULL },
+    { EMPLOYEE_ADDR, GNC_ID_ADDRESS, (QofAccessFunc)gncEmployeeGetAddr, (QofSetterFunc)qofEmployeeSetAddr },
+    { EMPLOYEE_CC,  GNC_ID_ACCOUNT, (QofAccessFunc)gncEmployeeGetCCard, (QofSetterFunc)gncEmployeeSetCCard },
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEmployeeGetActive, (QofSetterFunc)gncEmployeeSetActive },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
Index: gncEntryP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEntryP.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/business/business-core/gncEntryP.h -Lsrc/business/business-core/gncEntryP.h -u -r1.5 -r1.6
--- src/business/business-core/gncEntryP.h
+++ src/business/business-core/gncEntryP.h
@@ -30,7 +30,6 @@
 #define GNC_ENTRYP_H_
 
 #include "gncEntry.h"
-#include "qofid-p.h"
 
 gboolean gncEntryRegister (void);
 void gncEntrySetGUID (GncEntry *entry, const GUID *guid);
Index: gncOwnerP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOwnerP.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/business/business-core/gncOwnerP.h -Lsrc/business/business-core/gncOwnerP.h -u -r1.3 -r1.4
--- src/business/business-core/gncOwnerP.h
+++ src/business/business-core/gncOwnerP.h
@@ -28,7 +28,6 @@
 #ifndef GNC_OWNERP_H_
 #define GNC_OWNERP_H_
 
-#include "qofbook.h"
 #include "gncOwner.h"
 
 gboolean gncOwnerRegister (void);
Index: gncEmployeeP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEmployeeP.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-core/gncEmployeeP.h -Lsrc/business/business-core/gncEmployeeP.h -u -r1.7 -r1.8
--- src/business/business-core/gncEmployeeP.h
+++ src/business/business-core/gncEmployeeP.h
@@ -30,7 +30,6 @@
 #define GNC_EMPLOYEEP_H_
 
 #include "gncEmployee.h"
-#include "qofid-p.h"
 
 gboolean gncEmployeeRegister (void);
 gint64 gncEmployeeNextID (QofBook *book);
Index: gncOrderP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOrderP.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-core/gncOrderP.h -Lsrc/business/business-core/gncOrderP.h -u -r1.7 -r1.8
--- src/business/business-core/gncOrderP.h
+++ src/business/business-core/gncOrderP.h
@@ -30,7 +30,6 @@
 #define GNC_ORDERP_H_
 
 #include "gncOrder.h"
-#include "qofid-p.h"
 
 gboolean gncOrderRegister (void);
 gint64 gncOrderNextID (QofBook *book);
Index: gncEmployee.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEmployee.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/business/business-core/gncEmployee.h -Lsrc/business/business-core/gncEmployee.h -u -r1.18 -r1.19
--- src/business/business-core/gncEmployee.h
+++ src/business/business-core/gncEmployee.h
@@ -33,9 +33,6 @@
 
 typedef struct _gncEmployee GncEmployee;
 
-#include "qofbook.h"
-#include "qofid.h"
-
 #include "gncAddress.h"
 #include "Account.h"
 
@@ -43,8 +40,8 @@
 #define GNC_IS_EMPLOYEE(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_EMPLOYEE))
 #define GNC_EMPLOYEE(obj)     (QOF_CHECK_CAST((obj), GNC_ID_EMPLOYEE, GncEmployee))
 
-/** @name Create/Destroy Functions */
-/** @{ */
+/** @name Create/Destroy Functions 
+ @{ */
 GncEmployee *gncEmployeeCreate (QofBook *book);
 void gncEmployeeDestroy (GncEmployee *employee);
 void gncEmployeeBeginEdit (GncEmployee *employee);
@@ -52,8 +49,8 @@
 int gncEmployeeCompare (GncEmployee *a, GncEmployee *b);
 /** @} */
 
-/** @name Set Functions */
-/** @{ */
+/** @name Set Functions 
+ @{ */
 void gncEmployeeSetID (GncEmployee *employee, const char *id);
 void gncEmployeeSetUsername (GncEmployee *employee, const char *username);
 void gncEmployeeSetLanguage (GncEmployee *employee, const char *language);
@@ -63,10 +60,12 @@
 void gncEmployeeSetCurrency (GncEmployee *employee, gnc_commodity * currency);
 void gncEmployeeSetActive (GncEmployee *employee, gboolean active);
 void gncEmployeeSetCCard (GncEmployee *employee, Account* ccard_acc);
+void qofEmployeeSetAddr (GncEmployee *employee, QofEntity *addr_ent);
+
 /** @} */
 
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 QofBook * gncEmployeeGetBook (GncEmployee *employee);
 const char * gncEmployeeGetID (GncEmployee *employee);
 const char * gncEmployeeGetUsername (GncEmployee *employee);
@@ -99,9 +98,11 @@
 #define EMPLOYEE_ACL		"acl"
 #define EMPLOYEE_WORKDAY	"workday"
 #define EMPLOYEE_RATE		"rate"
+#define EMPLOYEE_CC    "credit_card_account"
 
 /** deprecated routines */
 #define gncEmployeeGetGUID(E) qof_entity_get_guid(QOF_ENTITY(E))
+#define gncEmployeeGetBook(E) qof_instance_get_book(QOF_INSTANCE(E))
 #define gncEmployeeRetGUID(E) (E ? *(qof_entity_get_guid(QOF_ENTITY(E))) : *(guid_null()))
 #define gncEmployeeLookupDirect(G,B) gncEmployeeLookup((B),&(G))
 
Index: gncVendor.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncVendor.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/business/business-core/gncVendor.h -Lsrc/business/business-core/gncVendor.h -u -r1.21 -r1.22
--- src/business/business-core/gncVendor.h
+++ src/business/business-core/gncVendor.h
@@ -37,9 +37,6 @@
 #include "gncBillTerm.h"
 #include "gncTaxTable.h"
 #include "gncJob.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
 
 #define GNC_ID_VENDOR       "gncVendor"
 #define GNC_IS_VENDOR(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_VENDOR))
@@ -50,7 +47,9 @@
 GncVendor *gncVendorCreate (QofBook *book);
 void gncVendorDestroy (GncVendor *vendor);
 
-/* Set Functions */
+/** @name Set Functions
+ @{
+*/
 
 void gncVendorSetID (GncVendor *vendor, const char *id);
 void gncVendorSetName (GncVendor *vendor, const char *name);
@@ -59,17 +58,20 @@
 void gncVendorSetTaxIncluded (GncVendor *vendor, GncTaxIncluded taxincl);
 void gncVendorSetCurrency (GncVendor *vendor, gnc_commodity *currency);
 void gncVendorSetActive (GncVendor *vendor, gboolean active);
-
 void gncVendorSetTaxTableOverride (GncVendor *vendor, gboolean override);
 void gncVendorSetTaxTable (GncVendor *vendor, GncTaxTable *table);
 
+/** @} */
+
 void gncVendorAddJob (GncVendor *vendor, GncJob *job);
 void gncVendorRemoveJob (GncVendor *vendor, GncJob *job);
 
 void gncVendorBeginEdit (GncVendor *vendor);
 void gncVendorCommitEdit (GncVendor *vendor);
 
-/* Get Functions */
+/** @name Get Functions
+@{
+*/
 
 const char * gncVendorGetID (GncVendor *vendor);
 const char * gncVendorGetName (GncVendor *vendor);
@@ -83,6 +85,7 @@
 gboolean gncVendorGetTaxTableOverride (GncVendor *vendor);
 GncTaxTable* gncVendorGetTaxTable (GncVendor *vendor);
 
+/** @} */
 /** XXX should be renamed to RetJobList to be consistent with
  * other usage, since caller must free the copied list 
  */
@@ -102,6 +105,12 @@
 #define VENDOR_ID	"id"
 #define VENDOR_NAME	"name"
 #define VENDOR_ADDR	"addr"
+#define VENDOR_NOTES "vendor_notes"
+#define VENDOR_TERMS "vendor_terms"
+#define VENDOR_TAX_INC "vendor_tax_included"
+#define VENDOR_ACTIVE "vendor_is_active"
+#define VENDOR_TAX_OVERRIDE "override_tax_table"
+#define VENDOR_TAX_TABLE "vendor_tax_table"
 
 /** deprecated functions */
 #define gncVendorGetBook(X) qof_instance_get_book (QOF_INSTANCE(X))
Index: gncOrder.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOrder.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/business/business-core/gncOrder.h -Lsrc/business/business-core/gncOrder.h -u -r1.20 -r1.21
--- src/business/business-core/gncOrder.h
+++ src/business/business-core/gncOrder.h
@@ -38,9 +38,7 @@
 
 #include "gncEntry.h"
 #include "gncOwner.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
+#include "qof.h"
 
 #define GNC_ID_ORDER "gncOrder"
 #define GNC_IS_ORDER(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_ORDER))
Index: gncAddress.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncAddress.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/business/business-core/gncAddress.h -Lsrc/business/business-core/gncAddress.h -u -r1.12 -r1.13
--- src/business/business-core/gncAddress.h
+++ src/business/business-core/gncAddress.h
@@ -22,50 +22,74 @@
 /** @addtogroup Business
     @{ */
 /** @addtogroup Address
+
+An address belongs to another object, determined by the ::GncOwner.
+It is the owner that assigns a name and identifier to the address.
+In effect, an address is just a building - to make it useful to
+GnuCash, it needs to be tied to a person. After all, you cannot
+invoice a building, you invoice a person working / living in the
+building.
+
+QOF needs to handle all objects generically and to tie the address
+to an owner, QOF must be able to find each - as entities.
+
+This allows QOF to follow the hierarchy of objects without having
+to call any application-specific routines.
+
+To achieve this, new GncAddress routines have been added. An address
+is now created with a NULL parent and the parent set explicitly using
+the QOF object declaration. Whilst this adds functionality, it is
+important that a valid ::GncOwner entity is always set as a parent.
+This is an API issue - QOF will always set the parent provided that
+a suitable entity is passed to the qofAddressSetOwner routine. It is
+up to you to pass a suitable entity.
+
     @{ */
 /** @file gncAddress.h
     @brief an Address object
     @author Copyright (C) 2001 Derek Atkins <warlord at MIT.EDU>
+    @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef GNC_ADDRESS_H_
 #define GNC_ADDRESS_H_
 
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofobject.h"
-#include "qofinstance.h"
-#include "qofid-p.h"
+#include "qof.h"
+#ifdef GNUCASH_MAJOR_VERSION
+#include "gncBusiness.h"
+#endif
 
 #define GNC_ADDRESS_MODULE_NAME        "gncAddress"
-
+#define GNC_ID_ADDRESS GNC_ADDRESS_MODULE_NAME
 /** \struct GncAddress
 
- at param	QofBook *	book;
- at param	QofEntity * parent;
- at param	gboolean	dirty;
- at param	char *	name;
- at param	char *	addr1;
- at param	char *	addr2;
- at param	char *	addr3;
- at param	char *	addr4;
- at param	char *	phone;
- at param	char *	fax;
- at param	char *	email;
+ at param  QofInstance The address instance.
+ at param	QofBook*	  Copy of the book pointer.
+ at param	QofEntity* parent entity.
+ at param	gboolean	dirty flag
+ at param	char*	name of addressee
+ at param	char*	first line of address
+ at param	char*	second line of address
+ at param	char*	third line of address
+ at param	char*	fourth line of address
+ at param	char*	phone number
+ at param	char*	fax number
+ at param	char*	email address
 */
 typedef struct _gncAddress GncAddress;
 
-/** @name Create/Destroy functions */
-/** @{ */
+/** @name Create/Destroy functions 
+ @{ */
 /** create a new address */
 GncAddress * gncAddressCreate (QofBook *book, QofEntity *parent);
+
 /** destroy an address */
 void gncAddressDestroy (GncAddress *addr);
 
 /** @} */
 
-/** @name Set functions */
-/** @{ */
+/** @name Set functions 
+ @{ */
 
 void gncAddressSetName (GncAddress *addr, const char *name);
 void gncAddressSetAddr1 (GncAddress *addr, const char *addr1);
@@ -78,8 +102,8 @@
 void gncAddressClearDirty (GncAddress *address);
 /** @} */
 
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 
 const char * gncAddressGetName (const GncAddress *addr);
 const char * gncAddressGetAddr1 (const GncAddress *addr);
@@ -108,6 +132,7 @@
 #define ADDRESS_PHONE   "phone"
 #define ADDRESS_FAX     "fax"
 #define ADDRESS_EMAIL   "email"
+#define ADDRESS_OWNER   "owner"
 
 #endif /* GNC_ADDRESS_H_ */
 /** @} */
Index: gncInvoice.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.h,v
retrieving revision 1.42
retrieving revision 1.43
diff -Lsrc/business/business-core/gncInvoice.h -Lsrc/business/business-core/gncInvoice.h -u -r1.42 -r1.43
--- src/business/business-core/gncInvoice.h
+++ src/business/business-core/gncInvoice.h
@@ -22,10 +22,15 @@
 /** @addtogroup Business
     @{ */
 /** @addtogroup Invoice
+
+An invoice holds a list of entries, a pointer to the customer, 
+and the job, the dates entered and posted, as well as the account, 
+transaction and lot for the posted invoice.
     @{ */
 /** @file gncInvoice.h
     @brief  Business Invoice Interface 
     @author Copyright (C) 2001 Derek Atkins <warlord at MIT.EDU>
+    @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef GNC_INVOICE_H_
@@ -39,21 +44,18 @@
 #include "gncOwner.h"
 #include "gnc-lot.h"
 
-#include "qofid.h"
-#include "qofinstance.h"
-
 #define GNC_ID_INVOICE    "gncInvoice"
 #define GNC_IS_INVOICE(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_INVOICE))
 #define GNC_INVOICE(obj)     (QOF_CHECK_CAST((obj), GNC_ID_INVOICE, GncInvoice))
 
-/** @name Create/Destroy Functions */
-/** @{ */
+/** @name Create/Destroy Functions 
+ @{ */
 GncInvoice *gncInvoiceCreate (QofBook *book);
 void gncInvoiceDestroy (GncInvoice *invoice);
 /** @} */
 
-/** @name Set Functions */
-/** @{ */
+/** @name Set Functions 
+ @{ */
 void gncInvoiceSetID (GncInvoice *invoice, const char *id);
 void gncInvoiceSetOwner (GncInvoice *invoice, GncOwner *owner);
 void gncInvoiceSetDateOpened (GncInvoice *invoice, Timespec date);
@@ -74,8 +76,8 @@
 void gncBillAddEntry (GncInvoice *bill, GncEntry *entry);
 void gncBillRemoveEntry (GncInvoice *bill, GncEntry *entry);
 
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 const char * gncInvoiceGetID (GncInvoice *invoice);
 GncOwner * gncInvoiceGetOwner (GncInvoice *invoice);
 Timespec gncInvoiceGetDateOpened (GncInvoice *invoice);
@@ -176,6 +178,8 @@
 #define INVOICE_POST_LOT	"posted_lot"
 #define INVOICE_TYPE	"type"
 #define INVOICE_BILLTO	"bill-to"
+#define INVOICE_ENTRIES     "list_of_entries"
+#define INVOICE_JOB         "invoice_job"
 
 #define INVOICE_FROM_LOT	"invoice-from-lot"
 #define INVOICE_FROM_TXN	"invoice-from-txn"
Index: gncJob.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncJob.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/business/business-core/gncJob.h -Lsrc/business/business-core/gncJob.h -u -r1.16 -r1.17
--- src/business/business-core/gncJob.h
+++ src/business/business-core/gncJob.h
@@ -33,8 +33,6 @@
 
 typedef struct _gncJob GncJob;
 
-#include "qofid.h"
-#include "qofinstance.h"
 #include "gncAddress.h"
 #include "gncOwner.h"
 
@@ -47,7 +45,9 @@
 GncJob *gncJobCreate (QofBook *book);
 void gncJobDestroy (GncJob *job);
 
-/* Set Functions */
+/** \name Set Functions
+@{
+*/
 
 void gncJobSetID (GncJob *job, const char *id);
 void gncJobSetName (GncJob *job, const char *jobname);
@@ -55,15 +55,20 @@
 void gncJobSetOwner (GncJob *job, GncOwner *owner);
 void gncJobSetActive (GncJob *job, gboolean active);
 
+/** @} */
 void gncJobBeginEdit (GncJob *job);
 void gncJobCommitEdit (GncJob *job);
 
-/* Get Functions */
+/** \name Get Functions
+@{
+*/
 
 const char * gncJobGetID (GncJob *job);
 const char * gncJobGetName (GncJob *job);
 const char * gncJobGetReference (GncJob *job);
 GncOwner * gncJobGetOwner (GncJob *job);
+
+/** @} */
 gboolean gncJobGetActive (GncJob *job);
 gboolean gncJobIsDirty (GncJob *job);
 
@@ -84,6 +89,7 @@
 #define JOB_NAME	"name"
 #define JOB_REFERENCE	"reference"
 #define JOB_OWNER	"owner"
+#define Q_JOB_OWNER "owner_collection"
 #define JOB_ACTIVE	"active"
 
 /** deprecated functions */
Index: gncVendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncVendor.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lsrc/business/business-core/gncVendor.c -Lsrc/business/business-core/gncVendor.c -u -r1.50 -r1.51
--- src/business/business-core/gncVendor.c
+++ src/business/business-core/gncVendor.c
@@ -31,26 +31,11 @@
 #include <glib.h>
 #include <string.h>
 
-#include "guid.h"
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-
 #include "messages.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-
 #include "gncAddressP.h"
 #include "gncBillTermP.h"
-#include "gncBusiness.h"
+#include "gncInvoice.h"
 #include "gncJobP.h"
 #include "gncTaxTableP.h"
 #include "gncVendor.h"
@@ -73,19 +58,15 @@
   GList *         jobs;
 };
 
-static short        module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME        GNC_ID_VENDOR
 
 /* ============================================================ */
 /* Misc inline funcs */
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 G_INLINE_FUNC void mark_vendor (GncVendor *vendor);
-G_INLINE_FUNC void
-mark_vendor (GncVendor *vendor)
+void mark_vendor (GncVendor *vendor)
 {
   vendor->inst.dirty = TRUE;
   qof_collection_mark_dirty (vendor->inst.entity.collection);
@@ -313,6 +294,31 @@
   gncVendorCommitEdit (vendor);
 }
 
+static void
+qofVendorSetAddr (GncVendor *vendor, QofEntity *addr_ent)
+{
+	GncAddress *addr;
+
+	if(!vendor || !addr_ent) { return; }
+	addr = (GncAddress*)addr_ent;
+	if(addr == vendor->addr) { return; }
+	if(vendor->addr != NULL) { gncAddressDestroy(vendor->addr); }
+	gncVendorBeginEdit(vendor);
+	vendor->addr = addr;
+	gncVendorCommitEdit(vendor);
+}
+
+static void
+qofVendorSetTaxIncluded(GncVendor *vendor, const char* type_string)
+{
+	GncTaxIncluded inc;
+
+	if(!gncTaxIncludedStringToType(type_string, &inc)) { return; }
+	gncVendorBeginEdit(vendor);
+	vendor->taxincluded = inc;
+	gncVendorCommitEdit(vendor);
+}
+
 /* ============================================================== */
 /* Get Functions */
 
@@ -376,6 +382,12 @@
   return vendor->taxtable;
 }
 
+static const char*
+qofVendorGetTaxIncluded(GncVendor *vendor)
+{
+	return gncTaxIncludedTypeToString(vendor->taxincluded);
+}
+
 /* Note that JobList changes do not affect the "dirtiness" of the vendor */
 void gncVendorAddJob (GncVendor *vendor, GncJob *job)
 {
@@ -501,13 +513,24 @@
   static QofParam params[] = {
     { VENDOR_ID, QOF_TYPE_STRING, (QofAccessFunc)gncVendorGetID, (QofSetterFunc)gncVendorSetID },
     { VENDOR_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncVendorGetName, (QofSetterFunc)gncVendorSetName },
-    { VENDOR_ADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncVendorGetAddr, NULL },
+    { VENDOR_ADDR,    GNC_ID_ADDRESS, (QofAccessFunc)gncVendorGetAddr, (QofSetterFunc)qofVendorSetAddr },
+    { VENDOR_NOTES,   QOF_TYPE_STRING, (QofAccessFunc)gncVendorGetNotes, (QofSetterFunc)gncVendorSetNotes },
+    { VENDOR_TERMS,   GNC_ID_BILLTERM, (QofAccessFunc)gncVendorGetTerms, (QofSetterFunc)gncVendorSetTerms },
+    { VENDOR_TAX_OVERRIDE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncVendorGetTaxTableOverride,
+		(QofSetterFunc)gncVendorSetTaxTableOverride },
+    { VENDOR_TAX_TABLE, GNC_ID_TAXTABLE, (QofAccessFunc)gncVendorGetTaxTable,
+		(QofSetterFunc)gncVendorSetTaxTable },
+    { VENDOR_TAX_INC, QOF_TYPE_STRING, (QofAccessFunc)qofVendorGetTaxIncluded, 
+		(QofSetterFunc)qofVendorSetTaxIncluded},
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncVendorGetActive, NULL },
     { NULL },
   };
 
+  if(!qof_choice_add_class(GNC_ID_INVOICE, GNC_ID_VENDOR, INVOICE_OWNER)) { return FALSE; }
+  if(!qof_choice_add_class(GNC_ID_JOB, GNC_ID_VENDOR, JOB_OWNER)) { return FALSE; }
+
   qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncVendorCompare, params);
 
   return qof_object_register (&gncVendorDesc);
Index: gncInvoiceP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoiceP.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/business/business-core/gncInvoiceP.h -Lsrc/business/business-core/gncInvoiceP.h -u -r1.10 -r1.11
--- src/business/business-core/gncInvoiceP.h
+++ src/business/business-core/gncInvoiceP.h
@@ -32,7 +32,6 @@
 #include "Account.h"
 #include "Transaction.h"
 #include "gnc-lot.h"
-#include "qofid-p.h"
 
 gboolean gncInvoiceRegister (void);
 gint64 gncInvoiceNextID (QofBook *book);
Index: gncBillTermP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTermP.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/business-core/gncBillTermP.h -Lsrc/business/business-core/gncBillTermP.h -u -r1.4 -r1.5
--- src/business/business-core/gncBillTermP.h
+++ src/business/business-core/gncBillTermP.h
@@ -29,7 +29,6 @@
 #ifndef GNC_BILLTERMP_H_
 #define GNC_BILLTERMP_H_
 
-#include "qofid-p.h"
 #include "gncBillTerm.h"
 
 gboolean gncBillTermRegister (void);
Index: gncEntry.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEntry.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -Lsrc/business/business-core/gncEntry.c -Lsrc/business/business-core/gncEntry.c -u -r1.58 -r1.59
--- src/business/business-core/gncEntry.c
+++ src/business/business-core/gncEntry.c
@@ -31,22 +31,7 @@
 
 #include "messages.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-#include "gnc-numeric.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
 
-#include "gncBusiness.h"
 #include "gncEntry.h"
 #include "gncEntryP.h"
 #include "gncInvoice.h"
@@ -112,7 +97,7 @@
   Timespec	b_taxtable_modtime;
 };
 
-static short	module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 /* You must edit the functions in this block in tandem.  KEEP THEM IN
    SYNC! */
@@ -171,9 +156,6 @@
 
 #define _GNC_MOD_NAME	GNC_ID_ENTRY
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
@@ -185,8 +167,7 @@
 	}
 
 G_INLINE_FUNC void mark_entry (GncEntry *entry);
-G_INLINE_FUNC void
-mark_entry (GncEntry *entry)
+void mark_entry (GncEntry *entry)
 {
   entry->inst.dirty = TRUE;
   qof_collection_mark_dirty (entry->inst.entity.collection);
@@ -434,6 +415,35 @@
   gncEntryCommitEdit (entry);
 }
 
+void qofEntrySetInvDiscType (GncEntry *entry, const char *type_string)
+{
+	GncAmountType type;
+
+	if (!entry) return;
+	gncAmountStringToType(type_string, &type);
+	if (entry->i_disc_type == type) return;
+	gncEntryBeginEdit (entry);
+	entry->i_disc_type = type;
+	entry->values_dirty = TRUE;
+	mark_entry (entry);
+	gncEntryCommitEdit (entry);
+
+}
+
+void qofEntrySetInvDiscHow  (GncEntry *entry, const char *type)
+{
+	GncDiscountHow how;
+
+	if (!entry) return;
+	gncEntryBeginEdit (entry);
+	gncEntryDiscountStringToHow(type, &how);
+	if (entry->i_disc_how == how) return;
+	entry->i_disc_how = how;
+	entry->values_dirty = TRUE;
+	mark_entry (entry);
+	gncEntryCommitEdit (entry);
+}
+
 /* Vendor Bills */
 
 void gncEntrySetBillAccount (GncEntry *entry, Account *acc)
@@ -685,6 +695,24 @@
   return entry->i_disc_how;
 }
 
+char* qofEntryGetInvDiscType (GncEntry *entry)
+{
+	char *type_string;
+
+	if (!entry) return 0;
+	type_string = g_strdup(gncAmountTypeToString(entry->i_disc_type));
+	return type_string;
+}
+
+char* qofEntryGetInvDiscHow (GncEntry *entry)
+{
+	char *type_string;
+
+	if (!entry) return 0;
+	type_string = g_strdup(gncEntryDiscountHowToString(entry->i_disc_how));
+	return type_string;
+}
+
 gboolean gncEntryGetInvTaxable (GncEntry *entry)
 {
   if (!entry) return FALSE;
@@ -1191,7 +1219,21 @@
     { ENTRY_IPRICE, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEntryGetInvPrice, (QofSetterFunc)gncEntrySetInvPrice },
     { ENTRY_BPRICE, QOF_TYPE_NUMERIC, (QofAccessFunc)gncEntryGetBillPrice, (QofSetterFunc)gncEntrySetBillPrice },
     { ENTRY_INVOICE, GNC_ID_INVOICE, (QofAccessFunc)gncEntryGetInvoice, NULL },
+    { ENTRY_IACCT, GNC_ID_ACCOUNT,  (QofAccessFunc)gncEntryGetInvAccount,  (QofSetterFunc)gncEntrySetInvAccount  },
+    { ENTRY_BACCT, GNC_ID_ACCOUNT,  (QofAccessFunc)gncEntryGetBillAccount, (QofSetterFunc)gncEntrySetBillAccount },
     { ENTRY_BILL, GNC_ID_INVOICE, (QofAccessFunc)gncEntryGetBill, NULL },
+    { ENTRY_INV_DISC_TYPE, QOF_TYPE_STRING, (QofAccessFunc)qofEntryGetInvDiscType,
+       (QofSetterFunc)qofEntrySetInvDiscType },
+    { ENTRY_INV_DISC_HOW, QOF_TYPE_STRING, (QofAccessFunc)qofEntryGetInvDiscHow,
+       (QofSetterFunc)qofEntrySetInvDiscHow },
+    { ENTRY_INV_TAXABLE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEntryGetInvTaxable,
+       (QofSetterFunc)gncEntrySetInvTaxable },
+    { ENTRY_INV_TAX_INC, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEntryGetInvTaxIncluded,
+       (QofSetterFunc)gncEntrySetInvTaxIncluded },
+    { ENTRY_BILL_TAXABLE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEntryGetInvTaxable,
+       (QofSetterFunc)gncEntrySetInvTaxable },
+    { ENTRY_BILL_TAX_INC, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEntryGetBillTaxIncluded,
+       (QofSetterFunc)gncEntrySetBillTaxIncluded },
     { ENTRY_BILLABLE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncEntryGetBillable, (QofSetterFunc)gncEntrySetBillable },
     { ENTRY_BILLTO, GNC_ID_OWNER, (QofAccessFunc)gncEntryGetBillTo, (QofSetterFunc)gncEntrySetBillTo },
     { ENTRY_ORDER, GNC_ID_ORDER, (QofAccessFunc)gncEntryGetOrder, NULL },
Index: gncTaxTable.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lsrc/business/business-core/gncTaxTable.c -Lsrc/business/business-core/gncTaxTable.c -u -r1.40 -r1.41
--- src/business/business-core/gncTaxTable.c
+++ src/business/business-core/gncTaxTable.c
@@ -31,25 +31,8 @@
 #include <glib.h>
 
 #include "messages.h"
-#include "gnc-numeric.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-
-#include "gncBusiness.h"
 #include "gncTaxTableP.h"
 
-
 struct _gncTaxTable 
 {
   QofInstance     inst;
@@ -81,7 +64,7 @@
 
 static GncTaxTableEntry * CloneTaxEntry (GncTaxTableEntry*, QofBook *);
 
-static short        module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 /* =============================================================== */
 /* You must edit the functions in this block in tandem.  KEEP THEM IN
@@ -148,9 +131,6 @@
 
 #define _GNC_MOD_NAME        GNC_ID_TAXTABLE
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 #define SET_STR(obj, member, str) { \
         char * tmp; \
         \
Index: gncAddressP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncAddressP.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-core/gncAddressP.h -Lsrc/business/business-core/gncAddressP.h -u -r1.2 -r1.3
--- src/business/business-core/gncAddressP.h
+++ src/business/business-core/gncAddressP.h
@@ -29,7 +29,6 @@
 #define GNC_ADDRESSP_H_
 
 #include "gncAddress.h"
-#include "qofid.h"
 
 gboolean gncAddressRegister (void);
 
Index: gncBillTerm.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTerm.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/business/business-core/gncBillTerm.h -Lsrc/business/business-core/gncBillTerm.h -u -r1.14 -r1.15
--- src/business/business-core/gncBillTerm.h
+++ src/business/business-core/gncBillTerm.h
@@ -33,19 +33,16 @@
 
 typedef struct _gncBillTerm GncBillTerm;
 
-#include "gnc-date.h"
-#include "gnc-numeric.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
+#include "qof.h"
+#ifdef GNUCASH_MAJOR_VERSION
 #include "gncBusiness.h"
-
+#endif
 #define GNC_ID_BILLTERM       "gncBillTerm"
 #define GNC_IS_BILLTERM(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_BILLTERM))
 #define GNC_BILLTERM(obj)     (QOF_CHECK_CAST((obj), GNC_ID_BILLTERM, GncBillTerm))
 
-/** @name BillTerm parameter names */
-/** @{ */
+/** @name BillTerm parameter names
+ @{ */
 #define GNC_BILLTERM_NAME 		"name"
 #define GNC_BILLTERM_DESC 		"description"
 #define GNC_BILLTERM_DUEDAYS 	"number of days due"
@@ -61,13 +58,19 @@
  * You can interpret it as a VALUE or a PERCENT.
  * ??? huh?
  */
-typedef enum {
+#define ENUM_TERMS_TYPE(_)  \
+ _(GNC_TERM_TYPE_DAYS,) \
+ _(GNC_TERM_TYPE_PROXIMO,)
+
+DEFINE_ENUM(GncBillTermType, ENUM_TERMS_TYPE)
+
+/*typedef enum {
   GNC_TERM_TYPE_DAYS = 1,
   GNC_TERM_TYPE_PROXIMO,
 } GncBillTermType;
-
-/** @name Create/Destroy Functions */
-/** @{ */
+*/
+/** @name Create/Destroy Functions 
+ @{ */
 GncBillTerm * gncBillTermCreate (QofBook *book);
 void gncBillTermDestroy (GncBillTerm *term);
 void gncBillTermIncRef (GncBillTerm *term);
@@ -78,7 +81,9 @@
 void gncBillTermCommitEdit (GncBillTerm *term);
 /** @} */
 
-/** @name Set Functions */
+/** @name Set Functions 
+@{
+*/
 void gncBillTermSetName (GncBillTerm *term, const char *name);
 void gncBillTermSetDescription (GncBillTerm *term, const char *name);
 void gncBillTermSetType (GncBillTerm *term, GncBillTermType type);
@@ -89,8 +94,8 @@
 
 /** @} */
 
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 /** Return a pointer to the instance gncBillTerm that is identified
  *  by the guid, and is residing in the book. Returns NULL if the 
  *  instance can't be found.
Index: gncCustomer.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/business/business-core/gncCustomer.h -Lsrc/business/business-core/gncCustomer.h -u -r1.23 -r1.24
--- src/business/business-core/gncCustomer.h
+++ src/business/business-core/gncCustomer.h
@@ -56,31 +56,25 @@
 */
 typedef struct _gncCustomer GncCustomer;
 
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
 #include "gncAddress.h"
 #include "gncBillTerm.h"
 #include "gncTaxTable.h"
 #include "gncJob.h"
 
-#include "gnc-numeric.h"
-#include "kvp_frame.h"
-
 #define GNC_ID_CUSTOMER       "gncCustomer"
 #define GNC_IS_CUSTOMER(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_CUSTOMER))
 #define GNC_CUSTOMER(obj)     (QOF_CHECK_CAST((obj), GNC_ID_CUSTOMER, GncCustomer))
 
-/** @name Create/Destroy Functions */
-/** @{ */
+/** @name Create/Destroy Functions 
+ @{ */
 GncCustomer *gncCustomerCreate (QofBook *book);
 void gncCustomerDestroy (GncCustomer *customer);
 void gncCustomerBeginEdit (GncCustomer *customer);
 void gncCustomerCommitEdit (GncCustomer *customer);
 /** @} */
 
-/** @name Set Functions */
-/** @{ */
+/** @name Set Functions 
+ @{ */
 
 void gncCustomerSetID (GncCustomer *customer, const char *id);
 void gncCustomerSetName (GncCustomer *customer, const char *name);
@@ -100,8 +94,8 @@
 
 /** @} */
 
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 /** Return a pointer to the instance gncCustomer that is identified
  *  by the guid, and is residing in the book. Returns NULL if the 
  *  instance can't be found.
@@ -130,8 +124,6 @@
 GList * gncCustomerGetJoblist (GncCustomer *customer, gboolean show_all);
 /** @} */
 
-
-
 gboolean gncCustomerIsDirty (GncCustomer *customer);
 int gncCustomerCompare (GncCustomer *a, GncCustomer *b);
 
@@ -143,6 +135,11 @@
 #define CUSTOMER_DISCOUNT 	"amount of discount"
 #define CUSTOMER_CREDIT 	"amount of credit"
 #define CUSTOMER_TT_OVER 	"tax table override"
+#define CUSTOMER_TAX_INC    "customer_tax_included"
+#define CUSTOMER_TERMS      "customer_terms"
+#define CUSTOMER_ACTIVE     "customer_is_active"
+#define CUSTOMER_SLOTS      "customer_values"
+
 /** @deprecated functions, should be removed */
 #define gncCustomerGetGUID(x) qof_instance_get_guid(QOF_INSTANCE(x))
 #define gncCustomerRetGUID(x) (x ? *(qof_instance_get_guid(QOF_INSTANCE(x))) : *(guid_null()))
Index: gncInvoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncInvoice.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -Lsrc/business/business-core/gncInvoice.c -Lsrc/business/business-core/gncInvoice.c -u -r1.95 -r1.96
--- src/business/business-core/gncInvoice.c
+++ src/business/business-core/gncInvoice.c
@@ -23,6 +23,7 @@
 /*
  * Copyright (C) 2001,2002 Derek Atkins
  * Copyright (C) 2003 Linas Vepstas <linas at linas.org>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  * Author: Derek Atkins <warlord at MIT.EDU>
  */
 
@@ -30,28 +31,9 @@
 
 #include <glib.h>
 
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquerycore.h"
-#include "qofquery.h"
-
 #include "Transaction.h"
 #include "Account.h"
 #include "messages.h"
-#include "gnc-numeric.h"
-#include "kvp_frame.h"
-#include "gnc-engine-util.h"
-
-#include "gnc-event-p.h"
-#include "gnc-lot.h"
-
-#include "gncBusiness.h"
 #include "gncBillTermP.h"
 #include "gncEntry.h"
 #include "gncEntryP.h"
@@ -64,39 +46,36 @@
 {
   QofInstance inst;
   
-  char *	id;
-  char *	notes;
-  gboolean 	active;
-
-  char *	billing_id;
-  char *	printname;
-  GncBillTerm *	terms;
-  GList * 	entries;
-  GncOwner	owner;
-  GncOwner	billto;
-  GncJob *	job;
-  Timespec 	date_opened;
-  Timespec 	date_posted;
+  char        *id;
+  char        *notes;
+  gboolean    active;
+
+  char        *billing_id;
+  char        *printname;
+  GncBillTerm *terms;
+  GList       *entries;
+  GncOwner    owner;
+  GncOwner    billto;
+  GncJob      *job;
+  Timespec    date_opened;
+  Timespec    date_posted;
 
   gnc_numeric	to_charge_amount;
 
   gnc_commodity * currency;
 
-  Account * 	posted_acc;
-  Transaction * posted_txn;
-  GNCLot *	posted_lot;
+  Account     *posted_acc;
+  Transaction *posted_txn;
+  GNCLot      *posted_lot;
 };
 
-static short	module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME	GNC_ID_INVOICE
 
 #define GNC_INVOICE_ID		"gncInvoice"
 #define GNC_INVOICE_GUID	"invoice-guid"
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
@@ -187,7 +166,7 @@
 
   invoice->billto = gncCloneOwner (&from->billto, book);
   invoice->owner = gncCloneOwner (&from->owner, book);
-  invoice->job = gncJobObtainTwin (from->job, book);
+  invoice->job = (GncJob*)gncJobObtainTwin (from->job, book);
   invoice->terms = gncBillTermObtainTwin (from->terms, book);
   gncBillTermIncRef (invoice->terms);
 
@@ -257,6 +236,26 @@
   gncInvoiceCommitEdit (invoice);
 }
 
+static void
+qofInvoiceSetOwner (GncInvoice *invoice, QofEntity *ent)
+{
+	if(!invoice || !ent) { return; }
+	gncInvoiceBeginEdit (invoice);
+	qofOwnerSetEntity(&invoice->owner, ent);
+	mark_invoice (invoice);
+	gncInvoiceCommitEdit (invoice);
+}
+
+static void
+qofInvoiceSetBillTo (GncInvoice *invoice, QofEntity *ent)
+{
+	if(!invoice || !ent) { return; }
+	gncInvoiceBeginEdit (invoice);
+	qofOwnerSetEntity(&invoice->billto, ent);
+	mark_invoice (invoice);
+	gncInvoiceCommitEdit (invoice);
+}
+
 void gncInvoiceSetDateOpened (GncInvoice *invoice, Timespec date)
 {
   if (!invoice) return;
@@ -448,6 +447,20 @@
   return &invoice->owner;
 }
 
+static QofEntity*
+qofInvoiceGetOwner (GncInvoice *invoice)
+{
+	if(!invoice) { return NULL; }
+	return (QofEntity*)&invoice->owner;
+}
+
+static QofEntity*
+qofInvoiceGetBillTo (GncInvoice *invoice)
+{
+	if(!invoice) { return NULL; }
+	return (QofEntity*)&invoice->billto;
+}
+
 Timespec gncInvoiceGetDateOpened (GncInvoice *invoice)
 {
   Timespec ts; ts.tv_sec = 0; ts.tv_nsec = 0;
@@ -625,6 +638,65 @@
   return invoice->entries;
 }
 
+static QofCollection*
+qofInvoiceGetEntries (GncInvoice *invoice)
+{
+	QofCollection *entry_coll;
+	GList         *list;
+	QofEntity     *entry;
+
+	entry_coll = qof_collection_new(GNC_ID_ENTRY);
+	for(list = gncInvoiceGetEntries(invoice); list != NULL; list = list->next)
+	{
+		entry = (QofEntity*)list->data;
+		qof_collection_add_entity(entry_coll, entry);
+	}
+	return entry_coll;
+}
+
+static void
+qofInvoiceEntryCB (QofEntity *ent, gpointer user_data)
+{
+	GncInvoice *invoice;
+
+	invoice = (GncInvoice*)user_data;
+	if(!invoice || !ent) { return; }
+	switch (gncInvoiceGetOwnerType (invoice)) {
+		case GNC_OWNER_VENDOR: {
+		gncBillAddEntry (invoice, (GncEntry*) ent);
+		break;
+		}
+		default : {
+			gncInvoiceAddEntry(invoice, (GncEntry*)ent);
+			break;
+		}
+	}
+}
+
+static void 
+qofInvoiceSetEntries(GncInvoice *invoice, QofCollection *entry_coll)
+{
+	if(!entry_coll) { return; }
+	if(0 == safe_strcmp(qof_collection_get_type(entry_coll), GNC_ID_ENTRY))
+	{
+		qof_collection_foreach(entry_coll, qofInvoiceEntryCB, invoice);
+	}
+}
+
+static GncJob*
+qofInvoiceGetJob (GncInvoice *invoice)
+{
+	if(!invoice) { return NULL; }
+	return invoice->job;
+}
+
+static void 
+qofInvoiceSetJob (GncInvoice *invoice, GncJob *job)
+{
+	if(!invoice) { return; }
+	invoice->job = job;
+}
+
 static void
 gncInvoiceDetachFromLot (GNCLot *lot)
 {
@@ -1425,21 +1497,23 @@
 gboolean gncInvoiceRegister (void)
 {
   static QofParam params[] = {
-    { INVOICE_ID, QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetID, (QofSetterFunc)gncInvoiceSetID },
-    { INVOICE_OWNER, GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetOwner, (QofSetterFunc)gncInvoiceSetOwner },
-    { INVOICE_OPENED, QOF_TYPE_DATE, (QofAccessFunc)gncInvoiceGetDateOpened, (QofSetterFunc)gncInvoiceSetDateOpened },
-    { INVOICE_DUE, QOF_TYPE_DATE, (QofAccessFunc)gncInvoiceGetDateDue, NULL },
-    { INVOICE_POSTED, QOF_TYPE_DATE, (QofAccessFunc)gncInvoiceGetDatePosted, (QofSetterFunc)gncInvoiceSetDatePosted },
+    { INVOICE_ID,      QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetID,     (QofSetterFunc)gncInvoiceSetID },
+    { INVOICE_OWNER,   GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetOwner, NULL },
+    { INVOICE_OPENED,  QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDateOpened, (QofSetterFunc)gncInvoiceSetDateOpened },
+    { INVOICE_DUE,     QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDateDue, NULL },
+    { INVOICE_POSTED,  QOF_TYPE_DATE,   (QofAccessFunc)gncInvoiceGetDatePosted, (QofSetterFunc)gncInvoiceSetDatePosted },
     { INVOICE_IS_POSTED, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncInvoiceIsPosted, NULL },
-    { INVOICE_IS_PAID, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncInvoiceIsPaid, NULL },
+    { INVOICE_IS_PAID, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncInvoiceIsPaid,    NULL },
     { INVOICE_BILLINGID, QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetBillingID, (QofSetterFunc)gncInvoiceSetBillingID },
-    { INVOICE_NOTES, QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetNotes, (QofSetterFunc)gncInvoiceSetNotes },
-    { INVOICE_ACC, GNC_ID_ACCOUNT, (QofAccessFunc)gncInvoiceGetPostedAcc, NULL },
-    { INVOICE_POST_TXN, GNC_ID_TRANS, (QofAccessFunc)gncInvoiceGetPostedTxn, NULL },
-    { INVOICE_POST_LOT, GNC_ID_LOT, (QofAccessFunc)gncInvoiceGetPostedLot, NULL },
-    { INVOICE_TYPE, QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetType, NULL },
-    { INVOICE_TERMS, GNC_ID_BILLTERM, (QofAccessFunc)gncInvoiceGetTerms, (QofSetterFunc)gncInvoiceSetTerms },
-    { INVOICE_BILLTO, GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetBillTo, (QofSetterFunc)gncInvoiceSetBillTo },
+    { INVOICE_NOTES,   QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetNotes,   (QofSetterFunc)gncInvoiceSetNotes },
+    { INVOICE_ACC,     GNC_ID_ACCOUNT,  (QofAccessFunc)gncInvoiceGetPostedAcc, (QofSetterFunc)gncInvoiceSetPostedAcc },
+    { INVOICE_POST_TXN, GNC_ID_TRANS,   (QofAccessFunc)gncInvoiceGetPostedTxn, (QofSetterFunc)gncInvoiceSetPostedTxn },
+    { INVOICE_POST_LOT, GNC_ID_LOT,     (QofAccessFunc)gncInvoiceGetPostedLot, NULL/*(QofSetterFunc)gncInvoiceSetPostedLot*/ },
+    { INVOICE_TYPE,    QOF_TYPE_STRING, (QofAccessFunc)gncInvoiceGetType,    NULL },
+    { INVOICE_TERMS,   GNC_ID_BILLTERM, (QofAccessFunc)gncInvoiceGetTerms,   (QofSetterFunc)gncInvoiceSetTerms },
+    { INVOICE_BILLTO,  GNC_ID_OWNER, (QofAccessFunc)gncInvoiceGetBillTo, NULL  },
+    { INVOICE_ENTRIES, QOF_TYPE_COLLECT, (QofAccessFunc)qofInvoiceGetEntries, (QofSetterFunc)qofInvoiceSetEntries },
+    { INVOICE_JOB,     GNC_ID_JOB,      (QofAccessFunc)qofInvoiceGetJob,     (QofSetterFunc)qofInvoiceSetJob }, 
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncInvoiceGetActive, (QofSetterFunc)gncInvoiceSetActive },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
@@ -1450,6 +1524,14 @@
   reg_lot ();
   reg_txn ();
 
+  /* Make the compiler happy... */
+  if (0) {
+    qofInvoiceSetOwner(NULL, NULL);
+    qofInvoiceGetOwner(NULL);
+    qofInvoiceSetBillTo(NULL, NULL);
+    qofInvoiceGetBillTo(NULL);
+  }
+  if(!qof_choice_create(GNC_ID_INVOICE)) { return FALSE;}
   return qof_object_register (&gncInvoiceDesc);
 }
 
Index: gncAddress.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncAddress.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/business/business-core/gncAddress.c -Lsrc/business/business-core/gncAddress.c -u -r1.17 -r1.18
--- src/business/business-core/gncAddress.c
+++ src/business/business-core/gncAddress.c
@@ -29,17 +29,14 @@
 
 #include <glib.h>
 
-#include "gnc-engine-util.h"	/* safe_strcmp */
-#include "qofquerycore.h"
-#include "qofclass.h"
-#include "guid.h"
-#include "gnc-event-p.h"
-
 #include "gncAddress.h"
 #include "gncAddressP.h"
+#include "gncCustomerP.h"
 
 struct _gncAddress 
 {
+  QofInstance inst;
+
   QofBook *	book;
   QofEntity * parent;
   gboolean	dirty;
@@ -55,12 +52,8 @@
 
 #define _GNC_MOD_NAME	GNC_ADDRESS_MODULE_NAME
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 G_INLINE_FUNC void mark_address (GncAddress *address);
-G_INLINE_FUNC void
-mark_address (GncAddress *address)
+void mark_address (GncAddress *address)
 {
   address->dirty = TRUE;
 
@@ -77,6 +70,7 @@
   if (!book) return NULL;
 
   addr = g_new0 (GncAddress, 1);
+  qof_instance_init(&addr->inst, GNC_ID_ADDRESS, book);
   addr->book = book;
   addr->dirty = FALSE;
   addr->parent = prnt;
@@ -93,6 +87,46 @@
   return addr;
 }
 
+static GncAddress * 
+qofAddressCreate (QofBook *book)
+{
+  GncAddress *addr;
+
+  if (!book) return NULL;
+
+  addr = g_new0 (GncAddress, 1);
+  qof_instance_init(&addr->inst, GNC_ID_ADDRESS, book);
+  addr->book = book;
+  addr->dirty = FALSE;
+  addr->parent = NULL; /* set using an independent function. */
+
+  addr->name = CACHE_INSERT ("");
+  addr->addr1 = CACHE_INSERT ("");
+  addr->addr2 = CACHE_INSERT ("");
+  addr->addr3 = CACHE_INSERT ("");
+  addr->addr4 = CACHE_INSERT ("");
+  addr->phone = CACHE_INSERT ("");
+  addr->fax = CACHE_INSERT ("");
+  addr->email = CACHE_INSERT ("");
+
+  return addr;
+}
+
+static void
+qofAddressSetOwner(GncAddress *addr, QofEntity *ent)
+{
+	if(!addr || !ent) { return; }
+	if(addr->parent == NULL) { addr->parent = ent; }
+}
+
+static QofEntity*
+qofAddressGetOwner(GncAddress *addr)
+{
+
+	if(!addr) { return NULL; }
+	return addr->parent;
+}
+
 GncAddress * 
 gncCloneAddress (GncAddress *from, QofEntity *new_parent, QofBook *book)
 {
@@ -281,22 +315,41 @@
   return safe_strcmp (a->name, b->name);
 }
 
+static QofObject GncAddressDesc =
+{
+	interface_version:  QOF_OBJECT_VERSION,
+	e_type:             GNC_ID_ADDRESS,
+	type_label:         "Address",
+	create:             (gpointer)qofAddressCreate,
+	book_begin:         NULL,
+	book_end:           NULL,
+	is_dirty:           qof_collection_is_dirty,
+	mark_clean:         qof_collection_mark_clean,
+	foreach:            qof_collection_foreach,
+	printable:          NULL,
+	version_cmp:        (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+};
+
 gboolean gncAddressRegister (void)
 {
   static QofParam params[] = {
 
-    { ADDRESS_NAME, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetName, 	(QofSetterFunc)gncAddressSetName },
-    { ADDRESS_ONE, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr1, (QofSetterFunc)gncAddressSetAddr1 },
-    { ADDRESS_TWO, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr2, (QofSetterFunc)gncAddressSetAddr2 },
-    { ADDRESS_THREE, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr3, (QofSetterFunc)gncAddressSetAddr3 },
-    { ADDRESS_FOUR, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr4, (QofSetterFunc)gncAddressSetAddr4 },
-    { ADDRESS_PHONE, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetPhone, (QofSetterFunc)gncAddressSetPhone },
-    { ADDRESS_FAX, 		QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetFax, 	(QofSetterFunc)gncAddressSetFax },
-    { ADDRESS_EMAIL, 	QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetEmail, (QofSetterFunc)gncAddressSetEmail },
+    { ADDRESS_NAME,  QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetName,  (QofSetterFunc)gncAddressSetName },
+    { ADDRESS_ONE,   QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr1, (QofSetterFunc)gncAddressSetAddr1 },
+    { ADDRESS_TWO,   QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr2, (QofSetterFunc)gncAddressSetAddr2 },
+    { ADDRESS_THREE, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr3, (QofSetterFunc)gncAddressSetAddr3 },
+    { ADDRESS_FOUR,  QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr4, (QofSetterFunc)gncAddressSetAddr4 },
+    { ADDRESS_PHONE, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetPhone, (QofSetterFunc)gncAddressSetPhone },
+    { ADDRESS_FAX,   QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetFax,   (QofSetterFunc)gncAddressSetFax },
+    { ADDRESS_EMAIL, QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetEmail, (QofSetterFunc)gncAddressSetEmail },
+    { ADDRESS_OWNER, QOF_TYPE_CHOICE, (QofAccessFunc)qofAddressGetOwner, (QofSetterFunc)qofAddressSetOwner },
+    { QOF_PARAM_BOOK, QOF_ID_BOOK,   (QofAccessFunc)qof_instance_get_book, NULL },
+    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
     { NULL },
   };
 
-  qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncAddressCompare, params);
+  qof_class_register (GNC_ID_ADDRESS, (QofSortFunc)gncAddressCompare, params);
+  if(!qof_choice_add_class(GNC_ID_CUSTOMER, GNC_ID_ADDRESS, ADDRESS_OWNER)) { return FALSE; }
 
-  return TRUE;
+  return qof_object_register(&GncAddressDesc);
 }
Index: gncBusPeriod.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBusPeriod.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-core/gncBusPeriod.c -Lsrc/business/business-core/gncBusPeriod.c -u -r1.8 -r1.9
--- src/business/business-core/gncBusPeriod.c
+++ src/business/business-core/gncBusPeriod.c
@@ -1,7 +1,7 @@
 
-
+/*
 XXX TODO:
--- contemplate a per-colection (per type) edit/commmit-edit, 
+-- contemplate a per-collection (per type) edit/commmit-edit, 
    clone, dirty, etc. functions some more ...
 
 -- turn clone into a generic object callback, so that 
@@ -14,13 +14,13 @@
 -- billterm and taxtables are incompletely cloned, not sure 
    what to do with refcount, ask warlord, need to explore.
 
--- The following busines objects have an id/name/desc/active
+-- The following business objects have an id/name/desc/active
    this could be abstracted into an common object.
    vendor (customer)
    bill term (but bill terms doesn't have id or active)
    job 
 
--- gnVendor should be a base class to gncCustomer (they're
+-- gncVendor should be a base class to gncCustomer (they're
    identical, but customer adds more stuff).
 
    Employee could be base class for vendor, its got some of the 
@@ -38,7 +38,7 @@
    ditto jobs in the customer list ??
 
 -- closed orders can be removed from new book ?
-
+*/
 
 
 
@@ -76,8 +76,6 @@
 
   /* Copy all bill terms first, since the CustomerCopy expects
    * these to be in place already. */
-/* XXX not strictly needed, the customer can pull thier own .. ? */
+/* XXX not strictly needed, the customer can pull their own .. ? */
   gncBillTermCopyAll (dest_book, src_book);
 }
-
-
Index: gncVendorP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncVendorP.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-core/gncVendorP.h -Lsrc/business/business-core/gncVendorP.h -u -r1.7 -r1.8
--- src/business/business-core/gncVendorP.h
+++ src/business/business-core/gncVendorP.h
@@ -29,7 +29,6 @@
 #define GNC_VENDORP_H_
 
 #include "gncVendor.h"
-#include "qofid-p.h"
 
 gboolean gncVendorRegister (void);
 gint64 gncVendorNextID (QofBook *book);
Index: gncJobP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncJobP.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/business/business-core/gncJobP.h -Lsrc/business/business-core/gncJobP.h -u -r1.9 -r1.10
--- src/business/business-core/gncJobP.h
+++ src/business/business-core/gncJobP.h
@@ -30,7 +30,6 @@
 #define GNC_JOBP_H_
 
 #include "gncJob.h"
-#include "qofid-p.h"
 
 gboolean gncJobRegister (void);
 gint64 gncJobNextID (QofBook *book);
Index: gncOwner.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOwner.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/business/business-core/gncOwner.h -Lsrc/business/business-core/gncOwner.h -u -r1.17 -r1.18
--- src/business/business-core/gncOwner.h
+++ src/business/business-core/gncOwner.h
@@ -26,6 +26,7 @@
 /** @file gncOwner.h
     @brief Business Interface:  Object OWNERs
     @author Copyright (C) 2001,2002 Derek Atkins <warlord at MIT.EDU>
+    @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef GNC_OWNER_H_
@@ -35,45 +36,77 @@
 
 #define GNC_ID_OWNER   "gncOwner"
 
+#include "qof.h"
 #include "gncCustomer.h"
 #include "gncJob.h"
 #include "gncVendor.h"
 #include "gncEmployee.h"
 #include "gnc-lot.h" 
 
-typedef enum {
-  GNC_OWNER_NONE,
-  GNC_OWNER_UNDEFINED,
-  GNC_OWNER_CUSTOMER,
-  GNC_OWNER_JOB,
-  GNC_OWNER_VENDOR,
-  GNC_OWNER_EMPLOYEE
-} GncOwnerType;
+typedef enum { 
+	GNC_OWNER_NONE , 
+	GNC_OWNER_UNDEFINED , 
+	GNC_OWNER_CUSTOMER , 
+	GNC_OWNER_JOB , 
+	GNC_OWNER_VENDOR , 
+	GNC_OWNER_EMPLOYEE , 
+}GncOwnerType;
+
+/** \name QOF handling
+
+Whilst GncOwner is not a formal QOF object, these functions
+are still expected to be useful in making GncOwner transparent
+to QOF as they can be used by objects like GncInvoice.
+@{
+*/
+/** return the type for the collection. */
+QofIdType qofOwnerGetType(GncOwner *owner);
+/** return the owner itself as an entity. */
+QofEntity* qofOwnerGetOwner (GncOwner *owner);
+/** set the owner from the entity. */
+void qofOwnerSetEntity (GncOwner *owner, QofEntity *ent);
+
+/** \brief Set the parent owner. */
+void qofOwnerSetEndOwner (GncOwner *owner, GncOwner *parent);
+GncOwner* qofOwnerCreate (QofBook *book);
+
+gboolean
+gncOwnerRegister(void);
 
+/** @} */
+
+/** \struct GncOwner */
 struct gnc_owner_s {
-  GncOwnerType     type;
+  GncOwnerType     type;      /**< Customer, Job, Vendor, Employee or Undefined. */
   union {
     gpointer       undefined;
     GncCustomer *  customer;
     GncJob *       job;
     GncVendor *    vendor;
     GncEmployee *  employee;
-  } owner;
+  } owner;                   /**< holds the pointer to the owner object. */
+  gpointer         qof_temp; /**< Set type independently of the owner. */
 };
 
+/** \name Setup routines
+@{
+*/
 void gncOwnerInitUndefined (GncOwner *owner, gpointer obj);
 void gncOwnerInitCustomer (GncOwner *owner, GncCustomer *customer);
 void gncOwnerInitJob (GncOwner *owner, GncJob *job);
 void gncOwnerInitVendor (GncOwner *owner, GncVendor *vendor);
 void gncOwnerInitEmployee (GncOwner *owner, GncEmployee *employee);
-
+/** @} */
+/** \name Get routines.
+@{
+*/
 GncOwnerType gncOwnerGetType (const GncOwner *owner);
 gpointer gncOwnerGetUndefined (const GncOwner *owner);
 GncCustomer * gncOwnerGetCustomer (const GncOwner *owner);
 GncJob * gncOwnerGetJob (const GncOwner *owner);
 GncVendor * gncOwnerGetVendor (const GncOwner *owner);
 GncEmployee * gncOwnerGetEmployee (const GncOwner *owner);
-
+/** @} */
 void gncOwnerCopy (const GncOwner *src, GncOwner *dest);
 gboolean gncOwnerEqual (const GncOwner *a, const GncOwner *b);
 int gncOwnerCompare (const GncOwner *a, const GncOwner *b);
@@ -103,6 +136,7 @@
 gboolean gncOwnerGetOwnerFromLot (GNCLot *lot, GncOwner *owner);
 
 #define OWNER_TYPE        "type"
+#define OWNER_TYPE_STRING "type-string"  /**< Allows the type to be handled externally. */
 #define OWNER_CUSTOMER    "customer"
 #define OWNER_JOB         "job"
 #define OWNER_VENDOR      "vendor"
Index: gncTaxTable.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTable.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/business/business-core/gncTaxTable.h -Lsrc/business/business-core/gncTaxTable.h -u -r1.18 -r1.19
--- src/business/business-core/gncTaxTable.h
+++ src/business/business-core/gncTaxTable.h
@@ -64,12 +64,10 @@
 typedef struct _gncAccountValue GncAccountValue;
 
 #include "Account.h"
-#include "gnc-date.h"
-#include "gnc-numeric.h"
-
-#include "qofbook.h"
-#include "qofinstance.h"
+#include "qof.h"
+#ifdef GNUCASH_MAJOR_VERSION
 #include "gncBusiness.h"
+#endif
 
 #define GNC_ID_TAXTABLE       "gncTaxTable"
 #define GNC_IS_TAXTABLE(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_TAXTABLE))
@@ -97,14 +95,16 @@
 const char * gncTaxIncludedTypeToString (GncTaxIncluded type);
 gboolean gncTaxIncludedStringToType (const char *str, GncTaxIncluded *type);
 
-/** @name Create/Destroy Functions */
-/** @{ */
+/** @name Create/Destroy Functions 
+ @{ */
 GncTaxTable * gncTaxTableCreate (QofBook *book);
 void gncTaxTableDestroy (GncTaxTable *table);
 GncTaxTableEntry * gncTaxTableEntryCreate (void);
 void gncTaxTableEntryDestroy (GncTaxTableEntry *entry);
-
-/** Set Functions */
+/** @} */
+/** \name Set Functions 
+@{
+*/
 void gncTaxTableSetName (GncTaxTable *table, const char *name);
 void gncTaxTableIncRef (GncTaxTable *table);
 void gncTaxTableDecRef (GncTaxTable *table);
@@ -112,7 +112,7 @@
 void gncTaxTableEntrySetAccount (GncTaxTableEntry *entry, Account *account);
 void gncTaxTableEntrySetType (GncTaxTableEntry *entry, GncAmountType type);
 void gncTaxTableEntrySetAmount (GncTaxTableEntry *entry, gnc_numeric amount);
-
+/** @} */
 void gncTaxTableAddEntry (GncTaxTable *table, GncTaxTableEntry *entry);
 void gncTaxTableRemoveEntry (GncTaxTable *table, GncTaxTableEntry *entry);
 
@@ -120,10 +120,8 @@
 void gncTaxTableBeginEdit (GncTaxTable *table);
 void gncTaxTableCommitEdit (GncTaxTable *table);
 
-/** @} */
-
-/** @name Get Functions */
-/** @{ */
+/** @name Get Functions 
+ @{ */
 
 /** Return a pointer to the instance gncTaxTable that is identified
  *  by the guid, and is residing in the book. Returns NULL if the 
Index: gncOwner.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOwner.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -Lsrc/business/business-core/gncOwner.c -Lsrc/business/business-core/gncOwner.c -u -r1.36 -r1.37
--- src/business/business-core/gncOwner.c
+++ src/business/business-core/gncOwner.c
@@ -23,6 +23,7 @@
 /*
  * Copyright (C) 2001, 2002 Derek Atkins
  * Copyright (C) 2003 Linas Vepstas <linas at linas.org>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  * Author: Derek Atkins <warlord at MIT.EDU>
  */
 
@@ -31,11 +32,6 @@
 #include <glib.h>
 #include <string.h>		/* for memcpy() */
 
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofquerycore.h"
-#include "qofquery.h"
-
 #include "gncCustomerP.h"
 #include "gncEmployeeP.h"
 #include "gncJobP.h"
@@ -51,7 +47,9 @@
 
 GncOwner * gncOwnerCreate (void)
 {
-  GncOwner *o = g_new0 (GncOwner, 1);
+  GncOwner *o;
+
+  o = g_new0 (GncOwner, 1);
   o->type = GNC_OWNER_NONE;
   return o;
 }
@@ -103,6 +101,103 @@
   return owner->type;
 }
 
+QofIdType
+qofOwnerGetType(GncOwner *owner)
+{
+	QofIdType type;
+
+	type = NULL;
+	switch(owner->type)
+	{
+		case GNC_OWNER_NONE : {
+			type = NULL;
+			break;
+		}
+		case GNC_OWNER_UNDEFINED : {
+			type = NULL;
+			break;
+		}
+		case GNC_OWNER_CUSTOMER : {
+			type = GNC_ID_CUSTOMER;
+			break;
+		}
+		case GNC_OWNER_JOB : {
+			type = GNC_ID_JOB;
+			break;
+		}
+		case GNC_OWNER_VENDOR : {
+			type = GNC_ID_VENDOR;
+			break;
+		}
+		case GNC_OWNER_EMPLOYEE : {
+			type = GNC_ID_EMPLOYEE;
+			break;
+		}
+	}
+	return type;
+}
+
+QofEntity*
+qofOwnerGetOwner (GncOwner *owner)
+{
+	QofEntity *ent;
+
+	if(!owner) { return NULL; }
+	ent = NULL;
+	switch(owner->type)
+	{
+		case GNC_OWNER_NONE : {
+			break;
+		}
+		case GNC_OWNER_UNDEFINED : {
+			break;
+		}
+		case GNC_OWNER_CUSTOMER : {
+			ent = (QofEntity*)owner->owner.customer;
+			break;
+		}
+		case GNC_OWNER_JOB : {
+			ent = (QofEntity*)owner->owner.job;
+			break;
+		}
+		case GNC_OWNER_VENDOR : {
+			ent = (QofEntity*)owner->owner.vendor;
+			break;
+		}
+		case GNC_OWNER_EMPLOYEE : {
+			ent = (QofEntity*)owner->owner.employee;
+			break;
+		}
+	}
+	return ent;
+}
+
+void
+qofOwnerSetEntity (GncOwner *owner, QofEntity *ent)
+{
+	if(!owner || !ent) { return; }
+	if(0 == safe_strcmp(ent->e_type, GNC_ID_CUSTOMER))
+	{
+		owner->type = GNC_OWNER_CUSTOMER;
+		gncOwnerInitCustomer(owner, (GncCustomer*)ent);
+	}
+	if(0 == safe_strcmp(ent->e_type, GNC_ID_JOB))
+	{
+		owner->type = GNC_OWNER_JOB;
+		gncOwnerInitJob(owner, (GncJob*)ent);
+	}
+	if(0 == safe_strcmp(ent->e_type, GNC_ID_VENDOR))
+	{
+		owner->type = GNC_OWNER_VENDOR;
+		gncOwnerInitVendor(owner, (GncVendor*)ent);
+	}
+	if(0 == safe_strcmp(ent->e_type, GNC_ID_EMPLOYEE))
+	{
+		owner->type = GNC_OWNER_EMPLOYEE;
+		gncOwnerInitEmployee(owner, (GncEmployee*)ent);
+	}
+}
+
 gpointer gncOwnerGetUndefined (const GncOwner *owner)
 {
   if (!owner) return NULL;
@@ -397,20 +492,19 @@
 gboolean gncOwnerRegister (void)
 {
   static QofParam params[] = {
-    { OWNER_TYPE, QOF_TYPE_INT64, (QofAccessFunc)gncOwnerGetType, NULL },
-    { OWNER_CUSTOMER, GNC_ID_CUSTOMER,
-      (QofAccessFunc)gncOwnerGetCustomer, NULL },
-    { OWNER_JOB, GNC_ID_JOB, (QofAccessFunc)gncOwnerGetJob, NULL },
-    { OWNER_VENDOR, GNC_ID_VENDOR, (QofAccessFunc)gncOwnerGetVendor, NULL },
-    { OWNER_EMPLOYEE, GNC_ID_EMPLOYEE, (QofAccessFunc)gncOwnerGetEmployee, NULL },
-    { OWNER_PARENT, GNC_ID_OWNER, (QofAccessFunc)gncOwnerGetEndOwner, NULL },
-    { OWNER_PARENTG, QOF_TYPE_GUID, (QofAccessFunc)gncOwnerGetEndGUID, NULL },
-    { OWNER_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncOwnerGetName, NULL },
-    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)gncOwnerGetGUID, NULL },
+    { OWNER_TYPE, QOF_TYPE_INT64,      (QofAccessFunc)gncOwnerGetType,          NULL },
+    { OWNER_CUSTOMER, GNC_ID_CUSTOMER, (QofAccessFunc)gncOwnerGetCustomer,      NULL },
+    { OWNER_JOB, GNC_ID_JOB,           (QofAccessFunc)gncOwnerGetJob,           NULL },
+    { OWNER_VENDOR, GNC_ID_VENDOR,     (QofAccessFunc)gncOwnerGetVendor,        NULL },
+    { OWNER_EMPLOYEE, GNC_ID_EMPLOYEE, (QofAccessFunc)gncOwnerGetEmployee,      NULL },
+    { OWNER_PARENT, GNC_ID_OWNER,      (QofAccessFunc)gncOwnerGetEndOwner,      NULL },
+    { OWNER_PARENTG, QOF_TYPE_GUID,    (QofAccessFunc)gncOwnerGetEndGUID,       NULL },
+    { OWNER_NAME, QOF_TYPE_STRING,     (QofAccessFunc)gncOwnerGetName, NULL },
+    { QOF_PARAM_GUID, QOF_TYPE_GUID,   (QofAccessFunc)gncOwnerGetGUID, NULL },
     { NULL },
   };
 
-  qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncOwnerCompare, params);
+  qof_class_register (GNC_ID_OWNER, (QofSortFunc)gncOwnerCompare, params);
   reg_lot ();
 
   return TRUE;
Index: gncEntry.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncEntry.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/business/business-core/gncEntry.h -Lsrc/business/business-core/gncEntry.h -u -r1.31 -r1.32
--- src/business/business-core/gncEntry.h
+++ src/business/business-core/gncEntry.h
@@ -44,14 +44,13 @@
   GNC_DISC_POSTTAX
 } GncDiscountHow;
 
-#include "qofbook.h"
-#include "qofinstance.h"
-
-#include "gnc-date.h"
+#ifdef GNUCASH_MAJOR_VERSION
 #include "gncBusiness.h"
+#endif
 #include "gncInvoice.h"
 #include "gncOrder.h"
 #include "gncTaxTable.h"
+#include "gncOwner.h"
 
 #define GNC_ID_ENTRY "gncEntry"
 #define GNC_IS_ENTRY(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_ENTRY))
@@ -72,16 +71,16 @@
 const char * gncEntryPaymentTypeToString (GncEntryPaymentType type);
 gboolean gncEntryPaymentStringToType (const char *str, GncEntryPaymentType *type);
 
-/** @name Create/Destroy Functions */
-/** @{ */
+/** @name Create/Destroy Functions 
+ @{ */
 GncEntry *gncEntryCreate (QofBook *book);
 void gncEntryDestroy (GncEntry *entry);
 /** @} */
 
 /* SET FUNCTIONS */
 
-/** @name Generic (shared) data */
-/** @{ */
+/** @name Generic (shared) data 
+ @{ */
 void gncEntrySetDate (GncEntry *entry, Timespec date);
 void gncEntrySetDateEntered (GncEntry *entry, Timespec date);
 void gncEntrySetDescription (GncEntry *entry, const char *desc);
@@ -90,8 +89,8 @@
 void gncEntrySetQuantity (GncEntry *entry, gnc_numeric quantity);
 /** @} */
 
-/** @name Customer Invoices */
-/** @{ */
+/** @name Customer Invoices 
+ @{ */
 void gncEntrySetInvAccount (GncEntry *entry, Account *acc);
 void gncEntrySetInvPrice (GncEntry *entry, gnc_numeric price);
 void gncEntrySetInvTaxable (GncEntry *entry, gboolean taxable);
@@ -100,11 +99,12 @@
 void gncEntrySetInvDiscount (GncEntry *entry, gnc_numeric discount);
 void gncEntrySetInvDiscountType (GncEntry *entry, GncAmountType type);
 void gncEntrySetInvDiscountHow (GncEntry *entry, GncDiscountHow how);
-
+void qofEntrySetInvDiscType (GncEntry *entry, const char *type);
+void qofEntrySetInvDiscHow  (GncEntry *entry, const char *type);
 /** @} */
 
-/** @name Vendor Bills (and Employee Expenses) */
-/** @{ */
+/** @name Vendor Bills (and Employee Expenses) 
+ @{ */
 void gncEntrySetBillAccount (GncEntry *entry, Account *acc);
 void gncEntrySetBillPrice (GncEntry *entry, gnc_numeric price);
 void gncEntrySetBillTaxable (GncEntry *entry, gboolean taxable);
@@ -114,14 +114,14 @@
 void gncEntrySetBillTo (GncEntry *entry, GncOwner *billto);
 /** @} */
 
-/** @name employee-stuff */
-/** @{ */
+/** @name employee-stuff 
+ @{ */
 void gncEntrySetBillPayment (GncEntry *entry, GncEntryPaymentType type);
 /** @} */
 
 /* GET FUNCTIONS */
-/** @name Generic (shared) data */
-/** @{ */
+/** @name Generic (shared) data 
+ @{ */
 Timespec gncEntryGetDate (GncEntry *entry);
 Timespec gncEntryGetDateEntered (GncEntry *entry);
 const char * gncEntryGetDescription (GncEntry *entry);
@@ -130,20 +130,22 @@
 gnc_numeric gncEntryGetQuantity (GncEntry *entry);
 /** @} */
 
-/** @name Customer Invoices */
-/** @{ */
+/** @name Customer Invoices 
+ @{ */
 Account * gncEntryGetInvAccount (GncEntry *entry);
 gnc_numeric gncEntryGetInvPrice (GncEntry *entry);
 gnc_numeric gncEntryGetInvDiscount (GncEntry *entry);
 GncAmountType gncEntryGetInvDiscountType (GncEntry *entry);
 GncDiscountHow gncEntryGetInvDiscountHow (GncEntry *entry);
+char* qofEntryGetInvDiscType (GncEntry *entry);
+char* qofEntryGetInvDiscHow (GncEntry *entry);
 gboolean gncEntryGetInvTaxable (GncEntry *entry);
 gboolean gncEntryGetInvTaxIncluded (GncEntry *entry);
 GncTaxTable * gncEntryGetInvTaxTable (GncEntry *entry);
 /** @} */
 
-/** @name Vendor Bills (and Employee Expenses) */
-/** @{ */
+/** @name Vendor Bills (and Employee Expenses) 
+ @{ */
 Account * gncEntryGetBillAccount (GncEntry *entry);
 gnc_numeric gncEntryGetBillPrice (GncEntry *entry);
 gboolean gncEntryGetBillTaxable (GncEntry *entry);
@@ -157,12 +159,13 @@
 
 void gncEntryCopy (const GncEntry *src, GncEntry *dest);
 
-/** @name Getting Values */
-/** @{ */
-/** The first three return the rounded values -- the last returns the
+/** @name Getting Values 
+
+ * The first three return the rounded values -- the last returns the
  * list of unrounded account-values.  The list belongs to the entry
  * and will be destroyed, so use it quickly.
- */
+ @{
+*/
 gnc_numeric gncEntryReturnValue (GncEntry *entry, gboolean is_inv);
 gnc_numeric gncEntryReturnDiscountValue (GncEntry *entry, gboolean is_inv);
 gnc_numeric gncEntryReturnTaxValue (GncEntry *entry, gboolean is_inv);
@@ -217,6 +220,8 @@
 #define ENTRY_QTY			"qty"
 
 #define ENTRY_IPRICE		"iprice"
+#define ENTRY_IACCT			"invoice-account"
+#define ENTRY_BACCT			"bill-account"
 #define ENTRY_BPRICE		"bprice"
 #define ENTRY_BILLABLE		"billable?"
 #define ENTRY_BILLTO		"bill-to"
Index: gncCustomer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomer.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -Lsrc/business/business-core/gncCustomer.c -Lsrc/business/business-core/gncCustomer.c -u -r1.62 -r1.63
--- src/business/business-core/gncCustomer.c
+++ src/business/business-core/gncCustomer.c
@@ -32,25 +32,15 @@
 #include <string.h>
 
 #include "messages.h"
-#include "gnc-engine-util.h"
 #include "gnc-commodity.h"
-#include "gnc-numeric.h"
-#include "gnc-event-p.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid-p.h"
-#include "qofid.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquerycore.h"
-#include "qofquery.h"
 
 #include "gncAddressP.h"
 #include "gncBillTermP.h"
+#include "gncInvoice.h"
+#ifdef GNUCASH_MAJOR_VERSION
 #include "gncBusiness.h"
+#endif
+
 #include "gncCustomer.h"
 #include "gncCustomerP.h"
 #include "gncJobP.h"
@@ -79,19 +69,15 @@
   GncAddress *    shipaddr;
 };
 
-static short module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME        GNC_ID_CUSTOMER
 
 /* ============================================================== */
 /* misc inline funcs */
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 G_INLINE_FUNC void mark_customer (GncCustomer *customer);
-G_INLINE_FUNC void
-mark_customer (GncCustomer *customer)
+void mark_customer (GncCustomer *customer)
 {
   customer->inst.dirty = TRUE;
   qof_collection_mark_dirty (customer->inst.entity.collection);
@@ -194,8 +180,9 @@
 
   if (cust->terms)
     gncBillTermDecRef (cust->terms);
-  if (cust->taxtable)
+  if (cust->taxtable) {
     gncTaxTableDecRef (cust->taxtable);
+  }
 
   qof_instance_release (&cust->inst);
   g_free (cust);
@@ -377,7 +364,7 @@
 
 void gncCustomerBeginEdit (GncCustomer *cust)
 {
-  QOF_BEGIN_EDIT (&cust->inst);
+  qof_begin_edit (&cust->inst);
 }
 
 static inline void gncCustomerOnError (QofInstance *inst, QofBackendError errcode)
@@ -426,6 +413,34 @@
   return cust->addr;
 }
 
+static void
+qofCustomerSetAddr (GncCustomer *cust, QofEntity *addr_ent)
+{
+	GncAddress *addr;
+
+	if(!cust || !addr_ent) { return; }
+	addr = (GncAddress*)addr_ent;
+	if(addr == cust->addr) { return; }
+	if(cust->addr != NULL) { gncAddressDestroy(cust->addr); }
+	gncCustomerBeginEdit(cust);
+	cust->addr = addr;
+	gncCustomerCommitEdit(cust);
+}
+
+static void
+qofCustomerSetShipAddr (GncCustomer *cust, QofEntity *ship_addr_ent)
+{
+	GncAddress *ship_addr;
+
+	if(!cust || !ship_addr_ent) { return; }
+	ship_addr = (GncAddress*)ship_addr_ent;
+	if(ship_addr == cust->shipaddr) { return; }
+	if(cust->shipaddr != NULL) { gncAddressDestroy(cust->shipaddr); }
+	gncCustomerBeginEdit(cust);
+	cust->shipaddr = ship_addr;
+	gncCustomerCommitEdit(cust);
+}
+
 GncAddress * gncCustomerGetShipAddr (GncCustomer *cust)
 {
   if (!cust) return NULL;
@@ -506,7 +521,7 @@
 gboolean gncCustomerIsDirty (GncCustomer *cust)
 {
   if (!cust) return FALSE;
-  return (cust->inst.dirty ||
+  return (qof_instance_is_dirty(&cust->inst) ||
           gncAddressIsDirty (cust->addr) ||
           gncAddressIsDirty (cust->shipaddr));
 }
@@ -526,9 +541,9 @@
 /* Package-Private functions */
 static const char * _gncCustomerPrintable (gpointer item)
 {
-  GncCustomer *c = item;
-  if (!item) return NULL;
-  return c->name;
+//  GncCustomer *c = item;
+  if (!item) return "failed";
+  return gncCustomerGetName((GncCustomer*)item);
 }
 
 static QofObject gncCustomerDesc =
@@ -542,7 +557,7 @@
   is_dirty:           qof_collection_is_dirty,
   mark_clean:         qof_collection_mark_clean,
   foreach:            qof_collection_foreach,
-  printable:          _gncCustomerPrintable,
+  printable:          (const char* (*)(gpointer))gncCustomerGetName,
   version_cmp:        (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
 };
 
@@ -556,18 +571,24 @@
 		(QofSetterFunc)gncCustomerSetDiscount },
 	{ CUSTOMER_CREDIT, QOF_TYPE_NUMERIC, (QofAccessFunc)gncCustomerGetCredit,
 		(QofSetterFunc)gncCustomerSetCredit },
-    { CUSTOMER_ADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncCustomerGetAddr, NULL },
-    { CUSTOMER_SHIPADDR, GNC_ADDRESS_MODULE_NAME, (QofAccessFunc)gncCustomerGetShipAddr, NULL },
+    { CUSTOMER_ADDR, GNC_ID_ADDRESS, (QofAccessFunc)gncCustomerGetAddr, (QofSetterFunc)qofCustomerSetAddr },
+    { CUSTOMER_SHIPADDR, GNC_ID_ADDRESS, (QofAccessFunc)gncCustomerGetShipAddr, (QofSetterFunc)qofCustomerSetShipAddr },
 	{ CUSTOMER_TT_OVER, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncCustomerGetTaxTableOverride, 
 		(QofSetterFunc)gncCustomerSetTaxTableOverride },
+	{ CUSTOMER_TERMS, GNC_ID_BILLTERM, (QofAccessFunc)gncCustomerGetTerms, (QofSetterFunc)gncCustomerSetTerms },
+	{ CUSTOMER_SLOTS, QOF_TYPE_KVP, (QofAccessFunc)qof_instance_get_slots, NULL },
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncCustomerGetActive, (QofSetterFunc)gncCustomerSetActive },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
     { NULL },
   };
 
+  if(!qof_choice_add_class(GNC_ID_INVOICE, GNC_ID_CUSTOMER, INVOICE_OWNER)) { return FALSE; }
+  if(!qof_choice_add_class(GNC_ID_JOB, GNC_ID_CUSTOMER, JOB_OWNER)) { return FALSE; }
   qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncCustomerCompare,params);
-
+  if(!qof_choice_create(GNC_ID_CUSTOMER)) { return FALSE;}
+  /* temp */
+  _gncCustomerPrintable(NULL);
   return qof_object_register (&gncCustomerDesc);
 }
 
Index: businessmod-core.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/businessmod-core.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/business/business-core/businessmod-core.c -Lsrc/business/business-core/businessmod-core.c -u -r1.11 -r1.12
--- src/business/business-core/businessmod-core.c
+++ src/business/business-core/businessmod-core.c
@@ -81,13 +81,13 @@
   if(refcount == 0) 
   {
     /* initialize known types */
-    gncAddressRegister ();
+    gncInvoiceRegister ();
+    gncJobRegister ();
     gncBillTermRegister ();
     gncCustomerRegister ();
+    gncAddressRegister ();
     gncEmployeeRegister ();
     gncEntryRegister ();
-    gncInvoiceRegister ();
-    gncJobRegister ();
     gncOrderRegister ();
     gncOwnerRegister ();
     gncTaxTableRegister ();
@@ -104,4 +104,3 @@
 libgncmod_business_core_LTX_gnc_module_end(int refcount) {
   return TRUE;
 }
-
Index: gncBillTerm.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncBillTerm.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lsrc/business/business-core/gncBillTerm.c -Lsrc/business/business-core/gncBillTerm.c -u -r1.41 -r1.42
--- src/business/business-core/gncBillTerm.c
+++ src/business/business-core/gncBillTerm.c
@@ -31,30 +31,9 @@
 #include <glib.h>
 
 #include "messages.h"
-#include "gnc-numeric.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "qofquerycore.h"
-#include "gnc-event-p.h"
-#include "kvp_frame.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-
-#include "gncBusiness.h"
 #include "gncBillTermP.h"
 
-/* doxygen: this definition has been copied and pasted
-into the .h file to make it accessible to doxygen.
-Please keep the two in sync if it is not possible to
-move the struct definition itself into the .h */
 struct _gncBillTerm 
 {
   QofInstance     inst;
@@ -82,12 +61,10 @@
 {
   GList *         terms;        /* visible terms */
 };
-static short        module = MOD_BUSINESS;
 
-#define _GNC_MOD_NAME        GNC_ID_BILLTERM
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
+#define _GNC_MOD_NAME        GNC_ID_BILLTERM
 
 #define SET_STR(obj, member, str) { \
         char * tmp; \
@@ -99,6 +76,9 @@
         member = tmp; \
         }
 
+AS_STRING_DEC(GncBillTermType, ENUM_TERMS_TYPE)
+FROM_STRING_DEC(GncBillTermType, ENUM_TERMS_TYPE)
+
 /* ============================================================== */
 /* Misc inline utilities */
 
@@ -297,6 +277,18 @@
   gncBillTermCommitEdit (term);
 }
 
+/** \brief Convert bill term types from text. */
+FROM_STRING_FUNC(GncBillTermType, ENUM_TERMS_TYPE)
+
+static
+void qofBillTermSetType (GncBillTerm *term, const char *type_label)
+{
+	GncBillTermType type;
+
+	type = GncBillTermTypefromString(type_label);
+	gncBillTermSetType(term, type);
+}
+
 void gncBillTermSetDueDays (GncBillTerm *term, gint days)
 {
   if (!term) return;
@@ -470,6 +462,16 @@
   return term->type;
 }
 
+/** \brief Convert bill term types to text. */
+AS_STRING_FUNC(GncBillTermType, ENUM_TERMS_TYPE)
+
+static
+const char* qofBillTermGetType (GncBillTerm *term)
+{
+	if (!term) { return NULL; }
+	return GncBillTermTypeasString(term->type);
+}
+
 gint gncBillTermGetDueDays (GncBillTerm *term)
 {
   if (!term) return 0;
@@ -695,7 +697,7 @@
   static QofParam params[] = {
 	{ GNC_BILLTERM_NAME, 		QOF_TYPE_STRING,  (QofAccessFunc)gncBillTermGetName,			(QofSetterFunc)gncBillTermSetName },
 	{ GNC_BILLTERM_DESC, 		QOF_TYPE_STRING,  (QofAccessFunc)gncBillTermGetDescription,		(QofSetterFunc)gncBillTermSetDescription },
-	{ GNC_BILLTERM_TYPE, 		QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetType, 			(QofSetterFunc)gncBillTermSetType },
+	{ GNC_BILLTERM_TYPE, QOF_TYPE_STRING, (QofAccessFunc)qofBillTermGetType, (QofSetterFunc)qofBillTermSetType },
 	{ GNC_BILLTERM_DUEDAYS, 	QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetDueDays, 		(QofSetterFunc)gncBillTermSetDueDays },
 	{ GNC_BILLTERM_DISCDAYS, 	QOF_TYPE_INT32,   (QofAccessFunc)gncBillTermGetDiscountDays,	(QofSetterFunc)gncBillTermSetDiscountDays },
 	{ GNC_BILLTERM_DISCOUNT, 	QOF_TYPE_NUMERIC, (QofAccessFunc)gncBillTermGetDiscount,		(QofSetterFunc)gncBillTermSetDiscount },
Index: gncJob.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncJob.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -Lsrc/business/business-core/gncJob.c -Lsrc/business/business-core/gncJob.c -u -r1.46 -r1.47
--- src/business/business-core/gncJob.c
+++ src/business/business-core/gncJob.c
@@ -31,24 +31,8 @@
 #include <glib.h>
 #include <string.h>
 
-#include "guid.h"
 #include "messages.h"
-#include "gnc-engine-util.h"
-#include "gnc-numeric.h"
-#include "gnc-event-p.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-
-#include "gncBusiness.h"
+#include "gncInvoice.h"
 #include "gncJob.h"
 #include "gncJobP.h"
 #include "gncOwnerP.h"
@@ -63,19 +47,15 @@
   gboolean      active;
 };
 
-static short        module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME        GNC_ID_JOB
 
 /* ================================================================== */
 /* misc inline functions */
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 G_INLINE_FUNC void mark_job (GncJob *job);
-G_INLINE_FUNC void
-mark_job (GncJob *job)
+void mark_job (GncJob *job)
 {
   job->inst.dirty = TRUE;
   qof_collection_mark_dirty (job->inst.entity.collection);
@@ -269,6 +249,16 @@
   gncJobCommitEdit (job);
 }
 
+static void
+qofJobSetOwner (GncJob *job, QofEntity *ent)
+{
+	if(!job || !ent) { return; }
+	qof_begin_edit(&job->inst);
+	qofOwnerSetEntity(&job->owner, ent);
+	mark_job (job);
+	qof_commit_edit(&job->inst);
+}
+
 void gncJobBeginEdit (GncJob *job)
 {
   QOF_BEGIN_EDIT (&job->inst);
@@ -327,6 +317,13 @@
   return job->active;
 }
 
+static QofEntity*
+qofJobGetOwner (GncJob *job)
+{
+	if(!job) { return NULL; }
+	return (QofEntity*)qofOwnerGetOwner(&job->owner);
+}
+
 /* Other functions */
 
 int gncJobCompare (const GncJob * a, const GncJob *b) {
@@ -370,15 +367,25 @@
     { JOB_NAME, QOF_TYPE_STRING, (QofAccessFunc)gncJobGetName, (QofSetterFunc)gncJobSetName },
     { JOB_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncJobGetActive, (QofSetterFunc)gncJobSetActive },
     { JOB_REFERENCE, QOF_TYPE_STRING, (QofAccessFunc)gncJobGetReference, (QofSetterFunc)gncJobSetReference },
-    { JOB_OWNER, GNC_ID_OWNER, (QofAccessFunc)gncJobGetOwner, (QofSetterFunc)gncJobSetOwner },
+#ifdef GNUCASH_MAJOR_VERSION
+    { JOB_OWNER, GNC_ID_OWNER, (QofAccessFunc)gncJobGetOwner, NULL },
+#else
+    { JOB_OWNER, QOF_TYPE_CHOICE, (QofAccessFunc)qofJobGetOwner, (QofSetterFunc)qofJobSetOwner },
+#endif
     { QOF_PARAM_ACTIVE, QOF_TYPE_BOOLEAN, (QofAccessFunc)gncJobGetActive, NULL },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
     { NULL },
   };
 
-  qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncJobCompare, params);
+  if(!qof_choice_create(GNC_ID_JOB)) { return FALSE; }
+  if(!qof_choice_add_class(GNC_ID_INVOICE, GNC_ID_JOB, INVOICE_OWNER)) { return FALSE; }
 
+  qof_class_register (_GNC_MOD_NAME, (QofSortFunc)gncJobCompare, params);
+#ifdef GNUCASH_MAJOR_VERSION
+  qofJobGetOwner(NULL);
+  qofJobSetOwner(NULL, NULL);
+#endif
   return qof_object_register (&gncJobDesc);
 }
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-core/.cvsignore -Lsrc/business/business-core/.cvsignore -u -r1.2 -r1.3
--- src/business/business-core/.cvsignore
+++ src/business/business-core/.cvsignore
@@ -9,3 +9,6 @@
 gw-business-core.h
 gw-business-core.html
 gw-business-core.scm
+.DS_Store
+*.loT
+
Index: gncTaxTableP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncTaxTableP.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-core/gncTaxTableP.h -Lsrc/business/business-core/gncTaxTableP.h -u -r1.8 -r1.9
--- src/business/business-core/gncTaxTableP.h
+++ src/business/business-core/gncTaxTableP.h
@@ -30,7 +30,6 @@
 #define GNC_TAXTABLEP_H_
 
 #include "gncTaxTable.h"
-#include "qofid-p.h"
 
 gboolean gncTaxTableRegister (void);
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/business/business-core/Makefile.am -Lsrc/business/business-core/Makefile.am -u -r1.20 -r1.21
--- src/business/business-core/Makefile.am
+++ src/business/business-core/Makefile.am
@@ -9,6 +9,7 @@
   -I${top_srcdir}/src/gnc-module \
   ${G_WRAP_COMPILE_ARGS} \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 libgncmod_business_core_la_SOURCES = \
@@ -55,17 +56,17 @@
   gncVendorP.h \
   gw-business-core.h
 
-libgncmod_business_core_la_LDFLAGS = -module
-
 libgncmod_business_core_la_LIBADD = \
   ${GUILE_LIBS} \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   ${EFENCE_LIBS}
 
 # business-core-helpers.c
 
 libgw_business_core_la_SOURCES = gw-business-core.c 
-libgw_business_core_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
+
+libgw_business_core_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
 libgw_business_core_la_LIBADD  = libgncmod-business-core.la
 
 gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
Index: gncOrder.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncOrder.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -Lsrc/business/business-core/gncOrder.c -Lsrc/business/business-core/gncOrder.c -u -r1.46 -r1.47
--- src/business/business-core/gncOrder.c
+++ src/business/business-core/gncOrder.c
@@ -30,24 +30,6 @@
 #include <glib.h>
 
 #include "messages.h"
-#include "gnc-numeric.h"
-#include "kvp_frame.h"
-#include "gnc-engine-util.h"
-
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofclass.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-
-#include "gnc-event-p.h"
-
-#include "gncBusiness.h"
 #include "gncEntry.h"
 #include "gncEntryP.h"
 #include "gncOrder.h"
@@ -71,13 +53,10 @@
   Timespec 	closed;
 };
 
-static short	module = MOD_BUSINESS;
+static QofLogModule log_module = GNC_MOD_BUSINESS;
 
 #define _GNC_MOD_NAME	GNC_ID_ORDER
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (str));
-
 #define SET_STR(obj, member, str) { \
 	char * tmp; \
 	\
@@ -89,8 +68,7 @@
 	}
 
 G_INLINE_FUNC void mark_order (GncOrder *order);
-G_INLINE_FUNC void
-mark_order (GncOrder *order)
+void mark_order (GncOrder *order)
 {
   order->inst.dirty = TRUE;
   qof_collection_mark_dirty (order->inst.entity.collection);
@@ -356,7 +334,7 @@
 
 void gncOrderBeginEdit (GncOrder *order)
 {
-  QOF_BEGIN_EDIT (&order->inst);
+  qof_begin_edit(&order->inst);
 }
 
 static inline void gncOrderOnError (QofInstance *order, QofBackendError errcode)
Index: gncCustomerP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/gncCustomerP.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/business/business-core/gncCustomerP.h -Lsrc/business/business-core/gncCustomerP.h -u -r1.10 -r1.11
--- src/business/business-core/gncCustomerP.h
+++ src/business/business-core/gncCustomerP.h
@@ -30,7 +30,6 @@
 #define GNC_CUSTOMERP_H_
 
 #include "gncCustomer.h"
-#include "qofid-p.h"
 
 gboolean gncCustomerRegister (void);
 gint64 gncCustomerNextID (QofBook *book);
Index: gnc-job-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-job-xml-v2.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-core/file/gnc-job-xml-v2.c -Lsrc/business/business-core/file/gnc-job-xml-v2.c -u -r1.8 -r1.9
--- src/business/business-core/file/gnc-job-xml-v2.c
+++ src/business/business-core/file/gnc-job-xml-v2.c
@@ -44,14 +44,11 @@
 #include "gncJobP.h"
 #include "gnc-job-xml-v2.h"
 #include "gnc-owner-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofobject.h"
 #include "xml-helpers.h"
 
 #define _GNC_MOD_NAME	GNC_ID_JOB
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *job_version_string = "2.0.0";
 
@@ -70,8 +67,8 @@
 {
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, gnc_job_string);
-    xmlSetProp(ret, "version", job_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_job_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST job_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(job_guid_string,
 				      qof_instance_get_guid (QOF_INSTANCE (job))));
@@ -98,7 +95,7 @@
 struct job_pdata
 {
   GncJob *job;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -208,7 +205,7 @@
 };
 
 static GncJob*
-dom_tree_to_job (xmlNodePtr node, GNCBook *book)
+dom_tree_to_job (xmlNodePtr node, QofBook *book)
 {
     struct job_pdata job_pdata;
     gboolean successful;
@@ -242,7 +239,7 @@
     GncJob *job;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -299,7 +296,7 @@
 }
 
 static int
-job_get_count (GNCBook *book)
+job_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -323,11 +320,18 @@
 }
 
 static void
-job_write (FILE *out, GNCBook *book)
+job_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_job, (gpointer) out);
 }
 
+static void
+job_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "job");
+}
+
 void
 gnc_job_xml_initialize (void)
 {
@@ -339,6 +343,7 @@
     job_get_count,
     job_write,
     NULL,			/* scrub */
+    job_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gnc-customer-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-customer-xml-v2.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/business/business-core/file/gnc-customer-xml-v2.c -Lsrc/business/business-core/file/gnc-customer-xml-v2.c -u -r1.18 -r1.19
--- src/business/business-core/file/gnc-customer-xml-v2.c
+++ src/business/business-core/file/gnc-customer-xml-v2.c
@@ -46,16 +46,12 @@
 #include "gncTaxTableP.h"
 #include "gnc-customer-xml-v2.h"
 #include "gnc-address-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofobject.h"
-#include "qofinstance.h"
 
 #include "xml-helpers.h"
 
 #define _GNC_MOD_NAME	GNC_ID_CUSTOMER
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *customer_version_string = "2.0.0";
 
@@ -85,8 +81,8 @@
     GncBillTerm *term;
     GncTaxTable *taxtable;
 
-    ret = xmlNewNode(NULL, gnc_customer_string);
-    xmlSetProp(ret, "version", customer_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_customer_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST customer_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(cust_guid_string,
 				      qof_instance_get_guid(QOF_INSTANCE(cust))));
@@ -147,7 +143,7 @@
 struct customer_pdata
 {
   GncCustomer *customer;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -397,7 +393,7 @@
 };
 
 static GncCustomer*
-dom_tree_to_customer (xmlNodePtr node, GNCBook *book)
+dom_tree_to_customer (xmlNodePtr node, QofBook *book)
 {
     struct customer_pdata cust_pdata;
     gboolean successful;
@@ -431,7 +427,7 @@
     GncCustomer *cust;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -488,7 +484,7 @@
 }
 
 static int
-customer_get_count (GNCBook *book)
+customer_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -512,11 +508,18 @@
 }
 
 static void
-customer_write (FILE *out, GNCBook *book)
+customer_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_customer, (gpointer) out);
 }
 
+static void
+customer_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "cust");
+}
+
 void
 gnc_customer_xml_initialize (void)
 {
@@ -528,6 +531,7 @@
     customer_get_count,
     customer_write,
     NULL,			/* scrub */
+    customer_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gnc-address-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-address-xml-v2.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-core/file/gnc-address-xml-v2.c -Lsrc/business/business-core/file/gnc-address-xml-v2.c -u -r1.2 -r1.3
--- src/business/business-core/file/gnc-address-xml-v2.c
+++ src/business/business-core/file/gnc-address-xml-v2.c
@@ -43,9 +43,7 @@
 
 #include "gnc-address-xml-v2.h"
 
-#include "gnc-engine-util.h"
-
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *address_version_string = "2.0.0";
 
@@ -72,8 +70,8 @@
 {
     xmlNodePtr ret;
 
-    ret = xmlNewNode(NULL, tag);
-    xmlSetProp(ret, "version", address_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST address_version_string);
 
     maybe_add_string (ret, addr_name_string, gncAddressGetName (addr));
     
@@ -211,3 +209,29 @@
 
     return successful;
 }
+
+static void
+address_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "addr");
+}
+
+void
+gnc_address_xml_initialize (void)
+{
+  static GncXmlDataType_t be_data = {
+    GNC_FILE_BACKEND_VERS,
+    "gnc:Address",
+    NULL,			/* parser_create */
+    NULL,			/* add_item */
+    NULL,			/* get_count */
+    NULL,			/* write */
+    NULL,			/* scrub */
+    address_ns,
+  };
+
+  qof_object_register_backend ("gnc:Address",
+			    GNC_FILE_BACKEND,
+			    &be_data);
+}
Index: gnc-owner-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-owner-xml-v2.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/business-core/file/gnc-owner-xml-v2.c -Lsrc/business/business-core/file/gnc-owner-xml-v2.c -u -r1.4 -r1.5
--- src/business/business-core/file/gnc-owner-xml-v2.c
+++ src/business/business-core/file/gnc-owner-xml-v2.c
@@ -41,17 +41,13 @@
 #include "io-gncxml-gen.h"
 #include "io-gncxml-v2.h"
 
-#include "qofinstance.h"
-
 #include "gnc-owner-xml-v2.h"
 #include "gncCustomerP.h"
 #include "gncJobP.h"
 #include "gncVendorP.h"
 #include "gncEmployeeP.h"
 
-#include "gnc-engine-util.h"
-
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *owner_version_string = "2.0.0";
 
@@ -83,8 +79,8 @@
       return NULL;
     }
 
-    ret = xmlNewNode(NULL, tag);
-    xmlSetProp(ret, "version", owner_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST tag);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST owner_version_string);
 
     xmlAddChild (ret, text_to_dom_tree (owner_type_string, type_str));
     xmlAddChild (ret, guid_to_dom_tree (owner_id_string,
@@ -98,7 +94,7 @@
 struct owner_pdata
 {
   GncOwner *owner;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -193,7 +189,7 @@
 };
 
 gboolean
-gnc_dom_tree_to_owner (xmlNodePtr node, GncOwner *owner, GNCBook *book)
+gnc_dom_tree_to_owner (xmlNodePtr node, GncOwner *owner, QofBook *book)
 {
     struct owner_pdata owner_pdata;
     gboolean successful;
@@ -211,3 +207,29 @@
 
     return successful;
 }
+
+static void
+owner_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "owner");
+}
+
+void
+gnc_owner_xml_initialize (void)
+{
+  static GncXmlDataType_t be_data = {
+    GNC_FILE_BACKEND_VERS,
+    "gnc:Owner",
+    NULL,			/* parser_create */
+    NULL,			/* add_item */
+    NULL,			/* get_count */
+    NULL,			/* write */
+    NULL,			/* scrub */
+    owner_ns,
+  };
+
+  qof_object_register_backend ("gnc:Owner",
+			    GNC_FILE_BACKEND,
+			    &be_data);
+}
Index: gnc-invoice-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-invoice-xml-v2.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/business/business-core/file/gnc-invoice-xml-v2.c -Lsrc/business/business-core/file/gnc-invoice-xml-v2.c -u -r1.19 -r1.20
--- src/business/business-core/file/gnc-invoice-xml-v2.c
+++ src/business/business-core/file/gnc-invoice-xml-v2.c
@@ -45,14 +45,10 @@
 #include "gncInvoiceP.h"
 #include "gnc-invoice-xml-v2.h"
 #include "gnc-owner-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofinstance.h"
-#include "qofobject.h"
 
 #define _GNC_MOD_NAME	GNC_ID_INVOICE
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *invoice_version_string = "2.0.0";
 
@@ -101,8 +97,8 @@
     GncOwner *billto;
     gnc_numeric amt;
 
-    ret = xmlNewNode(NULL, gnc_invoice_string);
-    xmlSetProp(ret, "version", invoice_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_invoice_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST invoice_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(invoice_guid_string,
 				      qof_instance_get_guid(QOF_INSTANCE(invoice))));
@@ -167,7 +163,7 @@
 struct invoice_pdata
 {
   GncInvoice *invoice;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static inline gboolean
@@ -188,7 +184,7 @@
            void (*func)(GncInvoice *invoice, Timespec ts))
 {
   Timespec ts = dom_tree_to_timespec(node);
-  g_return_val_if_fail(is_valid_timespec(ts), FALSE);
+  if (!dom_tree_valid_timespec(&ts, node->name)) return FALSE;
     
   func(invoice, ts);
   return TRUE;
@@ -428,7 +424,7 @@
 };
 
 static GncInvoice*
-dom_tree_to_invoice (xmlNodePtr node, GNCBook *book)
+dom_tree_to_invoice (xmlNodePtr node, QofBook *book)
 {
     struct invoice_pdata invoice_pdata;
     gboolean successful;
@@ -462,7 +458,7 @@
     GncInvoice *invoice;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -519,7 +515,7 @@
 }
 
 static int
-invoice_get_count (GNCBook *book)
+invoice_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -543,11 +539,18 @@
 }
 
 static void
-invoice_write (FILE *out, GNCBook *book)
+invoice_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_invoice, (gpointer) out);
 }
 
+static void
+invoice_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "invoice");
+}
+
 void
 gnc_invoice_xml_initialize (void)
 {
@@ -559,6 +562,7 @@
     invoice_get_count,
     invoice_write,
     NULL,			/* scrub */
+    invoice_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gnc-vendor-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-vendor-xml-v2.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/business/business-core/file/gnc-vendor-xml-v2.c -Lsrc/business/business-core/file/gnc-vendor-xml-v2.c -u -r1.17 -r1.18
--- src/business/business-core/file/gnc-vendor-xml-v2.c
+++ src/business/business-core/file/gnc-vendor-xml-v2.c
@@ -46,16 +46,11 @@
 #include "gncTaxTableP.h"
 #include "gnc-vendor-xml-v2.h"
 #include "gnc-address-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofinstance.h"
-#include "qofobject.h"
-
 #include "xml-helpers.h"
 
 #define _GNC_MOD_NAME	GNC_ID_VENDOR
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *vendor_version_string = "2.0.0";
 
@@ -81,8 +76,8 @@
     GncBillTerm *term;
     GncTaxTable *taxtable;
 
-    ret = xmlNewNode(NULL, gnc_vendor_string);
-    xmlSetProp(ret, "version", vendor_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_vendor_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST vendor_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(vendor_guid_string,
 				      qof_instance_get_guid (QOF_INSTANCE(vendor))));
@@ -130,7 +125,7 @@
 struct vendor_pdata
 {
   GncVendor *vendor;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -335,7 +330,7 @@
 };
 
 static GncVendor*
-dom_tree_to_vendor (xmlNodePtr node, GNCBook *book)
+dom_tree_to_vendor (xmlNodePtr node, QofBook *book)
 {
     struct vendor_pdata vendor_pdata;
     gboolean successful;
@@ -369,7 +364,7 @@
     GncVendor *vendor;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -426,7 +421,7 @@
 }
 
 static int
-vendor_get_count (GNCBook *book)
+vendor_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -450,11 +445,18 @@
 }
 
 static void
-vendor_write (FILE *out, GNCBook *book)
+vendor_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_vendor, (gpointer) out);
 }
 
+static void
+vendor_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "vendor");
+}
+
 void
 gnc_vendor_xml_initialize (void)
 {
@@ -466,6 +468,7 @@
     vendor_get_count,
     vendor_write,
     NULL,			/* scrub */
+    vendor_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gnc-bill-term-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-bill-term-xml-v2.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/business/business-core/file/gnc-bill-term-xml-v2.c -Lsrc/business/business-core/file/gnc-bill-term-xml-v2.c -u -r1.11 -r1.12
--- src/business/business-core/file/gnc-bill-term-xml-v2.c
+++ src/business/business-core/file/gnc-bill-term-xml-v2.c
@@ -46,14 +46,11 @@
 #include "gnc-bill-term-xml-v2.h"
 #include "gnc-engine-util.h"
 
-#include "qofinstance.h"
-#include "qofobject.h"
-
 #include "xml-helpers.h"
 
 #define _GNC_MOD_NAME	GNC_ID_BILLTERM
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *billterm_version_string = "2.0.0";
 
@@ -84,8 +81,8 @@
 {
     xmlNodePtr ret, data, kvpnode;
 
-    ret = xmlNewNode(NULL, gnc_billterm_string);
-    xmlSetProp(ret, "version", billterm_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_billterm_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST billterm_version_string);
 
     maybe_add_guid(ret, billterm_guid_string, QOF_INSTANCE(term));
     xmlAddChild(ret, text_to_dom_tree (billterm_name_string,
@@ -113,7 +110,7 @@
 
     switch (gncBillTermGetType (term)) {
     case GNC_TERM_TYPE_DAYS:
-      data = xmlNewChild (ret, NULL, gnc_daystype_string, NULL);
+      data = xmlNewChild (ret, NULL, BAD_CAST gnc_daystype_string, NULL);
       maybe_add_int (data, days_duedays_string, gncBillTermGetDueDays (term));
       maybe_add_int (data, days_discdays_string,
 		     gncBillTermGetDiscountDays (term));
@@ -122,7 +119,7 @@
       break;
 
     case GNC_TERM_TYPE_PROXIMO:
-      data = xmlNewChild (ret, NULL, gnc_proximotype_string, NULL);
+      data = xmlNewChild (ret, NULL, BAD_CAST gnc_proximotype_string, NULL);
       maybe_add_int (data, prox_dueday_string, gncBillTermGetDueDays (term));
       maybe_add_int (data, prox_discday_string,
 		     gncBillTermGetDiscountDays (term));
@@ -140,7 +137,7 @@
 struct billterm_pdata
 {
   GncBillTerm *term;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -416,7 +413,7 @@
 };
 
 static GncBillTerm*
-dom_tree_to_billterm (xmlNodePtr node, GNCBook *book)
+dom_tree_to_billterm (xmlNodePtr node, QofBook *book)
 {
   struct billterm_pdata billterm_pdata;
   gboolean successful;
@@ -449,7 +446,7 @@
     GncBillTerm *term;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -492,7 +489,7 @@
 }
 
 static int
-billterm_get_count (GNCBook *book)
+billterm_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -513,7 +510,7 @@
 }
 
 static void
-billterm_write (FILE *out, GNCBook *book)
+billterm_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_billterm, (gpointer) out);
 }
@@ -658,15 +655,15 @@
   gint32 count = GPOINTER_TO_INT(value);
 
   if (count != gncBillTermGetRefcount(term) && !gncBillTermGetInvisible(term)) {
-    PWARN("Fixing refcount on billterm %s (%lld -> %d)\n",
+    PWARN("Fixing refcount on billterm %s (%" G_GINT64_FORMAT " -> %d)\n",
 	  guid_to_string(qof_instance_get_guid(QOF_INSTANCE(term))),
-	  gncBillTermGetRefcount(term), count)
+	  gncBillTermGetRefcount(term), count);
       gncBillTermSetRefcount(term, count);
   }
 }
 
 static void
-billterm_scrub (GNCBook *book)
+billterm_scrub (QofBook *book)
 {
   GList *list = NULL;
   GList *node;
@@ -701,6 +698,15 @@
   g_hash_table_destroy(ht);
 }
 
+static void
+billterm_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "billterm");
+  gnc_xml2_write_namespace_decl(out, "bt-days");
+  gnc_xml2_write_namespace_decl(out, "bt-prox");
+}
+
 void
 gnc_billterm_xml_initialize (void)
 {
@@ -712,6 +718,7 @@
     billterm_get_count,
     billterm_write,
     billterm_scrub,
+    billterm_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gnc-entry-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-entry-xml-v2.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/business/business-core/file/gnc-entry-xml-v2.c -Lsrc/business/business-core/file/gnc-entry-xml-v2.c -u -r1.18 -r1.19
--- src/business/business-core/file/gnc-entry-xml-v2.c
+++ src/business/business-core/file/gnc-entry-xml-v2.c
@@ -47,14 +47,10 @@
 #include "gncTaxTableP.h"
 #include "gnc-entry-xml-v2.h"
 #include "gnc-owner-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofinstance.h"
-#include "qofobject.h"
 
 #define _GNC_MOD_NAME	GNC_ID_ENTRY
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *entry_version_string = "2.0.0";
 
@@ -120,8 +116,8 @@
     GncOrder *order;
     GncInvoice *invoice;
 
-    ret = xmlNewNode(NULL, gnc_entry_string);
-    xmlSetProp(ret, "version", entry_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_entry_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST entry_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(entry_guid_string,
 				      qof_instance_get_guid(QOF_INSTANCE(entry))));
@@ -221,7 +217,7 @@
 struct entry_pdata
 {
   GncEntry *entry;
-  GNCBook *book;
+  QofBook *book;
   Account *acc;
 };
 
@@ -242,7 +238,7 @@
            void (*func)(GncEntry *entry, Timespec ts))
 {
   Timespec ts = dom_tree_to_timespec (node);
-  g_return_val_if_fail(is_valid_timespec(ts), FALSE);
+  if (!dom_tree_valid_timespec(&ts, node->name)) return FALSE;
     
   func(entry, ts);
   return TRUE;
@@ -708,7 +704,7 @@
 };
 
 static GncEntry*
-dom_tree_to_entry (xmlNodePtr node, GNCBook *book)
+dom_tree_to_entry (xmlNodePtr node, QofBook *book)
 {
     struct entry_pdata entry_pdata;
     gboolean successful;
@@ -749,7 +745,7 @@
     GncEntry *entry;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -792,7 +788,7 @@
 }
 
 static int
-entry_get_count (GNCBook *book)
+entry_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -818,11 +814,18 @@
 }
 
 static void
-entry_write (FILE *out, GNCBook *book)
+entry_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_entry, (gpointer) out);
 }
 
+static void
+entry_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "entry");
+}
+
 void
 gnc_entry_xml_initialize (void)
 {
@@ -834,6 +837,7 @@
     entry_get_count,
     entry_write,
     NULL,			/* scrub */
+    entry_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: gncmod-business-backend-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gncmod-business-backend-file.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/business/business-core/file/gncmod-business-backend-file.c -Lsrc/business/business-core/file/gncmod-business-backend-file.c -u -r1.6 -r1.7
--- src/business/business-core/file/gncmod-business-backend-file.c
+++ src/business/business-core/file/gncmod-business-backend-file.c
@@ -28,7 +28,10 @@
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "gnc-engine.h"
+#include "io-gncxml-v2.h"
 
+#include "gnc-address-xml-v2.h"
 #include "gnc-bill-term-xml-v2.h"
 #include "gnc-customer-xml-v2.h"
 #include "gnc-employee-xml-v2.h"
@@ -36,6 +39,7 @@
 #include "gnc-invoice-xml-v2.h"
 #include "gnc-job-xml-v2.h"
 #include "gnc-order-xml-v2.h"
+#include "gnc-owner-xml-v2.h"
 #include "gnc-tax-table-xml-v2.h"
 #include "gnc-vendor-xml-v2.h"
 
@@ -72,17 +76,14 @@
 int
 libgncmod_business_backend_file_LTX_gnc_module_init(int refcount) 
 {  
+  if(!gnc_engine_is_initialized()) { return FALSE; }
+
   bus_core = gnc_module_load("gnucash/business-core", 0);
   if(!bus_core) return FALSE;
 
-  file = gnc_module_load("gnucash/backend/file", 0);
-  if(!file) {
-    gnc_module_unload (bus_core);
-    return FALSE;
-  }
-
   if (refcount == 0) {
     /* Initialize our pointers into the backend subsystem */
+    gnc_address_xml_initialize ();
     gnc_billterm_xml_initialize ();
     gnc_customer_xml_initialize ();
     gnc_employee_xml_initialize ();
@@ -90,6 +91,7 @@
     gnc_invoice_xml_initialize ();
     gnc_job_xml_initialize ();
     gnc_order_xml_initialize ();
+    gnc_owner_xml_initialize ();
     gnc_taxtable_xml_initialize ();
     gnc_vendor_xml_initialize ();
   }
@@ -105,9 +107,6 @@
   if (bus_core)
     unload = gnc_module_unload(bus_core);
 
-  if (file)
-    unload = gnc_module_unload(file);
-
   if (refcount == 0) {
     bus_core = NULL;
     file = NULL;
Index: gnc-owner-xml-v2.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-owner-xml-v2.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/business/business-core/file/gnc-owner-xml-v2.h -Lsrc/business/business-core/file/gnc-owner-xml-v2.h -u -r1.3 -r1.4
--- src/business/business-core/file/gnc-owner-xml-v2.h
+++ src/business/business-core/file/gnc-owner-xml-v2.h
@@ -29,5 +29,6 @@
 gboolean   gnc_dom_tree_to_owner (xmlNodePtr node, GncOwner *owner,
 				  QofBook *book);
 xmlNodePtr gnc_owner_to_dom_tree (const char *tag, GncOwner *addr);
+void gnc_owner_xml_initialize (void);
 
 #endif /* GNC_OWNER_XML_V2_H */
Index: gnc-tax-table-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-tax-table-xml-v2.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/business/business-core/file/gnc-tax-table-xml-v2.c -Lsrc/business/business-core/file/gnc-tax-table-xml-v2.c -u -r1.10 -r1.11
--- src/business/business-core/file/gnc-tax-table-xml-v2.c
+++ src/business/business-core/file/gnc-tax-table-xml-v2.c
@@ -44,14 +44,10 @@
 #include "gncEntry.h"
 #include "gncTaxTableP.h"
 #include "gnc-tax-table-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofobject.h"
-#include "qofinstance.h"
 
 #define _GNC_MOD_NAME	GNC_ID_TAXTABLE
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *taxtable_version_string = "2.0.0";
 
@@ -86,7 +82,7 @@
   Account *account;
   gnc_numeric amount;
 
-  ret = xmlNewNode(NULL, gnc_taxtableentry_string);
+  ret = xmlNewNode(NULL, BAD_CAST gnc_taxtableentry_string);
 
   account = gncTaxTableEntryGetAccount (entry);
   if (account)
@@ -109,8 +105,8 @@
     xmlNodePtr ret, entries;
     GList *list;
 
-    ret = xmlNewNode(NULL, gnc_taxtable_string);
-    xmlSetProp(ret, "version", taxtable_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_taxtable_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST taxtable_version_string);
 
     maybe_add_guid(ret, taxtable_guid_string, table);
     xmlAddChild(ret, text_to_dom_tree (taxtable_name_string,
@@ -127,7 +123,7 @@
 
     maybe_add_guid(ret, taxtable_parent_string, gncTaxTableGetParent (table));
 
-    entries = xmlNewChild (ret, NULL, taxtable_entries_string, NULL);
+    entries = xmlNewChild (ret, NULL, BAD_CAST taxtable_entries_string, NULL);
     for (list = gncTaxTableGetEntries (table); list; list = list->next) {
       GncTaxTableEntry *entry = list->data;
       xmlAddChild(entries, ttentry_dom_tree_create (entry));
@@ -141,7 +137,7 @@
 struct ttentry_pdata
 {
   GncTaxTableEntry *ttentry;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -201,7 +197,7 @@
 };
 
 static GncTaxTableEntry*
-dom_tree_to_ttentry (xmlNodePtr node, GNCBook *book)
+dom_tree_to_ttentry (xmlNodePtr node, QofBook *book)
 {
   struct ttentry_pdata ttentry_pdata;
   gboolean successful;
@@ -226,7 +222,7 @@
 struct taxtable_pdata
 {
   GncTaxTable *table;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -343,10 +339,10 @@
   for (mark = node->xmlChildrenNode; mark; mark = mark->next) {
     GncTaxTableEntry *entry;
         
-    if (safe_strcmp ("text", mark->name) == 0)
+    if (safe_strcmp ("text", (char*)mark->name) == 0)
       continue;
 
-    if (safe_strcmp (gnc_taxtableentry_string, mark->name))
+    if (safe_strcmp (gnc_taxtableentry_string, (char*)mark->name))
       return FALSE;
 
     entry = dom_tree_to_ttentry (mark, pdata->book);
@@ -379,7 +375,7 @@
 };
 
 static GncTaxTable*
-dom_tree_to_taxtable (xmlNodePtr node, GNCBook *book)
+dom_tree_to_taxtable (xmlNodePtr node, QofBook *book)
 {
   struct taxtable_pdata taxtable_pdata;
   gboolean successful;
@@ -413,7 +409,7 @@
     GncTaxTable *table;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -456,7 +452,7 @@
 }
 
 static int
-taxtable_get_count (GNCBook *book)
+taxtable_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -477,7 +473,7 @@
 }
 
 static void
-taxtable_write (FILE *out, GNCBook *book)
+taxtable_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_taxtable, (gpointer) out);
 }
@@ -620,15 +616,15 @@
   gint32 count = GPOINTER_TO_INT(value);
 
   if (count != gncTaxTableGetRefcount(table) && !gncTaxTableGetInvisible(table)) {
-    PWARN("Fixing refcount on taxtable %s (%lld -> %d)\n",
+    PWARN("Fixing refcount on taxtable %s (%" G_GINT64_FORMAT " -> %d)\n",
 	  guid_to_string(qof_instance_get_guid(QOF_INSTANCE(table))),
-	  gncTaxTableGetRefcount(table), count)
+	  gncTaxTableGetRefcount(table), count);
       gncTaxTableSetRefcount(table, count);
   }
 }
 
 static void
-taxtable_scrub (GNCBook *book)
+taxtable_scrub (QofBook *book)
 {
   GList *list = NULL;
   GList *node;
@@ -663,6 +659,14 @@
   g_hash_table_destroy(ht);
 }
 
+static void
+taxtable_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "taxtable");
+  gnc_xml2_write_namespace_decl(out, "tte");
+}
+
 void
 gnc_taxtable_xml_initialize (void)
 {
@@ -674,6 +678,7 @@
     taxtable_get_count,
     taxtable_write,
     taxtable_scrub,
+    taxtable_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/business/business-core/file/.cvsignore -Lsrc/business/business-core/file/.cvsignore -u -r1.1 -r1.2
--- src/business/business-core/file/.cvsignore
+++ src/business/business-core/file/.cvsignore
@@ -4,3 +4,5 @@
 .libs
 Makefile
 Makefile.in
+.DS_Store
+
Index: gnc-employee-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-employee-xml-v2.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/business/business-core/file/gnc-employee-xml-v2.c -Lsrc/business/business-core/file/gnc-employee-xml-v2.c -u -r1.11 -r1.12
--- src/business/business-core/file/gnc-employee-xml-v2.c
+++ src/business/business-core/file/gnc-employee-xml-v2.c
@@ -44,14 +44,10 @@
 #include "gncEmployeeP.h"
 #include "gnc-employee-xml-v2.h"
 #include "gnc-address-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "qofinstance.h"
-#include "qofobject.h"
 
 #define _GNC_MOD_NAME	GNC_ID_EMPLOYEE
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *employee_version_string = "2.0.0";
 
@@ -84,8 +80,8 @@
     gnc_numeric num;
     Account* ccard_acc;
 
-    ret = xmlNewNode(NULL, gnc_employee_string);
-    xmlSetProp(ret, "version", employee_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_employee_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST employee_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(employee_guid_string,
 				      qof_instance_get_guid(QOF_INSTANCE (employee))));
@@ -130,7 +126,7 @@
 struct employee_pdata
 {
   GncEmployee *employee;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static gboolean
@@ -311,7 +307,7 @@
 };
 
 static GncEmployee*
-dom_tree_to_employee (xmlNodePtr node, GNCBook *book)
+dom_tree_to_employee (xmlNodePtr node, QofBook *book)
 {
     struct employee_pdata employee_pdata;
     gboolean successful;
@@ -344,7 +340,7 @@
     GncEmployee *employee;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -401,7 +397,7 @@
 }
 
 static int
-employee_get_count (GNCBook *book)
+employee_get_count (QofBook *book)
 {
   int count = 0;
   qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
@@ -425,11 +421,18 @@
 }
 
 static void
-employee_write (FILE *out, GNCBook *book)
+employee_write (FILE *out, QofBook *book)
 {
   qof_object_foreach (_GNC_MOD_NAME, book, xml_add_employee, (gpointer) out);
 }
 
+static void
+employee_ns(FILE *out)
+{
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "employee");
+}
+
 void
 gnc_employee_xml_initialize (void)
 {
@@ -441,6 +444,7 @@
     employee_get_count,
     employee_write,
     NULL,			/* scrub */
+    employee_ns,
   };
 
   qof_object_register_backend (_GNC_MOD_NAME,
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-core/file/Makefile.am -Lsrc/business/business-core/file/Makefile.am -u -r1.7 -r1.8
--- src/business/business-core/file/Makefile.am
+++ src/business/business-core/file/Makefile.am
@@ -9,7 +9,8 @@
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/business/business-core \
-  $(GNOME_XML_CFLAGS) \
+  ${XML_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
 
 libgncmod_business_backend_file_la_SOURCES = \
@@ -37,9 +38,10 @@
   gnc-order-xml-v2.h \
   gnc-owner-xml-v2.h \
   gnc-tax-table-xml-v2.h \
-  gnc-vendor-xml-v2.h
+  gnc-vendor-xml-v2.h \
+  xml-helpers.h
 
 libgncmod_business_backend_file_la_LDFLAGS = -module
 libgncmod_business_backend_file_la_LIBADD = \
-   ${GLIB_LIBS} ${GNOME_XML_LIB} \
+   ${GLIB_LIBS} ${XML_LIBS} ${QOF_LIBS} \
    ${top_builddir}/src/business/business-core/libgncmod-business-core.la
Index: gnc-order-xml-v2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-order-xml-v2.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/business/business-core/file/gnc-order-xml-v2.c -Lsrc/business/business-core/file/gnc-order-xml-v2.c -u -r1.9 -r1.10
--- src/business/business-core/file/gnc-order-xml-v2.c
+++ src/business/business-core/file/gnc-order-xml-v2.c
@@ -42,15 +42,13 @@
 #include "io-gncxml-v2.h"
 
 #include "gncOrderP.h"
+
 #include "gnc-order-xml-v2.h"
 #include "gnc-owner-xml-v2.h"
-#include "gnc-engine-util.h"
-
-#include "gncObject.h"
 
 #define _GNC_MOD_NAME	GNC_ID_ORDER
 
-static short module = MOD_IO;
+static QofLogModule log_module = GNC_MOD_IO;
 
 const gchar *order_version_string = "2.0.0";
 
@@ -79,8 +77,8 @@
     xmlNodePtr ret;
     Timespec ts;
 
-    ret = xmlNewNode(NULL, gnc_order_string);
-    xmlSetProp(ret, "version", order_version_string);
+    ret = xmlNewNode(NULL, BAD_CAST gnc_order_string);
+    xmlSetProp(ret, BAD_CAST "version", BAD_CAST order_version_string);
 
     xmlAddChild(ret, guid_to_dom_tree(order_guid_string,
 				      qof_instance_get_guid(QOF_INSTANCE (order))));
@@ -112,7 +110,7 @@
 struct order_pdata
 {
   GncOrder *order;
-  GNCBook *book;
+  QofBook *book;
 };
 
 static inline gboolean
@@ -133,7 +131,7 @@
            void (*func)(GncOrder *order, Timespec ts))
 {
   Timespec ts = dom_tree_to_timespec(node);
-  g_return_val_if_fail(is_valid_timespec(ts), FALSE);
+  if (!dom_tree_valid_timespec(&ts, node->name)) return FALSE;
     
   func(order, ts);
   return TRUE;
@@ -250,7 +248,7 @@
 };
 
 static GncOrder*
-dom_tree_to_order (xmlNodePtr node, GNCBook *book)
+dom_tree_to_order (xmlNodePtr node, QofBook *book)
 {
     struct order_pdata order_pdata;
     gboolean successful;
@@ -284,7 +282,7 @@
     GncOrder *order;
     xmlNodePtr tree = (xmlNodePtr)data_for_children;
     gxpf_data *gdata = (gxpf_data*)global_data;
-    GNCBook *book = gdata->bookdata;
+    QofBook *book = gdata->bookdata;
 
     successful = TRUE;
 
@@ -341,10 +339,10 @@
 }
 
 static int
-order_get_count (GNCBook *book)
+order_get_count (QofBook *book)
 {
   int count = 0;
-  gncObjectForeach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
+  qof_object_foreach (_GNC_MOD_NAME, book, do_count, (gpointer) &count);
   return count;
 }
 
@@ -365,9 +363,16 @@
 }
 
 static void
-order_write (FILE *out, GNCBook *book)
+order_write (FILE *out, QofBook *book)
+{
+  qof_object_foreach (_GNC_MOD_NAME, book, xml_add_order, (gpointer) out);
+}
+
+static void
+order_ns(FILE *out)
 {
-  gncObjectForeach (_GNC_MOD_NAME, book, xml_add_order, (gpointer) out);
+  g_return_if_fail(out);
+  gnc_xml2_write_namespace_decl(out, "order");
 }
 
 void
@@ -381,9 +386,10 @@
     order_get_count,
     order_write,
     NULL,			/* scrub */
+    order_ns,
   };
 
-  gncObjectRegisterBackend (_GNC_MOD_NAME,
+  qof_object_register_backend (_GNC_MOD_NAME,
 			    GNC_FILE_BACKEND,
 			    &be_data);
 }
Index: gnc-address-xml-v2.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/file/gnc-address-xml-v2.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-core/file/gnc-address-xml-v2.h -Lsrc/business/business-core/file/gnc-address-xml-v2.h -u -r1.2 -r1.3
--- src/business/business-core/file/gnc-address-xml-v2.h
+++ src/business/business-core/file/gnc-address-xml-v2.h
@@ -27,5 +27,6 @@
 
 gboolean   gnc_dom_tree_to_address (xmlNodePtr node, GncAddress *address);
 xmlNodePtr gnc_address_to_dom_tree (const char *tag, GncAddress *addr);
+void gnc_address_xml_initialize (void);
 
 #endif /* GNC_ADDRESS_XML_V2_H */
Index: test-business.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-business.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-core/test/test-business.c -Lsrc/business/business-core/test/test-business.c -u -r1.8 -r1.9
--- src/business/business-core/test/test-business.c
+++ src/business/business-core/test/test-business.c
@@ -26,9 +26,8 @@
 #include <glib.h>
 #include <libguile.h>
 
-#include "guid.h"
+#include "qof.h"
 #include "gnc-module.h"
-#include "gnc-engine-util.h"
 #include "messages.h"
 
 #include "gncBusiness.h"
Index: test-employee.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-employee.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/business/business-core/test/test-employee.c -Lsrc/business/business-core/test/test-employee.c -u -r1.13 -r1.14
--- src/business/business-core/test/test-employee.c
+++ src/business/business-core/test/test-employee.c
@@ -1,8 +1,9 @@
 /*********************************************************************
  * test-employee.c
- * Test the employee object.
+ * Test the employee object (without Guile).
  * 
  * Copyright (c) 2001 Derek Atkins <warlord at MIT.EDU>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,16 +25,11 @@
  *********************************************************************/
 
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
-#include "qofinstance.h"
-#include "qofobject.h"
-
-#include "gncEmployee.h"
+#include "qof.h"
 #include "gncEmployeeP.h"
+#include "gncCustomerP.h"
+#include "gncJobP.h"
+#include "gncInvoiceP.h"
 #include "test-stuff.h"
 
 static int count = 0;
@@ -60,21 +56,21 @@
 	       gint (*get) (GncEmployee *));
 #endif
 
-extern QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
-
 static void
 test_employee (void)
 {
-  QofBackend *fbe;
+  QofBackend *be;
   QofBook *book;
+  QofSession *session;
   GncEmployee *employee;
 
-  book = qof_book_new ();
-
+  session = qof_session_new();
+  qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
+  book = qof_session_get_book(session);
   /* The book *must* have a backend to pass the test of the 'dirty' flag */
   /* See the README file for details */
-  fbe = libgncmod_backend_file_LTX_gnc_backend_new();
-  qof_book_set_backend (book, fbe);
+  
+  be = qof_book_get_backend (book);
 
   /* Test creation/destruction */
   {
@@ -151,7 +147,7 @@
   set (employee, str);
   do_test (gncEmployeeIsDirty (employee), "test dirty later");
   gncEmployeeCommitEdit (employee);
-  do_test (!gncEmployeeIsDirty (employee), "test dirty after commit");
+  do_test (gncEmployeeIsDirty (employee), "test dirty after commit");
   do_test (safe_strcmp (get (employee), str) == 0, message);
   gncEmployeeSetActive (employee, FALSE);
   count++;
@@ -170,7 +166,7 @@
   set (employee, num);
   do_test (gncEmployeeIsDirty (employee), "test dirty later");
   gncEmployeeCommitEdit (employee);
-  do_test (!gncEmployeeIsDirty (employee), "test dirty after commit");
+  do_test (gncEmployeeIsDirty (employee), "test dirty after commit");
   do_test (gnc_numeric_equal (get (employee), num), message);
   gncEmployeeSetActive (employee, FALSE);
   count++;
@@ -191,7 +187,7 @@
   set (employee, num);
   do_test (gncEmployeeIsDirty (employee), "test dirty later");
   gncEmployeeCommitEdit (employee);
-  do_test (!gncEmployeeIsDirty (employee), "test dirty after commit");
+  do_test (gncEmployeeIsDirty (employee), "test dirty after commit");
   do_test (get (employee) == num, message);
   gncEmployeeSetActive (employee, FALSE);
   count++;
@@ -218,18 +214,21 @@
 }
 #endif
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/business-core", 0);
-  test_employee();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+  guid_init ();
+  qof_query_init ();
+  qof_object_initialize ();
+  qof_book_register ();
+  do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
+  do_test (gncJobRegister (),  "Cannot register GncJob");
+  do_test (gncCustomerRegister(), "Cannot register GncCustomer");
+  do_test (gncEmployeeRegister(), "Cannot register GncEmployee");
+  test_employee();
+  print_test_results();
+  qof_query_shutdown();
+  guid_shutdown();
+  qof_object_shutdown ();
   return 0;
 }
Index: test-address.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-address.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/business/business-core/test/test-address.c -Lsrc/business/business-core/test/test-address.c -u -r1.10 -r1.11
--- src/business/business-core/test/test-address.c
+++ src/business/business-core/test/test-address.c
@@ -1,8 +1,9 @@
 /*********************************************************************
- * businessmod-core.c
- * module definition/initialization for the core Business module
+ * test-address.c
+ * object definition/initialization for Address
  * 
  * Copyright (c) 2001 Derek Atkins <warlord at MIT.EDU>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,14 +25,8 @@
  *********************************************************************/
 
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
-
-#include "gncBusiness.h"
-#include "gncAddress.h"
+#include "cashobjects.h"
+#include "gncAddressP.h"
 #include "test-stuff.h"
 
 static void
@@ -88,18 +83,14 @@
   gncAddressClearDirty (address);
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/business-core", 0);
-  test_address();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+	test_address();
+	print_test_results();
+	}
+	qof_close();
   return 0;
 }
Index: test-job.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-job.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/business/business-core/test/test-job.c -Lsrc/business/business-core/test/test-job.c -u -r1.14 -r1.15
--- src/business/business-core/test/test-job.c
+++ src/business/business-core/test/test-job.c
@@ -3,6 +3,7 @@
  * Test the job object.
  * 
  * Copyright (c) 2001 Derek Atkins <warlord at MIT.EDU>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,15 +25,11 @@
  *********************************************************************/
 
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
-#include "qofobject.h"
-
-#include "gncJob.h"
+#include "qof.h"
 #include "gncJobP.h"
+#include "gncInvoiceP.h"
+#include "gncCustomerP.h"
+#include "gncOwner.h"
 #include "test-stuff.h"
 
 static int count = 0;
@@ -61,21 +58,23 @@
 	       gint (*get) (GncJob *));
 #endif
 
-extern QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
-
 static void
 test_job (void)
 {
-  QofBackend *fbe;
+  QofBackend *be;
+  QofSession *session;
   QofBook *book;
   GncJob *job;
 
-  book = qof_book_new ();
+  session = qof_session_new();
+  be = NULL;
+  qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
+  book = qof_session_get_book (session);
+  be = qof_book_get_backend(book);
 
   /* The book *must* have a backend to pass the test of the 'dirty' flag */
   /* See the README file for details */
-  fbe = libgncmod_backend_file_LTX_gnc_backend_new();
-  qof_book_set_backend (book, fbe);
+  do_test (be != NULL, "qsf backend could not be set");
 
   /* Test creation/destruction */
   {
@@ -167,7 +166,7 @@
   set (job, str);
   do_test (qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty later");
   gncJobCommitEdit (job);
-  do_test (!qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty after commit");
+  do_test (qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty after commit");
   do_test (safe_strcmp (get (job), str) == 0, message);
   gncJobSetActive (job, FALSE); count++;
 }
@@ -207,7 +206,7 @@
   set (job, num);
   do_test (qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty later");
   gncJobCommitEdit (job);
-  do_test (!qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty after commit");
+  do_test (qof_instance_is_dirty (QOF_INSTANCE(job)), "test dirty after commit");
   do_test (get (job) == num, message);
   gncJobSetActive (job, FALSE); count++;
 }
@@ -232,18 +231,21 @@
 }
 #endif
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/business-core", 0);
-  test_job();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+  guid_init ();
+  qof_query_init ();
+  qof_object_initialize ();
+  qof_book_register ();
+  do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
+  do_test (gncJobRegister (),  "Cannot register GncJob");
+  do_test (gncCustomerRegister(), "Cannot register GncCustomer");
+  test_job();
+  print_test_results();
+  qof_query_shutdown();
+  guid_shutdown();
+  qof_object_shutdown ();
   return 0;
 }
+
Index: test-customer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-customer.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/business/business-core/test/test-customer.c -Lsrc/business/business-core/test/test-customer.c -u -r1.14 -r1.15
--- src/business/business-core/test/test-customer.c
+++ src/business/business-core/test/test-customer.c
@@ -1,8 +1,9 @@
 /*********************************************************************
  * test-customer.c
- * Test the customer object 
+ * Test the customer object (without Guile/Scheme)
  * 
  * Copyright (c) 2001 Derek Atkins <warlord at MIT.EDU>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,14 +25,8 @@
  *********************************************************************/
 
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
-#include "gncObject.h"
-
-#include "gncCustomer.h"
+#include "qof.h"
+#include "cashobjects.h"
 #include "gncCustomerP.h"
 #include "test-stuff.h"
 
@@ -52,37 +47,31 @@
 		  void (*set) (GncCustomer *, gboolean),
 		  gboolean (*get) (GncCustomer *));
 
-#if 0
-static void
-test_gint_fcn (QofBook *book, const char *message,
-	       void (*set) (GncCustomer *, gint),
-	       gint (*get) (GncCustomer *));
-#endif
-
-extern QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
-
-
 static void
 test_customer (void)
 {
-  QofBackend *fbe;
+  QofBackend *be;
+  QofSession *session;
   QofBook *book;
   GncCustomer *customer;
 
-  book = qof_book_new ();
-
-  /* The book *must* have a backend to pass the test of the 'dirty' flag */
-  /* See the README file for details */
-  fbe = libgncmod_backend_file_LTX_gnc_backend_new();
-  qof_book_set_backend (book, fbe);
+  session = qof_session_new();
+  be = NULL;
+  qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
+  book = qof_session_get_book(session);
+  be = qof_book_get_backend(book);
+
+  /* The book *must* have a backend to pass the test of the 'dirty' flag 
+  so use a session to use the default QSF. However, until the SQL backend can be used, 
+  entities remain dirty until the session is saved or closed. */
+  do_test (be != NULL, "qsf backend could not be set");
 
   /* Test creation/destruction */
   {
     do_test (gncCustomerCreate (NULL) == NULL, "customer create NULL");
     customer = gncCustomerCreate (book);
     do_test (customer != NULL, "customer create");
-    do_test (gncCustomerGetBook (customer) == book,
-	     "getbook");
+    do_test (gncCustomerGetBook (customer) == book, "getbook");
 
     gncCustomerBeginEdit (customer);
     gncCustomerDestroy (customer);
@@ -102,7 +91,6 @@
     test_numeric_fcn (book, "Discount", gncCustomerSetDiscount, gncCustomerGetDiscount);
     test_numeric_fcn (book, "Credit", gncCustomerSetCredit, gncCustomerGetCredit);
 
-    //test_bool_fcn (book, "TaxIncluded", gncCustomerSetTaxIncluded, gncCustomerGetTaxIncluded);
     test_bool_fcn (book, "Active", gncCustomerSetActive, gncCustomerGetActive);
 
     do_test (gncCustomerGetAddr (customer) != NULL, "Addr");
@@ -132,8 +120,11 @@
     const char *str = get_random_string();
     const char *res;
 
+    res = NULL;
+    gncCustomerBeginEdit(customer);
     gncCustomerSetName (customer, str);
-    res = gncObjectPrintable (GNC_ID_CUSTOMER, customer);
+    gncCustomerCommitEdit(customer);
+    res = qof_object_printable (GNC_ID_CUSTOMER, customer);
     do_test (res != NULL, "Printable NULL?");
     do_test (safe_strcmp (str, res) == 0, "Printable equals");
   }    
@@ -149,6 +140,7 @@
   }
 
   /* Note: JobList is tested from the Job tests */
+  qof_session_end(session);
 }
 
 static void
@@ -164,7 +156,7 @@
   set (customer, str);
   do_test (gncCustomerIsDirty (customer), "test dirty later");
   gncCustomerCommitEdit (customer);
-  do_test (!gncCustomerIsDirty (customer), "test dirty after commit");
+  do_test (gncCustomerIsDirty (customer), "test dirty after commit");
   do_test (safe_strcmp (get (customer), str) == 0, message);
   gncCustomerSetActive (customer, FALSE);
   count++;
@@ -183,7 +175,7 @@
   set (customer, num);
   do_test (gncCustomerIsDirty (customer), "test dirty later");
   gncCustomerCommitEdit (customer);
-  do_test (!gncCustomerIsDirty (customer), "test dirty after commit");
+  do_test (gncCustomerIsDirty (customer), "test dirty after commit");
   do_test (gnc_numeric_equal (get (customer), num), message);
   gncCustomerSetActive (customer, FALSE);
   count++;
@@ -204,45 +196,24 @@
   set (customer, num);
   do_test (gncCustomerIsDirty (customer), "test dirty later");
   gncCustomerCommitEdit (customer);
-  do_test (!gncCustomerIsDirty (customer), "test dirty after commit");
+  do_test (gncCustomerIsDirty (customer), "test dirty after commit");
   do_test (get (customer) == num, message);
   gncCustomerSetActive (customer, FALSE);
   count++;
 }
 
-#if 0
-static void
-test_gint_fcn (QofBook *book, const char *message,
-	       void (*set) (GncCustomer *, gint),
-	       gint (*get) (GncCustomer *))
-{
-  GncCustomer *customer = gncCustomerCreate (book);
-  gint num = 17;
-
-  do_test (!gncCustomerIsDirty (customer), "test if start dirty");
-  gncCustomerBeginEdit (customer);
-  set (customer, num);
-  do_test (gncCustomerIsDirty (customer), "test dirty later");
-  gncCustomerCommitEdit (customer);
-  do_test (!gncCustomerIsDirty (customer), "test dirty after commit");
-  do_test (get (customer) == num, message);
-  gncCustomerSetActive (customer, FALSE);
-  count++;
-}
-#endif
-
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/business-core", 0);
-  test_customer();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+  guid_init ();
+  qof_query_init ();
+  qof_object_initialize ();
+  qof_book_register ();
+  do_test (cashobjects_register(), "Cannot register cash objects");
+  test_customer();
+  print_test_results();
+  qof_query_shutdown();
+  guid_shutdown();
+  qof_object_shutdown ();
   return 0;
 }
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/business/business-core/test/Makefile.am -Lsrc/business/business-core/test/Makefile.am -u -r1.6 -r1.7
--- src/business/business-core/test/Makefile.am
+++ src/business/business-core/test/Makefile.am
@@ -6,6 +6,7 @@
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/business/business-core \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 LDADD = \
@@ -13,10 +14,10 @@
   ${top_builddir}/src/test-core/libgncmod-test.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/engine/libgw-engine.la \
-  ${top_builddir}/src/backend/file/libgncmod-backend-file.la \
   ../libgncmod-business-core.la \
   ../libgw-business-core.la \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   -lltdl
 
 TESTS = \
Index: test-vendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-core/test/test-vendor.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/business/business-core/test/test-vendor.c -Lsrc/business/business-core/test/test-vendor.c -u -r1.16 -r1.17
--- src/business/business-core/test/test-vendor.c
+++ src/business/business-core/test/test-vendor.c
@@ -3,6 +3,7 @@
  * Test the vendor object.
  * 
  * Copyright (c) 2001 Derek Atkins <warlord at MIT.EDU>
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -24,14 +25,9 @@
  *********************************************************************/
 
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
-#include "qofobject.h"
-
-#include "gncVendor.h"
+#include "gncInvoiceP.h"
+#include "gncCustomerP.h"
+#include "gncJobP.h"
 #include "gncVendorP.h"
 #include "test-stuff.h"
 
@@ -61,21 +57,23 @@
 	       gint (*get) (GncVendor *));
 #endif
 
-extern QofBackend * libgncmod_backend_file_LTX_gnc_backend_new(void);
-
 static void
 test_vendor (void)
 {
-  QofBackend *fbe;
+  QofBackend *be;
+  QofSession *session;
   QofBook *book;
   GncVendor *vendor;
 
-  book = qof_book_new ();
+  session = qof_session_new();
+  be = NULL;
+  qof_session_begin(session, QOF_STDOUT, FALSE, FALSE);
+  book = qof_session_get_book (session);
+  be = qof_book_get_backend(book);
 
   /* The book *must* have a backend to pass the test of the 'dirty' flag */
   /* See the README file for details */
-  fbe = libgncmod_backend_file_LTX_gnc_backend_new();
-  qof_book_set_backend (book, fbe);
+  do_test (be != NULL, "qsf backend could not be set");
 
   /* Test creation/destruction */
   {
@@ -149,7 +147,7 @@
   set (vendor, str);
   do_test (gncVendorIsDirty (vendor), "test dirty later");
   gncVendorCommitEdit (vendor);
-  do_test (!gncVendorIsDirty (vendor), "test dirty after commit");
+  do_test (gncVendorIsDirty (vendor), "test dirty after commit");
   do_test (safe_strcmp (get (vendor), str) == 0, message);
   gncVendorSetActive (vendor, FALSE); count++;
 }
@@ -189,7 +187,7 @@
   set (vendor, num);
   do_test (gncVendorIsDirty (vendor), "test dirty later");
   gncVendorCommitEdit (vendor);
-  do_test (!gncVendorIsDirty (vendor), "test dirty after commit");
+  do_test (gncVendorIsDirty (vendor), "test dirty after commit");
   do_test (get (vendor) == num, message);
   gncVendorSetActive (vendor, FALSE); count++;
 }
@@ -214,18 +212,21 @@
 }
 #endif
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/business-core", 0);
-  test_vendor();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+  guid_init ();
+  qof_query_init ();
+  qof_object_initialize ();
+  qof_book_register ();
+  do_test (gncInvoiceRegister(), "Cannot register GncInvoice");
+  do_test (gncJobRegister (),  "Cannot register GncJob");
+  do_test (gncCustomerRegister(), "Cannot register GncCustomer");
+  do_test (gncVendorRegister(), "Cannot register GncVendor");		
+  test_vendor();
+  print_test_results();
+  qof_query_shutdown();
+  guid_shutdown();
+  qof_object_shutdown ();
   return 0;
 }
Index: dialog-order.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-order.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -Lsrc/business/business-gnome/dialog-order.c -Lsrc/business/business-gnome/dialog-order.c -u -r1.55 -r1.56
--- src/business/business-gnome/dialog-order.c
+++ src/business/business-gnome/dialog-order.c
@@ -23,17 +23,15 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
 #include "gnucash-sheet.h"
-#include "window-help.h"
 #include "dialog-search.h"
 #include "search-param.h"
 
@@ -51,6 +49,15 @@
 #define DIALOG_EDIT_ORDER_CM_CLASS "dialog-edit-order"
 #define DIALOG_VIEW_ORDER_CM_CLASS "dialog-view-order"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/order_search"
+
+void gnc_order_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_order_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_order_window_invoice_cb (GtkWidget *widget, gpointer data);
+void gnc_order_window_close_order_cb (GtkWidget *widget, gpointer data);
+void gnc_order_window_destroy_cb (GtkWidget *widget, gpointer data);
+
 typedef enum
 {
   NEW_ORDER,
@@ -106,6 +113,9 @@
 
 static void gnc_ui_to_order (OrderWindow *ow, GncOrder *order)
 {
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
   Timespec ts;
   time_t tt;
 
@@ -118,8 +128,12 @@
   
   gncOrderSetID (order, gtk_editable_get_chars
 		 (GTK_EDITABLE (ow->id_entry), 0, -1));
-  gncOrderSetNotes (order, gtk_editable_get_chars
-		    (GTK_EDITABLE (ow->notes_text), 0, -1));
+
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(ow->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncOrderSetNotes (order, text);
+
   gncOrderSetReference (order, gtk_editable_get_chars
 			(GTK_EDITABLE (ow->ref_entry), 0, -1));
 
@@ -184,7 +198,7 @@
   return TRUE;
 }
 
-static void
+void
 gnc_order_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   OrderWindow *ow = data;
@@ -198,7 +212,7 @@
   gnc_close_gui_component (ow->component_id);
 }
 
-static void
+void
 gnc_order_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   OrderWindow *ow = data;
@@ -206,15 +220,13 @@
   gnc_close_gui_component (ow->component_id);
 }
 
-static void
+void
 gnc_order_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_ORDER;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
-static void
+void
 gnc_order_window_invoice_cb (GtkWidget *widget, gpointer data)
 {
   OrderWindow *ow = data;
@@ -230,7 +242,7 @@
   gnc_order_update_window (ow);
 }
 
-static void
+void
 gnc_order_window_close_order_cb (GtkWidget *widget, gpointer data)
 {
   OrderWindow *ow = data;
@@ -300,7 +312,7 @@
   gnc_order_update_window (ow);
 }
 
-static void
+void
 gnc_order_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   OrderWindow *ow = data;
@@ -364,7 +376,7 @@
 {
   OrderWindow *ow = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (ow->dialog));
+  gtk_widget_destroy (ow->dialog);
 }
 
 static void
@@ -391,39 +403,6 @@
 }
 
 static void
-gnc_configure_register_colors (void)
-{
-  GncEntryLedgerColors reg_colors;
-
-  reg_colors.header_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Header color",
-                                 0xffffff);
-
-  reg_colors.primary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary color",
-                                 0xffffff);
-
-  reg_colors.secondary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary color",
-                                 0xffffff);
-
-  reg_colors.primary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary active color",
-                                 0xffffff);
-
-  reg_colors.secondary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary active color",
-                                 0xffffff);
-
-  gnc_entry_ledger_set_colors (reg_colors);
-}
-
-static void
 gnc_order_update_window (OrderWindow *ow)
 {
   GncOrder *order;
@@ -459,18 +438,17 @@
   gtk_widget_show_all (ow->dialog);
 
   {
+    GtkTextBuffer* text_buffer;
     const char *string;
     Timespec ts, ts_zero = {0,0};
     time_t tt;
-    gint pos = 0;
 
     gtk_entry_set_text (GTK_ENTRY (ow->ref_entry),
 			gncOrderGetReference (order));
 
     string = gncOrderGetNotes (order);
-    gtk_editable_delete_text (GTK_EDITABLE (ow->notes_text), 0, -1);
-    gtk_editable_insert_text (GTK_EDITABLE (ow->notes_text), string,
-			      strlen (string), &pos);
+    text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(ow->notes_text));
+    gtk_text_buffer_set_text (text_buffer, string, -1);
 
     ts = gncOrderGetDateOpened (order);
     if (timespec_equal (&ts, &ts_zero)) {
@@ -550,7 +528,6 @@
   GladeXML *xml;
   GtkWidget *vbox, *regWidget;
   GncEntryLedger *entry_ledger = NULL;
-  GnomeDialog *owd;
   const char * class_name;
 
   switch (type) {
@@ -582,8 +559,6 @@
   /*
    * No existing order window found.  Build a new one.
    */
-  gnc_configure_register_colors ();
-
   ow = g_new0 (OrderWindow, 1);
   ow->book = bookp;
   ow->dialog_type = type;
@@ -594,9 +569,6 @@
   /* Find the dialog */
   ow->xml = xml = gnc_glade_xml_new ("order.glade", "Order Entry Dialog");
   ow->dialog = glade_xml_get_widget (xml, "Order Entry Dialog");
-  owd = GNOME_DIALOG (ow->dialog);
-
-  gtk_object_set_data (GTK_OBJECT (ow->dialog), "dialog_info", ow);
 
   /* Grab the widgets */
   ow->id_entry = glade_xml_get_widget (xml, "id_entry");
@@ -608,10 +580,6 @@
   ow->owner_box = glade_xml_get_widget (xml, "owner_hbox");
   ow->owner_label = glade_xml_get_widget (xml, "owner_label");
 
-  /* default to ok */
-  gnome_dialog_editable_enters (owd, GTK_EDITABLE (ow->id_entry));
-  gnome_dialog_set_default (owd, 0);
-
   /* Build the ledger */
   switch (type) {
   case EDIT_ORDER:
@@ -645,20 +613,10 @@
   // gtk_box_pack_start (GTK_BOX(vbox), toolbar, FALSE, FALSE, 2);
   gtk_box_pack_start (GTK_BOX(vbox), regWidget, TRUE, TRUE, 2);
 
-  gtk_signal_connect (GTK_OBJECT (ow->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_order_window_destroy_cb), ow);
-
-  gnome_dialog_button_connect (owd, 0,
-			       GTK_SIGNAL_FUNC(gnc_order_window_ok_cb), ow);
-  gnome_dialog_button_connect (owd, 1,
-			       GTK_SIGNAL_FUNC(gnc_order_window_help_cb), ow);
-
-  gnome_dialog_button_connect
-    (owd, 2, GTK_SIGNAL_FUNC(gnc_order_window_invoice_cb), ow);
-
-  gnome_dialog_button_connect
-    (owd, 3, GTK_SIGNAL_FUNC(gnc_order_window_close_order_cb), ow);
-
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ow);
   /* Setup initial values */
   ow->order_guid = *gncOrderGetGUID (order);
 
@@ -686,8 +644,8 @@
 {
   OrderWindow *ow;
   GladeXML *xml;
-  GnomeDialog *owd;
   GncOrder *order;
+  gchar *string;
 
   ow = g_new0 (OrderWindow, 1);
   ow->book = bookp;
@@ -702,7 +660,6 @@
   /* Find the dialog */
   xml = gnc_glade_xml_new ("order.glade", "New Order Dialog");
   ow->dialog = glade_xml_get_widget (xml, "New Order Dialog");
-  owd = GNOME_DIALOG (ow->dialog);
 
   gtk_object_set_data (GTK_OBJECT (ow->dialog), "dialog_info", ow);
 
@@ -714,24 +671,16 @@
   ow->owner_box = glade_xml_get_widget (xml, "owner_hbox");
   ow->owner_label = glade_xml_get_widget (xml, "owner_label");
 
-  /* default to ok */
-  gnome_dialog_editable_enters (owd, GTK_EDITABLE (ow->id_entry));
-  gnome_dialog_set_default (owd, 0);
-
-  gtk_signal_connect (GTK_OBJECT (ow->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_order_window_destroy_cb), ow);
-
-  gnome_dialog_button_connect (owd, 0,
-			       GTK_SIGNAL_FUNC(gnc_order_window_ok_cb), ow);
-  gnome_dialog_button_connect (owd, 1,
-			       GTK_SIGNAL_FUNC(gnc_order_window_cancel_cb), ow);
-  gnome_dialog_button_connect (owd, 2,
-			       GTK_SIGNAL_FUNC(gnc_order_window_help_cb), ow);
-
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ow);
   /* Setup initial values */
   ow->order_guid = *gncOrderGetGUID (order);
-  gtk_entry_set_text (GTK_ENTRY (ow->id_entry),
-		      g_strdup_printf ("%.6lld", gncOrderNextID(bookp)));
+  string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			    gncOrderNextID(bookp));
+  gtk_entry_set_text (GTK_ENTRY (ow->id_entry), string);
+  g_free(string);
       
   ow->component_id =
     gnc_register_gui_component (DIALOG_NEW_ORDER_CM_CLASS,
@@ -933,7 +882,7 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_order_cb,
-				   sw, free_order_cb);
+				   sw, free_order_cb, GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: businessmod-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/businessmod-gnome.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/business/business-gnome/businessmod-gnome.c -Lsrc/business/business-gnome/businessmod-gnome.c -u -r1.15 -r1.16
--- src/business/business-gnome/businessmod-gnome.c
+++ src/business/business-gnome/businessmod-gnome.c
@@ -31,6 +31,7 @@
 #include <libguile.h>
 #include <glib.h>
 
+#include "gnc-hooks.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
 #include "gw-business-gnome.h"
@@ -41,6 +42,13 @@
 #include "business-options-gnome.h"
 #include "business-urls.h"
 
+#include "gnc-plugin-manager.h"
+#include "gnc-plugin-business.h"
+
+#include "gnc-hooks.h"
+#include "dialog-invoice.h"
+#include "dialog-preferences.h"
+
 /* version of the gnc module system interface we require */
 int libgncmod_business_gnome_LTX_gnc_module_system_interface = 0;
 
@@ -102,6 +110,15 @@
 				   (GNCSearchCoreNew) gnc_search_owner_new);
     gnc_business_urls_initialize ();
     gnc_business_options_gnome_initialize ();
+
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (),
+				   gnc_plugin_business_new ());
+
+    gnc_hook_add_dangler(HOOK_UI_POST_STARTUP,
+			 (GFunc)gnc_invoice_remind_bills_due_cb, NULL);
+
+    gnc_preferences_add_page("businessprefs.glade", "business_prefs",
+			     "Business");
   }
 
   return TRUE;
Index: dialog-invoice.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/business/business-gnome/dialog-invoice.h -Lsrc/business/business-gnome/dialog-invoice.h -u -r1.12 -r1.13
--- src/business/business-gnome/dialog-invoice.h
+++ src/business/business-gnome/dialog-invoice.h
@@ -28,11 +28,28 @@
 typedef struct _invoice_window InvoiceWindow;
 
 #include "qofbook.h"
+#include "qofsession.h"
 #include "gncInvoice.h"
 #include "gncOwner.h"
 #include "dialog-search.h"
 #include "dialog-query-list.h"
 
+typedef enum
+{
+  BY_STANDARD = 0,
+  BY_DATE,
+  BY_DATE_ENTERED,
+  BY_DESC,
+  BY_QTY,
+  BY_PRICE
+} invoice_sort_type_t;
+
+
+#define GCONF_SECTION_INVOICE "dialogs/business/invoice"
+#define GCONF_SECTION_BILL    "dialogs/business/bill"
+#define GCONF_SECTION_VOUCHER "dialogs/business/voucher"
+
+
 /* Create and edit an invoice */
 InvoiceWindow * gnc_ui_invoice_edit (GncInvoice *invoice);
 InvoiceWindow * gnc_ui_invoice_new (GncOwner *owner, QofBook *book);
@@ -51,6 +68,39 @@
 
 void gnc_business_call_owner_report (GncOwner *owner, Account *acc);
 
+void gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code);
+
+GtkWidget * gnc_invoice_window_create_summary_bar (InvoiceWindow *iw);
+
+void gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window);;
+
+gchar *gnc_invoice_get_help (InvoiceWindow *iw);
+
+gchar *gnc_invoice_get_title (InvoiceWindow *iw);
+
+GtkWidget * gnc_invoice_create_page (InvoiceWindow *iw, gpointer page);
+
 DialogQueryList *gnc_invoice_show_bills_due (QofBook *book, double days_in_advance);
 
+GtkWidget *gnc_invoice_get_register(InvoiceWindow *iw);
+
+/* definitions for CB functions */
+void gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data);
+
+void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
+
 #endif /* GNC_DIALOG_INVOICE_H_ */
Index: dialog-date-close.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-date-close.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/business/business-gnome/dialog-date-close.c -Lsrc/business/business-gnome/dialog-date-close.c -u -r1.18 -r1.19
--- src/business/business-gnome/dialog-date-close.c
+++ src/business/business-gnome/dialog-date-close.c
@@ -53,7 +53,10 @@
   gboolean answer;
 } DialogDateClose;
 
-static void
+void gnc_dialog_date_close_ok_cb (GtkWidget *widget, gpointer user_data);
+
+
+void
 gnc_dialog_date_close_ok_cb (GtkWidget *widget, gpointer user_data)
 {
   DialogDateClose *ddc = user_data;
@@ -88,22 +91,6 @@
   if (ddc->question_check)
 	  ddc->answer = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ddc->question_check));
   ddc->retval = TRUE;
-  gnome_dialog_close (GNOME_DIALOG (ddc->dialog));
-}
-
-static void
-gnc_dialog_date_close_cancel_cb (GtkWidget *widget, gpointer user_data)
-{
-  DialogDateClose *ddc = user_data;
-  ddc->retval = FALSE;
-  gnome_dialog_close (GNOME_DIALOG (ddc->dialog));
-}
-
-static gint
-gnc_dialog_date_close_cb (GnomeDialog *dialog, gpointer data)
-{
-  gtk_main_quit ();
-  return FALSE;
 }
 
 static void
@@ -131,9 +118,11 @@
   /* Make noises, basically */
   gnome_triggers_vdo(message, GNOME_MESSAGE_BOX_QUESTION, NULL);
 
-  s = gnome_unconditional_pixmap_file("gnome-question.png");
+  s = gnome_program_locate_file (NULL,
+				 GNOME_FILE_DOMAIN_PIXMAP,
+				 "gnome-question.png", TRUE, NULL);
   if (s) {
-    pixmap = gnome_pixmap_new_from_file(s);
+    pixmap = gtk_image_new_from_file(s);
     g_free(s);
   }
 
@@ -188,27 +177,28 @@
   gtk_box_pack_start (GTK_BOX(date_box), ddc->date, TRUE, TRUE, 0);
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG(ddc->dialog), GTK_WINDOW(parent));
+    gtk_window_set_transient_for (GTK_WINDOW(ddc->dialog), GTK_WINDOW(parent));
 
   build_date_close_window (hbox, message);
 
   gnc_date_edit_set_time_ts (GNC_DATE_EDIT (ddc->date), *ts);
   gtk_label_set_text (GTK_LABEL (label), label_message);
 
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 0,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_ok_cb), ddc);
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 1,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_cancel_cb), ddc);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ddc);
 
-  gtk_signal_connect (GTK_OBJECT(ddc->dialog), "close",
-                      GTK_SIGNAL_FUNC(gnc_dialog_date_close_cb), ddc);
-
-  gtk_window_set_modal (GTK_WINDOW (ddc->dialog), TRUE);
   gtk_widget_show_all (ddc->dialog);
-  gtk_main ();
 
+  ddc->retval = FALSE;
+  while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK) {
+    /* If reponse is OK but flag is not set, try again */
+    if (ddc->retval)
+      break;
+  }
+
+  gtk_widget_destroy(ddc->dialog);
   retval = ddc->retval;
   g_list_free (ddc->acct_types);
   g_free (ddc);
@@ -283,7 +273,7 @@
   ddc->question_check = glade_xml_get_widget(xml, "question_check");
   
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG(ddc->dialog), GTK_WINDOW(parent));
+    gtk_window_set_transient_for (GTK_WINDOW(ddc->dialog), GTK_WINDOW(parent));
 
   build_date_close_window (hbox, message);
 
@@ -310,8 +300,8 @@
 
   /* Deal with the terms handling of the due date */
   if (terms) {
-    gtk_signal_connect (GTK_OBJECT (ddc->post_date), "date_changed",
-			post_date_changed_cb, ddc);
+    g_signal_connect (G_OBJECT (ddc->post_date), "date_changed",
+		      G_CALLBACK (post_date_changed_cb), ddc);
     gtk_widget_set_sensitive (ddc->date, FALSE);
     post_date_changed_cb (GNC_DATE_EDIT (ddc->post_date), ddc);
   } else
@@ -320,21 +310,21 @@
   /* Setup the account widget */
   fill_in_acct_info (ddc);
 
-  /* Connect the buttons */
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 0,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_ok_cb), ddc);
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 1,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_cancel_cb), ddc);
-
-  gtk_signal_connect (GTK_OBJECT(ddc->dialog), "close",
-                      GTK_SIGNAL_FUNC(gnc_dialog_date_close_cb), ddc);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ddc);
 
-  gtk_window_set_modal (GTK_WINDOW (ddc->dialog), TRUE);
   gtk_widget_show_all (ddc->dialog);
-  gtk_main ();
 
+  ddc->retval = FALSE;
+  while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK) {
+    /* If reponse is OK but flag is not set, try again */
+    if (ddc->retval)
+      break;
+  }
+
+  gtk_widget_destroy(ddc->dialog);
   retval = ddc->retval;
   *acct = ddc->acct;
   if (question_check_message)
@@ -383,7 +373,7 @@
   gtk_box_pack_start (GTK_BOX(date_box), ddc->date, TRUE, TRUE, 0);
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG(ddc->dialog), GTK_WINDOW(parent));
+    gtk_window_set_transient_for (GTK_WINDOW(ddc->dialog), GTK_WINDOW(parent));
 
   build_date_close_window (hbox, message);
 
@@ -399,18 +389,11 @@
   /* Setup the account widget */
   fill_in_acct_info (ddc);
 
-  /* Connect the buttons */
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 0,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_ok_cb), ddc);
-  gnome_dialog_button_connect
-    (GNOME_DIALOG(ddc->dialog), 1,
-     GTK_SIGNAL_FUNC(gnc_dialog_date_close_cancel_cb), ddc);
-
-  gtk_signal_connect (GTK_OBJECT(ddc->dialog), "close",
-                      GTK_SIGNAL_FUNC(gnc_dialog_date_close_cb), ddc);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ddc);
 
-  gtk_window_set_modal (GTK_WINDOW (ddc->dialog), TRUE);
   gtk_widget_show_all (ddc->dialog);
 
   gtk_widget_hide_all (glade_xml_get_widget (xml, "postdate_label"));
@@ -418,8 +401,14 @@
   gtk_widget_hide_all (glade_xml_get_widget (xml, "memo_entry"));
   gtk_widget_hide_all (glade_xml_get_widget (xml, "memo_label"));
 
-  gtk_main ();
+  ddc->retval = FALSE;
+  while (gtk_dialog_run (GTK_DIALOG (ddc->dialog)) == GTK_RESPONSE_OK) {
+    /* If reponse is OK but flag is not set, try again */
+    if (ddc->retval)
+      break;
+  }
 
+  gtk_widget_destroy(ddc->dialog);
   retval = ddc->retval;
   *acct = ddc->acct;
   g_free (ddc);
Index: dialog-employee.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-employee.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lsrc/business/business-gnome/dialog-employee.c -Lsrc/business/business-gnome/dialog-employee.c -u -r1.29 -r1.30
--- src/business/business-gnome/dialog-employee.c
+++ src/business/business-gnome/dialog-employee.c
@@ -23,10 +23,9 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-currency-edit.h"
 #include "gnc-component-manager.h"
@@ -34,7 +33,6 @@
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
-#include "window-help.h"
 #include "dialog-search.h"
 #include "search-param.h"
 #include "gnc-account-sel.h"
@@ -51,6 +49,15 @@
 #define DIALOG_NEW_EMPLOYEE_CM_CLASS "dialog-new-employee"
 #define DIALOG_EDIT_EMPLOYEE_CM_CLASS "dialog-edit-employee"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/employee_search"
+
+void gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_employee_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_employee_window_destroy_cb (GtkWidget *widget, gpointer data);
+void gnc_employee_name_changed_cb (GtkWidget *widget, gpointer data);
+void gnc_employee_ccard_acct_toggled_cb (GtkToggleButton *button, gpointer data);
+
 typedef enum
 {
   NEW_EMPLOYEE,
@@ -197,10 +204,11 @@
   return FALSE;
 }
 
-static void
+void
 gnc_employee_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   EmployeeWindow *ew = data;
+  gchar *string;
 
   /* Check for valid username */
   if (check_entry_nonempty (ew->dialog, ew->username_entry,
@@ -224,9 +232,10 @@
 
   /* Set the employee id if one has not been chosen */
   if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (ew->id_entry)), "") == 0) {
-    gtk_entry_set_text (GTK_ENTRY (ew->id_entry),
-			g_strdup_printf ("%.6lld",
-					 gncEmployeeNextID (ew->book)));
+    string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			      gncEmployeeNextID (ew->book));
+    gtk_entry_set_text (GTK_ENTRY (ew->id_entry), string);
+    g_free(string);
   }
 
   /* Now save it off */
@@ -242,7 +251,7 @@
   gnc_close_gui_component (ew->component_id);
 }
 
-static void
+void
 gnc_employee_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   EmployeeWindow *ew = data;
@@ -250,15 +259,13 @@
   gnc_close_gui_component (ew->component_id);
 }
 
-static void
+void
 gnc_employee_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_EMPLOYEE;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
-static void
+void
 gnc_employee_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   EmployeeWindow *ew = data;
@@ -278,11 +285,12 @@
   g_free (ew);
 }
 
-static void
+void
 gnc_employee_name_changed_cb (GtkWidget *widget, gpointer data)
 {
   EmployeeWindow *ew = data;
-  char *name, *id, *fullname, *title;
+  char *fullname, *title;
+  const char *name, *id;
 
   if (!ew)
     return;
@@ -306,7 +314,7 @@
   g_free (title);
 }
 
-static void
+void
 gnc_employee_ccard_acct_toggled_cb (GtkToggleButton *button, gpointer data)
 {
   EmployeeWindow *ew = data;
@@ -328,7 +336,7 @@
 {
   EmployeeWindow *ew = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (ew->dialog));
+  gtk_widget_destroy (ew->dialog);
 }
 
 static void
@@ -370,7 +378,6 @@
   EmployeeWindow *ew;
   GladeXML *xml;
   GtkWidget *hbox, *edit;
-  GnomeDialog *ewd;
   gnc_commodity *currency;
   GNCPrintAmountInfo print_info;
   GList *acct_types;
@@ -408,13 +415,9 @@
   /* Find the dialog */
   xml = gnc_glade_xml_new ("employee.glade", "Employee Dialog");
   ew->dialog = glade_xml_get_widget (xml, "Employee Dialog");
-  ewd = GNOME_DIALOG (ew->dialog);
 
   gtk_object_set_data (GTK_OBJECT (ew->dialog), "dialog_info", ew);
 
-  /* default to ok */
-  gnome_dialog_set_default (ewd, 0);
-
   /* Get entry points */
   ew->id_entry = glade_xml_get_widget (xml, "id_entry");
   ew->username_entry = glade_xml_get_widget (xml, "username_entry");
@@ -479,45 +482,10 @@
   hbox = glade_xml_get_widget (xml, "ccard_acct_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-
-  /* Setup Dialog for Editing */
-  gnome_dialog_set_default (ewd, 0);
-
-  /* Attach <Enter> to default button */
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->id_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->username_entry));
-
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->name_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->addr1_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->addr2_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->addr3_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->addr4_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->phone_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->fax_entry));
-  gnome_dialog_editable_enters (ewd, GTK_EDITABLE (ew->email_entry));
-
-  /* Set focus to username */
-  gtk_widget_grab_focus (ew->username_entry);
-
   /* Setup signals */
-  gnome_dialog_button_connect
-    (ewd, 0, GTK_SIGNAL_FUNC(gnc_employee_window_ok_cb), ew);
-  gnome_dialog_button_connect
-    (ewd, 1, GTK_SIGNAL_FUNC(gnc_employee_window_cancel_cb), ew);
-  gnome_dialog_button_connect
-    (ewd, 2, GTK_SIGNAL_FUNC(gnc_employee_window_help_cb), ew);
-
-  gtk_signal_connect (GTK_OBJECT (ew->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_employee_window_destroy_cb), ew);
-
-  gtk_signal_connect(GTK_OBJECT (ew->id_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_employee_name_changed_cb), ew);
-
-  gtk_signal_connect(GTK_OBJECT (ew->username_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_employee_name_changed_cb), ew);
-
-  gtk_signal_connect(GTK_OBJECT (ew->ccard_acct_check), "toggled",
-		     GTK_SIGNAL_FUNC(gnc_employee_ccard_acct_toggled_cb), ew);
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ew);
 
   /* Setup initial values */
   if (employee != NULL) {
@@ -757,7 +725,8 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_employee_cb,
-				   sw, free_employee_cb);
+				   sw, free_employee_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: business-gnome.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-gnome.scm,v
retrieving revision 1.52
retrieving revision 1.53
diff -Lsrc/business/business-gnome/business-gnome.scm -Lsrc/business/business-gnome/business-gnome.scm -u -r1.52 -r1.53
--- src/business/business-gnome/business-gnome.scm
+++ src/business/business-gnome/business-gnome.scm
@@ -14,414 +14,13 @@
 (use-modules (gnucash report business-reports))
 (use-modules (gnucash main))		;for gnc:debug
 
-(define main-window gnc:window-name-main)
 (define top-level (N_ "_Business"))
 (define new-label (N_ "New"))
 (define find-label (N_ "Find"))
 
-(define ui-started #f)
-
-(define (remind-bills-due session)
-  (define (option-value name)
-    (gnc:option-value (gnc:lookup-global-option gnc:*business-label* name)))
-
-  (let ((check-bills? (option-value "Notify Bills Due?")))
-    (if (and session check-bills?)
-	(let* ((book (gnc:session-get-book session))
-	       (days (option-value "Bills Due Days")))
-	  (gnc:invoice-show-bills-due book days)))))
-
-(define (add-customer-items)
-  (let ((last-cust (gnc:owner-create))
-	(cust (N_ "Customers")))
-
-    (define customer-menu
-      (gnc:make-menu cust
-		     (list main-window top-level "")))
-
-    (define new-customer-item
-      (gnc:make-menu-item (N_ "New Customer")
-			  (N_ "New Customer")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:customer-new (gnc:get-current-book)))))
-
-    (define find-customer-item
-      (gnc:make-menu-item (N_ "Find Customer")
-			  (N_ "Find Customer")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:customer-search (gnc:owner-get-customer
-						last-cust)
-					       (gnc:get-current-book)))))
-
-    (define new-invoice-item
-      (gnc:make-menu-item (N_ "New Invoice")
-			  (N_ "New Invoice")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:invoice-new last-cust
-					     (gnc:get-current-book)))))
-
-    (define find-invoice-item
-      (gnc:make-menu-item (N_ "Find Invoice")
-			  (N_ "Find Invoice")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:invoice-search #f last-cust
-					      (gnc:get-current-book)))))
-
-    (define new-job-item
-      (gnc:make-menu-item (N_ "New Job")
-			  (N_ "New Job")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:job-new last-cust
-					 (gnc:get-current-book)))))
-
-    (define find-job-item
-      (gnc:make-menu-item (N_ "Find Job")
-			  (N_ "Find Job")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:job-search #f last-cust
-					  (gnc:get-current-book)))))
-
-    (define payment-item
-      (gnc:make-menu-item (N_ "Process Payment")
-			  (N_ "Process Payment")
-			  (list main-window top-level cust "")
-			  (lambda ()
-			    (gnc:payment-new last-cust
-					     (gnc:get-current-book)))))
-
-
-    (gnc:owner-init-customer last-cust #f)
-
-    (gnc:add-extension customer-menu)
-    (gnc:add-extension payment-item)
-    (gnc:add-extension find-job-item)
-    (gnc:add-extension new-job-item)
-    (gnc:add-extension find-invoice-item)
-    (gnc:add-extension new-invoice-item)
-    (gnc:add-extension find-customer-item)
-    (gnc:add-extension new-customer-item)
-    ))
-
-(define (add-vendor-items)
-  (let ((last-vendor (gnc:owner-create))
-	(vendor (N_ "Vendors")))
-
-    (define vendor-menu
-      (gnc:make-menu (N_ vendor)
-		     (list main-window top-level "")))
-
-    (define new-vendor-item
-      (gnc:make-menu-item (N_ "New Vendor")
-			  (N_ "New Vendor")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:vendor-new (gnc:get-current-book)))))
-  
-
-    (define find-vendor-item
-      (gnc:make-menu-item (N_ "Find Vendor")
-			  (N_ "Find Vendor")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:vendor-search (gnc:owner-get-vendor
-					      last-vendor)
-					     (gnc:get-current-book)))))
-
-    (define new-invoice-item
-      (gnc:make-menu-item (N_ "New Bill")
-			  (N_ "New Bill")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:invoice-new last-vendor
-					     (gnc:get-current-book)))))
-
-    (define find-invoice-item
-      (gnc:make-menu-item (N_ "Find Bill")
-			  (N_ "Find Bill")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:invoice-search #f last-vendor
-					      (gnc:get-current-book)))))
-
-    (define new-job-item
-      (gnc:make-menu-item (N_ "New Job")
-			  (N_ "New Job")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:job-new last-vendor
-					 (gnc:get-current-book)))))
-
-    (define find-job-item
-      (gnc:make-menu-item (N_ "Find Job")
-			  (N_ "Find Job")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:job-search #f last-vendor
-					  (gnc:get-current-book)))))
-
-
-    (define payment-item
-      (gnc:make-menu-item (N_ "Process Payment")
-			  (N_ "Process Payment")
-			  (list main-window top-level vendor "")
-			  (lambda ()
-			    (gnc:payment-new last-vendor
-					     (gnc:get-current-book)))))
-
-    (gnc:owner-init-vendor last-vendor #f)
-
-    (gnc:add-extension vendor-menu)
-    (gnc:add-extension payment-item)
-    (gnc:add-extension find-job-item)
-    (gnc:add-extension new-job-item)
-    (gnc:add-extension find-invoice-item)
-    (gnc:add-extension new-invoice-item)
-    (gnc:add-extension find-vendor-item)
-    (gnc:add-extension new-vendor-item)
-    ))
-
-(define (add-employee-items)
-  (let ((last-employee (gnc:owner-create))
-	(employee (N_ "Employees")))
-
-    (define employee-menu
-      (gnc:make-menu employee (list main-window top-level "")))
-
-    (define new-employee-item
-      (gnc:make-menu-item (N_ "New Employee")
-			  (N_ "New Employee")
-			  (list main-window top-level employee "")
-			  (lambda ()
-			    (gnc:employee-new (gnc:get-current-book)))))
-
-    (define find-employee-item
-      (gnc:make-menu-item (N_ "Find Employee")
-			  (N_ "Find Employee")
-			  (list main-window top-level employee "")
-			  (lambda ()
-			    (gnc:employee-search (gnc:owner-get-employee 
-						  last-employee)
-						 (gnc:get-current-book)))))
-
-    (define new-invoice-item
-      (gnc:make-menu-item (N_ "New Expense Voucher")
-			  (N_ "New Expense Voucher")
-			  (list main-window top-level employee "")
-			  (lambda ()
-			    (gnc:invoice-new last-employee
-					     (gnc:get-current-book)))))
-
-    (define find-invoice-item
-      (gnc:make-menu-item (N_ "Find Expense Voucher")
-			  (N_ "Find Expense Voucher")
-			  (list main-window top-level employee "")
-			  (lambda ()
-			    (gnc:invoice-search #f last-employee
-					      (gnc:get-current-book)))))
-
-    (define payment-item
-      (gnc:make-menu-item (N_ "Process Payment")
-			  (N_ "Process Payment")
-			  (list main-window top-level employee "")
-			  (lambda ()
-			    (gnc:payment-new last-employee
-					     (gnc:get-current-book)))))
-
-    (gnc:owner-init-employee last-employee #f)
-
-    (gnc:add-extension employee-menu)
-    (gnc:add-extension payment-item)
-    (gnc:add-extension find-invoice-item)
-    (gnc:add-extension new-invoice-item)
-    (gnc:add-extension find-employee-item)
-    (gnc:add-extension new-employee-item)
-    ))
-
-(define (add-business-items)
-  (define menu (gnc:make-menu top-level (list "Main" "_Actions")))
-  ;;(define new (gnc:make-menu (N_ new-label) (list main-window top-level "")))
-  ;;(define find (gnc:make-menu (N_ find-label) (list main-window top-level "")))
-
-  (gnc:add-extension menu)
-
-  ;;(gnc:add-extension find)
-  ;;(gnc:add-extension new)
-
-  (gnc:add-extension
-   (gnc:make-menu-item (N_ "Bills Due Reminder")
-		       (N_ "View the quick report of bills coming due soon.")
-		       (list main-window top-level "")
-		       (lambda ()
-			 (remind-bills-due (gnc:get-current-session)))))
-
-  (gnc:add-extension
-   (gnc:make-menu-item (N_ "Billing Terms")
-		       (N_ "View and Edit the available Billing Terms")
-		       (list main-window top-level "")
-		       (lambda ()
-			 (gnc:billterms-new (gnc:get-current-book)))))
-
-  (gnc:add-extension
-   (gnc:make-menu-item (N_ "Tax Tables")
-		       (N_ "View and Edit the available Tax Tables")
-		       (list main-window top-level "")
-		       (lambda ()
-			 (gnc:tax-table-new (gnc:get-current-book)))))
-  (add-employee-items)
-  (add-vendor-items)
-  (add-customer-items)
-  )
-
-
 (define (business-report-function)
   (gnc:add-extension
    (gnc:make-menu gnc:menuname-business-reports
-		  (list "Main" gnc:menuname-reports gnc:menuname-income-expense))))
-
-
-
-(define (add-business-test)
-
-  (define test-search
-    (gnc:make-menu-item (N_ "Test Search Dialog")
-			(N_ "Test Search Dialog")
-			(list main-window "Extensions" "")
-			(lambda ()
-			  (gnc:search-dialog-test))))
-
-
-  (define reload-invoice
-    (gnc:make-menu-item (N_ "Reload invoice report")
-			(N_ "Reload invoice report scheme file")
-			(list main-window "Extensions" "")
-			(lambda ()
-			  (let ((m (current-module)))
-			    (load-from-path "gnucash/report/invoice.scm")
-			    (set-current-module m)))))
-
-  (define reload-owner
-    (gnc:make-menu-item (N_ "Reload owner report")
-			(N_ "Reload owner report scheme file")
-			(list main-window "Extensions" "")
-			(lambda ()
-			  (let ((m (current-module)))
-			    (load-from-path "gnucash/report/owner-report.scm")
-			    (set-current-module m)))))
-
-  (define reload-receivable
-    (gnc:make-menu-item (N_ "Reload receivable report")
-			(N_ "Reload receivable report scheme file")
-			(list main-window "Extensions" "")
-			(lambda ()
-			  (let ((m (current-module)))
-			    (load-from-path "gnucash/report/aging.scm")
-			    (set-current-module m)
-			    (load-from-path "gnucash/report/receivables.scm")
-			    (set-current-module m)))))
-
-  (define init-data
-    (gnc:make-menu-item (N_ "Initialize Test Data")
-			(N_ "Initialize Test Data")
-			(list main-window "Extensions" "")
-			(lambda ()
-			  (let* ((book (gnc:get-current-book))
-				 (customer (gnc:customer-create book))
-				 (address (gnc:customer-get-addr customer))
-				 (invoice (gnc:invoice-create book))
-				 (owner (gnc:owner-create))
-				 (job (gnc:job-create book))
-				 (group (gnc:book-get-group book))
-				 (inc-acct (gnc:malloc-account book))
-				 (bank-acct (gnc:malloc-account book))
-				 (tax-acct (gnc:malloc-account book))
-				 (ar-acct (gnc:malloc-account book)))
-
-			    ;; Create Customer
-			    (gnc:customer-set-id customer "000001")
-			    (gnc:customer-set-name customer "Test Customer")
-			    (gnc:customer-set-currency customer
-							(gnc:default-currency))
-			    (gnc:address-set-name address "Contact Person")
-			    (gnc:address-set-addr1 address
-						   "20 Customer Lane")
-			    (gnc:address-set-addr2 address "Customer M/S")
-			    (gnc:address-set-addr3 address "Addr3, XXX  12345")
-			    
-			    ;; Create the Owner
-			    (gnc:owner-init-customer owner customer)
-			    
-			    ;; Create the Invoice
-			    (gnc:invoice-set-id invoice "000012")
-			    (gnc:invoice-set-owner invoice owner)
-			    (gnc:invoice-set-date-opened
-			     invoice (cons (current-time) 0))
-			    (gnc:invoice-set-currency
-			     invoice (gnc:default-currency))
-
-			    ;; Create the Job
-			    (gnc:job-set-id job "000025")
-			    (gnc:job-set-name job "Test Job")
-			    (gnc:job-set-reference job "Customer's ref#")
-			    (gnc:job-set-owner job owner)
-
-			    ;; MODIFY THE OWNER
-			    (gnc:owner-init-job owner job)
-
-			    ;; Create the A/R account
-			    (gnc:account-set-type ar-acct 'receivable)
-			    (gnc:account-set-name ar-acct "A/R")
-			    (gnc:account-set-commodity ar-acct
-						       (gnc:default-currency))
-			    (gnc:group-insert-account group ar-acct)
-
-			    ;; Create the Income account
-			    (gnc:account-set-type inc-acct 'income)
-			    (gnc:account-set-name inc-acct "Income")
-			    (gnc:account-set-commodity inc-acct
-						       (gnc:default-currency))
-			    (gnc:group-insert-account group inc-acct)
-
-			    ;; Create the Bank account
-			    (gnc:account-set-type bank-acct 'bank)
-			    (gnc:account-set-name bank-acct "Bank")
-			    (gnc:account-set-commodity bank-acct
-						       (gnc:default-currency))
-			    (gnc:group-insert-account group bank-acct)
-
-			    ;; Create the Tax account
-			    (gnc:account-set-type tax-acct 'liability)
-			    (gnc:account-set-name tax-acct "Tax-Holding")
-			    (gnc:account-set-commodity tax-acct
-						       (gnc:default-currency))
-			    (gnc:group-insert-account group tax-acct)
-
-			    ;; Launch the invoice editor
-			    (gnc:invoice-edit invoice)
-			    ))))
-
-  
-  (gnc:add-extension init-data)
-  (gnc:add-extension reload-receivable)
-  (gnc:add-extension reload-invoice)
-  (gnc:add-extension reload-owner)
-  (gnc:add-extension test-search)
-)
-
-(define (business-book-opened session)
-  (remind-bills-due session))
-
-(define (business-ui-started)
-  (set! ui-started #t)
-  (remind-bills-due (gnc:get-current-session)))
+		  (list gnc:menuname-reports))))
 
 (gnc:hook-add-dangler gnc:*report-hook* business-report-function)
-(gnc:hook-add-dangler gnc:*ui-startup-hook* add-business-items)
-;(gnc:hook-add-dangler gnc:*ui-post-startup-hook* business-ui-started)
-(gnc:hook-add-dangler gnc:*book-opened-hook* business-book-opened)
-(gnc:hook-add-dangler gnc:*add-extension-hook* add-business-test)
Index: dialog-vendor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-vendor.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lsrc/business/business-gnome/dialog-vendor.c -Lsrc/business/business-gnome/dialog-vendor.c -u -r1.38 -r1.39
--- src/business/business-gnome/dialog-vendor.c
+++ src/business/business-gnome/dialog-vendor.c
@@ -23,17 +23,15 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-currency-edit.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
-#include "window-help.h"
 #include "dialog-search.h"
 #include "search-param.h"
 
@@ -51,6 +49,15 @@
 #define DIALOG_NEW_VENDOR_CM_CLASS "dialog-new-vendor"
 #define DIALOG_EDIT_VENDOR_CM_CLASS "dialog-edit-vendor"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/vendor_search"
+
+void gnc_vendor_taxtable_check_cb (GtkToggleButton *togglebutton, gpointer user_data);
+void gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_vendor_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_vendor_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_vendor_window_destroy_cb (GtkWidget *widget, gpointer data);
+void gnc_vendor_name_changed_cb (GtkWidget *widget, gpointer data);
+
 typedef enum
 {
   NEW_VENDOR,
@@ -97,7 +104,7 @@
   GncTaxTable *	taxtable;
 };
 
-static void
+void
 gnc_vendor_taxtable_check_cb (GtkToggleButton *togglebutton,
 				gpointer user_data)
 {
@@ -120,6 +127,9 @@
 
 static void gnc_ui_to_vendor (VendorWindow *vw, GncVendor *vendor)
 {
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
   GncAddress *addr;
 
   addr = gncVendorGetAddr (vendor);
@@ -152,8 +162,12 @@
   gncVendorSetActive (vendor, gtk_toggle_button_get_active
 			(GTK_TOGGLE_BUTTON (vw->active_check)));
   gncVendorSetTaxIncluded (vendor, vw->taxincluded);
-  gncVendorSetNotes (vendor, gtk_editable_get_chars
-		       (GTK_EDITABLE (vw->notes_text), 0, -1));
+
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(vw->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncVendorSetNotes (vendor, text);
+
   gncVendorSetTerms (vendor, vw->terms);
   gncVendorSetCurrency (vendor,
 			gnc_currency_edit_get_currency (GNC_CURRENCY_EDIT
@@ -179,10 +193,11 @@
   return FALSE;
 }
 
-static void
+void
 gnc_vendor_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   VendorWindow *vw = data;
+  gchar *string;
 
   /* Check for valid company name */
   if (check_entry_nonempty (vw->dialog, vw->company_entry,
@@ -203,10 +218,12 @@
   }
 
   /* Check for valid id and set one if necessary */
-  if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (vw->id_entry)), "") == 0)
-    gtk_entry_set_text (GTK_ENTRY (vw->id_entry),
-			g_strdup_printf ("%.6lld",
-					 gncVendorNextID(vw->book)));
+  if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (vw->id_entry)), "") == 0) {
+    string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			      gncVendorNextID(vw->book));
+    gtk_entry_set_text (GTK_ENTRY (vw->id_entry), string);
+    g_free(string);
+  }
 
   /* Now save it off */
   {
@@ -221,7 +238,7 @@
   gnc_close_gui_component (vw->component_id);
 }
 
-static void
+void
 gnc_vendor_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   VendorWindow *vw = data;
@@ -229,15 +246,13 @@
   gnc_close_gui_component (vw->component_id);
 }
 
-static void
+void
 gnc_vendor_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_VENDOR;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
-static void
+void
 gnc_vendor_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   VendorWindow *vw = data;
@@ -257,7 +272,7 @@
   g_free (vw);
 }
 
-static void
+void
 gnc_vendor_name_changed_cb (GtkWidget *widget, gpointer data)
 {
   VendorWindow *vw = data;
@@ -266,11 +281,11 @@
   if (!vw)
     return;
 
-  name = gtk_entry_get_text (GTK_ENTRY (vw->company_entry));
+  name = gtk_editable_get_chars (GTK_EDITABLE (vw->company_entry), 0, -1);
   if (!name || *name == '\0')
-    name = _("<No name>");
+    name = g_strdup (_("<No name>"));
 
-  id = gtk_entry_get_text (GTK_ENTRY (vw->id_entry));
+  id = gtk_editable_get_chars (GTK_EDITABLE (vw->id_entry), 0, -1);
 
   fullname = g_strconcat (name, " (", id, ")", NULL);
 
@@ -281,6 +296,8 @@
 
   gtk_window_set_title (GTK_WINDOW (vw->dialog), title);
 
+  g_free (name);
+  g_free (id);
   g_free (fullname);
   g_free (title);
 }
@@ -290,7 +307,7 @@
 {
   VendorWindow *vw = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (vw->dialog));
+  gtk_widget_destroy (vw->dialog);
 }
 
 static void
@@ -330,7 +347,6 @@
 {
   VendorWindow *vw;
   GladeXML *xml;
-  GnomeDialog *vwd;
   GtkWidget *edit, *hbox;
   gnc_commodity *currency;
 
@@ -366,12 +382,6 @@
   /* Find the dialog */
   xml = gnc_glade_xml_new ("vendor.glade", "Vendor Dialog");
   vw->dialog = glade_xml_get_widget (xml, "Vendor Dialog");
-  vwd = GNOME_DIALOG (vw->dialog);
-
-  gtk_object_set_data (GTK_OBJECT (vw->dialog), "dialog_info", vw);
-
-  /* default to ok */
-  gnome_dialog_set_default (vwd, 0);
 
   /* Get entry points */
   vw->id_entry = glade_xml_get_widget (xml, "id_entry");
@@ -402,50 +412,16 @@
   hbox = glade_xml_get_widget (xml, "currency_box");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  /* Setup Dialog for Editing */
-  gnome_dialog_set_default (vwd, 0);
-
-  /* Attach <Enter> to default button */
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->id_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->company_entry));
-
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->name_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->addr1_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->addr2_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->addr3_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->addr4_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->phone_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->fax_entry));
-  gnome_dialog_editable_enters (vwd, GTK_EDITABLE (vw->email_entry));
-
-  /* Set focus to company name */
-  gtk_widget_grab_focus (vw->company_entry);
-
   /* Setup signals */
-  gnome_dialog_button_connect
-    (vwd, 0, GTK_SIGNAL_FUNC(gnc_vendor_window_ok_cb), vw);
-  gnome_dialog_button_connect
-    (vwd, 1, GTK_SIGNAL_FUNC(gnc_vendor_window_cancel_cb), vw);
-  gnome_dialog_button_connect
-    (vwd, 2, GTK_SIGNAL_FUNC(gnc_vendor_window_help_cb), vw);
-
-  gtk_signal_connect (GTK_OBJECT (vw->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_vendor_window_destroy_cb), vw);
-
-  gtk_signal_connect(GTK_OBJECT (vw->id_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_vendor_name_changed_cb), vw);
-
-  gtk_signal_connect(GTK_OBJECT (vw->company_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_vendor_name_changed_cb), vw);
-
-  gtk_signal_connect(GTK_OBJECT (vw->taxtable_check), "toggled",
-		     GTK_SIGNAL_FUNC(gnc_vendor_taxtable_check_cb), vw);
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     vw);
 
   /* Setup initial values */
   if (vendor != NULL) {
+    GtkTextBuffer* text_buffer;
     GncAddress *addr;
     const char *string;
-    gint pos = 0;
 
     vw->dialog_type = EDIT_VENDOR;
     vw->vendor_guid = *gncVendorGetGUID (vendor);
@@ -470,9 +446,8 @@
                                 gncVendorGetActive (vendor));
 
     string = gncVendorGetNotes (vendor);
-    gtk_editable_delete_text (GTK_EDITABLE (vw->notes_text), 0, -1);
-    gtk_editable_insert_text (GTK_EDITABLE (vw->notes_text), string,
-			      strlen(string), &pos);
+    text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(vw->notes_text));
+    gtk_text_buffer_set_text (text_buffer, string, -1);
 
     vw->component_id =
       gnc_register_gui_component (DIALOG_EDIT_VENDOR_CM_CLASS,
@@ -717,7 +692,8 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL,
-				   new_vendor_cb, sw, free_vendor_cb);
+				   new_vendor_cb, sw, free_vendor_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: dialog-invoice.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-invoice.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -Lsrc/business/business-gnome/dialog-invoice.c -Lsrc/business/business-gnome/dialog-invoice.c -u -r1.101 -r1.102
--- src/business/business-gnome/dialog-invoice.c
+++ src/business/business-gnome/dialog-invoice.c
@@ -32,17 +32,15 @@
 #include "QueryNew.h"
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
 #include "gnc-date-edit.h"
-#include "gnc-menu-extensions.h"
 #include "gnc-amount-edit.h"
 #include "gnucash-sheet.h"
-#include "window-help.h"
 #include "window-report.h"
 #include "dialog-search.h"
 #include "search-param.h"
@@ -65,9 +63,21 @@
 
 #include "dialog-query-list.h"
 
+#include "gnc-plugin-business.h"
+#include "gnc-plugin-page.h"
+#include "gnc-plugin-page-invoice.h"
+#include "gnc-main-window.h"
+
 #define DIALOG_NEW_INVOICE_CM_CLASS "dialog-new-invoice"
 #define DIALOG_VIEW_INVOICE_CM_CLASS "dialog-view-invoice"
 
+#define GCONF_SECTION_SEARCH  "dialogs/business/invoice_search"
+
+void gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_invoice_id_changed_cb (GtkWidget *widget, gpointer data);
+
 typedef enum
 {
   NEW_INVOICE,
@@ -76,16 +86,6 @@
   VIEW_INVOICE
 } InvoiceDialogType;
 
-typedef enum
-{
-  BY_STANDARD = 0,
-  BY_DATE,
-  BY_DATE_ENTERED,
-  BY_DESC,
-  BY_QTY,
-  BY_PRICE
-} sort_type_t;
-
 struct _invoice_select_window {
   GNCBook *	book;
   GncOwner *	owner;
@@ -93,43 +93,25 @@
   GncOwner	owner_def;
 };
 
+
+/** This data structure does double duty.  It is used to maintain
+ *  information for the "New Invoice" dialog, and it is also used to
+ *  maintain information for the "Invoice Entry" page that is embedded
+ *  into a main window.  Beware, as not all fields are used by both windows.
+ */
 struct _invoice_window {
   GladeXML *	xml;
 
-  GtkWidget *	dialog;
-
-  GtkWidget *	statusbar;
-
-  /* Popup Menu */
-  GtkWidget *	popup_menu;
-
-  /* Toolbar Widgets */
-  GtkWidget *	toolbar_dock;
-  GtkWidget *	edit_button;
-  GtkWidget *	enter_button;
-  GtkWidget *	cancel_button;
-  GtkWidget *	delete_button;
-  GtkWidget *	duplicate_button;
-  GtkWidget *	blank_button;
-  GtkWidget *	print_button;
-  GtkWidget *	post_button;
-  GtkWidget *	unpost_button;
+  GtkWidget *	dialog;		/* Used by 'New Invoice Window' */
+  GncPluginPage *page;		/* Used by 'Edit Invoice' Page */
 
   /* Summary Bar Widgets */
-  GtkWidget *	summarybar_dock;
   GtkWidget *	total_label;
   GtkWidget *	total_cash_label;
   GtkWidget *	total_charge_label;
   GtkWidget *	total_subtotal_label;
   GtkWidget *	total_tax_label;
 
-  /* Menu Widgets */
-  GtkWidget *	menu_print;
-  GtkWidget *	menu_cut;
-  GtkWidget *	menu_paste;
-  GtkWidget *	menu_edit_invoice;
-  GtkWidget *	menu_actions;
-
   /* Data Widgets */
   GtkWidget *	id_entry;
   GtkWidget *	notes_text;
@@ -158,14 +140,13 @@
   GtkWidget *	to_charge_frame;
   GtkWidget *	to_charge_edit;
 
-  gboolean	width_inited;
   gint		width;
 
   GncBillTerm *	terms;
   GnucashRegister *	reg;
   GncEntryLedger *	ledger;
 
-  sort_type_t	last_sort;
+  invoice_sort_type_t	last_sort;
 
   InvoiceDialogType	dialog_type;
   GUID		invoice_guid;
@@ -184,101 +165,73 @@
 
 /* Forward definitions for CB functions */
 void gnc_invoice_window_closeCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_editCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_recordCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_cancelCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_deleteCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_duplicateCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_blankCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_printCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_postCB (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_unpostCB (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_cut_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_copy_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_paste_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_new_account_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_report_owner_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_taxtable_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_billterm_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_sort_standard_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_date_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_date_entered_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_description_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_quantity_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_sort_price_cb (GtkWidget *widget, gpointer data);
-
-void gnc_invoice_window_toolbar_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data);
-void gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data);
-
 void gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data);
 void gnc_invoice_window_leave_notes_cb (GtkWidget *widget, GdkEventFocus *event, gpointer data);
 
 #define INV_WIDTH_PREFIX "invoice_reg"
 #define BILL_WIDTH_PREFIX "bill_reg"
 #define VOUCHER_WIDTH_PREFIX "voucher_reg"
-static int inv_last_width = 0;
-static int bill_last_width = 0;
-static int voucher_last_width = 0;
 
-static void gnc_invoice_update_window (InvoiceWindow *iw);
+static void gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget);
 static InvoiceWindow * gnc_ui_invoice_modify (GncInvoice *invoice);
 
 /*******************************************************************************/
-/* FUNCTIONS FOR UNPOSTING */
+/* FUNCTIONS FOR ACCESSING DATA STRUCTURE FIELDS */
 
-static void
-on_yes_tt_reset_toggled (GtkToggleButton *button, InvoiceWindow *iw)
+static GtkWidget *
+iw_get_window (InvoiceWindow *iw)
 {
-  if (!iw) return;
-  if (gtk_toggle_button_get_active(button))
-    iw->reset_tax_tables = TRUE;
+  if (iw->page)
+    return gnc_plugin_page_get_window(iw->page);
+  return iw->dialog;
 }
 
-static void
-on_no_tt_reset_toggled (GtkToggleButton *button, InvoiceWindow *iw)
+GtkWidget *
+gnc_invoice_get_register(InvoiceWindow *iw)
 {
-  if (!iw) return;
-  if (gtk_toggle_button_get_active(button))
-    iw->reset_tax_tables = FALSE;
+  if (iw)
+    return (GtkWidget *)iw->reg;
+  return NULL;
 }
 
+/*******************************************************************************/
+/* FUNCTIONS FOR UNPOSTING */
+
 static gboolean
 iw_ask_unpost (InvoiceWindow *iw)
 {
   GtkWidget *dialog, *toggle, *pixmap;
   GladeXML *xml;
+  gint response;
   char *s;
 
   xml = gnc_glade_xml_new ("invoice.glade", "Unpost Message Dialog");
   dialog = glade_xml_get_widget (xml, "Unpost Message Dialog");
-  toggle = glade_xml_get_widget (xml, "no_tt_reset");
+  toggle = glade_xml_get_widget (xml, "yes_tt_reset");
   pixmap = glade_xml_get_widget (xml, "q_pixmap");
 
-  gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(iw->dialog));
+  gtk_window_set_transient_for (GTK_WINDOW(dialog),
+				GTK_WINDOW(iw_get_window(iw)));
 
-  glade_xml_signal_connect_data (xml, "on_yes_tt_reset_toggled",
-				 GTK_SIGNAL_FUNC (on_yes_tt_reset_toggled), iw);
-  glade_xml_signal_connect_data (xml, "on_no_tt_reset_toggled",
-				 GTK_SIGNAL_FUNC (on_no_tt_reset_toggled), iw);
-  
   iw->reset_tax_tables = FALSE;
-  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(toggle), TRUE);
 
-  s = gnome_unconditional_pixmap_file("gnome-question.png");
+  s = gnome_program_locate_file (NULL,
+				 GNOME_FILE_DOMAIN_PIXMAP,
+				 "gnome-question.png", TRUE, NULL);
   if (s) {
-    gnome_pixmap_load_file(GNOME_PIXMAP(pixmap), s);
+    pixmap = gtk_image_new_from_file(s);
     g_free(s);
   }
 
   gtk_widget_show_all(dialog);
 
-  return (gnome_dialog_run_and_close(GNOME_DIALOG(dialog)) == 0);
+  response = gtk_dialog_run(GTK_DIALOG(dialog));
+  if (response == GTK_RESPONSE_OK)
+    iw->reset_tax_tables =
+      gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle));
+
+  gtk_widget_destroy(dialog);
+  return (response == GTK_RESPONSE_OK);
 }
 
 /*******************************************************************************/
@@ -295,6 +248,9 @@
 
 static void gnc_ui_to_invoice (InvoiceWindow *iw, GncInvoice *invoice)
 {
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
   Timespec ts;
 
   if (iw->dialog_type == VIEW_INVOICE)
@@ -308,8 +264,10 @@
     gncInvoiceSetActive (invoice, gtk_toggle_button_get_active
 			 (GTK_TOGGLE_BUTTON (iw->active_check)));
 
-  gncInvoiceSetNotes (invoice, gtk_editable_get_chars
-		      (GTK_EDITABLE (iw->notes_text), 0, -1));
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(iw->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncInvoiceSetNotes (invoice, text);
 
   if (iw->to_charge_edit)
     gncInvoiceSetToChargeAmount (invoice,
@@ -355,16 +313,17 @@
 gnc_invoice_window_verify_ok (InvoiceWindow *iw)
 {
   const char *res;
+  gchar *string;
 
   /* save the current entry in the ledger? */
-  if (!gnc_entry_ledger_check_close (iw->dialog, iw->ledger))
+  if (!gnc_entry_ledger_check_close (iw_get_window(iw), iw->ledger))
     return FALSE;
 
   /* Check the Owner */
   gnc_owner_get_owner (iw->owner_choice, &(iw->owner));
   res = gncOwnerGetName (&(iw->owner));
   if (res == NULL || safe_strcmp (res, "") == 0) {
-    gnc_error_dialog (iw->dialog,
+    gnc_error_dialog (iw_get_window(iw),
 		      /* Translators: In this context,
 		       * 'Billing information' maps to the
 		       * label in the frame and means
@@ -377,8 +336,10 @@
   /* Check the ID; set one if necessary */
   res = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
   if (safe_strcmp (res, "") == 0) {
-  gtk_entry_set_text (GTK_ENTRY (iw->id_entry),
-		      g_strdup_printf ("%.6lld", gncInvoiceNextID(iw->book)));
+    string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			      gncInvoiceNextID(iw->book));
+    gtk_entry_set_text (GTK_ENTRY (iw->id_entry), string);
+    g_free(string);
   }
       
   return TRUE;
@@ -401,7 +362,7 @@
   return TRUE;
 }
 
-static void
+void
 gnc_invoice_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -422,7 +383,7 @@
   gnc_close_gui_component (iw->component_id);
 }
 
-static void
+void
 gnc_invoice_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -430,15 +391,13 @@
   gnc_close_gui_component (iw->component_id);
 }
 
-static void
+void
 gnc_invoice_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_INVOICE;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
-static void
+void
 gnc_invoice_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -536,7 +495,7 @@
     else
       msg = g_strdup (message);
 
-    result = gnc_verify_dialog (iw->dialog, FALSE, msg);
+    result = gnc_verify_dialog (iw_get_window(iw), FALSE, msg);
     g_free (msg);
 
     if (!result)
@@ -633,7 +592,7 @@
   /* Check that there is at least one Entry */
   invoice = iw_get_invoice (iw);
   if (gncInvoiceGetEntries (invoice) == NULL) {
-    gnc_error_dialog (iw->dialog,
+    gnc_error_dialog (iw_get_window(iw),
 		      _("The Invoice must have at least one Entry."));
     return;
   }
@@ -656,9 +615,9 @@
   memo = NULL;
 
   /* Get the default for the accumulate option */
-  accumulate = gnc_lookup_boolean_option("Business", "Accumulate splits on Post?", TRUE);
+  accumulate = gnc_gconf_get_bool(GCONF_SECTION_INVOICE, "accumulate_splits", NULL);
 
-  if (!gnc_dialog_dates_acct_question_parented (iw->dialog, message, ddue_label,
+  if (!gnc_dialog_dates_acct_question_parented (iw_get_window(iw), message, ddue_label,
 				       post_label, acct_label, question_label, TRUE,
 				       acct_types, iw->book, iw->terms,
 				       &ddue, &postdate, &memo, &acc, &accumulate))
@@ -685,7 +644,7 @@
   gnc_entry_ledger_set_readonly (iw->ledger, TRUE);
 
   /* ... and redisplay here. */
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), FALSE);
 }
 
@@ -713,7 +672,7 @@
   /* if we get here, we succeeded in unposting -- reset the ledger and redisplay */
   iw->dialog_type = EDIT_INVOICE;
   gnc_entry_ledger_set_readonly (iw->ledger, FALSE);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), FALSE);
 }
 
@@ -735,11 +694,6 @@
   gnucash_register_paste_clipboard (iw->reg);
 }
 
-void gnc_invoice_window_new_account_cb (GtkWidget *widget, gpointer data)
-{
-  gnc_ui_new_account_window (NULL);
-}
-
 void gnc_invoice_window_new_invoice_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -798,18 +752,6 @@
   gnc_business_call_owner_report (&iw->owner, NULL);
 }
 
-void gnc_invoice_window_taxtable_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_ui_tax_table_window_new (iw->book);
-}
-
-void gnc_invoice_window_billterm_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_ui_billterms_window_new (iw->book);
-}
-
 void gnc_invoice_window_payment_cb (GtkWidget *widget, gpointer data)
 {
   InvoiceWindow *iw = data;
@@ -825,8 +767,8 @@
 
 /* Sorting callbacks */
 
-static void
-gnc_invoice_window_sort (InvoiceWindow *iw, sort_type_t sort_code)
+void
+gnc_invoice_window_sort (InvoiceWindow *iw, invoice_sort_type_t sort_code)
 {
   QueryNew *query = gnc_entry_ledger_get_query (iw->ledger);
   GSList *p1 = NULL, *p2 = NULL, *p3 = NULL, *standard;
@@ -872,90 +814,8 @@
   gnc_entry_ledger_display_refresh (iw->ledger);
 }
 
-void
-gnc_invoice_window_sort_standard_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_STANDARD);
-}
-
-void
-gnc_invoice_window_sort_date_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DATE);
-}
-
-void
-gnc_invoice_window_sort_date_entered_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DATE_ENTERED);
-}
-
-void
-gnc_invoice_window_sort_description_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_DESC);
-}
-
-void
-gnc_invoice_window_sort_quantity_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_QTY);
-}
-
-void
-gnc_invoice_window_sort_price_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  gnc_invoice_window_sort (iw, BY_PRICE);
-}
-
 /* Window configuration callbacks */
 
-void gnc_invoice_window_toolbar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->toolbar_dock);
-  } else {
-    gtk_widget_hide(iw->toolbar_dock);
-    gtk_widget_queue_resize(iw->toolbar_dock);
-  }
-}
-
-void gnc_invoice_window_statusbar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->statusbar);
-  } else {
-    gtk_widget_hide(iw->statusbar);
-    gtk_widget_queue_resize(iw->statusbar);
-  }
-}
-
-void
-gnc_invoice_window_summarybar_cb (GtkWidget *widget, gpointer data)
-{
-  InvoiceWindow *iw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show(iw->summarybar_dock);
-  } else {
-    gtk_widget_hide(iw->summarybar_dock);
-    gtk_widget_queue_resize(iw->summarybar_dock);
-  }
-}
-
 void
 gnc_invoice_window_active_toggled_cb (GtkWidget *widget, gpointer data)
 {
@@ -974,11 +834,16 @@
 {
   InvoiceWindow *iw = data;
   GncInvoice *invoice = iw_get_invoice(iw);
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
 
   if (!invoice) return;
 
-  gncInvoiceSetNotes (invoice, gtk_editable_get_chars
-		      (GTK_EDITABLE (widget), 0, -1));
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(iw->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncInvoiceSetNotes (invoice, text);
 }
 
 static void
@@ -1020,7 +885,7 @@
   return label;
 }
 
-static GtkWidget *
+GtkWidget *
 gnc_invoice_window_create_summary_bar (InvoiceWindow *iw)
 {
   GtkWidget *summarybar;
@@ -1051,98 +916,10 @@
     break;
   }
 
+  gtk_widget_show_all(summarybar);
   return summarybar;
 }
 
-static GtkWidget *
-gnc_invoice_window_create_popup_menu (InvoiceWindow *iw)
-{
-  GtkWidget *popup;
-  GladeXML *xml;
-
-  xml = gnc_glade_xml_new ("invoice.glade", "Invoice Window Popup Menu");
-
-  popup = glade_xml_get_widget (xml, "Invoice Window Popup Menu");
-
-  glade_xml_signal_autoconnect_full (xml, gnc_glade_autoconnect_full_func, iw);
-
-  /* Glade insists on making this a tearoff menu. */
-  if (gnome_preferences_get_menus_have_tearoff ()) {
-    GtkMenuShell *ms = GTK_MENU_SHELL (popup);
-    GtkWidget *tearoff;
-
-    tearoff = g_list_nth_data (ms->children, 0);
-    ms->children = g_list_remove (ms->children, tearoff);
-    gtk_widget_destroy (tearoff);
-  }
-
-  iw->popup_menu = popup;
-
-  return popup;
-}
-
-static char *
-gnc_invoice_get_width_prefix (InvoiceWindow *iw)
-{
-  switch (gncOwnerGetType (&iw->owner)) {
-  case GNC_OWNER_CUSTOMER:
-    return INV_WIDTH_PREFIX;
-  case GNC_OWNER_VENDOR:
-    return BILL_WIDTH_PREFIX;
-  case GNC_OWNER_EMPLOYEE:
-    return VOUCHER_WIDTH_PREFIX;
-  default:
-    g_warning ("invalid owner");
-    return INV_WIDTH_PREFIX;
-  }
-}
-
-static int *
-gnc_invoice_get_width_integer (InvoiceWindow *iw)
-{
-  switch (gncOwnerGetType (&iw->owner)) {
-  case GNC_OWNER_CUSTOMER:
-    return &inv_last_width;
-  case GNC_OWNER_VENDOR:
-    return &bill_last_width;
-  case GNC_OWNER_EMPLOYEE:
-    return &voucher_last_width; 
-  default:
-    g_warning ("invalid owner");
-    return &inv_last_width;
-  }
-}
-
-static void
-gnc_invoice_save_size (InvoiceWindow *iw)
-{
-  int *last_width = gnc_invoice_get_width_integer (iw);
-
-  gdk_window_get_geometry (iw->dialog->window, NULL, NULL,
-			   last_width, NULL, NULL);
-
-  gnc_save_window_size (gnc_invoice_get_width_prefix (iw), *last_width, 0);
-}
-
-static void
-gnc_invoice_size_allocate (GtkWidget *widget,
-			   GtkAllocation *allocation,
-			   gpointer user_data)
-{
-  InvoiceWindow *iw = user_data;
-
-  /* HACK ALERT. this seems to be the only thing to get the
-   * freekin register window to stop freekin resizing itself
-   * all the freekin time.
-   */
-
-  if (iw->width == allocation->width)
-    return;
-
-  iw->width = allocation->width;
-  gtk_window_set_default_size (GTK_WINDOW(iw->dialog), iw->width, 0);
-}
-
 static int
 gnc_invoice_job_changed_cb (GtkWidget *widget, gpointer data)
 {
@@ -1217,9 +994,8 @@
       gtk_box_pack_start (GTK_BOX (iw->job_box), iw->job_choice,
 			  TRUE, TRUE, 0);
       
-      gtk_signal_connect (GTK_OBJECT (iw->job_choice), "changed",
-			  GTK_SIGNAL_FUNC (gnc_invoice_job_changed_cb),
-			  iw);
+      g_signal_connect (G_OBJECT (iw->job_choice), "changed",
+			G_CALLBACK (gnc_invoice_job_changed_cb), iw);
       break;
     }
   
@@ -1289,9 +1065,8 @@
       gtk_box_pack_start (GTK_BOX (iw->proj_job_box), iw->proj_job_choice,
 			  TRUE, TRUE, 0);
       
-      gtk_signal_connect (GTK_OBJECT (iw->proj_job_choice), "changed",
-			  GTK_SIGNAL_FUNC (gnc_invoice_proj_job_changed_cb),
-			  iw);
+      g_signal_connect (G_OBJECT (iw->proj_job_choice), "changed",
+			G_CALLBACK (gnc_invoice_proj_job_changed_cb), iw);
     }
     break;
   }
@@ -1387,8 +1162,9 @@
 {
   InvoiceWindow *iw = user_data;
 
-  if (iw)
-    gnome_dialog_close (GNOME_DIALOG (iw->dialog));
+  if (iw) {
+    gtk_widget_destroy (iw->dialog);
+  }
 }
 
 static void
@@ -1397,15 +1173,8 @@
   InvoiceWindow *iw = user_data;
 
   if (iw) {
-    switch (iw->dialog_type) {
-    case VIEW_INVOICE:
-    case EDIT_INVOICE:
-      gnc_invoice_save_size (iw);
-      break;
-    default:
-      break;
-    }
-    gtk_widget_destroy (iw->dialog);
+    gnc_main_window_close_page(iw->page);
+    iw->page = NULL;
   }
 }
 
@@ -1431,7 +1200,7 @@
     return;
 
   //  if (iw)
-  //    gnc_invoice_update_window (iw);
+  //    gnc_invoice_update_window (iw, NULL);
 
   invoice = iw_get_invoice (iw);
   if (!invoice)
@@ -1476,20 +1245,19 @@
   }
 }
 
-static void
-gnc_invoice_redraw_help_cb (GnucashRegister *g_reg, gpointer data)
+void
+gnc_invoice_window_changed (InvoiceWindow *iw, GtkWidget *window)
 {
-  InvoiceWindow *iw = data;
-  const char *status;
-  char *help;
+  gnc_entry_ledger_set_parent(iw->ledger, window);
+}
 
+gchar *
+gnc_invoice_get_help (InvoiceWindow *iw)
+{
   if (!iw)
-    return;
+    return NULL;
 
-  help = gnc_table_get_help (gnc_entry_ledger_get_table (iw->ledger));
-  status = help ? help : "";
-  gnome_appbar_set_default (GNOME_APPBAR (iw->statusbar), status);
-  g_free (help);
+  return gnc_table_get_help (gnc_entry_ledger_get_table (iw->ledger));
 }
 
 static void
@@ -1528,44 +1296,21 @@
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (owner));
 
   /* Ok, NOW let's refresh ourselves */
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, NULL);
 }
 
+/** Update the various widgets in the window/page vased upon the data
+ *  in the InvoiceWindow data structure.
+ *
+ *  @param iw A pointer to the InvoiceWindow data structure.
+ *
+ *  @param widget If set, this is the widget that will be used for the
+ *  call to gtk_widget_show_all().  This is needed at window/page
+ *  creation time when all of the iw/page linkages haven't been set up
+ *  yet.
+ */
 static void
-gnc_configure_register_colors (void)
-{
-  GncEntryLedgerColors reg_colors;
-
-  reg_colors.header_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Header color",
-                                 0xffffff);
-
-  reg_colors.primary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary color",
-                                 0xffffff);
-
-  reg_colors.secondary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary color",
-                                 0xffffff);
-
-  reg_colors.primary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary active color",
-                                 0xffffff);
-
-  reg_colors.secondary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary active color",
-                                 0xffffff);
-
-  gnc_entry_ledger_set_colors (reg_colors);
-}
-
-static void
-gnc_invoice_update_window (InvoiceWindow *iw)
+gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
 {
   GtkWidget *acct_entry;
   GncInvoice *invoice;
@@ -1600,42 +1345,23 @@
       gnc_owner_select_create (NULL, iw->proj_cust_box, iw->book,
 			       &(iw->proj_cust));
 
-    gtk_signal_connect (GTK_OBJECT (iw->owner_choice), "changed",
-			GTK_SIGNAL_FUNC (gnc_invoice_owner_changed_cb),
-			iw);
-
-    gtk_signal_connect (GTK_OBJECT (iw->proj_cust_choice), "changed",
-			GTK_SIGNAL_FUNC (gnc_invoice_proj_cust_changed_cb),
-			iw);
+    g_signal_connect (G_OBJECT (iw->owner_choice), "changed",
+		      G_CALLBACK (gnc_invoice_owner_changed_cb), iw);
+
+    g_signal_connect (G_OBJECT (iw->proj_cust_choice), "changed",
+		      G_CALLBACK (gnc_invoice_proj_cust_changed_cb), iw);
 
     break;
   }
 
+  if (iw->owner_choice)
+    gtk_widget_show_all (iw->owner_choice);
+  if (iw->proj_cust_choice)
+    gtk_widget_show_all (iw->proj_cust_choice);
+
   gnc_invoice_update_job_choice (iw);
   gnc_invoice_update_proj_job (iw);
 
-  gtk_widget_show_all (iw->dialog);
-
-  if (!iw->width_inited)
-  {
-    int * last_width = gnc_invoice_get_width_integer (iw);
-
-    switch (iw->dialog_type) {
-    case VIEW_INVOICE:
-    case EDIT_INVOICE:
-      if (*last_width == 0)
-	gnc_get_window_size (gnc_invoice_get_width_prefix (iw), last_width,
-			     NULL);
-
-      gtk_window_set_default_size (GTK_WINDOW (iw->dialog), *last_width, 0);
-      break;
-    default:
-      break;
-    }
-
-    iw->width_inited = TRUE;
-  }
-
   /* Hide the project frame for customer invoices */
   if (iw->owner.type == GNC_OWNER_CUSTOMER)
     gtk_widget_hide_all (iw->proj_frame);
@@ -1650,10 +1376,11 @@
 
   /* We know that "invoice" (and "owner") exist now */
   do {
+    GtkTextBuffer* text_buffer;
     const char *string;
+    gchar * tmp_string;
     Timespec ts, ts_zero = {0,0};
     Account *acct;
-    gint pos = 0;
 
     gtk_entry_set_text (GTK_ENTRY (iw->id_entry), gncInvoiceGetID (invoice));
 
@@ -1661,9 +1388,8 @@
 			gncInvoiceGetBillingID (invoice));
 
     string = gncInvoiceGetNotes (invoice);
-    gtk_editable_delete_text (GTK_EDITABLE (iw->notes_text), 0, -1);
-    gtk_editable_insert_text (GTK_EDITABLE (iw->notes_text), string,
-			      strlen (string), &pos);
+    text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(iw->notes_text));
+    gtk_text_buffer_set_text (text_buffer, string, -1);
 
     if (iw->active_check)
       gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (iw->active_check),
@@ -1702,13 +1428,20 @@
     ts = gncInvoiceGetDatePosted (invoice);
     gnc_date_edit_set_time_ts (GNC_DATE_EDIT (iw->posted_date), ts);
 
-    string = xaccAccountGetFullName (acct, gnc_get_account_separator ());
-    gtk_entry_set_text (GTK_ENTRY (acct_entry), string);
+    tmp_string = xaccAccountGetFullName (acct, gnc_get_account_separator ());
+    gtk_entry_set_text (GTK_ENTRY (acct_entry), tmp_string);
+    g_free(tmp_string);
 
   } while (FALSE);
 
-  if (iw->dialog_type == NEW_INVOICE || iw->dialog_type == MOD_INVOICE)
+  gnc_invoice_id_changed_cb(NULL, iw);
+  if (iw->dialog_type == NEW_INVOICE || iw->dialog_type == MOD_INVOICE) {
+    if (widget)
+      gtk_widget_show (widget);
+    else
+      gtk_widget_show (iw_get_window(iw));
     return;
+  }
 
   /* Fill in the to_charge amount (only in VIEW/EDIT modes) */
   {
@@ -1729,9 +1462,6 @@
       hide = glade_xml_get_widget (iw->xml, "hide4");
       gtk_widget_hide_all (hide);
 
-      /* Remove the popup menu */
-      gnucash_register_attach_popup (iw->reg, NULL, iw);
-
     } else {			/* ! posted */
       hide = glade_xml_get_widget (iw->xml, "posted_label");
       gtk_widget_hide_all (hide);
@@ -1749,21 +1479,8 @@
   }
 
   /* Set the toolbar widgets sensitivity */
-  gtk_widget_set_sensitive (iw->edit_button, !is_posted);
-  gtk_widget_set_sensitive (iw->enter_button, !is_posted);
-  gtk_widget_set_sensitive (iw->cancel_button, !is_posted);
-  gtk_widget_set_sensitive (iw->delete_button, !is_posted);
-  gtk_widget_set_sensitive (iw->duplicate_button, !is_posted);
-  gtk_widget_set_sensitive (iw->blank_button, !is_posted);
-  gtk_widget_set_sensitive (iw->post_button, !is_posted);
-  gtk_widget_set_sensitive (iw->unpost_button, can_unpost);
-
-  /* Set the menubar widgets sensitivity */
-  gtk_widget_set_sensitive (iw->menu_print, is_posted);
-  gtk_widget_set_sensitive (iw->menu_cut, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_paste, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_edit_invoice, !is_posted);
-  gtk_widget_set_sensitive (iw->menu_actions, !is_posted);
+  if (iw->page)
+    gnc_plugin_page_invoice_update_menus(iw->page, is_posted, can_unpost);
 
   /* Set the to-change widget */
   gtk_widget_set_sensitive (iw->to_charge_edit, !is_posted);
@@ -1787,17 +1504,20 @@
     gtk_widget_set_sensitive (iw->terms_menu, FALSE);
     gtk_widget_set_sensitive (iw->notes_text, FALSE); *//* XXX: should notes remain writable? */
   }  
+
+  if (widget)
+    gtk_widget_show (widget);
+  else
+    gtk_widget_show (iw_get_window(iw));
 }
 
-static void
-gnc_invoice_id_changed_cb (GtkWidget *widget, gpointer data)
+gchar *
+gnc_invoice_get_title (InvoiceWindow *iw)
 {
-  InvoiceWindow *iw = data;
-  char *id, *wintitle = NULL, *title;
+  char *wintitle = NULL;
+  const char *id = NULL;
 
-  if (!iw) return;
-
-  id = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
+  if (!iw) return NULL;
 
   switch (gncOwnerGetType (&iw->owner)) 
     {
@@ -1850,11 +1570,30 @@
       break;
     }  
 
-  title = g_strconcat (wintitle, " - ", id, NULL);
-  gtk_window_set_title (GTK_WINDOW (iw->dialog), title);
-  g_free (title);
+  if (iw->id_entry)
+    id = gtk_entry_get_text (GTK_ENTRY (iw->id_entry));
+  if (id && *id)
+    return g_strconcat (wintitle, " - ", id, NULL);
+  return g_strdup (wintitle);
+}
+
+void
+gnc_invoice_id_changed_cb (GtkWidget *unused, gpointer data)
+{
+  InvoiceWindow *iw = data;
+  gchar *title;
+
+  if (!iw) return;
+  if (iw->page) {
+    gnc_plugin_page_invoice_update_title (iw->page);
+  } else {
+    title = gnc_invoice_get_title (iw);
+    gtk_window_set_title (GTK_WINDOW (iw->dialog), title);
+    g_free (title);
+  }
 }
 
+
 static gboolean
 find_handler (gpointer find_data, gpointer user_data)
 {
@@ -1865,16 +1604,12 @@
 }
 
 static InvoiceWindow *
-gnc_invoice_new_window (GNCBook *bookp, InvoiceDialogType type,
-			GncInvoice *invoice, GncOwner *owner)
+gnc_invoice_new_page (GNCBook *bookp, InvoiceDialogType type,
+		      GncInvoice *invoice, GncOwner *owner)
 {
   InvoiceWindow *iw;
-  GladeXML *xml;
-  GtkWidget *hbox;
-  GncEntryLedger *entry_ledger = NULL;
-  GncOwnerType owner_type;
-  GncEntryLedgerType ledger_type;
   GncOwner *billto;
+  GncPluginPage *new_page;
 
   g_assert (type != NEW_INVOICE && type != MOD_INVOICE);
   g_assert (invoice != NULL);
@@ -1890,7 +1625,7 @@
     iw = gnc_find_first_gui_component (DIALOG_VIEW_INVOICE_CM_CLASS,
 				       find_handler, &invoice_guid);
     if (iw) {
-      gtk_window_present (GTK_WINDOW(iw->dialog));
+      gnc_main_window_display_page(iw->page);
       return(iw);
     }
   }
@@ -1898,35 +1633,48 @@
   /*
    * No existing invoice window found.  Build a new one.
    */
-  gnc_configure_register_colors ();
-
   iw = g_new0 (InvoiceWindow, 1);
   iw->book = bookp;
   iw->dialog_type = type;
+  iw->invoice_guid = *gncInvoiceGetGUID (invoice);
   iw->width = -1;
 
   /* Save this for later */
   gncOwnerCopy (gncOwnerGetEndOwner (owner), &(iw->owner));
   gncOwnerInitJob (&(iw->job), gncOwnerGetJob (owner));
-  owner_type = gncOwnerGetType (&iw->owner);
 
   billto = gncInvoiceGetBillTo (invoice);
   gncOwnerCopy (gncOwnerGetEndOwner (billto), &(iw->proj_cust));
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (billto));
 
-  /* Find the dialog */
-  iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "Invoice Entry Window");
-  iw->dialog = glade_xml_get_widget (xml, "Invoice Entry Window");
+  /* Now create the plugin page for this invoice and display it. */
+  new_page = gnc_plugin_page_invoice_new (iw);
+  gnc_main_window_open_page (gnc_plugin_business_get_window(), new_page);
 
-  gtk_object_set_data (GTK_OBJECT (iw->dialog), "dialog_info", iw);
+  return iw;
+}
 
-  /* Autoconnect all the signals */
-  glade_xml_signal_autoconnect_full (xml, gnc_glade_autoconnect_full_func, iw);
+GtkWidget *
+gnc_invoice_create_page (InvoiceWindow *iw, gpointer page)
+{
+  GncInvoice *invoice;
+  GladeXML *xml;
+  GtkWidget *dialog, *hbox;
+  GncEntryLedger *entry_ledger = NULL;
+  GncOwnerType owner_type;
+  GncEntryLedgerType ledger_type;
+  const gchar *gconf_section = NULL;
+
+  invoice = gncInvoiceLookup(iw->book,&iw->invoice_guid);
 
-  /* libglade should do this next line */
-  GNOME_APP(iw->dialog)->menubar = glade_xml_get_widget (xml, "menubar1");
-  gnc_extensions_menu_setup(GNOME_APP(iw->dialog), WINDOW_NAME_INVOICE);
+  iw->page = page;
 
+  /* Find the dialog */
+  iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "invoice_entry_vbox");
+  dialog = glade_xml_get_widget (xml, "invoice_entry_vbox");
+
+  /* Autoconnect all the signals */
+  glade_xml_signal_autoconnect_full (xml, gnc_glade_autoconnect_full_func, iw);
 
   /* Grab the widgets */
   iw->id_entry = glade_xml_get_widget (xml, "id_entry");
@@ -1944,28 +1692,10 @@
   iw->proj_cust_box = glade_xml_get_widget (xml, "proj_cust_hbox");
   iw->proj_job_box = glade_xml_get_widget (xml, "proj_job_hbox");
 
-  /* grab the toolbar widgets */
-  iw->toolbar_dock = glade_xml_get_widget (xml, "toolbar_dock");
-  iw->edit_button = glade_xml_get_widget (xml, "edit_button");
-  iw->enter_button = glade_xml_get_widget (xml, "enter_button");
-  iw->cancel_button = glade_xml_get_widget (xml, "cancel_button");
-  iw->delete_button = glade_xml_get_widget (xml, "delete_button");
-  iw->duplicate_button = glade_xml_get_widget (xml, "duplicate_button");
-  iw->blank_button = glade_xml_get_widget (xml, "blank_button");
-  iw->print_button = glade_xml_get_widget (xml, "print_button");
-  iw->post_button = glade_xml_get_widget (xml, "post_button");
-  iw->unpost_button = glade_xml_get_widget (xml, "unpost_button");
-
-  /* grab the menu widgets */
-  iw->menu_print = glade_xml_get_widget (xml, "menu_print");
-  iw->menu_cut = glade_xml_get_widget (xml, "menu_cut");
-  iw->menu_paste = glade_xml_get_widget (xml, "menu_paste");
-  iw->menu_edit_invoice = glade_xml_get_widget (xml, "menu_edit_invoice");
-  iw->menu_actions = glade_xml_get_widget (xml, "menu_actions");
-
   /* grab the to_charge widgets */
   {
     GtkWidget *edit;
+
     gnc_commodity *currency = gncInvoiceGetCurrency (invoice);
     GNCPrintAmountInfo print_info;
 
@@ -1981,34 +1711,21 @@
     hbox = glade_xml_get_widget (xml, "to_charge_box");
     gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-    gtk_signal_connect (GTK_OBJECT(gnc_amount_edit_gtk_entry
-				   (GNC_AMOUNT_EDIT(edit))),
-			"focus-out-event",
-			GTK_SIGNAL_FUNC(gnc_invoice_window_leave_to_charge_cb), iw);
-    gtk_signal_connect (GTK_OBJECT (edit), "amount_changed",
-			GTK_SIGNAL_FUNC(gnc_invoice_window_changed_to_charge_cb),
-			iw);
-  }
-
-  /* grab the statusbar */
-  iw->statusbar = glade_xml_get_widget (xml, "status_bar");
-
-  /* grab/build the summarybar */
-  {
-    GtkWidget * summarybar = gnc_invoice_window_create_summary_bar (iw);
-    iw->summarybar_dock = glade_xml_get_widget (xml, "summarybar_dock");
-    if (summarybar) {
-      gtk_widget_show_all (summarybar);
-      gtk_container_add (GTK_CONTAINER (iw->summarybar_dock), summarybar);
-    }
+    g_signal_connect(G_OBJECT(gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT(edit))),
+		     "focus-out-event",
+		     G_CALLBACK(gnc_invoice_window_leave_to_charge_cb), iw);
+    g_signal_connect(G_OBJECT(edit), "amount_changed",
+		     G_CALLBACK(gnc_invoice_window_changed_to_charge_cb), iw);
   }
 
   hbox = glade_xml_get_widget (xml, "date_opened_hbox");
   iw->opened_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->opened_date);
   gtk_box_pack_start (GTK_BOX(hbox), iw->opened_date, TRUE, TRUE, 0);
 
   iw->posted_date_hbox = glade_xml_get_widget (xml, "date_posted_hbox");
   iw->posted_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->posted_date);
   gtk_box_pack_start (GTK_BOX(iw->posted_date_hbox), iw->posted_date,
 		      TRUE, TRUE, 0);
 
@@ -2018,7 +1735,8 @@
 
   /* Build the ledger */
   ledger_type = GNCENTRY_INVOICE_VIEWER;
-  switch (type) {
+  owner_type = gncOwnerGetType (&iw->owner);
+  switch (iw->dialog_type) {
   case EDIT_INVOICE:
     switch (owner_type) {
     case GNC_OWNER_CUSTOMER:
@@ -2039,12 +1757,15 @@
     switch (owner_type) {
     case GNC_OWNER_CUSTOMER:
       ledger_type = GNCENTRY_INVOICE_VIEWER;
+      gconf_section = GCONF_SECTION_INVOICE;
       break;
     case GNC_OWNER_VENDOR:
       ledger_type = GNCENTRY_BILL_VIEWER;
+      gconf_section = GCONF_SECTION_BILL;
       break;
     case GNC_OWNER_EMPLOYEE:
       ledger_type = GNCENTRY_EXPVOUCHER_VIEWER;
+      gconf_section = GCONF_SECTION_BILL;
       break;
     default:
       g_warning ("Invalid owner type");
@@ -2054,14 +1775,15 @@
 
   /* Save the ledger... */
   iw->ledger = entry_ledger;
-  gnc_entry_ledger_set_parent (entry_ledger, iw->dialog);
+  /* window will be updated in a callback */
 
   /* Set the entry_ledger's invoice */
   gnc_entry_ledger_set_default_invoice (entry_ledger, invoice);
 
-  /* Setup initial values */
-  iw->invoice_guid = *gncInvoiceGetGUID (invoice);
+  /* Set the gconf section */
+  gnc_entry_ledger_set_gconf_section (entry_ledger, gconf_section);
 
+  /* Setup initial values */
   iw->component_id =
     gnc_register_gui_component (DIALOG_VIEW_INVOICE_CM_CLASS,
 				gnc_invoice_window_refresh_handler,
@@ -2072,58 +1794,51 @@
 				       GNC_INVOICE_MODULE_NAME,
 				       GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
 
-  gtk_signal_connect (GTK_OBJECT (iw->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_invoice_window_destroy_cb), iw);
-  gtk_signal_connect (GTK_OBJECT (iw->dialog), "size-allocate",
-		      GTK_SIGNAL_FUNC(gnc_invoice_size_allocate), iw);
-  gtk_signal_connect (GTK_OBJECT (iw->id_entry), "changed",
-		      gnc_invoice_id_changed_cb, iw);
+  g_signal_connect (G_OBJECT (dialog), "destroy",
+		    G_CALLBACK (gnc_invoice_window_destroy_cb), iw);
 
   /* Create the register */
   {
-    GtkWidget *regWidget, *frame;
-    GtkWidget *popup;
+    GtkWidget *regWidget, *frame, *window;
     guint num_rows;
 
-    num_rows = (guint) gnc_lookup_number_option ("Business",
-                                                 "Number of Rows", 10.0);
+    num_rows = gnc_gconf_get_float(GCONF_SECTION_INVOICE,
+				   KEY_NUMBER_OF_ROWS, NULL);
+    if (num_rows == 0)
+      num_rows = 10;
     gnucash_register_set_initial_rows( num_rows );
 
     /* Watch the order of operations, here... */
     regWidget = gnucash_register_new (gnc_entry_ledger_get_table
 				      (entry_ledger));
+    gtk_widget_show(regWidget);
     gnc_table_init_gui( regWidget, entry_ledger );
 
     frame = glade_xml_get_widget (xml, "ledger_frame");
     gtk_container_add (GTK_CONTAINER (frame), regWidget);
     
     iw->reg = GNUCASH_REGISTER (regWidget);
-    GNUCASH_SHEET (iw->reg->sheet)->window = iw->dialog;
-
-    gtk_signal_connect (GTK_OBJECT(regWidget), "activate_cursor",
-			GTK_SIGNAL_FUNC(gnc_invoice_window_recordCB), iw);
-    gtk_signal_connect (GTK_OBJECT(regWidget), "redraw_all",
-			GTK_SIGNAL_FUNC(gnc_invoice_redraw_all_cb), iw);
-    gtk_signal_connect (GTK_OBJECT(regWidget), "redraw_help",
-			GTK_SIGNAL_FUNC(gnc_invoice_redraw_help_cb), iw);
+    window = gnc_plugin_page_get_window(iw->page);
+    GNUCASH_SHEET (iw->reg->sheet)->window = window;
 
-    popup = gnc_invoice_window_create_popup_menu (iw);
-    gnucash_register_attach_popup (GNUCASH_REGISTER (regWidget), popup, iw);
+    g_signal_connect (G_OBJECT (regWidget), "activate_cursor",
+		      G_CALLBACK (gnc_invoice_window_recordCB), iw);
+    g_signal_connect (G_OBJECT (regWidget), "redraw_all",
+		      G_CALLBACK (gnc_invoice_redraw_all_cb), iw);
   }
 
   gnc_table_realize_gui (gnc_entry_ledger_get_table (entry_ledger));
  
-  /* Show the dialog */
-  gtk_widget_show_all (iw->dialog);
-
   /* Now fill in a lot of the pieces and display properly */
   gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, dialog);
 
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), TRUE);
-  gnc_window_adjust_for_screen (GTK_WINDOW(iw->dialog));
 
-  return iw;
+  /* Show the dialog */
+  //  gtk_widget_show_all (dialog);
+
+  return dialog;
 }
 
 static InvoiceWindow *
@@ -2132,7 +1847,6 @@
 {
   InvoiceWindow *iw;
   GladeXML *xml;
-  GnomeDialog *iwd;
   GtkWidget *hbox;
   GncOwner *billto;
 
@@ -2177,12 +1891,11 @@
   gncOwnerCopy (gncOwnerGetEndOwner (billto), &(iw->proj_cust));
   gncOwnerInitJob (&iw->proj_job, gncOwnerGetJob (billto));
 
-  /* Find the dialog */
+  /* Find the glade page layout */
   iw->xml = xml = gnc_glade_xml_new ("invoice.glade", "New Invoice Dialog");
   iw->dialog = glade_xml_get_widget (xml, "New Invoice Dialog");
-  iwd = GNOME_DIALOG (iw->dialog);
 
-  gtk_object_set_data (GTK_OBJECT (iw->dialog), "dialog_info", iw);
+  g_object_set_data (G_OBJECT (iw->dialog), "dialog_info", iw);
 
   /* Grab the widgets */
   iw->id_entry = glade_xml_get_widget (xml, "id_entry");
@@ -2201,28 +1914,16 @@
 
   hbox = glade_xml_get_widget (xml, "date_opened_hbox");
   iw->opened_date = gnc_date_edit_new (time(NULL), FALSE, FALSE);
+  gtk_widget_show(iw->opened_date);
   gtk_box_pack_start (GTK_BOX(hbox), iw->opened_date, TRUE, TRUE, 0);
 
   /* If this is a New Invoice, reset the Notes file to read/write */
-  if (iw->dialog_type == NEW_INVOICE)
-    gtk_editable_set_editable (GTK_EDITABLE (iw->notes_text), TRUE);
-
-  /* default to ok */
-  gnome_dialog_editable_enters (iwd, GTK_EDITABLE (iw->id_entry));
-  gnome_dialog_set_default (iwd, 0);
-
-  gtk_signal_connect (GTK_OBJECT (iw->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_invoice_window_destroy_cb), iw);
-  gtk_signal_connect (GTK_OBJECT (iw->id_entry), "changed",
-		      gnc_invoice_id_changed_cb, iw);
-
-  gnome_dialog_button_connect (iwd, 0,
-  			       GTK_SIGNAL_FUNC(gnc_invoice_window_ok_cb), iw);
-  gnome_dialog_button_connect (iwd, 1,
-  			       GTK_SIGNAL_FUNC(gnc_invoice_window_cancel_cb), iw);
-  gnome_dialog_button_connect (iwd, 2,
-  			       GTK_SIGNAL_FUNC(gnc_invoice_window_help_cb), iw);
+  gtk_widget_set_sensitive (iw->notes_text, (iw->dialog_type == NEW_INVOICE));
 
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     iw);
   /* Setup initial values */
   iw->invoice_guid = *gncInvoiceGetGUID (invoice);
 
@@ -2238,7 +1939,7 @@
 
   /* Now fill in a lot of the pieces and display properly */
   gnc_ui_billterms_optionmenu (iw->terms_menu, iw->book, TRUE, &iw->terms);
-  gnc_invoice_update_window (iw);
+  gnc_invoice_update_window (iw, iw->dialog);
   gnc_table_refresh_gui (gnc_entry_ledger_get_table (iw->ledger), TRUE);
 
   return iw;
@@ -2258,8 +1959,8 @@
   else
     type = EDIT_INVOICE;
 
-  iw = gnc_invoice_new_window (gncInvoiceGetBook(invoice), type,
-			       invoice, gncInvoiceGetOwner (invoice));
+  iw = gnc_invoice_new_page (gncInvoiceGetBook(invoice), type,
+			     invoice, gncInvoiceGetOwner (invoice));
 
   return iw;
 }
@@ -2468,7 +2169,7 @@
 
   return gnc_search_dialog_create (type, params, columns, q, q2,
 				   buttons, NULL, new_invoice_cb,
-				   sw, free_invoice_cb);
+				   sw, free_invoice_cb, GCONF_SECTION_SEARCH);
 
 }
 
@@ -2570,3 +2271,25 @@
 				      TRUE, FALSE,
 				      buttons, NULL);
 }
+
+void
+gnc_invoice_remind_bills_due (void)
+{
+  GNCBook *book;
+  gint days;
+
+  book = qof_session_get_book(qof_session_get_current_session());
+  days = gnc_gconf_get_float(GCONF_SECTION_BILL, "days_in_advance", NULL);
+
+  gnc_invoice_show_bills_due(book, days);
+}
+
+void
+gnc_invoice_remind_bills_due_cb (void)
+{
+  if (!gnc_gconf_get_bool(GCONF_SECTION_BILL, "notify_when_due", NULL))
+    return;
+
+  gnc_invoice_remind_bills_due();
+}
+
Index: dialog-payment.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-payment.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-gnome/dialog-payment.c -Lsrc/business/business-gnome/dialog-payment.c -u -r1.8 -r1.9
--- src/business/business-gnome/dialog-payment.c
+++ src/business/business-gnome/dialog-payment.c
@@ -26,7 +26,6 @@
 #include <gnome.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
@@ -34,7 +33,7 @@
 #include "gnc-engine-util.h"
 #include "gnc-date-edit.h"
 #include "gnc-amount-edit.h"
-#include "gnc-account-tree.h"
+#include "gnc-tree-view-account.h"
 #include "Transaction.h"
 #include "Account.h"
 #include "gnc-numeric.h"
@@ -65,6 +64,11 @@
 };
 
 
+void gnc_payment_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_payment_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_payment_window_destroy_cb (GtkWidget *widget, gpointer data);
+
+
 static void
 gnc_payment_window_refresh_handler (GHashTable *changes, gpointer data)
 {
@@ -79,7 +83,7 @@
   PaymentWindow *pw = data;
 
   if (pw)
-    gnome_dialog_close (GNOME_DIALOG (pw->dialog));
+    gtk_widget_destroy (pw->dialog);
 }
 
 static void
@@ -88,11 +92,11 @@
   gnc_owner_set_owner (pw->owner_choice, owner);
 }
 
-static void
+void
 gnc_payment_ok_cb (GtkWidget *widget, gpointer data)
 {
   PaymentWindow *pw = data;
-  char *text;
+  const char *text;
   Account *post, *acc;
   gnc_numeric amount;
 
@@ -117,7 +121,7 @@
   }
 
   /* Verify the user has selected a transfer account */
-  acc = gnc_account_tree_get_current_account (GNC_ACCOUNT_TREE(pw->acct_tree));
+  acc = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(pw->acct_tree));
   if (!acc) {
     text = _("You must select a transfer account from the account tree.");
     gnc_error_dialog (pw->dialog, text);
@@ -147,7 +151,7 @@
   /* Ok, now post the damn thing */
   gnc_suspend_gui_refresh ();
   {
-    char *memo, *num;
+    const char *memo, *num;
     Timespec date;
     
     /* Obtain all our ancillary information */
@@ -163,14 +167,14 @@
   gnc_ui_payment_window_destroy (pw);
 }
 
-static void
+void
 gnc_payment_cancel_cb (GtkWidget *widget, gpointer data)
 {
   PaymentWindow *pw = data;
   gnc_ui_payment_window_destroy (pw);
 }
 
-static void
+void
 gnc_payment_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   PaymentWindow *pw = data;
@@ -185,12 +189,12 @@
 
 /* Select the list of accounts to show in the tree */
 static void
-gnc_payment_set_account_types (GNCAccountTree *tree)
+gnc_payment_set_account_types (GncTreeViewAccount *tree)
 {
   AccountViewInfo avi;
   int i;
 
-  gnc_account_tree_get_view_info (tree, &avi);
+  gnc_tree_view_account_get_view_info (tree, &avi);
 
   for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
     switch (i) {
@@ -206,7 +210,7 @@
       break;
     }
 
-  gnc_account_tree_set_view_info (tree, &avi);
+  gnc_tree_view_account_set_view_info (tree, &avi);
 }
 
 static gboolean
@@ -276,22 +280,15 @@
   gtk_box_pack_start (GTK_BOX (box), pw->date_edit, TRUE, TRUE, 0);
 
   box = glade_xml_get_widget (xml, "acct_window");
-  pw->acct_tree = gnc_account_tree_new ();
+  pw->acct_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
   gtk_container_add (GTK_CONTAINER (box), pw->acct_tree);
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(pw->acct_tree), FALSE);
+  gnc_payment_set_account_types (GNC_TREE_VIEW_ACCOUNT (pw->acct_tree));
 
-  gtk_clist_column_titles_hide(GTK_CLIST(pw->acct_tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(pw->acct_tree));
-  gnc_payment_set_account_types (GNC_ACCOUNT_TREE (pw->acct_tree));
-
-  /* Connect the dialog buttons */
-  gnome_dialog_button_connect (GNOME_DIALOG (pw->dialog), 0,
-			       gnc_payment_ok_cb, pw);
-  gnome_dialog_button_connect (GNOME_DIALOG (pw->dialog), 1,
-			       gnc_payment_cancel_cb, pw);
-
-  /* Setup various signal handlers */
-  gtk_signal_connect (GTK_OBJECT (pw->dialog), "destroy",
-		      gnc_payment_window_destroy_cb, pw);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     pw);
 
   /* Register with the component manager */
   pw->component_id =
@@ -307,7 +304,6 @@
 				       GNC_EVENT_DESTROY);
 
   /* Fill in the post_combo and account_tree widgets */
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(pw->acct_tree));
   gnc_fill_account_select_combo (pw->post_combo, pw->book, pw->acct_types);
 
   /* Show it all */
Index: gw-business-gnome-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/gw-business-gnome-spec.scm,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lsrc/business/business-gnome/gw-business-gnome-spec.scm -Lsrc/business/business-gnome/gw-business-gnome-spec.scm -u -r1.26 -r1.27
--- src/business/business-gnome/gw-business-gnome-spec.scm
+++ src/business/business-gnome/gw-business-gnome-spec.scm
@@ -163,14 +163,6 @@
    "Dialog: Select a GncInvoice.  Either start_selection or "
    "owner may be NULL.")
   
-  (gw:wrap-function
-   ws
-   'gnc:invoice-show-bills-due
-   '<gw:void>
-   "gnc_invoice_show_bills_due"
-   '((<gnc:Book*> book) (<gw:double> days_in_advance))
-   "Dialog: display the bills due within the next \"days\"")
-
   ;;
   ;; dialog-job.h
   ;;
Index: dialog-customer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-customer.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/business/business-gnome/dialog-customer.c -Lsrc/business/business-gnome/dialog-customer.c -u -r1.39 -r1.40
--- src/business/business-gnome/dialog-customer.c
+++ src/business/business-gnome/dialog-customer.c
@@ -23,10 +23,9 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-currency-edit.h"
 #include "gnc-component-manager.h"
@@ -34,7 +33,6 @@
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
-#include "window-help.h"
 
 #include "dialog-search.h"
 #include "search-param.h"
@@ -53,6 +51,17 @@
 #define DIALOG_NEW_CUSTOMER_CM_CLASS "dialog-new-customer"
 #define DIALOG_EDIT_CUSTOMER_CM_CLASS "dialog-edit-customer"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/customer_search"
+
+void gnc_customer_taxtable_check_cb (GtkToggleButton *togglebutton,
+				     gpointer user_data);
+
+void gnc_customer_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_customer_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_customer_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_customer_window_destroy_cb (GtkWidget *widget, gpointer data);
+void gnc_customer_name_changed_cb (GtkWidget *widget, gpointer data);
+
 typedef enum
 {
   NEW_CUSTOMER,
@@ -111,7 +120,7 @@
   GncTaxTable *	taxtable;
 };
 
-static void
+void
 gnc_customer_taxtable_check_cb (GtkToggleButton *togglebutton,
 				gpointer user_data)
 {
@@ -134,6 +143,9 @@
 
 static void gnc_ui_to_customer (CustomerWindow *cw, GncCustomer *cust)
 {
+  GtkTextBuffer* text_buffer;
+  GtkTextIter start, end;
+  gchar *text;
   GncAddress *addr, *shipaddr;
 
   addr = gncCustomerGetAddr (cust);
@@ -185,8 +197,11 @@
   gncCustomerSetActive (cust, gtk_toggle_button_get_active
 			(GTK_TOGGLE_BUTTON (cw->active_check)));
   gncCustomerSetTaxIncluded (cust, cw->taxincluded);
-  gncCustomerSetNotes (cust, gtk_editable_get_chars
-		       (GTK_EDITABLE (cw->notes_text), 0, -1));
+
+  text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(cw->notes_text));
+  gtk_text_buffer_get_bounds (text_buffer, &start, &end);
+  text = gtk_text_buffer_get_text (text_buffer, &start, &end, FALSE);
+  gncCustomerSetNotes (cust, text);
 
   /* Parse and set the currency, terms, discount, and credit amounts */
   gncCustomerSetCurrency (cust,
@@ -240,11 +255,12 @@
   return FALSE;
 }
 
-static void
+void
 gnc_customer_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   CustomerWindow *cw = data;
   gnc_numeric min, max;
+  gchar *string;
 
   /* Check for valid company name */
   if (check_entry_nonempty (cw->dialog, cw->company_entry,
@@ -280,9 +296,10 @@
 
   /* Set the customer id if one has not been chosen */
   if (safe_strcmp (gtk_entry_get_text (GTK_ENTRY (cw->id_entry)), "") == 0) {
-    gtk_entry_set_text (GTK_ENTRY (cw->id_entry),
-			g_strdup_printf ("%.6lld",
-					 gncCustomerNextID (cw->book)));
+    string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			      gncCustomerNextID (cw->book));
+    gtk_entry_set_text (GTK_ENTRY (cw->id_entry), string);
+    g_free(string);
   }
 
   /* Now save it off */
@@ -298,7 +315,7 @@
   gnc_close_gui_component (cw->component_id);
 }
 
-static void
+void
 gnc_customer_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   CustomerWindow *cw = data;
@@ -306,15 +323,13 @@
   gnc_close_gui_component (cw->component_id);
 }
 
-static void
+void
 gnc_customer_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_CUSTOMER;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
-static void
+void
 gnc_customer_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   CustomerWindow *cw = data;
@@ -334,11 +349,12 @@
   g_free (cw);
 }
 
-static void
+void
 gnc_customer_name_changed_cb (GtkWidget *widget, gpointer data)
 {
   CustomerWindow *cw = data;
-  char *name, *id, *fullname, *title;
+  char *fullname, *title;
+  const char *id,  *name;
 
   if (!cw)
     return;
@@ -367,7 +383,9 @@
 {
   CustomerWindow *cw = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (cw->dialog));
+  gtk_widget_destroy (cw->dialog);
+  // cw has already been freed by this point.
+  // cw->dialog = NULL;
 }
 
 static void
@@ -408,7 +426,6 @@
   CustomerWindow *cw;
   GladeXML *xml;
   GtkWidget *hbox, *edit;
-  GnomeDialog *cwd;
   gnc_commodity *currency;
   GNCPrintAmountInfo print_info;
   
@@ -444,13 +461,9 @@
   /* Find the dialog */
   xml = gnc_glade_xml_new ("customer.glade", "Customer Dialog");
   cw->dialog = glade_xml_get_widget (xml, "Customer Dialog");
-  cwd = GNOME_DIALOG (cw->dialog);
 
   gtk_object_set_data (GTK_OBJECT (cw->dialog), "dialog_info", cw);
 
-  /* default to ok */
-  gnome_dialog_set_default (cwd, 0);
-
   /* Get entry points */
   cw->id_entry = glade_xml_get_widget (xml, "id_entry");
   cw->company_entry = glade_xml_get_widget (xml, "company_entry");
@@ -516,59 +529,16 @@
   hbox = glade_xml_get_widget (xml, "credit_box");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  /* Setup Dialog for Editing */
-  gnome_dialog_set_default (cwd, 0);
-
-  /* Attach <Enter> to default button */
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->id_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->company_entry));
-
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->name_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->addr1_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->addr2_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->addr3_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->addr4_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->phone_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->fax_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->email_entry));
-
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipname_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipaddr1_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipaddr2_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipaddr3_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipaddr4_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipphone_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipfax_entry));
-  gnome_dialog_editable_enters (cwd, GTK_EDITABLE (cw->shipemail_entry));
-
-  /* Set focus to company name */
-  gtk_widget_grab_focus (cw->company_entry);
-
   /* Setup signals */
-  gnome_dialog_button_connect
-    (cwd, 0, GTK_SIGNAL_FUNC(gnc_customer_window_ok_cb), cw);
-  gnome_dialog_button_connect
-    (cwd, 1, GTK_SIGNAL_FUNC(gnc_customer_window_cancel_cb), cw);
-  gnome_dialog_button_connect
-    (cwd, 2, GTK_SIGNAL_FUNC(gnc_customer_window_help_cb), cw);
-
-  gtk_signal_connect (GTK_OBJECT (cw->dialog), "destroy",
-		      GTK_SIGNAL_FUNC(gnc_customer_window_destroy_cb), cw);
-
-  gtk_signal_connect(GTK_OBJECT (cw->id_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_customer_name_changed_cb), cw);
-
-  gtk_signal_connect(GTK_OBJECT (cw->company_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_customer_name_changed_cb), cw);
-
-  gtk_signal_connect(GTK_OBJECT (cw->taxtable_check), "toggled",
-		     GTK_SIGNAL_FUNC(gnc_customer_taxtable_check_cb), cw);
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     cw);
 
   /* Setup initial values */
   if (cust != NULL) {
+    GtkTextBuffer* text_buffer;
     GncAddress *addr, *shipaddr;
     const char *string;
-    gint pos = 0;
 
     cw->dialog_type = EDIT_CUSTOMER;
     cw->customer_guid = *gncCustomerGetGUID (cust);
@@ -604,9 +574,8 @@
                                 gncCustomerGetActive (cust));
 
     string = gncCustomerGetNotes (cust);
-    gtk_editable_delete_text (GTK_EDITABLE (cw->notes_text), 0, -1);
-    gtk_editable_insert_text (GTK_EDITABLE (cw->notes_text), string,
-			      strlen(string), &pos);
+    text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(cw->notes_text));
+    gtk_text_buffer_set_text (text_buffer, string, -1);
 
     cw->component_id =
       gnc_register_gui_component (DIALOG_EDIT_CUSTOMER_CM_CLASS,
@@ -861,7 +830,8 @@
 
   return gnc_search_dialog_create (type, params, columns,
 				   q, q2, buttons, NULL,
-				   new_customer_cb, sw, free_userdata_cb);
+				   new_customer_cb, sw, free_userdata_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 GNCSearchWindow *
Index: business-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-gnome-utils.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/business-gnome-utils.h -Lsrc/business/business-gnome/business-gnome-utils.h -u -r1.2 -r1.3
--- src/business/business-gnome/business-gnome-utils.h
+++ src/business/business-gnome/business-gnome-utils.h
@@ -30,6 +30,12 @@
 #include "gncBillTerm.h"
 #include "gncTaxTable.h"
 
+#define GCONF_SECTION_ORDER    "dialogs/business/order"
+#define GCONF_SECTION_JOB      "dialogs/business/job"
+#define GCONF_SECTION_CUSTOMER "dialogs/business/customer"
+#define GCONF_SECTION_VENDOR   "dialogs/business/vendor"
+#define GCONF_SECTION_EMPLOYEE "dialogs/business/employee"
+
 GtkWidget * gnc_owner_select_create (GtkWidget *label, GtkWidget *hbox,
 				     GNCBook *book, GncOwner *owner);
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/.cvsignore -Lsrc/business/business-gnome/.cvsignore -u -r1.2 -r1.3
--- src/business/business-gnome/.cvsignore
+++ src/business/business-gnome/.cvsignore
@@ -9,3 +9,5 @@
 gw-business-gnome.h
 gw-business-gnome.html
 gw-business-gnome.scm
+.DS_Store
+
Index: business-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-gnome-utils.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/business-gnome/business-gnome-utils.c -Lsrc/business/business-gnome/business-gnome-utils.c -u -r1.4 -r1.5
--- src/business/business-gnome/business-gnome-utils.c
+++ src/business/business-gnome/business-gnome-utils.c
@@ -181,11 +181,7 @@
   g_return_if_fail (acct_types);
 
   /* Figure out if anything is set in the combo */
-  text = gtk_entry_get_text (GTK_ENTRY ((GTK_COMBO (combo))->entry));
-  if (text && strcmp (text, ""))
-    text = g_strdup (text);
-  else
-    text = NULL;
+  text = gtk_editable_get_chars (GTK_EDITABLE ((GTK_COMBO (combo))->entry), 0, -1);
 
   list = xaccGroupGetSubAccounts (gnc_book_get_group (book));
 
@@ -292,9 +288,9 @@
 	       gpointer this_item)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "this_item", this_item);
-  gtk_signal_connect (GTK_OBJECT (item), "activate",
-		      business_option_changed, omd);
+  g_object_set_data (G_OBJECT (item), "this_item", this_item);
+  g_signal_connect (G_OBJECT (item), "activate",
+		    G_CALLBACK (business_option_changed), omd);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
 }
@@ -387,8 +383,8 @@
 					   type_name,
 					   GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
     
-    gtk_signal_connect (GTK_OBJECT (omenu), "destroy",
-			generic_omenu_destroy_cb, omd);
+    g_signal_connect (G_OBJECT (omenu), "destroy",
+		      G_CALLBACK (generic_omenu_destroy_cb), omd);
 
   }
 
Index: dialog-billterms.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-billterms.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-gnome/dialog-billterms.c -Lsrc/business/business-gnome/dialog-billterms.c -u -r1.7 -r1.8
--- src/business/business-gnome/dialog-billterms.c
+++ src/business/business-gnome/dialog-billterms.c
@@ -29,6 +29,7 @@
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
 #include "gnc-numeric.h"
@@ -38,6 +39,14 @@
 
 #define DIALOG_BILLTERMS_CM_CLASS "billterms-dialog"
 
+void billterms_row_selected (GtkCList *clist, gint row, gint column,
+			     GdkEventButton *event, gpointer user_data);
+void billterms_new_term_cb (GtkButton *button, BillTermsWindow *btw);
+void billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw);
+void billterms_edit_term_cb (GtkButton *button, BillTermsWindow *btw);
+void billterms_window_close (GtkWidget *widget, gpointer data);
+void billterms_window_destroy_cb (GtkWidget *widget, gpointer data);
+
 typedef struct _billterm_notebook {
   GtkTooltips *		tooltips;
   GtkWidget *		notebook;
@@ -100,7 +109,7 @@
 /* NOTE: The caller needs to unref once they attach */
 static void
 init_notebook_widgets (BillTermNB *notebook, gboolean read_only,
-		       GnomeDialog *dialog, gpointer user_data)
+		       GtkDialog *dialog, gpointer user_data)
 {
   GladeXML *xml;
   GtkWidget *parent;
@@ -125,7 +134,7 @@
   notebook->prox_cutoff = read_widget (xml, "prox:cutoff_day", read_only);
 
   /* Disconnect the notebook from the window */
-  gtk_object_ref (GTK_OBJECT (notebook->notebook));
+  g_object_ref (notebook->notebook);
   gtk_container_remove (GTK_CONTAINER (parent), notebook->notebook);
   gtk_widget_destroy (parent);
 
@@ -182,7 +191,7 @@
 {
   BillTermNB *notebook;
   GncBillTerm *term;
-  char *text;
+  const char *text;
 
   term = nbt->this_term;
   notebook = &nbt->notebook;
@@ -256,15 +265,14 @@
   return TRUE;
 }
 
-static void
-new_billterm_ok_cb (GtkWidget *widget, gpointer data)
+static gboolean
+new_billterm_ok_cb (NewBillTerm *nbt)
 {
-  NewBillTerm *nbt = data;
   BillTermsWindow *btw;
-  char *name = NULL;
+  const char *name = NULL;
   char *message;
 
-  g_return_if_fail (nbt);
+  g_return_val_if_fail (nbt, FALSE);
   btw = nbt->btw;
 
   /* Verify that we've got real, valid data */
@@ -275,7 +283,7 @@
     if (name == NULL || *name == '\0') {
       message = _("You must provide a name for this Billing Term.");
       gnc_error_dialog (nbt->dialog, message);
-      return;
+      return FALSE;
     }
     if (gncBillTermLookupByName (btw->book, name)) {
       message = g_strdup_printf(_(
@@ -283,13 +291,13 @@
 			 "Your choice \"%s\" is already in use."), name);
       gnc_error_dialog (nbt->dialog, "%s", message);
       g_free (message);
-      return;
+      return FALSE;
     }
   }
 
   /* Verify the actual data */
   if (!verify_term_ok (nbt))
-    return;
+    return FALSE;
 
   gnc_suspend_gui_refresh ();
 
@@ -311,26 +319,7 @@
   gncBillTermCommitEdit (btw->current_term);
 
   gnc_resume_gui_refresh();
-
-  /* Then close/refresh the dialog/window */
-  gnome_dialog_close (GNOME_DIALOG (nbt->dialog));
-}
-
-static void
-new_billterm_cancel_cb (GtkWidget *widget, gpointer data)
-{
-  NewBillTerm *nbt = data;
-  g_return_if_fail (nbt);
-  gnome_dialog_close (GNOME_DIALOG (nbt->dialog));
-}
-
-static void
-new_billterm_dialog_destroy_cb (GtkWidget *widget, gpointer data)
-{
-  NewBillTerm *nbt = data;
-
-  if (!nbt) return;
-  g_free (nbt);
+  return TRUE;
 }
 
 static void
@@ -379,7 +368,7 @@
   popup = glade_xml_get_widget (xml, "Term Type Popup");
 
   /* Glade insists on making this a tearoff menu. */
-  if (gnome_preferences_get_menus_have_tearoff ()) {
+  if (gnc_gconf_menus_have_tearoff()) {
     GtkMenuShell *ms = GTK_MENU_SHELL (popup);
     GtkWidget *tearoff;
 
@@ -390,21 +379,25 @@
 
   /* attach the signal handlers */
   glade_xml_signal_connect_data (xml, "on_days1_activate",
-				 on_days1_activate, nbt);
+				 G_CALLBACK (on_days1_activate), nbt);
   glade_xml_signal_connect_data (xml, "on_proximo1_activate",
-				 on_proximo1_activate, nbt);
+				 G_CALLBACK (on_proximo1_activate), nbt);
 
   gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), popup);
   gtk_option_menu_set_history (GTK_OPTION_MENU (omenu),
 			       nbt->notebook.type - 1);
 }
 
-static NewBillTerm *
-new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term)
+static GncBillTerm *
+new_billterm_dialog (BillTermsWindow *btw, GncBillTerm *term,
+		     const char *name)
 {
+  GncBillTerm *created_term = NULL;
   NewBillTerm *nbt;
   GladeXML *xml;
   GtkWidget *box, *widget;
+  gint response;
+  gboolean done;
 
   if (!btw) return NULL;
 
@@ -417,15 +410,17 @@
   nbt->dialog = glade_xml_get_widget (xml, "New Term Dialog");
   nbt->name_entry = glade_xml_get_widget (xml, "name_entry");
   nbt->desc_entry = glade_xml_get_widget (xml, "desc_entry");
+  if (name)
+    gtk_entry_set_text (GTK_ENTRY (nbt->name_entry), name);
 
   /* Initialize the notebook widgets */
   init_notebook_widgets (&nbt->notebook, FALSE,
-			 GNOME_DIALOG (nbt->dialog), nbt);
+			 GTK_DIALOG (nbt->dialog), nbt);
 
   /* Attach the notebook */
   box = glade_xml_get_widget (xml, "notebook_box");
   gtk_box_pack_start (GTK_BOX (box), nbt->notebook.notebook, TRUE, TRUE, 0);
-  gtk_object_unref (GTK_OBJECT (nbt->notebook.notebook));
+  g_object_unref (nbt->notebook.notebook);
 
   /* Fill in the widgets appropriately */
   if (term)
@@ -439,28 +434,13 @@
   /* Show the right notebook page */
   show_notebook (&nbt->notebook);
 
-  /* Make 'enter' do the right thing */
-  gnome_dialog_set_default (GNOME_DIALOG (nbt->dialog), 0);
-  gnome_dialog_editable_enters (GNOME_DIALOG (nbt->dialog),
-				GTK_EDITABLE (nbt->name_entry));
-  gnome_dialog_editable_enters (GNOME_DIALOG (nbt->dialog),
-				GTK_EDITABLE (nbt->desc_entry));
-
-  /* Connect the dialog buttons */
-  gnome_dialog_button_connect (GNOME_DIALOG (nbt->dialog), 0,
-			       new_billterm_ok_cb, nbt);
-
-  gnome_dialog_button_connect (GNOME_DIALOG (nbt->dialog), 1,
-			       new_billterm_cancel_cb, nbt);
-
-  /* Set our modality */
-  gnome_dialog_set_parent (GNOME_DIALOG (nbt->dialog),
-			   GTK_WINDOW (btw->dialog));
-  gtk_window_set_modal (GTK_WINDOW (nbt->dialog), TRUE);
-
-  gtk_signal_connect (GTK_OBJECT (nbt->dialog), "destroy",
-		      new_billterm_dialog_destroy_cb, nbt);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     nbt);
 
+  gtk_window_set_transient_for (GTK_WINDOW(nbt->dialog),
+				GTK_WINDOW(btw->dialog));
 
   /* Show what we should */
   gtk_widget_show_all (nbt->dialog);
@@ -471,7 +451,26 @@
   } else
     gtk_widget_grab_focus (nbt->name_entry);
 
-  return nbt;
+  done = FALSE;
+  while (!done) {
+    response = gtk_dialog_run (GTK_DIALOG (nbt->dialog));
+    switch (response) {
+     case GTK_RESPONSE_OK:
+      if (new_billterm_ok_cb (nbt)) {
+	created_term = nbt->this_term;
+	done = TRUE;
+      }
+      break;
+     default:
+      done = TRUE;
+      break;
+    }
+  }
+
+  gtk_widget_destroy(nbt->dialog);
+  g_free(nbt);
+
+  return created_term;
 }
 
 /***********************************************************************/
@@ -583,7 +582,7 @@
   /* select_row() above will refresh the term display */
 }
 
-static void
+void
 billterms_row_selected (GtkCList *clist, gint row, gint column,
 			GdkEventButton *event, gpointer user_data)
 {
@@ -602,17 +601,17 @@
 
   /* If the user double-clicked on the item, pop up the edit window */
   if (event && event->type == GDK_2BUTTON_PRESS)
-    new_billterm_dialog (btw, term);
+    new_billterm_dialog (btw, term, NULL);
 }
 
-static void
+void
 billterms_new_term_cb (GtkButton *button, BillTermsWindow *btw)
 {
   g_return_if_fail (btw);
-  new_billterm_dialog (btw, NULL);
+  new_billterm_dialog (btw, NULL, NULL);
 }
 
-static void
+void
 billterms_delete_term_cb (GtkButton *button, BillTermsWindow *btw)
 {
   g_return_if_fail (btw);
@@ -639,13 +638,13 @@
   }
 }
 
-static void
+void
 billterms_edit_term_cb (GtkButton *button, BillTermsWindow *btw)
 {
   g_return_if_fail (btw);
   if (!btw->current_term)
     return;
-  new_billterm_dialog (btw, btw->current_term);
+  new_billterm_dialog (btw, btw->current_term, NULL);
 }
 
 static void
@@ -662,10 +661,11 @@
 {
   BillTermsWindow *btw = data;
   g_return_if_fail (btw);
-  gnome_dialog_close (GNOME_DIALOG (btw->dialog));
+
+  gtk_widget_destroy (btw->dialog);
 }
 
-static void
+void
 billterms_window_close (GtkWidget *widget, gpointer data)
 {
   BillTermsWindow *btw = data;
@@ -673,7 +673,7 @@
   gnc_ui_billterms_window_destroy (btw);
 }
 
-static void
+void
 billterms_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   BillTermsWindow *btw = data;
@@ -700,7 +700,7 @@
 {
   BillTermsWindow *btw;
   GladeXML *xml;
-  GtkWidget *button, *widget;
+  GtkWidget *widget;
 
   if (!book) return NULL;
 
@@ -728,40 +728,20 @@
   btw->type_label = glade_xml_get_widget (xml, "type_label");
   btw->term_vbox = glade_xml_get_widget (xml, "term_vbox");
 
-  gnome_dialog_editable_enters (GNOME_DIALOG (btw->dialog),
-				GTK_EDITABLE (btw->desc_entry));
-
   /* Initialize the notebook widgets */
   init_notebook_widgets (&btw->notebook, TRUE,
-			 GNOME_DIALOG (btw->dialog), btw);
+			 GTK_DIALOG (btw->dialog), btw);
 
   /* Attach the notebook */
   widget = glade_xml_get_widget (xml, "notebook_box");
   gtk_box_pack_start (GTK_BOX (widget), btw->notebook.notebook,
 		      TRUE, TRUE, 0);
-  gtk_object_unref (GTK_OBJECT (btw->notebook.notebook));
-
-  /* Connect all the buttons */
-  button = glade_xml_get_widget (xml, "new_term_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      billterms_new_term_cb, btw);
-  button = glade_xml_get_widget (xml, "delete_term_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      billterms_delete_term_cb, btw);
-  button = glade_xml_get_widget (xml, "edit_term_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      billterms_edit_term_cb, btw);
-
-  /* Set the row-select callbacks */
-  gtk_signal_connect (GTK_OBJECT (btw->terms_clist), "select-row",
-		      billterms_row_selected, btw);
-
-  /* Connect the dialog buttons */
-  gnome_dialog_button_connect (GNOME_DIALOG (btw->dialog), 0,
-			       billterms_window_close, btw);
+  g_object_unref (btw->notebook.notebook);
 
-  gtk_signal_connect (GTK_OBJECT (btw->dialog), "destroy",
-		      billterms_window_destroy_cb, btw);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     btw);
 
   /* register with component manager */
   btw->component_id =
@@ -787,50 +767,17 @@
 }
 
 #if 0
-static int
-from_name_close_cb (GnomeDialog *dialog, gpointer data)
-{
-  NewBillTerm *nbt;
-  GncBillTerm **created_term = data;
-
-  nbt = gtk_object_get_data (GTK_OBJECT (dialog), "dialog_info");
-
-  *created_term = nbt->created_term;
-
-  gtk_main_quit ();
-
-  return FALSE;
-}
-
 /* Create a new billterms by name */
 GncBillTerm *
 gnc_ui_billterms_new_from_name (GNCBook *book, const char *name)
 {
-  GncBillTerm *created_term = NULL;
   BillTermsWindow *btw;
-  NewBillTerm *nbt;
 
   if (!book) return NULL;
 
   btw = gnc_ui_billterms_window_new (book);
   if (!btw) return NULL;
 
-  nbt = new_billterm_dialog (btw, NULL);
-  if (!nbt) return NULL;
-
-  gtk_object_set_data (GTK_OBJECT (nbt->dialog), "dialog_info", nbt);
-  gtk_signal_connect (GTK_OBJECT (nbt->dialog), "close",
-		      GTK_SIGNAL_FUNC (from_name_close_cb), &created_term);
-
-  /* Preset the name in the new dialog */
-  if (name)
-    gtk_entry_set_text (GTK_ENTRY (nbt->name_entry), name);
-
-  /* I know that NBT is already modal, no need to reset it here */
-
-  /* Now run the dialog -- wait for it to close */
-  gtk_main ();
-
-  return created_term;
+  return new_billterm_dialog (btw, NULL, name);
 }
 #endif
Index: dialog-job.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/dialog-job.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/business/business-gnome/dialog-job.c -Lsrc/business/business-gnome/dialog-job.c -u -r1.30 -r1.31
--- src/business/business-gnome/dialog-job.c
+++ src/business/business-gnome/dialog-job.c
@@ -23,14 +23,13 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-engine-util.h"
-#include "window-help.h"
 #include "dialog-search.h"
 #include "search-param.h"
 
@@ -46,6 +45,14 @@
 #define DIALOG_NEW_JOB_CM_CLASS "dialog-new-job"
 #define DIALOG_EDIT_JOB_CM_CLASS "dialog-edit-job"
 
+#define GCONF_SECTION_SEARCH "dialogs/business/job_search"
+
+void gnc_job_window_ok_cb (GtkWidget *widget, gpointer data);
+void gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data);
+void gnc_job_window_help_cb (GtkWidget *widget, gpointer data);
+void gnc_job_window_destroy_cb (GtkWidget *widget, gpointer data);
+void gnc_job_name_changed_cb (GtkWidget *widget, gpointer data);
+
 typedef enum
 {
   NEW_JOB,
@@ -114,6 +121,7 @@
 gnc_job_verify_ok (JobWindow *jw)
 {
   const char *res;
+  gchar *string;
 
   /* Check for valid name */
   res = gtk_entry_get_text (GTK_ENTRY (jw->name_entry));
@@ -135,8 +143,10 @@
   /* Set a valid id if one was not created */
   res = gtk_entry_get_text (GTK_ENTRY (jw->id_entry));
   if (safe_strcmp (res, "") == 0) {
-    gtk_entry_set_text (GTK_ENTRY (jw->id_entry),
-			g_strdup_printf ("%.6lld", gncJobNextID(jw->book)));
+    string = g_strdup_printf ("%.6" G_GINT64_FORMAT,
+			      gncJobNextID(jw->book));
+    gtk_entry_set_text (GTK_ENTRY (jw->id_entry), string);
+    g_free(string);
   }
 
   /* Now save it off */
@@ -153,7 +163,7 @@
   return TRUE;
 }
 
-static void
+void
 gnc_job_window_ok_cb (GtkWidget *widget, gpointer data)
 {
   JobWindow *jw = data;
@@ -169,7 +179,7 @@
   gnc_close_gui_component (jw->component_id);
 }
 
-static void
+void
 gnc_job_window_cancel_cb (GtkWidget *widget, gpointer data)
 {
   JobWindow *jw = data;
@@ -177,16 +187,14 @@
   gnc_close_gui_component (jw->component_id);
 }
 
-static void
+void
 gnc_job_window_help_cb (GtkWidget *widget, gpointer data)
 {
-  char *help_file = HH_JOB;
-
-  helpWindow(NULL, NULL, help_file);
+  gnc_gnome_help(HF_USAGE, NULL);
 }
 
 
-static void
+void
 gnc_job_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   JobWindow *jw = data;
@@ -206,11 +214,12 @@
   g_free (jw);
 }
 
-static void
+void
 gnc_job_name_changed_cb (GtkWidget *widget, gpointer data)
 {
   JobWindow *jw = data;
-  char *name, *id, *fullname, *title;
+  char *fullname, *title;
+  const char *name, *id;
 
   if (!jw)
     return;
@@ -239,7 +248,8 @@
 {
   JobWindow *jw = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (jw->dialog));
+  gtk_widget_destroy (jw->dialog);
+  jw->dialog = NULL;
 }
 
 static void
@@ -280,7 +290,6 @@
   JobWindow *jw;
   GladeXML *xml;
   GtkWidget *owner_box, *owner_label;
-  GnomeDialog *jwd;
   GtkObject *jwo;
 
   /*
@@ -312,13 +321,9 @@
   /* Find the dialog */
   jw->dialog = glade_xml_get_widget (xml, "Job Dialog");
   jwo = GTK_OBJECT (jw->dialog);
-  jwd = GNOME_DIALOG (jwo);
 
   gtk_object_set_data (jwo, "dialog_info", jw);
 
-  /* default to ok XXX */
-  gnome_dialog_set_default (jwd, 0);
-
   /* Get entry points */
   jw->id_entry  = glade_xml_get_widget (xml, "id_entry");
   jw->name_entry = glade_xml_get_widget (xml, "name_entry");
@@ -328,33 +333,10 @@
   owner_box = glade_xml_get_widget (xml, "customer_hbox");
   owner_label = glade_xml_get_widget (xml, "owner_label");
 
-  /* Connect buttons */
-  gnome_dialog_button_connect (jwd, 0,
-			       GTK_SIGNAL_FUNC(gnc_job_window_ok_cb), jw);
-  gnome_dialog_button_connect (jwd, 1,
-			       GTK_SIGNAL_FUNC(gnc_job_window_cancel_cb), jw);
-  gnome_dialog_button_connect (jwd, 2,
-			       GTK_SIGNAL_FUNC(gnc_job_window_help_cb), jw);
-
   /* Setup signals */
-  gtk_signal_connect (jwo, "destroy",
-		      GTK_SIGNAL_FUNC(gnc_job_window_destroy_cb), jw);
-
-  gtk_signal_connect(GTK_OBJECT (jw->id_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_job_name_changed_cb), jw);
-
-  gtk_signal_connect(GTK_OBJECT (jw->name_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_job_name_changed_cb), jw);
-
-
-  /* Attach <Enter> to default button */
-  gnome_dialog_editable_enters (jwd, GTK_EDITABLE (jw->id_entry));
-  gnome_dialog_editable_enters (jwd, GTK_EDITABLE (jw->name_entry));
-  gnome_dialog_editable_enters (jwd, GTK_EDITABLE (jw->desc_entry));
-
-  /* Start at the name */
-  gtk_widget_grab_focus (jw->name_entry);
-
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     jw);
   /* Set initial entries */
   if (job != NULL) {
     jw->job_guid = *gncJobGetGUID (job);
@@ -609,7 +591,8 @@
 
   return gnc_search_dialog_create (type, params, columns,
 				   q, q2, buttons, NULL,
-				   new_job_cb, sw, free_userdata_cb);
+				   new_job_cb, sw, free_userdata_cb,
+				   GCONF_SECTION_SEARCH);
 }
 
 /* Functions for widgets for job selection */
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/Makefile.am,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lsrc/business/business-gnome/Makefile.am -Lsrc/business/business-gnome/Makefile.am -u -r1.33 -r1.34
--- src/business/business-gnome/Makefile.am
+++ src/business/business-gnome/Makefile.am
@@ -1,10 +1,11 @@
-SUBDIRS = . glade
+SUBDIRS = . glade schemas ui
 PWD := $(shell pwd)
 
 pkglib_LTLIBRARIES = libgncmod-business-gnome.la libgw-business-gnome.la
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/gnome-utils \
@@ -16,13 +17,14 @@
   -I${top_srcdir}/src/business/business-ledger \
   -I${top_srcdir}/src/business/dialog-tax-table \
   ${GNOME_PRINT_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GLIB_CFLAGS} \
   ${G_WRAP_COMPILE_ARGS} \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   -I${top_srcdir}/src/register/register-core \
   -I${top_srcdir}/src/register/register-gnome \
   -I${top_srcdir}/src/register/ledger-core
@@ -41,6 +43,8 @@
   dialog-order.c \
   dialog-payment.c \
   dialog-vendor.c \
+  gnc-plugin-business.c \
+  gnc-plugin-page-invoice.c \
   search-owner.c
 
 noinst_HEADERS = \
@@ -56,24 +60,27 @@
   dialog-order.h \
   dialog-payment.h \
   dialog-vendor.h \
+  gnc-plugin-business.h \
+  gnc-plugin-page-invoice.h \
   search-owner.h \
   gw-business-gnome.h
 
-libgncmod_business_gnome_la_LDFLAGS = -module
-
 libgncmod_business_gnome_la_LIBADD = \
   ${top_builddir}/src/business/business-core/libgncmod-business-core.la \
   ${top_builddir}/src/business/business-ledger/libgnc-business-ledger.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${GUILE_LIBS} \
-  ${GNOMEUI_LIBS} \
+  ${GNOME_LIBS} \
   ${G_WRAP_LINK_ARGS} \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   ${EFENCE_LIBS}
 
 
 libgw_business_gnome_la_SOURCES = gw-business-gnome.c
-libgw_business_gnome_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
+
+libgw_business_gnome_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
 libgw_business_gnome_la_LIBADD  = libgncmod-business-gnome.la
 
 # For Business Reports
Index: search-owner.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/search-owner.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/business/business-gnome/search-owner.c -Lsrc/business/business-gnome/search-owner.c -u -r1.6 -r1.7
--- src/business/business-gnome/search-owner.c
+++ src/business/business-gnome/search-owner.c
@@ -41,7 +41,7 @@
 
 static void gnc_search_owner_class_init	(GNCSearchOwnerClass *class);
 static void gnc_search_owner_init	(GNCSearchOwner *gspaper);
-static void gnc_search_owner_finalise	(GtkObject *obj);
+static void gnc_search_owner_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchOwner *)(x))->priv)
 
@@ -73,8 +73,8 @@
       sizeof(GNCSearchOwnerClass),
       (GtkClassInitFunc)gnc_search_owner_class_init,
       (GtkObjectInitFunc)gnc_search_owner_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+      NULL,
+      NULL
     };
 		
     type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
@@ -86,24 +86,19 @@
 static void
 gnc_search_owner_class_init (GNCSearchOwnerClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
+  object_class = G_OBJECT_CLASS (class);
   parent_class = gtk_type_class(gnc_search_core_type_get_type ());
 
-  object_class->finalize = gnc_search_owner_finalise;
+  object_class->finalize = gnc_search_owner_finalize;
 
   /* override methods */
   gnc_search_core_type->validate = gncs_validate;
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -113,14 +108,14 @@
 }
 
 static void
-gnc_search_owner_finalise (GtkObject *obj)
+gnc_search_owner_finalize (GObject *obj)
 {
   GNCSearchOwner *o = (GNCSearchOwner *)obj;
   g_assert (IS_GNCSEARCH_OWNER (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -178,8 +173,8 @@
 			     gnc_get_current_book(), &(fe->priv->owner));
 
   /* Setup the "changed" callback */
-  gtk_signal_connect (GTK_OBJECT (fe->priv->owner_choice), "changed",
-		      GTK_SIGNAL_FUNC (owner_changed_cb), fe);
+  g_signal_connect (G_OBJECT (fe->priv->owner_choice), "changed",
+		    G_CALLBACK (owner_changed_cb), fe);
 
   gtk_widget_show_all (fe->priv->owner_choice);
 }
@@ -188,7 +183,7 @@
 type_option_changed (GtkWidget *widget, GNCSearchOwner *fe)
 {
   GncOwnerType type = (GncOwnerType)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 
   /* If the type changed or if we don't have a type create the owner_choice */
   if (type != gncOwnerGetType (&(fe->priv->owner))) {
@@ -204,9 +199,9 @@
 		    GncOwnerType type)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) type);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", type_option_changed,
-		      user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) type);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (type_option_changed),
+		    user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -239,7 +234,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -249,7 +244,7 @@
 how_option_changed (GtkWidget *widget, GNCSearchOwner *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static GtkWidget *
@@ -257,9 +252,9 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", how_option_changed,
-		      user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (how_option_changed),
+		    user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -287,7 +282,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
Index: business-options-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/business-options-gnome.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/business-gnome/business-options-gnome.c -Lsrc/business/business-gnome/business-options-gnome.c -u -r1.4 -r1.5
--- src/business/business-gnome/business-options-gnome.c
+++ src/business/business-gnome/business-options-gnome.c
@@ -37,19 +37,6 @@
 #include "business-options-gnome.h"
 #include "business-gnome-utils.h"
 #include "dialog-invoice.h"
-#include "guile-mappings.h"
-
-static int
-option_changed_cb (GtkWidget *widget, gpointer data)
-{
-  GNCOption *option = data;
-
-  gnc_option_set_changed (option, TRUE);
-  gnc_option_call_option_widget_changed_proc (option);
-  gnc_options_dialog_changed_internal (widget);
-
-  return FALSE;
-}
 
 static GtkWidget *
 create_owner_widget (GNCOption *option, GncOwnerType type, GtkWidget *hbox)
@@ -78,8 +65,8 @@
 				    gnc_get_current_book (), &owner);
   gnc_option_set_widget (option, widget);
 
-  gtk_signal_connect (GTK_OBJECT (widget), "changed", 
-		      GTK_SIGNAL_FUNC (option_changed_cb), option);
+  g_signal_connect (G_OBJECT (widget), "changed", 
+		    G_CALLBACK (gnc_option_changed_option_cb), option);
 
   return widget;
 }
@@ -374,8 +361,8 @@
 
   gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
   gnc_option_set_widget (option, widget);
-  gtk_signal_connect (GTK_OBJECT (widget), "changed", 
-		      GTK_SIGNAL_FUNC (option_changed_cb), option);
+  g_signal_connect (G_OBJECT (widget), "changed", 
+		    G_CALLBACK (gnc_option_changed_option_cb), option);
 
   return widget;
 }
@@ -449,7 +436,7 @@
   gnc_option_set_widget (option, widget);
 
   gnc_ui_optionmenu_set_changed_callback (widget,
-					  (void(*)(GtkWidget*,gpointer))option_changed_cb,
+					  (void(*)(GtkWidget*,gpointer))gnc_option_changed_option_cb,
 					  option);
 
   return widget;
Index: employee.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/employee.glade,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/business/business-gnome/glade/employee.glade -Lsrc/business/business-gnome/glade/employee.glade -u -r1.5 -r1.6
--- src/business/business-gnome/glade/employee.glade
+++ src/business/business-gnome/glade/employee.glade
@@ -1,902 +1,1158 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Employee</name>
-  <program_name>employee</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Employee Dialog</name>
-  <title>New Employee</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button6</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Employee Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Employee</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_employee_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 22:48:49 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>notebook1</name>
-      <can_focus>True</can_focus>
-      <show_tabs>True</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>False</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox2</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <border_width>3</border_width>
-	  <label>Identification</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_employee_window_help_cb" last_modification_time="Sat, 19 Jul 2003 22:48:26 GMT"/>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <border_width>2</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox11</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Employee Number: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label19</name>
-		<label>Username: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<label>Active</label>
-		<active>True</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_employee_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 22:48:00 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox12</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<width>50</width>
-		<tooltip>The employee ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>username_entry</name>
-		<width>158</width>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label26</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_employee_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 22:47:43 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <border_width>3</border_width>
-	  <label>Payment Address</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+	    <widget class="GtkVBox" id="vbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox3</name>
-	    <width>200</width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox5</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>3</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<widget class="GtkFrame" id="frame1">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox11">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Employee Number: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label19">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Username: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="active_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Active</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox12">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="id_entry">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">The employee ID number.  If left blank a reasonable number will be chosen for you</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_employee_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:49:16 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="username_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_employee_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:49:28 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label26">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Identification</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label4</name>
-		<label>Address: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label23</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label24</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label25</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label5</name>
-		<label>Phone: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label6</name>
-		<label>Fax: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Email: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox6</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkFrame" id="frame2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox5">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label3">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label4">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Address: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label24">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label25">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label5">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Phone: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label6">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Fax: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Email: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox6">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="name_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr1_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr2_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr3_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr4_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="phone_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="fax_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="email_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label27">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Payment Address</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>name_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr1_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr2_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr3_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr4_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>phone_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>fax_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>email_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame4</name>
-	  <border_width>3</border_width>
-	  <label>Interface</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox14</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox7</name>
-	      <border_width>2</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkFrame" id="frame4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox14">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox7">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label34">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Language: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="language_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label28">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Interface</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label34</name>
-		<label>Language: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>language_entry</name>
-		<width>50</width>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame5</name>
-	  <border_width>3</border_width>
-	  <label>Billing</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox15</name>
-	    <border_width>2</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>2</spacing>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox8</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label35</name>
-		<label>Default Hours per Day: </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hours_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
+		<widget class="GtkFrame" id="frame5">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox15">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox8">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label35">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Default Hours per Day: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hours_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox9">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label36">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Default Rate: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="rate_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox10">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label37">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Currency: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="currency_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox11">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label39">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Credit Account</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="ccard_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <signal name="toggled" handler="gnc_employee_ccard_acct_toggled_cb" last_modification_time="Sat, 19 Jul 2003 22:49:53 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">2</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="ccard_acct_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label35">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Billing</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox9</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label36</name>
-		<label>Default Rate: </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>rate_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox10</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label37</name>
-		<label>Currency: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>currency_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label9">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Employee</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
 	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox11</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label38</name>
-		<label>Credit Account:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>ccard_check</name>
-		<can_focus>True</can_focus>
-		<label></label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>2</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>ccard_acct_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+	  <child>
+	    <widget class="GtkVBox" id="vbox13">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkFrame" id="frame3">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox16">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label38">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Access Control List</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label9</name>
-	<label>Employee</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox13</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <border_width>3</border_width>
-	  <label>Access Control List</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox16</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkLabel" id="label33">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Access Control</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label33</name>
-	<label>Access Control</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: customer.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/customer.glade,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-gnome/glade/customer.glade -Lsrc/business/business-gnome/glade/customer.glade -u -r1.8 -r1.9
--- src/business/business-gnome/glade/customer.glade
+++ src/business/business-gnome/glade/customer.glade
@@ -1,1228 +1,1609 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Customer</name>
-  <program_name>customer</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Customer Dialog</name>
-  <title>New Customer</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button6</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>notebook1</name>
-      <can_focus>True</can_focus>
-      <show_tabs>True</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>False</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Customer Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Customer</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_customer_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 22:41:20 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox2</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <border_width>3</border_width>
-	  <label>Identification</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_customer_window_help_cb" last_modification_time="Sat, 19 Jul 2003 22:38:33 GMT"/>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <border_width>2</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox11</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Customer Number: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label19</name>
-		<label>Company Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<label>Active</label>
-		<active>True</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_customer_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 22:38:03 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox12</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<width>50</width>
-		<tooltip>The customer ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>company_entry</name>
-		<width>158</width>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label26</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_customer_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 22:37:47 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <border_width>3</border_width>
-	  <label>Billing Address</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+	    <widget class="GtkVBox" id="vbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox3</name>
-	    <width>200</width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox5</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>3</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkFrame" id="frame1">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label4</name>
-		<label>Address: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label23</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label24</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label25</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label5</name>
-		<label>Phone: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label6</name>
-		<label>Fax: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Email: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox11">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Customer Number: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label19">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Company Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="active_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Active</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox12">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="id_entry">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">The customer ID number.  If left blank a reasonable number will be chosen for you</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_customer_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:39:38 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="company_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_customer_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:39:57 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label26">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Identification</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox6</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkFrame" id="frame2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox5">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label3">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label4">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Address: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label24">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label25">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label5">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Phone: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label6">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Fax: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Email: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox6">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="name_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr1_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr2_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr3_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr4_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="phone_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="fax_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="email_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label27">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Billing Address</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>name_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr1_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr2_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr3_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr4_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>phone_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>fax_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>email_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkFrame" id="frame4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame4</name>
-	  <border_width>3</border_width>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTextView" id="notes_text">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="overwrite">False</property>
+			  <property name="accepts_tab">True</property>
+			  <property name="justification">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap_mode">GTK_WRAP_WORD</property>
+			  <property name="cursor_visible">True</property>
+			  <property name="pixels_above_lines">0</property>
+			  <property name="pixels_below_lines">0</property>
+			  <property name="pixels_inside_wrap">0</property>
+			  <property name="left_margin">0</property>
+			  <property name="right_margin">0</property>
+			  <property name="indent">0</property>
+			  <property name="text" translatable="yes"></property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <height>15</height>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
+		  <child>
+		    <widget class="GtkLabel" id="label28">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Notes</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label9</name>
-	<label>Customer</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox13</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <border_width>3</border_width>
-	  <label>Billing Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkLabel" id="label9">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Customer</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox6</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox7</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label36</name>
-		<label>Currency: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label>Terms: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label10</name>
-		<label>Discount: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label11</name>
-		<label>Credit Limit: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label34</name>
-		<label>Tax Included: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label35</name>
-		<label>Tax Table: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkVBox" id="vbox13">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox13</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkFrame" id="frame3">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>currency_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+		  <child>
+		    <widget class="GtkHBox" id="hbox6">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox7">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label36">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Currency: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label8">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Terms: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label10">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Discount: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label11">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Credit Limit: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label34">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Tax Included: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label35">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Tax Table: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox13">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="currency_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="terms_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget3">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget4">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">(terms)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="discount_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="credit_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="tax_included_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget5">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget6">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">(taxincluded)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox7">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="taxtable_button">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Override the global Tax Table?</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes"></property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <signal name="toggled" handler="gnc_customer_taxtable_check_cb" last_modification_time="Sat, 19 Jul 2003 22:40:27 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="taxtable_menu">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">What Tax Table should be applied to this customer?</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">0</property>
+
+				  <child internal-child="menu">
+				    <widget class="GtkMenu" id="convertwidget7">
+				      <property name="visible">True</property>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget8">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">(taxtables)</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
 
-		<widget>
-		  <class>Placeholder</class>
+		  <child>
+		    <widget class="GtkLabel" id="label29">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Billing Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>terms_menu</name>
-		<can_focus>True</can_focus>
-		<items>(terms)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>discount_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label33">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Billing Information</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>credit_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+	  <child>
+	    <widget class="GtkVBox" id="vbox9">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
+	      <child>
+		<widget class="GtkFrame" id="frame5">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>tax_included_menu</name>
-		<can_focus>True</can_focus>
-		<items>(taxincluded)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hbox7</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>GtkCheckButton</class>
-		  <name>taxtable_button</name>
-		  <tooltip>Override the global Tax Table?</tooltip>
-		  <can_focus>True</can_focus>
-		  <label></label>
-		  <active>False</active>
-		  <draw_indicator>True</draw_indicator>
 		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+		    <widget class="GtkHBox" id="hbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox8">
+			  <property name="border_width">4</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label14">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label15">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Address: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label20">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label21">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label22">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label16">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Phone: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label17">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Fax: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label18">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Email: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox9">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipname_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipaddr1_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipaddr2_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipaddr3_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipaddr4_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipphone_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipfax_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="shipemail_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
 		  </child>
-		</widget>
 
-		<widget>
-		  <class>GtkOptionMenu</class>
-		  <name>taxtable_menu</name>
-		  <tooltip>What Tax Table should be applied to this customer?</tooltip>
-		  <can_focus>True</can_focus>
-		  <items>(taxtables)
-</items>
-		  <initial_choice>0</initial_choice>
 		  <child>
-		    <padding>0</padding>
-		    <expand>True</expand>
-		    <fill>True</fill>
+		    <widget class="GtkLabel" id="label37">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Shipping Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
 		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label33</name>
-	<label>Billing Information</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox9</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame5</name>
-	  <border_width>3</border_width>
-	  <label>Shipping Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox5</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox8</name>
-	      <border_width>4</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>3</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<placeholder/>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label14</name>
-		<label>Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label15</name>
-		<label>Address: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label20</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label21</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label22</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label16</name>
-		<label>Phone: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label17</name>
-		<label>Fax: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label18</name>
-		<label>Email: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox9</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>3</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<placeholder/>
 	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipname_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipaddr1_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipaddr2_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipaddr3_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipaddr4_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipphone_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipfax_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>shipemail_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-	<widget>
-	  <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkLabel" id="label12">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Shipping Address</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label12</name>
-	<label>Shipping Address</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: invoice.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/invoice.glade,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/business/business-gnome/glade/invoice.glade -Lsrc/business/business-gnome/glade/invoice.glade -u -r1.19 -r1.20
--- src/business/business-gnome/glade/invoice.glade
+++ src/business/business-gnome/glade/invoice.glade
@@ -1,2345 +1,1817 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Invoice</name>
-  <program_name>invoice</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>New Invoice Dialog</name>
-  <title>New Invoice</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button6</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox10</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame4</name>
-	<border_width>3</border_width>
-	<label>Invoice Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox3</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox11</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label14</name>
-	      <label>Invoice ID</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+<widget class="GtkDialog" id="New Invoice Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Invoice</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_invoice_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 22:55:50 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label15</name>
-	      <label>Date Opened</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_invoice_window_help_cb" last_modification_time="Sat, 19 Jul 2003 22:54:50 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox12</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>id_entry</name>
-	      <tooltip>The invoice ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_invoice_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 22:55:04 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>date_opened_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_invoice_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 22:55:18 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame5</name>
-	<border_width>3</border_width>
-	<label>Billing Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox13</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>owner_label</name>
-	      <label>(owner)</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox10">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>job_label</name>
-	      <label>Job</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame4">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label20</name>
-	      <label>Billing ID</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkHBox" id="hbox3">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox11">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label14">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Invoice ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label15">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date Opened</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox12">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="id_entry">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">The invoice ID number.  If left blank a reasonable number will be chosen for you</property>
+			  <property name="can_focus">True</property>
+			  <property name="has_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">True</property>
+			  <signal name="changed" handler="gnc_invoice_id_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:56:07 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="date_opened_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label17</name>
-	      <label>Terms</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Invoice Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox14</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>owner_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame5">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>job_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox13">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="owner_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="job_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Job</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label20">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Billing ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label17">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Terms</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox14">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="owner_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="job_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="billing_id_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="terms_menu">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget1">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget2">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">(terms)</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>billing_id_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label16">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Billing Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>terms_menu</name>
-	      <can_focus>True</can_focus>
-	      <items>(terms)
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	  <child>
+	    <widget class="GtkFrame" id="proj_frame">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>proj_frame</name>
-	<label>Default Chargeback Project</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox5</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox15</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label22</name>
-	      <label>Customer</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkHBox" id="hbox5">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox15">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label22">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Customer</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label23">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Job</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox16">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="proj_cust_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="proj_job_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label23</name>
-	      <label>Job</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label22">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Default Chargeback Project</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox16</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>proj_cust_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame6">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>proj_job_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTextView" id="notes_text">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="overwrite">False</property>
+		      <property name="accepts_tab">True</property>
+		      <property name="justification">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
+		      <property name="cursor_visible">True</property>
+		      <property name="pixels_above_lines">0</property>
+		      <property name="pixels_below_lines">0</property>
+		      <property name="pixels_inside_wrap">0</property>
+		      <property name="left_margin">0</property>
+		      <property name="right_margin">0</property>
+		      <property name="indent">0</property>
+		      <property name="text" translatable="yes"></property>
+		    </widget>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label24">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Notes</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame6</name>
-	<border_width>3</border_width>
-	<label>Notes</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow2</name>
-	  <border_width>3</border_width>
-	  <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkText</class>
-	    <name>notes_text</name>
-	    <can_focus>True</can_focus>
-	    <editable>False</editable>
-	    <text></text>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeApp</class>
-  <name>Invoice Entry Window</name>
-  <visible>False</visible>
-  <title>Invoice</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <enable_layout_config>False</enable_layout_config>
-
-  <widget>
-    <class>GnomeDock</class>
-    <child_name>GnomeApp:dock</child_name>
-    <name>dock1</name>
-    <allow_floating>True</allow_floating>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>menu_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>0</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>True</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>GtkMenuBar</class>
-	<name>menubar1</name>
-	<shadow_type>GTK_SHADOW_NONE</shadow_type>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_file</name>
-	  <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_file_menu</name>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_new_invoice</name>
-	      <tooltip>Create a new invoice</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_new_invoice_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:41:11 GMT</last_modification_time>
-	      </signal>
-	      <label>_New Invoice</label>
-	      <right_justify>False</right_justify>
-	      <stock_icon>GNOME_STOCK_MENU_NEW</stock_icon>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_new_account</name>
-	      <tooltip>Create a new Account</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_new_account_cb</handler>
-		<last_modification_time>Tue, 02 Jul 2002 20:55:21 GMT</last_modification_time>
-	      </signal>
-	      <label>New Account</label>
-	      <right_justify>False</right_justify>
-	      <stock_icon>GNOME_STOCK_MENU_NEW</stock_icon>
-	    </widget>
+<widget class="GtkWindow" id="Invoice Entry Window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Invoice</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkVBox" id="invoice_entry_vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator10</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_save</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_file_save_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_SAVE_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_saveas</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_file_save_as_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_SAVE_AS_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator12</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_print</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_printCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:07:26 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_PRINT_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator1</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_close</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_closeCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 01:59:32 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_CLOSE_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_exit</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_exit_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:55:04 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_edit</name>
-	  <stock_item>GNOMEUIINFO_MENU_EDIT_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_edit_menu</name>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_cut</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_cut_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_CUT_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_copy</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_copy_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_COPY_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_paste</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_paste_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_PASTE_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator13</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_edit_invoice</name>
-	      <tooltip>Edit this Invoice</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_editCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:42:08 GMT</last_modification_time>
-	      </signal>
-	      <label>_Edit Invoice</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator11</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_view</name>
-	  <stock_item>GNOMEUIINFO_MENU_VIEW_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_view_menu</name>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>menu_toolbar</name>
-	      <tooltip>Display the toolbar</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_toolbar_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:55:04 GMT</last_modification_time>
-	      </signal>
-	      <label>_Toolbar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>menu_summary_bar</name>
-	      <tooltip>Display the Summary Bar</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_summarybar_cb</handler>
-		<last_modification_time>Mon, 28 Oct 2002 04:13:57 GMT</last_modification_time>
-	      </signal>
-	      <label>S_ummary Bar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>menu_status_bar</name>
-	      <tooltip>Display the Status Bar</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_statusbar_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:03:51 GMT</last_modification_time>
-	      </signal>
-	      <label>_Status Bar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
+      <child>
+	<widget class="GtkHBox" id="hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator4</name>
-	      <right_justify>False</right_justify>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_sort_order</name>
-	      <label>Sort _Order</label>
-	      <right_justify>False</right_justify>
-
-	      <widget>
-		<class>GtkMenu</class>
-		<name>menu_sort_order_menu</name>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_sort_standard</name>
-		  <tooltip>Keep normal invoice order</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_standard_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>_Standard</label>
-		  <active>False</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
-		</widget>
-
-		<widget>
-		  <class>GtkMenuItem</class>
-		  <name>separator5</name>
-		  <right_justify>False</right_justify>
-		</widget>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_sort_date</name>
-		  <tooltip>Sort by date</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_date_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>_Date</label>
-		  <active>False</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
-		</widget>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_sort_date_of_entry</name>
-		  <tooltip>Sort by the date of entry</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_date_entered_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>Date of _Entry</label>
-		  <active>False</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
-		</widget>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_sort_quantity</name>
-		  <tooltip>Sort by quantity</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_quantity_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>_Quantity</label>
-		  <active>False</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
-		</widget>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_price_quantity</name>
-		  <tooltip>Sort by price</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_price_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>_Price</label>
-		  <active>False</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
-		</widget>
-
-		<widget>
-		  <class>GtkRadioMenuItem</class>
-		  <name>menu_sort_description</name>
-		  <tooltip>Sort by description</tooltip>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_invoice_window_sort_description_cb</handler>
-		    <last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-		  </signal>
-		  <label>_Description</label>
-		  <active>True</active>
-		  <always_show_toggle>True</always_show_toggle>
-		  <group>sort</group>
+	      <child>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Invoice ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date Opened</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="posted_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date Posted</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="acct_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Posted Account</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="hide3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="id_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="date_opened_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="date_posted_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="acct_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckButton" id="active_check">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Active</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <signal name="toggled" handler="gnc_invoice_window_active_toggled_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="hide4">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+	      </child>
 
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_actions</name>
-	  <label>_Actions</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_actions_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_enter</name>
-	      <tooltip>Record the current entry</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_recordCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:01:51 GMT</last_modification_time>
-	      </signal>
-	      <label>_Enter</label>
-	      <right_justify>False</right_justify>
+	      <child>
+		<widget class="GtkLabel" id="label25">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Invoice Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_cancel</name>
-	      <tooltip>Cancel the current entry</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_cancelCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:10:40 GMT</last_modification_time>
-	      </signal>
-	      <label>_Cancel</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame3">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_delete</name>
-	      <tooltip>Delete the current entry</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_deleteCB</handler>
-		<last_modification_time>Tue, 18 Jun 2002 07:59:59 GMT</last_modification_time>
-	      </signal>
-	      <label>_Delete</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	      <child>
+		<widget class="GtkHBox" id="hbox2">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox8">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="owner_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="job_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Job</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label19">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Billing ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label13">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Terms</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="hide1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox9">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="owner_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="job_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="billing_id_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="terms_menu">
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget7">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget8">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">(terms)</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="hide2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator8</name>
-	      <right_justify>False</right_justify>
+	      <child>
+		<widget class="GtkLabel" id="label26">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Billing Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_duplicate</name>
-	      <tooltip>Make a copy of the current entry</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_duplicateCB</handler>
-		<last_modification_time>Sun, 16 Jun 2002 00:14:37 GMT</last_modification_time>
-	      </signal>
-	      <label>Dup_licate</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_blank</name>
-	      <tooltip>Move to the blank entry at the bottom of the Invoice</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_blankCB</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-	      </signal>
-	      <label>_Blank</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow1">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTextView" id="notes_text">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="overwrite">False</property>
+		      <property name="accepts_tab">True</property>
+		      <property name="justification">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
+		      <property name="cursor_visible">True</property>
+		      <property name="pixels_above_lines">0</property>
+		      <property name="pixels_below_lines">0</property>
+		      <property name="pixels_inside_wrap">0</property>
+		      <property name="left_margin">0</property>
+		      <property name="right_margin">0</property>
+		      <property name="indent">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <signal name="focus-out-event" handler="gnc_invoice_window_leave_notes_cb"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
 
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_reports</name>
-	  <label>_Reports</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_reports_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_report_owner</name>
-	      <tooltip>Open a company report window for the owner of this Invoice</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_report_owner_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:31:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Company Report</label>
-	      <right_justify>False</right_justify>
+	      <child>
+		<widget class="GtkLabel" id="label27">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Notes</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_tools</name>
-	  <label>_Tools</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_tools_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_general_ledger</name>
-	      <tooltip>Open a general ledger window</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_gl_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_General Ledger</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+      <child>
+	<widget class="GtkFrame" id="proj_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_price_editor</name>
-	      <tooltip>View and edit the prices for stocks and mutual funds</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_prices_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Price Editor</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	  <child>
+	    <widget class="GtkHBox" id="hbox8">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_commodity_editor</name>
-	      <tooltip>View and edit the commodities for stocks and mutual funds</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_commodities_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Commodity Editor</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label24">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Customer: </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_fincalc</name>
-	      <tooltip>Use the financial calculator</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_fincalc_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Financial Calculator</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	      <child>
+		<widget class="GtkHBox" id="proj_cust_hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_taxtable</name>
-	      <tooltip>View and edit the list of Tax Tables</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_taxtable_cb</handler>
-		<last_modification_time>Tue, 02 Jul 2002 20:55:22 GMT</last_modification_time>
-	      </signal>
-	      <label>_Tax Table Editor</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label25">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Job: </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_billterm</name>
-	      <tooltip>View and edit the list of Billing Terms</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_billterm_cb</handler>
-		<last_modification_time>Tue, 02 Jul 2002 20:55:22 GMT</last_modification_time>
-	      </signal>
-	      <label>_Billing Terms Editor</label>
-	      <right_justify>False</right_justify>
+	      <child>
+		<widget class="GtkHBox" id="proj_job_hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_payment</name>
-	      <tooltip>Enter a payment for the owner of this Invoice</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_invoice_window_payment_cb</handler>
-		<last_modification_time>Tue, 02 Jul 2002 20:55:22 GMT</last_modification_time>
-	      </signal>
-	      <label>Process Pa_yment</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label28">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Default Chargeback Project</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_help</name>
-	  <stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_help_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_manual</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_help_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 01:57:06 GMT</last_modification_time>
-	      </signal>
-	      <label>_Gnucash Users Manual</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+      <child>
+	<widget class="GtkFrame" id="to_charge_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menu_totd</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_totd_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 01:57:06 GMT</last_modification_time>
-	      </signal>
-	      <label>_Tip Of The Day</label>
-	      <right_justify>False</right_justify>
-	    </widget>
+	  <child>
+	    <widget class="GtkHBox" id="hbox9">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator9</name>
-	      <right_justify>False</right_justify>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label31">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Additional to Card:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>menu_about</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_about_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 01:12:45 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
+	      <child>
+		<widget class="GtkHBox" id="to_charge_box">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>toolbar_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>1</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>False</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>GtkToolbar</class>
-	<name>toolbar</name>
-	<border_width>2</border_width>
-	<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
-	<type>GTK_TOOLBAR_BOTH</type>
-	<space_size>10</space_size>
-	<space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
-	<relief>GTK_RELIEF_NONE</relief>
-	<tooltips>True</tooltips>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>close_button</name>
-	  <tooltip>Close this invoice window</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_closeCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:52:00 GMT</last_modification_time>
-	  </signal>
-	  <label>Close</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_CLOSE</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>edit_button</name>
-	  <tooltip>Edit this Invoice</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_editCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:54:57 GMT</last_modification_time>
-	  </signal>
-	  <label>Edit</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_PREFERENCES</stock_pixmap>
-	</widget>
+	  </child>
 
-	<widget>
-	  <class>GtkVSeparator</class>
-	  <name>vseparator1</name>
 	  <child>
-	    <new_group>True</new_group>
+	    <widget class="GtkLabel" id="label30">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Extra Payments</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>enter_button</name>
-	  <tooltip>Record the current entry</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_recordCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:22:58 GMT</last_modification_time>
-	  </signal>
-	  <label>Enter</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>cancel_button</name>
-	  <tooltip>Cancel the current entry</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_cancelCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:22:47 GMT</last_modification_time>
-	  </signal>
-	  <label>Cancel</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_UNDELETE</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>delete_button</name>
-	  <tooltip>Delete the current entry</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_deleteCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:24:15 GMT</last_modification_time>
-	  </signal>
-	  <label>Delete</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_TRASH</stock_pixmap>
-	</widget>
+      <child>
+	<widget class="GtkFrame" id="ledger_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkVSeparator</class>
-	  <name>vseparator2</name>
 	  <child>
-	    <new_group>True</new_group>
+	    <placeholder/>
 	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>duplicate_button</name>
-	  <tooltip>Make a copy of the current entry</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_duplicateCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:25:45 GMT</last_modification_time>
-	  </signal>
-	  <label>Duplicate</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_COPY</stock_pixmap>
-	</widget>
 
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>blank_button</name>
-	  <tooltip>Move to the blank entry at the bottom of the Invoice</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_blankCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:26:55 GMT</last_modification_time>
-	  </signal>
-	  <label>Blank</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_NEW</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkVSeparator</class>
-	  <name>vseparator3</name>
 	  <child>
-	    <new_group>True</new_group>
+	    <widget class="GtkLabel" id="label29">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Invoice Entries</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
 	  </child>
 	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>print_button</name>
-	  <tooltip>Make a printable Invoice</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_printCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:29:05 GMT</last_modification_time>
-	  </signal>
-	  <label>Print</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_PRINT</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>post_button</name>
-	  <tooltip>Post this Invoice to your Chart of Accounts</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_postCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Tue, 02 Jul 2002 03:30:17 GMT</last_modification_time>
-	  </signal>
-	  <label>Post</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_JUMP_TO</stock_pixmap>
-	</widget>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <child_name>Toolbar:button</child_name>
-	  <name>unpost_button</name>
-	  <tooltip>Unpost this Invoice and make it editable</tooltip>
-	  <signal>
-	    <name>clicked</name>
-	    <handler>gnc_invoice_window_unpostCB</handler>
-	    <data>Invoice Entry Window</data>
-	    <last_modification_time>Wed, 13 Nov 2002 01:17:37 GMT</last_modification_time>
-	  </signal>
-	  <label>Unpost</label>
-	  <stock_pixmap>GNOME_STOCK_PIXMAP_CONVERT</stock_pixmap>
-	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">3</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
+  </child>
+</widget>
 
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>summarybar_dock</name>
-      <placement>GNOME_DOCK_BOTTOM</placement>
-      <band>0</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>False</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>False</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Unpost Message Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area3">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <child_name>GnomeDock:contents</child_name>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox1</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>3</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <label>Invoice Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox1</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox2</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Invoice ID</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Date Opened</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>posted_label</name>
-		<label>Date Posted</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>acct_label</name>
-		<label>Posted Account</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide3</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox3</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<can_focus>True</can_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>date_opened_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>date_posted_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>acct_entry</name>
-		<can_focus>True</can_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_invoice_window_active_toggled_cb</handler>
-		  <data>Invoice Entry Window</data>
-		  <last_modification_time>Sat, 01 Feb 2003 01:03:48 GMT</last_modification_time>
-		</signal>
-		<label>Active</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide4</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <label>Billing Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox8</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>owner_label</name>
-		<label>(owner)</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>job_label</name>
-		<label>Job</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label19</name>
-		<label>Billing ID</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label13</name>
-		<label>Terms</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide1</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox9</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>owner_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>job_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>billing_id_entry</name>
-		<can_focus>True</can_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>terms_menu</name>
-		<sensitive>False</sensitive>
-		<can_focus>True</can_focus>
-		<items>(terms)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide2</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>focus-out-event</name>
-		<handler>gnc_invoice_window_leave_notes_cb</handler>
-		<data>Invoice Entry Window</data>
-		<last_modification_time>Sat, 01 Feb 2003 01:12:00 GMT</last_modification_time>
-	      </signal>
-	      <editable>True</editable>
-	      <text></text>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>proj_frame</name>
-	<label>Default Chargeback Project</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>3</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox8</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label24</name>
-	    <label>Customer: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>proj_cust_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label25</name>
-	    <label>Job: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>proj_job_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>to_charge_frame</name>
-	<label>Extra Payments</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox9</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label26</name>
-	    <label>Additional to Card:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>to_charge_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>ledger_frame</name>
-	<label>Invoice Entries</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>3</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>Placeholder</class>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-
-  <widget>
-    <class>GnomeAppBar</class>
-    <child_name>GnomeApp:appbar</child_name>
-    <name>status_bar</name>
-    <has_progress>False</has_progress>
-    <has_status>True</has_status>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-  </widget>
-</widget>
-
-<widget>
-  <class>GtkMenu</class>
-  <name>Invoice Window Popup Menu</name>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>enter_item</name>
-    <tooltip>Record the current entry</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_invoice_window_recordCB</handler>
-      <last_modification_time>Tue, 02 Jul 2002 14:52:15 GMT</last_modification_time>
-    </signal>
-    <label>Enter</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>cancel_item</name>
-    <tooltip>Cancel the current entry</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_invoice_window_cancelCB</handler>
-      <last_modification_time>Tue, 02 Jul 2002 14:52:15 GMT</last_modification_time>
-    </signal>
-    <label>Cancel</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>delete_item</name>
-    <tooltip>Delete the current entry</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_invoice_window_deleteCB</handler>
-      <last_modification_time>Tue, 02 Jul 2002 14:52:15 GMT</last_modification_time>
-    </signal>
-    <label>Delete</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>separator1</name>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>duplicate_item</name>
-    <tooltip>Make a copy of the current entry</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_invoice_window_duplicateCB</handler>
-      <last_modification_time>Tue, 02 Jul 2002 14:52:15 GMT</last_modification_time>
-    </signal>
-    <label>Duplicate</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>blank_item</name>
-    <tooltip>Move to the blank entry at the bottom of the Invoice</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_invoice_window_blankCB</handler>
-      <last_modification_time>Tue, 02 Jul 2002 14:52:15 GMT</last_modification_time>
-    </signal>
-    <label>Blank</label>
-    <right_justify>False</right_justify>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Unpost Message Dialog</name>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox5</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area5</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button11</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_YES</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button12</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_NO</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox17</name>
-      <homogeneous>True</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkVBox" id="vbox17">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox12</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GnomePixmap</class>
-	  <name>q_pixmap</name>
 	  <child>
-	    <padding>10</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkHBox" id="hbox11">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkImage" id="q_pixmap">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">10</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label32">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Unposting this Invoice will delete the posted transaction.
+Are you sure you want to unpost it?</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label27</name>
-	  <label>Unposting this Invoice will delete the posted transaction.
-Are you sure you want to unpost it?</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-      </widget>
+	    <widget class="GtkFrame" id="frame8">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox12">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="yes_tt_reset">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Yes, reset the Tax Tables</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_yes_tt_reset_toggled" object="Invoice Entry Window" last_modification_time="Wed, 16 Jul 2003 07:22:26 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="no_tt_reset">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No, keep them as they are</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_no_tt_reset_toggled" object="Invoice Entry Window" last_modification_time="Wed, 16 Jul 2003 07:23:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame8</name>
-	<border_width>3</border_width>
-	<label>Reset Tax Tables to present Values? </label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>6</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox11</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>yes_tt_reset</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>on_yes_tt_reset_toggled</handler>
-	      <data>Invoice Entry Window</data>
-	      <last_modification_time>Tue, 27 May 2003 04:05:35 GMT</last_modification_time>
-	    </signal>
-	    <label>Yes, reset the Tax Tables</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>reset tax tables</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>no_tt_reset</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>on_no_tt_reset_toggled</handler>
-	      <data>Invoice Entry Window</data>
-	      <last_modification_time>Tue, 27 May 2003 04:05:26 GMT</last_modification_time>
-	    </signal>
-	    <label>No, keep them as they are</label>
-	    <active>True</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>reset tax tables</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+	      <child>
+		<widget class="GtkLabel" id="label33">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Reset Tax Tables to present Values? </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">6</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: order.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/order.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/glade/order.glade -Lsrc/business/business-gnome/glade/order.glade -u -r1.2 -r1.3
--- src/business/business-gnome/glade/order.glade
+++ src/business/business-gnome/glade/order.glade
@@ -1,1385 +1,1148 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Order</name>
-  <program_name>order</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Order Entry Dialog</name>
-  <title>Order Entry</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>950</default_width>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button3</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>new_invoice_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Invoices</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_order_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Close Order</label>
-      </widget>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
+<widget class="GtkDialog" id="Order Entry Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Order Entry</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">950</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_order_window_destroy_cb" last_modification_time="Mon, 08 Sep 2003 01:36:38 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox1</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>3</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <label>Order Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox1</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox2</name>
-	      <border_width>2</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Order ID</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Date Opened</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>cd_label</name>
-		<label>Date Closed</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_order_window_help_cb" last_modification_time="Mon, 08 Sep 2003 01:34:48 GMT"/>
 	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox3</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<can_focus>True</can_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeDateEdit</class>
-		<name>opened_date</name>
-		<sensitive>False</sensitive>
-		<show_time>False</show_time>
-		<use_24_format>False</use_24_format>
-		<week_start_monday>False</week_start_monday>
-		<lower_hour>7</lower_hour>
-		<upper_hour>19</upper_hour>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeDateEdit</class>
-		<name>closed_date</name>
-		<show_time>False</show_time>
-		<use_24_format>False</use_24_format>
-		<week_start_monday>False</week_start_monday>
-		<lower_hour>7</lower_hour>
-		<upper_hour>19</upper_hour>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<label>Active</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <border_width>3</border_width>
-	  <label>Billing Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox8</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>owner_label</name>
-		<label>(owner)</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Reference</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide1</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label11</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox9</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>owner_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>ref_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide2</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label12</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="closebutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_order_window_ok_cb" last_modification_time="Mon, 08 Sep 2003 01:33:56 GMT"/>
 	    </widget>
-	  </widget>
-	</widget>
+	  </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <border_width>3</border_width>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="new_invoice_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Invoices</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_order_window_invoice_cb" last_modification_time="Mon, 08 Sep 2003 01:34:14 GMT"/>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
+	  <child>
+	    <widget class="GtkButton" id="close_order_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Close Order</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_order_window_close_order_cb" last_modification_time="Mon, 08 Sep 2003 01:34:33 GMT"/>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>ledger_frame</name>
-	<label>Order Entries</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>3</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>ledger_vbox</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>New Order Dialog</name>
-  <title>New Order</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button6</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox10</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame4</name>
-	<border_width>3</border_width>
-	<label>Order Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox3</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox12</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label13</name>
-	      <label>Order ID</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkHBox" id="hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label14</name>
-	      <label>Date Opened</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkFrame" id="frame1">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox1">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox2">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Order ID</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label3">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date Opened</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="cd_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date Closed</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label8">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox3">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="id_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">False</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GnomeDateEdit" id="opened_date">
+			      <property name="visible">True</property>
+			      <property name="sensitive">False</property>
+			      <property name="dateedit_flags"></property>
+			      <property name="lower_hour">7</property>
+			      <property name="upper_hour">19</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GnomeDateEdit" id="closed_date">
+			      <property name="visible">True</property>
+			      <property name="dateedit_flags"></property>
+			      <property name="lower_hour">7</property>
+			      <property name="upper_hour">19</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="active_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Active</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Order Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox13</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>id_entry</name>
-	      <tooltip>The order ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkFrame" id="frame3">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox8">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="owner_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">(owner)</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Reference</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="hide1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label11">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox9">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="owner_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="ref_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">False</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="hide2">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label12">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label9">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Billing Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GnomeDateEdit</class>
-	      <name>opened_date</name>
-	      <show_time>False</show_time>
-	      <use_24_format>False</use_24_format>
-	      <week_start_monday>False</week_start_monday>
-	      <lower_hour>7</lower_hour>
-	      <upper_hour>19</upper_hour>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkFrame" id="frame2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTextView" id="notes_text">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="overwrite">False</property>
+			  <property name="accepts_tab">True</property>
+			  <property name="justification">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap_mode">GTK_WRAP_WORD</property>
+			  <property name="cursor_visible">True</property>
+			  <property name="pixels_above_lines">0</property>
+			  <property name="pixels_below_lines">0</property>
+			  <property name="pixels_inside_wrap">0</property>
+			  <property name="left_margin">0</property>
+			  <property name="right_margin">0</property>
+			  <property name="indent">0</property>
+			  <property name="text" translatable="yes"></property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label13">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Notes</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="padding">3</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="ledger_frame">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame5</name>
-	<border_width>3</border_width>
-	<label>Billing Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox14</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>owner_label</name>
-	      <label>(owner)</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkVBox" id="ledger_vbox">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label16</name>
-	      <label>Reference</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label14">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Order Entries</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">3</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox15</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>owner_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+<widget class="GtkDialog" id="New Order Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Order</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_order_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 23:05:37 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_order_window_help_cb" last_modification_time="Sat, 19 Jul 2003 23:05:19 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>ref_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>False</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_order_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 23:05:01 GMT"/>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame6</name>
-	<border_width>3</border_width>
-	<label>Notes</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow2</name>
-	  <border_width>3</border_width>
-	  <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkText</class>
-	    <name>notes_text</name>
-	    <can_focus>True</can_focus>
-	    <editable>False</editable>
-	    <text></text>
-	  </widget>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_order_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 23:04:42 GMT"/>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeApp</class>
-  <name>Order Entry Window</name>
-  <title>Order</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <enable_layout_config>True</enable_layout_config>
-
-  <widget>
-    <class>GnomeDock</class>
-    <child_name>GnomeApp:dock</child_name>
-    <name>dock1</name>
-    <allow_floating>True</allow_floating>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>menu_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>0</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>True</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>toolbar_dock</name>
-      <border_width>1</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>1</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>False</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox10">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <child_name>GnomeDock:contents</child_name>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox1</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>3</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <label>Order Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
+	    <widget class="GtkFrame" id="frame4">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox1</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox2</name>
-	      <border_width>2</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<widget class="GtkHBox" id="hbox3">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox12">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label13">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Order ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label14">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date Opened</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox13">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="id_entry">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">The order ID number.  If left blank a reasonable number will be chosen for you</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GnomeDateEdit" id="opened_date">
+			  <property name="visible">True</property>
+			  <property name="dateedit_flags"></property>
+			  <property name="lower_hour">7</property>
+			  <property name="upper_hour">19</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Order ID</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Date Opened</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>cd_label</name>
-		<label>Date Closed</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox3</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label15">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Order Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeDateEdit</class>
-		<name>opened_date</name>
-		<show_time>False</show_time>
-		<use_24_format>False</use_24_format>
-		<week_start_monday>False</week_start_monday>
-		<lower_hour>7</lower_hour>
-		<upper_hour>19</upper_hour>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeDateEdit</class>
-		<name>closed_date</name>
-		<show_time>False</show_time>
-		<use_24_format>False</use_24_format>
-		<week_start_monday>False</week_start_monday>
-		<lower_hour>7</lower_hour>
-		<upper_hour>19</upper_hour>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<label>Active</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
 	    </widget>
-	  </widget>
-	</widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <border_width>3</border_width>
-	  <label>Billing Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
+	    <widget class="GtkFrame" id="frame5">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox8</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox14">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="owner_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label16">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Reference</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox15">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="owner_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="ref_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>owner_label</name>
-		<label>(owner)</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Reference</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide1</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label11</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox9</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label16">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Billing Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>owner_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+	  <child>
+	    <widget class="GtkFrame" id="frame6">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTextView" id="notes_text">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">False</property>
+		      <property name="overwrite">False</property>
+		      <property name="accepts_tab">True</property>
+		      <property name="justification">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
+		      <property name="cursor_visible">True</property>
+		      <property name="pixels_above_lines">0</property>
+		      <property name="pixels_below_lines">0</property>
+		      <property name="pixels_inside_wrap">0</property>
+		      <property name="left_margin">0</property>
+		      <property name="right_margin">0</property>
+		      <property name="indent">0</property>
+		      <property name="text" translatable="yes"></property>
+		    </widget>
+		  </child>
 		</widget>
-	      </widget>
+	      </child>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>ref_entry</name>
-		<can_focus>True</can_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>hide2</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label12</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label17">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Notes</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <border_width>3</border_width>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
-	    </widget>
-	  </widget>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>ledger_frame</name>
-	<label>Order Entries</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>3</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>ledger_vbox</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
-
-  <widget>
-    <class>GnomeAppBar</class>
-    <child_name>GnomeApp:appbar</child_name>
-    <name>appbar1</name>
-    <has_progress>False</has_progress>
-    <has_status>True</has_status>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: job.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/job.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/glade/job.glade -Lsrc/business/business-gnome/glade/job.glade -u -r1.2 -r1.3
--- src/business/business-gnome/glade/job.glade
+++ src/business/business-gnome/glade/job.glade
@@ -1,352 +1,451 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Job</name>
-  <program_name>job</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Job Dialog</name>
-  <title>Job Dialog</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button8</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button9</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button10</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Job Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Job Dialog</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_job_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 23:00:18 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_job_window_help_cb" last_modification_time="Sat, 19 Jul 2003 22:59:31 GMT"/>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<border_width>3</border_width>
-	<label>Job Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox8</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox4</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label1</name>
-	      <label>Job Number</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_job_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 22:59:19 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label3</name>
-	      <width>100</width>
-	      <label>Job Name</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_job_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 22:59:09 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox12</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>id_entry</name>
-	      <width>50</width>
-	      <tooltip>The job ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox8">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox4">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Job Number</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Job Name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox12">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkEntry" id="id_entry">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">The job ID number.  If left blank a reasonable number will be chosen for you</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">True</property>
+			  <signal name="changed" handler="gnc_job_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:58:48 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="name_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="has_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">True</property>
+			  <signal name="changed" handler="gnc_job_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 22:58:36 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>name_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Job Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame2</name>
-	<border_width>3</border_width>
-	<label>Owner Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox9</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox5</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>owner_label</name>
-	      <label>(owner)</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox9">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox5">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="owner_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label4">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Billing ID</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox13">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="customer_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="desc_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label4</name>
-	      <width>100</width>
-	      <label>Billing ID</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label4">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Owner Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame3">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox13</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>customer_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkCheckButton" id="active_check">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Job Active</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>desc_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label5">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Active</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame3</name>
-	<border_width>3</border_width>
-	<label>Active</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCheckButton</class>
-	  <name>active_check</name>
-	  <can_focus>True</can_focus>
-	  <label>Job Active</label>
-	  <active>True</active>
-	  <draw_indicator>True</draw_indicator>
-	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/business/business-gnome/glade/.cvsignore -Lsrc/business/business-gnome/glade/.cvsignore -u -r1.1 -r1.2
--- src/business/business-gnome/glade/.cvsignore
+++ src/business/business-gnome/glade/.cvsignore
@@ -1,2 +1,3 @@
+*.gladep
 Makefile
 Makefile.in
Index: billterms.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/billterms.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/glade/billterms.glade -Lsrc/business/business-gnome/glade/billterms.glade -u -r1.2 -r1.3
--- src/business/business-gnome/glade/billterms.glade
+++ src/business/business-gnome/glade/billterms.glade
@@ -1,1121 +1,1300 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Terms</name>
-  <program_name>tax-tables</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Terms Window</name>
-  <width>400</width>
-  <height>300</height>
-  <title>Terms</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<tooltip>Close this window</tooltip>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Terms Window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Terms</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="billterms_window_destroy_cb" last_modification_time="Mon, 08 Sep 2003 02:00:27 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Close this window</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-7</property>
+	      <signal name="clicked" handler="billterms_window_close" last_modification_time="Mon, 08 Sep 2003 02:00:40 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<border_width>1</border_width>
-	<label>Terms</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox1</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>terms_clist</name>
-	      <can_focus>True</can_focus>
-	      <columns>1</columns>
-	      <column_widths>80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>False</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label1</name>
-		<label>label1</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkHBox" id="hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>new_term_button</name>
-	      <tooltip>Create a new Billing Term</tooltip>
-	      <can_focus>True</can_focus>
-	      <label>New...</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>delete_term_button</name>
-	      <tooltip>Delete the current Billing Term</tooltip>
-	      <can_focus>True</can_focus>
-	      <label>Delete</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkVBox" id="vbox1">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="terms_clist">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">1</property>
+			  <property name="column_widths">80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">False</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <signal name="select_row" handler="billterms_row_selected" last_modification_time="Mon, 08 Sep 2003 02:00:56 GMT"/>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="new_term_button">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Create a new Billing Term</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">New...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="billterms_new_term_cb" last_modification_time="Mon, 08 Sep 2003 02:01:29 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="delete_term_button">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Delete the current Billing Term</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Delete</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="billterms_delete_term_cb" last_modification_time="Mon, 08 Sep 2003 02:01:18 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame2</name>
-	<border_width>1</border_width>
-	<label>Term Definition</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>term_vbox</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox8</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox9</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Terms</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label16</name>
-		<label>Description: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label9</name>
-		<label>Type: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox10</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkVBox" id="term_vbox">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>desc_entry</name>
-		<tooltip>The description of the Billing Term, printed on invoices</tooltip>
-		<can_focus>True</can_focus>
-		<has_focus>True</has_focus>
-		<editable>False</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hbox13</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>type_label</name>
-		  <label>(type)</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+		  <child>
+		    <widget class="GtkHBox" id="hbox8">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox9">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label16">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Description: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label9">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Type: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox10">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="desc_entry">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">The description of the Billing Term, printed on invoices</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_focus">True</property>
+			      <property name="editable">False</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox13">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkLabel" id="type_label">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">(type)</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
 		  </child>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>notebook_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
+		  <child>
+		    <widget class="GtkHBox" id="notebook_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+		  <child>
+		    <widget class="GtkHBox" id="hbox30">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="edit_term_button">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Edit the current Billing Term</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Edit...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="billterms_edit_term_cb" last_modification_time="Mon, 08 Sep 2003 02:01:07 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox30</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>edit_term_button</name>
-	      <tooltip>Edit the current Billing Term</tooltip>
-	      <can_focus>True</can_focus>
-	      <label>Edit...</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Term Definition</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>New Term Dialog</name>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<widget class="GtkDialog" id="New Term Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<tooltip>Commit this Billing Term</tooltip>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<tooltip>Cancel your changes</tooltip>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Cancel your changes</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox3</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Commit this Billing Term</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>term_frame</name>
-	<border_width>2</border_width>
-	<label>New Billing Terms</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label5</name>
-	    <label>Name: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>name_entry</name>
-	    <tooltip>The internal name of the Billing Term.</tooltip>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="term_frame">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame4</name>
-	<border_width>1</border_width>
-	<label>Term Definition</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox15</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox19</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox16</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label5">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Name: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="name_entry">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The internal name of the Billing Term.</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label22</name>
-		<label>Description: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label21</name>
-		<label>Type: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label17">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">New Billing Terms</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame4">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox17</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkVBox" id="vbox15">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>desc_entry</name>
-		<tooltip>The description of the Billing Term, printed on invoices</tooltip>
-		<can_focus>True</can_focus>
-		<has_focus>True</has_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hbox20</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkOptionMenu</class>
-		  <name>type_menu</name>
-		  <tooltip>Choose the type of Billing Term</tooltip>
-		  <can_focus>True</can_focus>
-		  <items>Type Menu
-</items>
-		  <initial_choice>0</initial_choice>
-		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+		  <child>
+		    <widget class="GtkHBox" id="hbox19">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox16">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label22">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Description: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label21">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Type: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox17">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="desc_entry">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">The description of the Billing Term, printed on invoices</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox20">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="type_menu">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Choose the type of Billing Term</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">0</property>
+
+				  <child internal-child="menu">
+				    <widget class="GtkMenu" id="convertwidget3">
+				      <property name="visible">True</property>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget4">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Type Menu</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
 		  </child>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>notebook_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
+		  <child>
+		    <widget class="GtkHBox" id="notebook_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-	    <widget>
-	      <class>Placeholder</class>
+	      <child>
+		<widget class="GtkLabel" id="label18">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Term Definition</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkMenu</class>
-  <name>Term Type Popup</name>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>days1</name>
-    <tooltip>Number of days from now</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>on_days1_activate</handler>
-      <last_modification_time>Wed, 19 Jun 2002 22:56:35 GMT</last_modification_time>
-    </signal>
-    <label>Days</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>proximo1</name>
-    <tooltip>Absolute Day-of-the-month</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>on_proximo1_activate</handler>
-      <last_modification_time>Wed, 19 Jun 2002 22:56:35 GMT</last_modification_time>
-    </signal>
-    <label>Proximo</label>
-    <right_justify>False</right_justify>
-  </widget>
+<widget class="GtkMenu" id="Term Type Popup">
+  <property name="visible">True</property>
+
+  <child>
+    <widget class="GtkMenuItem" id="days1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Number of days from now</property>
+      <property name="label" translatable="yes">Days</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_days1_activate"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="proximo1">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Absolute Day-of-the-month</property>
+      <property name="label" translatable="yes">Proximo</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="on_proximo1_activate"/>
+    </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>Term Notebook</name>
-  <visible>False</visible>
-  <title>window1</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkNotebook</class>
-    <name>term_notebook</name>
-    <show_tabs>False</show_tabs>
-    <show_border>False</show_border>
-    <tab_pos>GTK_POS_TOP</tab_pos>
-    <scrollable>False</scrollable>
-    <tab_hborder>2</tab_hborder>
-    <tab_vborder>2</tab_vborder>
-    <popup_enable>False</popup_enable>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox13</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox9</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox7</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
+<widget class="GtkWindow" id="Term Notebook">
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkNotebook" id="term_notebook">
+      <property name="visible">True</property>
+      <property name="show_tabs">False</property>
+      <property name="show_border">False</property>
+      <property name="tab_pos">GTK_POS_TOP</property>
+      <property name="scrollable">False</property>
+      <property name="enable_popup">False</property>
 
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label13</name>
-	    <label>Due Days: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label14</name>
-	    <label>Discount Days: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label15</name>
-	    <label>Discount %: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GtkVBox" id="vbox13">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox8</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
+	    <widget class="GtkHBox" id="hbox9">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>days:due_days</name>
-	    <tooltip>The number of days to pay the bill after the post date.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>30</value>
-	    <lower>0</lower>
-	    <upper>365</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>days:discount_days</name>
-	    <tooltip>The number of days after the post date during which a discount will be applied for early payment.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>365</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>days:discount</name>
-	    <tooltip>The percentage discount applied for early payment.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>2</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+	      <child>
+		<widget class="GtkVBox" id="vbox7">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
 
-    <widget>
-      <class>GtkLabel</class>
-      <child_name>Notebook:tab</child_name>
-      <name>days_label</name>
-      <label>Days</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-    </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label13">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Due Days: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox14</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox14</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox11</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+		  <child>
+		    <widget class="GtkLabel" id="label14">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Discount Days: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label15">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Discount %: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox8">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="days:due_days">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The number of days to pay the bill after the post date.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">30 0 365 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="days:discount_days">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The number of days after the post date during which a discount will be applied for early payment.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 365 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="days:discount">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The percentage discount applied for early payment.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">2</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
 
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label17</name>
-	    <label>Due Day: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label18</name>
-	    <label>Discount Day: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label19</name>
-	    <label>Discount %: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label20</name>
-	    <label>Cutoff Day: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+      <child>
+	<widget class="GtkLabel" id="days_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Days</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
 	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox14">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox12</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
-	  </child>
+	    <widget class="GtkHBox" id="hbox14">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox11">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>prox:due_day</name>
-	    <tooltip>The day of the month bills are due</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>True</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>31</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>prox:discount_day</name>
-	    <tooltip>The last day of the month for the early payment discount.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>True</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>31</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>prox:discount</name>
-	    <tooltip>The discount percentage applied if paid early.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>2</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>prox:cutoff_day</name>
-	    <tooltip>The cutoff day for applying bills to the next month.  After the cutoff, bills are applied to the following month.  Negative values count backwards from the end of the month.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>True</wrap>
-	    <value>0</value>
-	    <lower>-27</lower>
-	    <upper>27</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label17">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Due Day: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label18">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Discount Day: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label19">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Discount %: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label20">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Cutoff Day: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox12">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="prox:due_day">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The day of the month bills are due</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">True</property>
+		      <property name="adjustment">1 1 31 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="prox:discount_day">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The last day of the month for the early payment discount.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">True</property>
+		      <property name="adjustment">1 1 31 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="prox:discount">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The discount percentage applied if paid early.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">2</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="prox:cutoff_day">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">The cutoff day for applying bills to the next month.  After the cutoff, bills are applied to the following month.  Negative values count backwards from the end of the month.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">True</property>
+		      <property name="adjustment">0 -27 27 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="tab_expand">False</property>
+	  <property name="tab_fill">True</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkLabel</class>
-      <child_name>Notebook:tab</child_name>
-      <name>proximo_label</name>
-      <label>Proximo</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-    </widget>
+      <child>
+	<widget class="GtkLabel" id="proximo_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Proximo</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>Placeholder</class>
-    </widget>
+      <child>
+	<placeholder/>
+      </child>
 
-    <widget>
-      <class>GtkLabel</class>
-      <child_name>Notebook:tab</child_name>
-      <name>table_label</name>
-      <label>Table</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
+      <child>
+	<widget class="GtkLabel" id="table_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Table</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="type">tab</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: payment.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/payment.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/glade/payment.glade -Lsrc/business/business-gnome/glade/payment.glade -u -r1.2 -r1.3
--- src/business/business-gnome/glade/payment.glade
+++ src/business/business-gnome/glade/payment.glade
@@ -1,364 +1,484 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Payment</name>
-  <program_name>payment</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Payment Dialog</name>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button3</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<label>Payment Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox1</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox2</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>owner_label</name>
-	      <label>(owner)</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+<glade-interface>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label3</name>
-	      <label>Date</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+<widget class="GtkDialog" id="Payment Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_payment_window_destroy_cb" last_modification_time="Mon, 08 Sep 2003 02:39:12 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_payment_cancel_cb" last_modification_time="Mon, 08 Sep 2003 02:40:12 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label2</name>
-	      <label>Amount</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_payment_ok_cb" last_modification_time="Mon, 08 Sep 2003 02:40:03 GMT"/>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label4</name>
-	      <label>Num</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label5</name>
-	      <label>Memo</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox2">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="owner_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">(owner)</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Amount</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label4">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Num</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label5">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Memo</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox3">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="owner_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="date_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="amount_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="num_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="memo_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox3</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>owner_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Payment Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>date_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkCombo" id="post_combo">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="value_in_list">True</property>
+		  <property name="allow_empty">False</property>
+		  <property name="case_sensitive">False</property>
+		  <property name="enable_arrow_keys">True</property>
+		  <property name="enable_arrows_always">False</property>
+
+		  <child internal-child="entry">
+		    <widget class="GtkEntry" id="combo-entry1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		  </child>
+
+		  <child internal-child="list">
+		    <widget class="GtkList" id="convertwidget1">
+		      <property name="visible">True</property>
+		      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		      <child>
+			<widget class="GtkListItem" id="convertwidget2">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="convertwidget3">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>amount_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label6">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Post To</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame3">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>num_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkScrolledWindow" id="acct_window">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>memo_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label7">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Transfer Account</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame2</name>
-	<label>Post To</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>post_combo</name>
-	  <border_width>3</border_width>
-	  <value_in_list>True</value_in_list>
-	  <ok_if_empty>False</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>combo-entry1</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame3</name>
-	<label>Transfer Account</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>acct_window</name>
-	  <border_width>3</border_width>
-	  <width>150</width>
-	  <height>100</height>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: date-close.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/date-close.glade,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/business-gnome/glade/date-close.glade -Lsrc/business/business-gnome/glade/date-close.glade -u -r1.4 -r1.5
--- src/business/business-gnome/glade/date-close.glade
+++ src/business/business-gnome/glade/date-close.glade
@@ -1,514 +1,569 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Date-close</name>
-  <program_name>date-close</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Date Close Dialog</name>
-  <title>Question</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button3</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>the_hbox</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
+<widget class="GtkDialog" id="Date Close Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Question</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox2</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label1</name>
-	  <label></label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_dialog_date_close_cancel_cb" last_modification_time="Mon, 08 Sep 2003 02:04:34 GMT"/>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label</name>
-	  <label>label1</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_dialog_date_close_ok_cb" last_modification_time="Mon, 08 Sep 2003 02:04:23 GMT"/>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>date_box</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkHBox" id="the_hbox">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label2</name>
-	  <label></label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkHBox" id="hbox2">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">label1</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="date_box">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Date Account Dialog</name>
-  <title>Question</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
     </widget>
+  </child>
+</widget>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox3</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>the_hbox</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
+<widget class="GtkDialog" id="Date Account Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Question</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox4</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label3</name>
-	  <label></label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox4</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_dialog_date_close_ok_cb" last_modification_time="Mon, 08 Sep 2003 02:23:45 GMT"/>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>postdate_label</name>
-	    <label>postd</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>date_label</name>
-	    <label>duedate</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>memo_label</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>acct_label</name>
-	    <label>acct</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>hide1</name>
-	    <label></label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox5</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>3</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>post_date_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>date_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>memo_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>acct_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
+      <child>
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	    <widget>
-	      <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkHBox" id="the_hbox">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
 	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>question_check</name>
-	    <can_focus>True</can_focus>
-	    <label>question</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label5</name>
-	  <label></label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkHBox" id="hbox4">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label3">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox4">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="postdate_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">postd</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="date_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">duedate</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="memo_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Description</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="acct_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">acct</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="hide1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox5">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="post_date_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="date_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="memo_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="acct_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="question_check">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">question</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label5">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-gnome/glade/Makefile.am -Lsrc/business/business-gnome/glade/Makefile.am -u -r1.2 -r1.3
--- src/business/business-gnome/glade/Makefile.am
+++ src/business/business-gnome/glade/Makefile.am
@@ -1,6 +1,7 @@
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = \
   billterms.glade \
+  businessprefs.glade \
   customer.glade \
   date-close.glade \
   employee.glade \
Index: vendor.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-gnome/glade/vendor.glade,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/business/business-gnome/glade/vendor.glade -Lsrc/business/business-gnome/glade/vendor.glade -u -r1.8 -r1.9
--- src/business/business-gnome/glade/vendor.glade
+++ src/business/business-gnome/glade/vendor.glade
@@ -1,832 +1,1105 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Vendor</name>
-  <program_name>vendor</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Vendor Dialog</name>
-  <title>New Vendor</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button5</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button6</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Vendor Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Vendor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="gnc_vendor_window_destroy_cb" last_modification_time="Sat, 19 Jul 2003 23:15:46 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>notebook1</name>
-      <can_focus>True</can_focus>
-      <show_tabs>True</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>False</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox2</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame1</name>
-	  <border_width>3</border_width>
-	  <label>Identification</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_vendor_window_help_cb" last_modification_time="Sat, 19 Jul 2003 23:14:50 GMT"/>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <border_width>2</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox11</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label1</name>
-		<label>Vendor Number: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label19</name>
-		<label>Company Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_check</name>
-		<can_focus>True</can_focus>
-		<label>Active</label>
-		<active>True</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_vendor_window_cancel_cb" last_modification_time="Sat, 19 Jul 2003 23:15:08 GMT"/>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox12</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>id_entry</name>
-		<width>50</width>
-		<tooltip>The vendor ID number.  If left blank a reasonable number will be chosen for you</tooltip>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>company_entry</name>
-		<width>158</width>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label26</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="gnc_vendor_window_ok_cb" last_modification_time="Sat, 19 Jul 2003 23:15:22 GMT"/>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame2</name>
-	  <border_width>3</border_width>
-	  <label>Payment Address</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+	    <widget class="GtkVBox" id="vbox2">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox3</name>
-	    <width>200</width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox5</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>3</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkFrame" id="frame1">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label3</name>
-		<label>Name: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label4</name>
-		<label>Address: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label23</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label24</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label25</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label5</name>
-		<label>Phone: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label6</name>
-		<label>Fax: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Email: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox11">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label1">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Vendor Number: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label19">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Company Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="active_check">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Active</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox12">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="id_entry">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">The vendor ID number.  If left blank a reasonable number will be chosen for you</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_vendor_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 23:16:23 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="company_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="has_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			      <signal name="changed" handler="gnc_vendor_name_changed_cb" last_modification_time="Sat, 19 Jul 2003 23:16:07 GMT"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label26">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Identification</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox6</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkFrame" id="frame2">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox5">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label3">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Name: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label4">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Address: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label24">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label25">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label5">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Phone: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label6">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Fax: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Email: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">3</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox6">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkEntry" id="name_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr1_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr2_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr3_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="addr4_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="phone_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="fax_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="email_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label27">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Payment Address</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>name_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr1_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr2_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr3_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>addr4_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>phone_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>fax_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>email_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkFrame" id="frame4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame4</name>
-	  <border_width>3</border_width>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTextView" id="notes_text">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="overwrite">False</property>
+			  <property name="accepts_tab">True</property>
+			  <property name="justification">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap_mode">GTK_WRAP_WORD</property>
+			  <property name="cursor_visible">True</property>
+			  <property name="pixels_above_lines">0</property>
+			  <property name="pixels_below_lines">0</property>
+			  <property name="pixels_inside_wrap">0</property>
+			  <property name="left_margin">0</property>
+			  <property name="right_margin">0</property>
+			  <property name="indent">0</property>
+			  <property name="text" translatable="yes"></property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <height>15</height>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
+		  <child>
+		    <widget class="GtkLabel" id="label28">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Notes</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label9</name>
-	<label>Vendor</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox13</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame3</name>
-	  <border_width>3</border_width>
-	  <label>Payment Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkLabel" id="label9">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Vendor</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox6</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox7</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label36</name>
-		<label>Currency: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label>Terms: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label34</name>
-		<label>Tax Included:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label35</name>
-		<label>Tax Table:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkVBox" id="vbox13">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox13</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkFrame" id="frame3">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>currency_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>terms_menu</name>
-		<can_focus>True</can_focus>
-		<items>(terms)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>tax_included_menu</name>
-		<can_focus>True</can_focus>
-		<items>(taxincluded)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hbox7</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>GtkCheckButton</class>
-		  <name>taxtable_button</name>
-		  <tooltip>Override the global Tax Table?</tooltip>
-		  <can_focus>True</can_focus>
-		  <label></label>
-		  <active>False</active>
-		  <draw_indicator>True</draw_indicator>
 		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+		    <widget class="GtkHBox" id="hbox6">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox7">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label36">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Currency: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label8">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Terms: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label34">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Tax Included:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label35">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Tax Table:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox13">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="currency_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="terms_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget3">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget4">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">(terms)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="tax_included_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget5">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget6">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">(taxincluded)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox7">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="taxtable_button">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Override the global Tax Table?</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes"></property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				  <signal name="toggled" handler="gnc_vendor_taxtable_check_cb" last_modification_time="Sat, 19 Jul 2003 23:16:43 GMT"/>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="taxtable_menu">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">What Tax Table should be applied to this vendor?</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">0</property>
+
+				  <child internal-child="menu">
+				    <widget class="GtkMenu" id="convertwidget7">
+				      <property name="visible">True</property>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget8">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">(taxtables)</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
 		  </child>
-		</widget>
 
-		<widget>
-		  <class>GtkOptionMenu</class>
-		  <name>taxtable_menu</name>
-		  <tooltip>What Tax Table should be applied to this vendor?</tooltip>
-		  <can_focus>True</can_focus>
-		  <items>(taxtables)
-</items>
-		  <initial_choice>0</initial_choice>
 		  <child>
-		    <padding>0</padding>
-		    <expand>True</expand>
-		    <fill>True</fill>
+		    <widget class="GtkLabel" id="label29">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Payment Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
 		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<placeholder/>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-	<widget>
-	  <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkLabel" id="label33">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Payment Information</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label33</name>
-	<label>Payment Information</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gncEntryLedgerModel.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedgerModel.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lsrc/business/business-ledger/gncEntryLedgerModel.c -Lsrc/business/business-ledger/gncEntryLedgerModel.c -u -r1.35 -r1.36
--- src/business/business-ledger/gncEntryLedgerModel.c
+++ src/business/business-ledger/gncEntryLedgerModel.c
@@ -40,12 +40,12 @@
 
 static GncEntryLedgerColors reg_colors =
 {
-  0xffffff, /* white */
-  0xffffff,
-  0xffffff,
+  0x96B183,
+  0xBFDEB9,
+  0xF6FFDA,
 
-  0xffffff,
-  0xffffff
+  0xFFEF98,
+  0xFFEF98,
 };
 
 /** Private Interfaces ***********************************************/
@@ -1197,8 +1197,3 @@
 
   return model;
 }
-
-void gnc_entry_ledger_set_colors (GncEntryLedgerColors reg_colors_new)
-{
-  reg_colors = reg_colors_new;
-}
Index: gncEntryLedgerControl.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedgerControl.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lsrc/business/business-ledger/gncEntryLedgerControl.c -Lsrc/business/business-ledger/gncEntryLedgerControl.c -u -r1.35 -r1.36
--- src/business/business-ledger/gncEntryLedgerControl.c
+++ src/business/business-ledger/gncEntryLedgerControl.c
@@ -272,7 +272,7 @@
 {
   GncEntryLedger *ledger = user_data;
   GncEntry *entry, *new_entry;
-  GNCVerifyResult result;
+  gint result;
   VirtualLocation virt_loc;
   int changed;
   char const *cell_name;
Index: gncEntryLedgerP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedgerP.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/business/business-ledger/gncEntryLedgerP.h -Lsrc/business/business-ledger/gncEntryLedgerP.h -u -r1.17 -r1.18
--- src/business/business-ledger/gncEntryLedgerP.h
+++ src/business/business-ledger/gncEntryLedgerP.h
@@ -52,6 +52,8 @@
   GncEntryLedgerType type;
 
   gboolean	is_invoice;	/* is this an invoice (or a bill)? */
+
+  const gchar * gconf_section;
 };
 
 GncEntry * gnc_entry_ledger_get_entry (GncEntryLedger *ledger,
Index: gncEntryLedger.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedger.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -Lsrc/business/business-ledger/gncEntryLedger.c -Lsrc/business/business-ledger/gncEntryLedger.c -u -r1.47 -r1.48
--- src/business/business-ledger/gncEntryLedger.c
+++ src/business/business-ledger/gncEntryLedger.c
@@ -277,6 +277,7 @@
   ledger->type = type;
   ledger->book = book;
   ledger->traverse_to_new = TRUE;
+  ledger->gconf_section = NULL;
 
   /* Orders and Invoices are "invoices" for lookups */
   switch (type) {
@@ -802,11 +803,11 @@
   if (changed) {
     const char *message = _("The current entry has been changed.\n"
 			  "Would you like to save it?");
-    GNCVerifyResult result;
+    gint result;
 
     result = gnc_ok_cancel_dialog (ledger->parent, GTK_RESPONSE_OK, message);
 
-    if (result == GTK_RESPONSE_CANCEL) {
+    if (result != GTK_RESPONSE_OK) {
       gnc_resume_gui_refresh ();
       return;
     }
@@ -841,3 +842,12 @@
 
   return ledger->query;
 }
+
+void
+gnc_entry_ledger_set_gconf_section (GncEntryLedger *ledger, const gchar *string)
+{
+  if (!ledger)
+    return;
+
+  ledger->gconf_section = string;
+}
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/business/business-ledger/Makefile.am -Lsrc/business/business-ledger/Makefile.am -u -r1.7 -r1.8
--- src/business/business-ledger/Makefile.am
+++ src/business/business-ledger/Makefile.am
@@ -17,8 +17,9 @@
   gncEntryLedgerLayout.h \
   gncEntryLedgerModel.h
 
-libgnc_business_ledger_la_LDFLAGS = -module
 libgnc_business_ledger_la_LIBADD = \
+  ${QOF_LIBS} \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   ${top_builddir}/src/register/register-core/libgncmod-register-core.la \
@@ -32,11 +33,13 @@
   -I${top_srcdir}/src/business/dialog-tax-table \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/engine \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/register/register-core \
   ${GUILE_INCS} \
   ${GLADE_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS} \
   ${GLIB_CFLAGS}
Index: gncEntryLedgerLoad.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedgerLoad.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/business/business-ledger/gncEntryLedgerLoad.c -Lsrc/business/business-ledger/gncEntryLedgerLoad.c -u -r1.34 -r1.35
--- src/business/business-ledger/gncEntryLedgerLoad.c
+++ src/business/business-ledger/gncEntryLedgerLoad.c
@@ -31,8 +31,8 @@
 #include "Account.h"
 #include "account-quickfill.h"
 #include "combocell.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui-util.h"
 #include "messages.h"
 #include "recncell.h"
@@ -408,10 +408,11 @@
 	  taxincluded = FALSE;
 	  break;
 	case GNC_TAXINCLUDED_USEGLOBAL:
-	  taxincluded = gnc_lookup_boolean_option ("Business",
-						   (ledger->is_invoice ?
-						    "Invoice Tax Included?" :
-						    "Bill Tax Included?"), FALSE);
+	  if (ledger->gconf_section) {
+	    taxincluded = gnc_gconf_get_bool(ledger->gconf_section, "tax_included", NULL);
+	  } else {
+	    taxincluded = FALSE;
+	  }
 	  break;
 	}
 
Index: gncEntryLedger.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-ledger/gncEntryLedger.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/business/business-ledger/gncEntryLedger.h -Lsrc/business/business-ledger/gncEntryLedger.h -u -r1.24 -r1.25
--- src/business/business-ledger/gncEntryLedger.h
+++ src/business/business-ledger/gncEntryLedger.h
@@ -63,12 +63,12 @@
 #define ENTRY_DISHOW_CELL	"discount-how"
 #define ENTRY_PRIC_CELL		"price"
 #define ENTRY_QTY_CELL		"quantity"
-#define ENTRY_TAXABLE_CELL	"taxable?"
+#define ENTRY_TAXABLE_CELL	"istaxable"
 #define ENTRY_TAXTABLE_CELL	"taxtable"
 #define ENTRY_TAXINCLUDED_CELL	"taxincluded"
-#define ENTRY_BILLABLE_CELL	"billable?"
+#define ENTRY_BILLABLE_CELL	"isbillable"
 
-#define ENTRY_INV_CELL		"invoiced?"
+#define ENTRY_INV_CELL		"isinvoiced"
 #define ENTRY_VALUE_CELL	"line-value"
 #define ENTRY_TAXVAL_CELL	"line-tax-val"
 
@@ -103,8 +103,6 @@
 /* Get the Table */
 Table * gnc_entry_ledger_get_table (GncEntryLedger *ledger);
 
-void gnc_entry_ledger_set_colors (GncEntryLedgerColors reg_colors_new);
-
 void gnc_entry_ledger_set_parent (GncEntryLedger *ledger, gncUIWidget parent);
 
 void gnc_entry_ledger_set_readonly (GncEntryLedger *ledger, gboolean readonly);
@@ -132,4 +130,6 @@
 
 QueryNew * gnc_entry_ledger_get_query (GncEntryLedger *ledger);
 
+void gnc_entry_ledger_set_gconf_section (GncEntryLedger *ledger, const gchar *string);
+
 #endif /* GNC_ENTRY_LEDGER_H */
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-utils/.cvsignore -Lsrc/business/business-utils/.cvsignore -u -r1.2 -r1.3
--- src/business/business-utils/.cvsignore
+++ src/business/business-utils/.cvsignore
@@ -5,3 +5,5 @@
 .scm-links
 Makefile
 Makefile.in
+.DS_Store
+
Index: business-prefs.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/business-prefs.scm,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/business/business-utils/business-prefs.scm -Lsrc/business/business-utils/business-prefs.scm -u -r1.9 -r1.10
--- src/business/business-utils/business-prefs.scm
+++ src/business/business-utils/business-prefs.scm
@@ -19,76 +19,6 @@
 ;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
 ;; Boston, MA  02111-1307,  USA       gnu at gnu.org
 
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "invoice_reg_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "bill_reg_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "voucher_reg_width" 0))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  gnc:*business-label* (N_ "Number of Rows")
-  "a" (N_ "Default number of register rows to display in Invoices.")
-   10.0 ;; default
-    1.0 ;; lower bound
-  200.0 ;; upper bound
-    0.0 ;; number of decimals
-    1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  gnc:*business-label* (N_ "Accumulate splits on Post?")
-  "f0" (N_ (string-append
-	   "Whether multiple entries in an invoice which transfer to "
-	   "the same account should be accumulated into a single split by default."
-	   "This setting can be changed in the Post dialog."))
-  #t))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  gnc:*business-label* (N_ "Invoice Tax Included?")
-  "f1" (N_ (string-append
-	   "Whether tax is included by default in entries on Invoices. "
-	   "This setting is inherited by new customers and vendors"))
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  gnc:*business-label* (N_ "Bill Tax Included?")
-  "f2" (N_ (string-append
-	   "Whether tax is included by default in entries on Bills. "
-	   "This setting is inherited by new customers and vendors"))
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-complex-boolean-option
-  gnc:*business-label* (N_ "Notify Bills Due?")
-  "g" (N_ "Whether to display the list of Bills Due at startup.")
-  #t #f
-  (lambda (x) (gnc:set-option-selectable-by-name gnc:*business-label*
-						 "Bills Due Days"
-						 x))
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  gnc:*business-label* (N_ "Bills Due Days")
-  "h" (N_ "How many days in the future to warn about Bills coming due.")
-    7.0 ;; default
-    1.0 ;; lower bound
-  180.0 ;; upper bound
-    0.0 ;; number of decimals
-    1.0 ;; step size
-  ))
-
-
 (define (book-options-generator options)
   (define (reg-option new-option)
     (gnc:register-option options new-option))
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/business/business-utils/Makefile.am -Lsrc/business/business-utils/Makefile.am -u -r1.3 -r1.4
--- src/business/business-utils/Makefile.am
+++ src/business/business-utils/Makefile.am
@@ -9,7 +9,8 @@
   ${G_WRAP_COMPILE_ARGS} \
   ${GUILE_INCS} \
   ${GLIB_CFLAGS} \
-  ${GNOME_INCLUDEDIR}
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS}
 
 libgncmod_business_utils_la_SOURCES = \
   gncmod-business-utils.c \
@@ -18,10 +19,10 @@
 noinst_HEADERS = \
   business-options.h
 
-libgncmod_business_utils_la_LDFLAGS = -module
 libgncmod_business_utils_la_LIBADD = \
   ${GUILE_LIBS} \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   ${EFENCE_LIBS}
 
 # Guile Modules
Index: business-options.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/business-utils/business-options.scm,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/business/business-utils/business-options.scm -Lsrc/business/business-utils/business-options.scm -u -r1.2 -r1.3
--- src/business/business-utils/business-options.scm
+++ src/business/business-utils/business-options.scm
@@ -58,7 +58,7 @@
                 (value-validator (convert-to-invoice invoice))))))
     (gnc:make-option
      section name sort-tag 'invoice documentation-string getter
-     (lambda (invoice)
+     (lambda (invoice) ;; setter
        (if (not invoice) (set! invoice (default-getter)))
        (set! invoice (convert-to-invoice invoice))
        (let* ((result (validator invoice))
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/dialog-tax-table/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/business/dialog-tax-table/.cvsignore -Lsrc/business/dialog-tax-table/.cvsignore -u -r1.1 -r1.2
--- src/business/dialog-tax-table/.cvsignore
+++ src/business/dialog-tax-table/.cvsignore
@@ -1,3 +1,4 @@
+*.gladep
 *.la
 *.lo
 .deps
Index: tax-tables.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/dialog-tax-table/tax-tables.glade,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/business/dialog-tax-table/tax-tables.glade -Lsrc/business/dialog-tax-table/tax-tables.glade -u -r1.4 -r1.5
--- src/business/dialog-tax-table/tax-tables.glade
+++ src/business/dialog-tax-table/tax-tables.glade
@@ -1,597 +1,748 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Tax Tables</name>
-  <program_name>tax-tables</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Tax Table Window</name>
-  <width>500</width>
-  <height>300</height>
-  <title>Tax Tables</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+<widget class="GtkDialog" id="Tax Table Window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Tax Tables</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="tax_table_window_destroy_cb" last_modification_time="Mon, 08 Sep 2003 03:25:07 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="tax_table_window_close" last_modification_time="Mon, 08 Sep 2003 03:24:35 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<border_width>1</border_width>
-	<label>Tax Tables</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox1</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>tax_tables_clist</name>
-	      <can_focus>True</can_focus>
-	      <columns>1</columns>
-	      <column_widths>80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>False</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label1</name>
-		<label>label1</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkHPaned" id="hpaned1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox2</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>new_table_button</name>
-	      <can_focus>True</can_focus>
-	      <label>New...</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+		<widget class="GtkVBox" id="vbox1">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>delete_table_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Delete</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="tax_tables_clist">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">1</property>
+			  <property name="column_widths">80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">False</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <signal name="select_row" handler="tax_table_row_selected" last_modification_time="Mon, 08 Sep 2003 03:31:16 GMT"/>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame2</name>
-	<border_width>1</border_width>
-	<label>Tax Table Entries</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox2</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow2</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>tax_table_entries</name>
-	      <can_focus>True</can_focus>
-	      <columns>2</columns>
-	      <column_widths>80,80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>False</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8</name>
-		<label>label8</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label9</name>
-		<label>label9</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="new_table_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">New...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="tax_table_new_table_cb" last_modification_time="Mon, 08 Sep 2003 03:32:06 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="delete_table_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Delete</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="tax_table_delete_table_cb" last_modification_time="Mon, 08 Sep 2003 03:31:56 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox3</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>new_entry_button</name>
-	      <can_focus>True</can_focus>
-	      <label>New...</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tax Tables</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
+	    <packing>
+	      <property name="shrink">True</property>
+	      <property name="resize">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="border_width">1</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>edit_entry_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Edit...</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkVBox" id="vbox2">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow2">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="tax_table_entries">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">1</property>
+			  <property name="column_widths">80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">False</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <signal name="select_row" handler="tax_table_entry_row_selected" last_modification_time="Mon, 08 Sep 2003 03:31:06 GMT"/>
+
+			  <child>
+			    <widget class="GtkLabel" id="label23">
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="new_entry_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">New...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="tax_table_new_entry_cb" last_modification_time="Mon, 08 Sep 2003 03:31:47 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="edit_entry_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Edit...</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="tax_table_edit_entry_cb" last_modification_time="Mon, 08 Sep 2003 03:31:36 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="delete_entry_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Delete</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="tax_table_delete_entry_cb" last_modification_time="Mon, 08 Sep 2003 03:31:26 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>delete_entry_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Delete</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tax Table Entries</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="shrink">True</property>
+	      <property name="resize">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>New Tax Table Dialog</name>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="New Tax Table Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox3</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>table_frame</name>
-	<border_width>2</border_width>
-	<label>Tax Table</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label5</name>
-	    <label>Name: </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>name_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="table_frame">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame4</name>
-	<border_width>3</border_width>
-	<label>Tax Table Entry</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox4</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox5</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox5</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label5">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Name: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="name_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label6</name>
-		<label>Type: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label7</name>
-		<label>Value: </label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label10">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tax Table</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame4">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox6</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+		<widget class="GtkVBox" id="vbox4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>hbox7</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkOptionMenu</class>
-		  <name>type_menu</name>
-		  <can_focus>True</can_focus>
-		  <items>Value ($)
-Percent (%)
-</items>
-		  <initial_choice>1</initial_choice>
 		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+		    <widget class="GtkHBox" id="hbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox5">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label6">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Type: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Value: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox6">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox7">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="type_menu">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">0</property>
+
+				  <child internal-child="menu">
+				    <widget class="GtkMenu" id="convertwidget5">
+				      <property name="visible">True</property>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget6">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Value ($)</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget7">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Percent (%)</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="amount_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
 		  </child>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>amount_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
 
-		<widget>
-		  <class>Placeholder</class>
+		  <child>
+		    <widget class="GtkFrame" id="account_frame">
+		      <property name="border_width">4</property>
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="acct_window">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_NONE</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label12">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Tax Account</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
+	      </child>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>account_frame</name>
-	    <border_width>4</border_width>
-	    <label>Tax Account</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_NONE</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>acct_window</name>
-	      <width>150</width>
-	      <height>100</height>
-	      <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label11">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tax Table Entry</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: dialog-tax-table.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/dialog-tax-table/dialog-tax-table.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/business/dialog-tax-table/dialog-tax-table.c -Lsrc/business/dialog-tax-table/dialog-tax-table.c -u -r1.9 -r1.10
--- src/business/dialog-tax-table/dialog-tax-table.c
+++ src/business/dialog-tax-table/dialog-tax-table.c
@@ -26,14 +26,13 @@
 #include <gnome.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h"
 #include "gnc-amount-edit.h"
-#include "gnc-account-tree.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-numeric.h"
 
 #include "gncTaxTable.h"
@@ -41,6 +40,19 @@
 
 #define DIALOG_TAX_TABLE_CM_CLASS "tax-table-dialog"
 
+void tax_table_new_table_cb (GtkButton *button, TaxTableWindow *ttw);
+void tax_table_delete_table_cb (GtkButton *button, TaxTableWindow *ttw);
+void tax_table_new_entry_cb (GtkButton *button, TaxTableWindow *ttw);
+void tax_table_edit_entry_cb (GtkButton *button, TaxTableWindow *ttw);
+void tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw);
+void tax_table_row_selected (GtkCList *clist, gint row, gint column,
+			     GdkEventButton *event, gpointer user_data);
+void tax_table_entry_row_selected (GtkCList *clist, gint row, gint column,
+				   GdkEventButton *event, gpointer user_data);
+void tax_table_window_close (GtkWidget *widget, gpointer data);
+void tax_table_window_destroy_cb (GtkWidget *widget, gpointer data);
+
+
 struct _taxtable_window {
   GtkWidget *	dialog;
   GtkWidget *	names_clist;
@@ -66,17 +78,16 @@
 } NewTaxTable;
 
 
-static void
-new_tax_table_ok_cb (GtkWidget *widget, gpointer data)
+static gboolean
+new_tax_table_ok_cb (NewTaxTable *ntt)
 {
-  NewTaxTable *ntt = data;
   TaxTableWindow *ttw;
-  char *name = NULL;
+  const char *name = NULL;
   char *message;
   Account *acc;
   gnc_numeric amount;
 
-  g_return_if_fail (ntt);
+  g_return_val_if_fail (ntt, FALSE);
   ttw = ntt->ttw;
 
   /* Verify that we've got real, valid data */
@@ -87,7 +98,7 @@
     if (name == NULL || *name == '\0') {
       message = _("You must provide a name for this Tax Table.");
       gnc_error_dialog (ntt->dialog, message);
-      return;
+      return FALSE;
     }
     if (gncTaxTableLookupByName (ttw->book, name)) {
       message = g_strdup_printf(_(
@@ -95,7 +106,7 @@
 			 "Your choice \"%s\" is already in use."), name);
       gnc_error_dialog (ntt->dialog, "%s", message);
       g_free (message);
-      return;
+      return FALSE;
     }
   }
 
@@ -104,23 +115,22 @@
   if (gnc_numeric_negative_p (amount)) {
     message = _("Negative amounts are not allowed.");
     gnc_error_dialog (ntt->dialog, message);
-    return;
+    return FALSE;
   }
   if (ntt->type == GNC_AMT_TYPE_PERCENT &&
       gnc_numeric_compare (amount,
 			   gnc_numeric_create (100, 1)) > 0) {
     message = _("Percentage amount must be between 0 and 100.");
     gnc_error_dialog (ntt->dialog, message);
-    return;
+    return FALSE;
   }							   
 
   /* verify the account */
-  acc =
-    gnc_account_tree_get_current_account (GNC_ACCOUNT_TREE (ntt->acct_tree));
+  acc = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(ntt->acct_tree));
   if (acc == NULL) {
     message = _("You must choose a Tax Account.");
     gnc_error_dialog (ntt->dialog, message);
-    return;
+    return FALSE;
   }
 
   gnc_suspend_gui_refresh ();
@@ -158,26 +168,7 @@
   gncTaxTableCommitEdit (ttw->current_table);
 
   gnc_resume_gui_refresh();
-
-  /* Then close/refresh the dialog/window */
-  gnome_dialog_close (GNOME_DIALOG (ntt->dialog));
-}
-
-static void
-new_tax_table_cancel_cb (GtkWidget *widget, gpointer data)
-{
-  NewTaxTable *ntt = data;
-  g_return_if_fail (ntt);
-  gnome_dialog_close (GNOME_DIALOG (ntt->dialog));
-}
-
-static void
-new_tax_table_dialog_destroy_cb (GtkWidget *widget, gpointer data)
-{
-  NewTaxTable *ntt = data;
-
-  if (!ntt) return;
-  g_free (ntt);
+  return TRUE;
 }
 
 static void
@@ -195,8 +186,8 @@
   GtkWidget *item;
 
   item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", GINT_TO_POINTER (type));
-  gtk_signal_connect (GTK_OBJECT (item), "activate", optionmenu_changed, ntt);
+  g_object_set_data (G_OBJECT (item), "option", GINT_TO_POINTER (type));
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (optionmenu_changed), ntt);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -215,19 +206,22 @@
 
   gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT ((current == GNC_AMT_TYPE_VALUE-1 ?
+  g_signal_emit_by_name (G_OBJECT ((current == GNC_AMT_TYPE_VALUE-1 ?
 					value : percent)), "activate", ntt);
   gtk_option_menu_set_history (GTK_OPTION_MENU (omenu), current);
   return menu;
 }
 
-static NewTaxTable *
+static GncTaxTable *
 new_tax_table_dialog (TaxTableWindow *ttw, gboolean new_table,
-		      GncTaxTableEntry *entry)
+		      GncTaxTableEntry *entry, const char *name)
 {
+  GncTaxTable *created_table = NULL;
   NewTaxTable *ntt;
   GladeXML *xml;
   GtkWidget *box, *widget;
+  gboolean done;
+  gint response;
 
   if (!ttw) return NULL;
   if (new_table && entry) return NULL;
@@ -246,6 +240,8 @@
   xml = gnc_glade_xml_new ("tax-tables.glade", "New Tax Table Dialog");
   ntt->dialog = glade_xml_get_widget (xml, "New Tax Table Dialog");
   ntt->name_entry = glade_xml_get_widget (xml, "name_entry");
+  if (name)
+    gtk_entry_set_text (GTK_ENTRY (ntt->name_entry), name);
 
   /* Create the menu */
   make_menu (glade_xml_get_widget (xml, "type_menu"), ntt);
@@ -258,42 +254,30 @@
   gtk_box_pack_start (GTK_BOX (box), widget, TRUE, TRUE, 0);
 
   box = glade_xml_get_widget (xml, "acct_window");
-  ntt->acct_tree = widget = gnc_account_tree_new ();
-  gtk_clist_column_titles_hide (GTK_CLIST (widget));
-  gnc_account_tree_hide_all_but_name (GNC_ACCOUNT_TREE (widget));
-  gtk_container_add (GTK_CONTAINER (box), widget);
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(ntt->acct_tree));
+  ntt->acct_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
+  gtk_container_add (GTK_CONTAINER (box), ntt->acct_tree);
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(ntt->acct_tree), FALSE);
 
   /* Make 'enter' do the right thing */
-  gnome_dialog_set_default (GNOME_DIALOG (ntt->dialog), 0);
-  gnome_dialog_editable_enters (GNOME_DIALOG (ntt->dialog),
-				GTK_EDITABLE (ntt->name_entry));
-  gnome_dialog_editable_enters (GNOME_DIALOG (ntt->dialog),
-				GTK_EDITABLE (gnc_amount_edit_gtk_entry
-					      (GNC_AMOUNT_EDIT (ntt->amount_entry))));
-
-  /* Connect the dialog buttons */
-  gnome_dialog_button_connect (GNOME_DIALOG (ntt->dialog), 0,
-			       new_tax_table_ok_cb, ntt);
-
-  gnome_dialog_button_connect (GNOME_DIALOG (ntt->dialog), 1,
-			       new_tax_table_cancel_cb, ntt);
+  gtk_entry_set_activates_default(GTK_ENTRY (gnc_amount_edit_gtk_entry
+					     (GNC_AMOUNT_EDIT (ntt->amount_entry))),
+				  TRUE);
 
   /* Fill in the widgets appropriately */
   if (entry) {
     gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (ntt->amount_entry),
 				gncTaxTableEntryGetAmount (entry));
-    gnc_account_tree_select_account (GNC_ACCOUNT_TREE (ntt->acct_tree),
-				     gncTaxTableEntryGetAccount (entry), TRUE);
+    gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT (ntt->acct_tree),
+						gncTaxTableEntryGetAccount (entry));
   }
 
-  /* Set our modality */
-  gnome_dialog_set_parent (GNOME_DIALOG (ntt->dialog),
-			   GTK_WINDOW (ttw->dialog));
-  gtk_window_set_modal (GTK_WINDOW (ntt->dialog), TRUE);
+  /* Set our parent */
+  gtk_window_set_transient_for (GTK_WINDOW(ntt->dialog), GTK_WINDOW(ttw->dialog));
 
-  gtk_signal_connect (GTK_OBJECT (ntt->dialog), "destroy",
-		      new_tax_table_dialog_destroy_cb, ntt);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ntt);
 
   /* Show what we should */
   gtk_widget_show_all (ntt->dialog);
@@ -305,7 +289,26 @@
   } else
     gtk_widget_grab_focus (ntt->name_entry);
 
-  return ntt;
+  done = FALSE;
+  while (!done) {
+    response = gtk_dialog_run (GTK_DIALOG (ntt->dialog));
+    switch (response) {
+     case GTK_RESPONSE_OK:
+      if (new_tax_table_ok_cb (ntt)) {
+	created_table = ntt->created_table;
+	done = TRUE;
+      }
+      break;
+     default:
+      done = TRUE;
+      break;
+    }
+  }
+
+  gtk_widget_destroy(ntt->dialog);
+  g_free(ntt);
+
+  return created_table;
 }
 
 /***********************************************************************/
@@ -471,7 +474,7 @@
   /* select_row() above will refresh the entries window */
 }
 
-static void
+void
 tax_table_row_selected (GtkCList *clist, gint row, gint column,
 			GdkEventButton *event, gpointer user_data)
 {
@@ -490,7 +493,7 @@
   tax_table_entries_refresh (ttw, TRUE);
 }
 
-static void
+void
 tax_table_entry_row_selected (GtkCList *clist, gint row, gint column,
 			      GdkEventButton *event, gpointer user_data)
 {
@@ -504,17 +507,17 @@
 
   /* If we double-click an item, then pop up an 'edit' window */
   if (event && event->type == GDK_2BUTTON_PRESS)
-    new_tax_table_dialog (ttw, FALSE, entry);
+    new_tax_table_dialog (ttw, FALSE, entry, NULL);
 }
 
-static void
+void
 tax_table_new_table_cb (GtkButton *button, TaxTableWindow *ttw)
 {
   g_return_if_fail (ttw);
-  new_tax_table_dialog (ttw, TRUE, NULL);
+  new_tax_table_dialog (ttw, TRUE, NULL, NULL);
 }
 
-static void
+void
 tax_table_delete_table_cb (GtkButton *button, TaxTableWindow *ttw)
 {
   g_return_if_fail (ttw);
@@ -543,25 +546,25 @@
   }
 }
 
-static void
+void
 tax_table_new_entry_cb (GtkButton *button, TaxTableWindow *ttw)
 {
   g_return_if_fail (ttw);
   if (!ttw->current_table)
     return;
-  new_tax_table_dialog (ttw, FALSE, NULL);
+  new_tax_table_dialog (ttw, FALSE, NULL, NULL);
 }
 
-static void
+void
 tax_table_edit_entry_cb (GtkButton *button, TaxTableWindow *ttw)
 {
   g_return_if_fail (ttw);
   if (!ttw->current_entry)
     return;
-  new_tax_table_dialog (ttw, FALSE, ttw->current_entry);
+  new_tax_table_dialog (ttw, FALSE, ttw->current_entry, NULL);
 }
 
-static void
+void
 tax_table_delete_entry_cb (GtkButton *button, TaxTableWindow *ttw)
 {
   g_return_if_fail (ttw);
@@ -603,10 +606,11 @@
 {
   TaxTableWindow *ttw = data;
   g_return_if_fail (ttw);
-  gnome_dialog_close (GNOME_DIALOG (ttw->dialog));
+
+  gtk_widget_destroy (ttw->dialog);
 }
 
-static void
+void
 tax_table_window_close (GtkWidget *widget, gpointer data)
 {
   TaxTableWindow *ttw = data;
@@ -614,7 +618,7 @@
   gnc_ui_tax_table_window_destroy (ttw);
 }
 
-static void
+void
 tax_table_window_destroy_cb (GtkWidget *widget, gpointer data)
 {
   TaxTableWindow *ttw = data;
@@ -641,7 +645,6 @@
 {
   TaxTableWindow *ttw;
   GladeXML *xml;
-  GtkWidget *button;
 
   if (!book) return NULL;
 
@@ -667,35 +670,10 @@
   ttw->names_clist = glade_xml_get_widget (xml, "tax_tables_clist");
   ttw->entries_clist = glade_xml_get_widget (xml, "tax_table_entries");
 
-  /* Connect all the buttons */
-  button = glade_xml_get_widget (xml, "new_table_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      tax_table_new_table_cb, ttw);
-  button = glade_xml_get_widget (xml, "delete_table_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      tax_table_delete_table_cb, ttw);
-  button = glade_xml_get_widget (xml, "new_entry_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      tax_table_new_entry_cb, ttw);
-  button = glade_xml_get_widget (xml, "edit_entry_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      tax_table_edit_entry_cb, ttw);
-  button = glade_xml_get_widget (xml, "delete_entry_button");
-  gtk_signal_connect (GTK_OBJECT (button), "clicked",
-		      tax_table_delete_entry_cb, ttw);
-
-  /* Set the row-select callbacks */
-  gtk_signal_connect (GTK_OBJECT (ttw->names_clist), "select-row",
-		      tax_table_row_selected, ttw);
-  gtk_signal_connect (GTK_OBJECT (ttw->entries_clist), "select-row",
-		      tax_table_entry_row_selected, ttw);
-
-  /* Connect the dialog buttons */
-  gnome_dialog_button_connect (GNOME_DIALOG (ttw->dialog), 0,
-			       tax_table_window_close, ttw);
-
-  gtk_signal_connect (GTK_OBJECT (ttw->dialog), "destroy",
-		      tax_table_window_destroy_cb, ttw);
+  /* Setup signals */
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     ttw);
 
   /* register with component manager */
   ttw->component_id =
@@ -719,49 +697,16 @@
   gnc_close_gui_component (ttw->component_id);
 }
 
-static int
-from_name_close_cb (GnomeDialog *dialog, gpointer data)
-{
-  NewTaxTable *ntt;
-  GncTaxTable **created_table = data;
-
-  ntt = gtk_object_get_data (GTK_OBJECT (dialog), "dialog_info");
-
-  *created_table = ntt->created_table;
-
-  gtk_main_quit ();
-
-  return FALSE;
-}
-
 /* Create a new tax-table by name */
 GncTaxTable *
 gnc_ui_tax_table_new_from_name (GNCBook *book, const char *name)
 {
-  GncTaxTable *created_table = NULL;
   TaxTableWindow *ttw;
-  NewTaxTable *ntt;
 
   if (!book) return NULL;
 
   ttw = gnc_ui_tax_table_window_new (book);
   if (!ttw) return NULL;
 
-  ntt = new_tax_table_dialog (ttw, TRUE, NULL);
-  if (!ntt) return NULL;
-
-  gtk_object_set_data (GTK_OBJECT (ntt->dialog), "dialog_info", ntt);
-  gtk_signal_connect (GTK_OBJECT (ntt->dialog), "close",
-		      GTK_SIGNAL_FUNC (from_name_close_cb), &created_table);
-
-  /* Preset the name in the new dialog */
-  if (name)
-    gtk_entry_set_text (GTK_ENTRY (ntt->name_entry), name);
-
-  /* I know that NTT is already modal, no need to reset it here */
-
-  /* Now run the dialog -- wait for it to close */
-  gtk_main ();
-
-  return created_table;
+  return new_tax_table_dialog (ttw, TRUE, NULL, name);
 }
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/business/dialog-tax-table/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/business/dialog-tax-table/Makefile.am -Lsrc/business/dialog-tax-table/Makefile.am -u -r1.6 -r1.7
--- src/business/dialog-tax-table/Makefile.am
+++ src/business/dialog-tax-table/Makefile.am
@@ -4,17 +4,19 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/business/business-core \
   ${GNOME_PRINT_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${G_WRAP_COMPILE_ARGS} \
   ${GUILE_INCS}
 
@@ -26,19 +28,19 @@
   dialog-tax-table.h \
   gw-dialog-tax-table.h
 
-libgncmod_dialog_tax_table_la_LDFLAGS = -module
-
 libgncmod_dialog_tax_table_la_LIBADD = \
   ../../gnc-module/libgncmodule.la \
+  ../../core-utils/libcore-utils.la \
   ${GUILE_LIBS} \
-  ${GNOME_LIBDIR} \
-  ${GNOMEUI_LIBS} \
+  ${GNOME_LIBS} \
   ${G_WRAP_LINK_ARGS} \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   ${EFENCE_LIBS}
 
 libgw_dialog_tax_table_la_SOURCES = gw-dialog-tax-table.c
-libgw_dialog_tax_table_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
+
+libgw_dialog_tax_table_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
 
 gwmoddir = ${GNC_GWRAP_LIBDIR}
 gwmod_DATA = \
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/calculation/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/calculation/Makefile.am -Lsrc/calculation/Makefile.am -u -r1.13 -r1.14
--- src/calculation/Makefile.am
+++ src/calculation/Makefile.am
@@ -2,8 +2,9 @@
 
 pkglib_LTLIBRARIES = libgncmod-calculation.la
 
-libgncmod_calculation_la_LDFLAGS = -module
-libgncmod_calculation_la_LIBADD = ${GLIB_LIBS} ${GUILE_LIBS}
+libgncmod_calculation_la_LIBADD = \
+  ${GLIB_LIBS} ${GUILE_LIBS} \
+  ${QOF_LIBS}
 
 libgncmod_calculation_la_SOURCES = \
   expression_parser.c \
@@ -30,4 +31,5 @@
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
Index: expression_parser.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/calculation/expression_parser.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/calculation/expression_parser.c -Lsrc/calculation/expression_parser.c -u -r1.16 -r1.17
--- src/calculation/expression_parser.c
+++ src/calculation/expression_parser.c
@@ -387,7 +387,7 @@
 
 #include <glib.h>
 
-#include "../engine/gnc-numeric.h"
+#include "qof.h"
 
 #define EXPRESSION_PARSER_STATICS
 #include "finvar.h"
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/calculation/test/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/calculation/test/Makefile.am -Lsrc/calculation/test/Makefile.am -u -r1.2 -r1.3
--- src/calculation/test/Makefile.am
+++ src/calculation/test/Makefile.am
@@ -3,4 +3,7 @@
 noinst_PROGRAMS=test-link
 
 test_link_SOURCES=test-link.c
-test_link_LDADD=../libgncmod-calculation.la ${GLIB_LIBS}
+test_link_LDADD= \
+  ../libgncmod-calculation.la \
+  ${GLIB_LIBS} \
+  -lgmodule-2.0
--- src/core-utils/core-utils.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/********************************************************************\
- * File: core-utils.h
- *
- * Copyright (C) 2001 Linux Developers Group
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
-\********************************************************************/
-
-#ifndef GNC_CORE_UTILS_H
-#define GNC_CORE_UTILS_H
-
-#include "config.h"
-
-/* gnc_setenv() papers over the brokenness of of systems that only
- * have putenv() which takes ownership of the pointer you give it,
- * making it *very* difficult, if not impossible to avoid memory
- * leaks.  Note that right now, on systems that have setenv, this is
- * just setenv, and on other systems, we just leave the memory leak.
- * Later, we may try to make things a little better by keeping track
- * of the pointers we call putenv on in a hash table and if someone
- * calls gnc_setenv on an envt var that we've previously set, then
- * we'll free it after the change.  However, given the sloppy
- * semantics (or docs) for putenv, it's not even clear that this is
- * OK, since it's not clear that people aren't allowed to keep the
- * pointer from getenv around, as long as they don't try to modify
- * it... <shrug> */
-#ifdef HAVE_SETENV
-
-#define gnc_setenv setenv
-#define gnc_unsetenv unsetenv
-
-#elif defined HAVE_PUTENV
-
-int gnc_setenv(const char *name, const char *value, int overwrite);
-int gnc_unsetenv(const char *name);
-
-#else
-#error "Must have setenv or putenv."
-#endif
-
-#endif
Index: gw-core-utils-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/core-utils/gw-core-utils-spec.scm,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/core-utils/gw-core-utils-spec.scm -Lsrc/core-utils/gw-core-utils-spec.scm -u -r1.2 -r1.3
--- src/core-utils/gw-core-utils-spec.scm
+++ src/core-utils/gw-core-utils-spec.scm
@@ -6,16 +6,32 @@
 (define-module (g-wrapped gw-core-utils-spec))
 
 (use-modules (g-wrap))
+(use-modules (g-wrap simple-type))
 
-(display "**** NOTE: this wrapset appears to be empty !?\n")
+(use-modules (g-wrap gw-standard-spec))
+(use-modules (g-wrap gw-wct-spec))
+(use-modules (g-wrap gw-glib-spec))
 
 (let ((ws (gw:new-wrapset "gw-core-utils")))
 
+  (gw:wrapset-depends-on ws "gw-standard")
+  (gw:wrapset-depends-on ws "gw-wct")
+  (gw:wrapset-depends-on ws "gw-glib")
+
   (gw:wrapset-set-guile-module! ws '(g-wrapped gw-core-utils))
 
   (gw:wrapset-add-cs-declarations!
    ws
    (lambda (wrapset client-wrapset)
-     (if client-wrapset
-         '()
-         "#include <core-utils.h>\n"))))
+     (list
+      "#include <gnc-gconf-utils.h>\n")))
+
+  (gw:wrap-function
+   ws
+   'gnc:gconf-get-bool
+   '<gw:bool>
+   "gnc_gconf_get_bool_no_error"
+   '(((<gw:mchars> caller-owned) section)
+     ((<gw:mchars> caller-owned) name))
+   "Get a boolean value from gconf.")
+)
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/core-utils/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/core-utils/Makefile.am -Lsrc/core-utils/Makefile.am -u -r1.7 -r1.8
--- src/core-utils/Makefile.am
+++ src/core-utils/Makefile.am
@@ -1,24 +1,45 @@
 
 lib_LTLIBRARIES = libcore-utils.la libgw-core-utils.la
 
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-core-utils-spec.scm gw-core-utils.scm
-
-libcore_utils_la_SOURCES = core-utils.c
-libcore_utils_la_LDFLAGS = -module ${GLIB_LIBS}
-libcore_utils_la_LIBADD =
-
-libgw_core_utils_la_SOURCES = gw-core-utils.c
-libgw_core_utils_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS} ${GUILE_LIBS}
-libgw_core_utils_la_LIBADD = libcore-utils.la
+libcore_utils_la_SOURCES = \
+  gnc-gconf-utils.c \
+  gnc-gdate-utils.c \
+  gnc-gkeyfile-utils.c \
+  gnc-gobject-utils.c
+
+libcore_utils_la_LIBADD = \
+  ${top_builddir}/lib/glib26/libgncglib.la \
+  ${GLIB_LIBS} \
+  ${GCONF_LIBS} \
+  ${GTK_LIBS}
+
+libgw_core_utils_la_SOURCES = \
+  gw-core-utils.c
+
+libgw_core_utils_la_LDFLAGS = ${G_WRAP_LINK_ARGS}
+libgw_core_utils_la_LIBADD = \
+  libcore-utils.la \
+  ${GUILE_LIBS}
 
 noinst_HEADERS = \
-  core-utils.h \
+  gnc-gconf-utils.h \
+  gnc-gdate-utils.h \
+  gnc-gkeyfile-utils.h \
+  gnc-gobject-utils.h \
   gw-core-utils.h
 
 EXTRA_DIST = .cvsignore ${gwmod_DATA}
 
-AM_CFLAGS = ${G_WRAP_COMPILE_ARGS} ${GLIB_CFLAGS} ${GUILE_INCS}
+AM_CFLAGS = \
+  -I${top_srcdir}/lib/glib26 \
+  ${G_WRAP_COMPILE_ARGS} \
+  ${GUILE_INCS} \
+  ${GLIB_CFLAGS} \
+  ${GCONF_CFLAGS} \
+  ${GTK_CFLAGS}
+
+gwmoddir = ${GNC_GWRAP_LIBDIR}
+gwmod_DATA = gw-core-utils-spec.scm gw-core-utils.scm
 
 if GNUCASH_SEPARATE_BUILDDIR
 #Only needed when srcdir and builddir are different
--- src/core-utils/core-utils.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/********************************************************************\
- * File: core-utils.c
- *
- * Copyright (C) 2001 Linux Developers Group
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
-\********************************************************************/
-
-#include <glib.h>
-
-#include "core-utils.h"
-
-#include <stdlib.h>
-#include <string.h>
-
-/********************************************************************\
- * see header for info.
-\********************************************************************/
-
-#ifndef HAVE_SETENV
-
-int
-gnc_setenv(const char *name, const char *value, int overwrite)
-{
-  const char *old_value = getenv(name);
-  int result = 0;
-
-  if ((name == NULL) || (value == NULL)) return -1;
-
-  if(overwrite || (!old_value))
-  {
-    char *new_value = g_strdup_printf("%s=%s", name, value);
-    if(putenv(new_value) != 0) result = -1;
-    if(old_value)
-    {
-      /* for now, do nothing, but it would be nice if we could figure
-         out a safe way to reclaim any memory that *we* allocated,
-         taking in to account whether or not other code (in other
-         system libs) is allowed to have cached a pointer into the
-         value via getenv -- is that kosher?
-         
-         Also we have to *know* that we allocated the memory.
-      */
-    }
-  }
-  return result;
-}
-
-int
-gnc_unsetenv(const char *name)
-{
-  int result = 0;
-  char *putenv_str;
-  
-  if(name == NULL) return -1;
-  if(strchr(name, '=') != NULL) return -1;
-  if(*name == '\0') return -1;
-  
-  putenv_str = g_strdup_printf("%s=", name);
-  if(!putenv_str) return -1;
-
-  result = putenv(putenv_str);
-  g_free(putenv_str);
-  return result;
-}
-
-#endif
--- src/doc/gnc-commodity.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-README.gnc-commodity
-
-Bill Gribble <grib at billgribble.com> 
-2 Aug 2000
-
-gnc-commodity : a representation of currencies, stocks, and other
-tradable commodities.
-
-
-
Index: doxygen_main_page.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/doxygen_main_page.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/doc/doxygen_main_page.c -Lsrc/doc/doxygen_main_page.c -u -r1.3 -r1.4
--- src/doc/doxygen_main_page.c
+++ src/doc/doxygen_main_page.c
@@ -1,55 +1,183 @@
+/** \mainpage GnuCash design and developer's reference
 
-/*! \mainpage GnuCash design and developer's reference
-  
-\section intro Introduction
-
-This is the new GnuCash developer and design manual for GnuCash.
-Previous documentation will slowly be integrated into this, and
-eventually it should always be up to date since it is generated
-directly from the source files using Doxygen.
-
-\section hacking Hacking on this documentation
-
-I will eventually post a style guide for documenting, and document one
-of the files "by the book".  Until then, feel free to start
-documenting or playing with doxygen configuration. This main page can
-be found in src/doc/doxygen_main_page.c .
-
-\subsection style_discussion Style discussion
-
-[cstim 2003-03-25] It's too bad that doxygen doesn't show the "Member
-Groups" (those created on-the-fly with @{ and @}) inside the Module
-pages (named groups, created with \\addtogroup). This means that the
-"member group" grouping of the account-related functions is only shown
-in the documentation of the Account.h header file. But in the
-documentation of the Engine group (module) all these functions are
-lumped together into one unreadable long list. This is bad (because
-1. nobody will read through the long list, 2. hyperlinks don't even
-work properly since the document is simply too big). Isn't there a way
-to have this member groups also show up on the module pages...? 
-Unfortunately nesting several named modules (groups) into one another
-doesn't really solve this problem, because that way all
-account-related functions will show up in one separate group each --
-which makes these unreadable as well. Maybe it would even be better to
-not have these function names show up on the module page at all. If
-they appear *only* on the file page, they will show up in their
-respective "member group" grouping and everything would be fine.
+This is the new developer and design manual for GnuCash.
 
-[cstim 2003-03-25] The "Data Structures" page of doxygen doesn't show
-anything useful for gnucash. Obviously doxygen only accepts "real" C
-struct definitions for inclusion on that page. However, all gnucash
-data structures are defined somewhere in private headers, and only the
-typedefs are publically visible. Isn't there a way to have doxygen
-show the documentation for the <i>typedefs</i> on the "Data
-Structures" page? Unfortunately I don't know how.
+\section maindocs Documentation Sections.
 
-[cstim 2003-03-25] This mainpage file should at some time be moved to
-a file name ending in .txt or even .html. It's a PITA to edit one huge
-C comment. All text editors will run amok sooner or later (well,
-XEmacs does :) and will not support proper HTML markup and editing
-inside this C comment... well, that's not really a problem of the
-outcome, yes. It would just make life easier for editing this
-non-source file.
+The documentation is organised in a rough sequence:
+
+-# \ref manualguide Start with the main GnuCash manual.
+-# \ref texihtml Design overview.
+-# \ref doxylist Individual topic overviews, linked into the
+	full API reference for each topic, generated from source code.
+-# \ref maingeneral How to work with Doxygen in your own code.
+
+\subsection manualguide External documentation.
+
+Please refer to the main 
+<a href="http://www.gnucash.org/en/docs.phtml">documentation
+page</a> on the gnucash website which includes links to the 
+GnuCash Manual and the Concepts Guide in various formats.
+
+\subsection texihtml Documentation elsewhere in the source tree.
+
+See also <a href="http://code.neil.williamsleesmill.me.uk/texi/gnucash-design.html">
+GnuCash Design Overview</a> which can be generated from the source using texi2html
+from the texinfo files in src/doc/design.
+
+The <a href="http://code.neil.williamsleesmill.me.uk/finutil.html">
+Financial Transaction Utility</a> documentation is not compatible with Doxygen.
+
+\section doxylist Doxygen overviews.
+
+Where possible, each overview is dated - take care to review older texts
+in relation to existing code.
+
+- \ref backuppolicy
+- \ref bookperiods
+- \ref business1
+- \ref currencies
+- \ref deprecated
+- \ref engine
+- \ref backendold
+- \ref financeconstraints
+- \ref druidframework
+- \ref guid
+- \ref gnome2
+- \ref networkoverview
+- \ref backenderrors
+- \ref loanhandling
+- \ref kvpvalues
+- \ref lotsoverview
+- \ref multicurrency
+- \ref plugindesign
+- \ref pricedocs
+- \ref gnucashextension
+- \ref qif
+- \ref backendapi
+- \ref budgetplan
+- \ref taxnotes
+- \ref todo
+- \ref userprefs
+
+Each overview in this section is generated directly from the 
+source files using Doxygen but some topics need updating.
+
+\section maingeneral General Doxygen help.
+
+- \ref tipshints
+- \ref reference
+- \ref stylediscussion
+
+*/
+
+/* Editing this file? Comments can be inserted in this file
+ Remember to use C syntax but skip the extra asterisk so that doxygen
+ignores the extra notes, like this one.
+*/
+/* Hacking alert: When adding new sections, keep the references in
+alphabetical order OF THE DESCRIPTION, not the reference title.
+
+Also, make sure all reference titles are unique across the entire
+Doxygen output.
+
+Keep each section within one C comment block and any text before
+the first section of a page must be in the same comment block as the
+page title itself.
+
+*/
+
+/** \section hacking Hacking on this documentation
+
+There is the beginning of a style guide for documenting under
+\ref tipshints.
+
+The Book Merge files are an attempt to document "by the book". 
+\ref BookMerge\n
+Feel free to start documenting or playing with doxygen configuration. 
+This main page can be found in src/doc/doxygen_main_page.c .
+
+Each doxygen section must be within a single comment block although 
+large comment blocks can be split into separate pages:
+\ref stylediscussion.
+
+This main page is just an introduction to doxygen markup, see the
+Doxygen manual for the full command set.
+
+- \ref tipshints Tips and hints for using doxygen
+- \ref stylediscussion Long comments, pages, editors
+- \ref reference Links to the Doxygen manual
+
+Code snippets need special handling in the text overviews. Change all
+comment markers to // (so that the overview comment remains intact) 
+and then wrap each code snippet in the \a verbatim \a endverbatim 
+doxygen markers.
+
+One useful method is to edit these .txt files using the syntax highlighting
+of normal C files.
+
+*/
+/**
+\page tipshints Useful tips for doxygen in C files
+
+ - \ref index Introduction
+ - \ref stylediscussion Long comments, pages, editors
+ - \ref reference The Doxygen manual
+ 
+\section tips An introduction to doxygen markup
+ 
+\subsection Locations What to document
+
+All declarations for:
+
+-# typedef
+-# struct
+-# enum
+-# functions
+
+This will enable doxygen to link all parameter types to the declarations
+every time the type is used in a function - very helpful to new developers.
+
+\subsection Files Private files
+
+If your declarations are in separate files, like private header files, 
+a simple block can still be linked into doxygen as long as the file is
+identified to doxygen using a '\\file' section:
+
+** \\file filename.h\n
+	\\brief one-liner summary of the file purpose\n
+	\\author the usual copyright statement
+
+\subsection Methods How to document
+
+Every doxygen comment block starts with an adapted comment marker. 
+You can use an extra slash /// or an extra asterisk ** . Blocks end
+in the usual way. Doxygen accepts commands using a backslash.
+
+To put a description with each function or structure, use '\\brief' 
+End the brief description with a blank line. The rest of the documentation will
+then be shown in the body of the doxygen page.
+
+Commands may begin with \\ or @
+
+\subsection Presentation Extras
+
+	-# Start a line with a hyphen to start a list - the indent determines the
+nesting of the list:
+		- To create a numbered list, use -# e.g. for a sublist:
+			-# start a numbered list
+		- revert to previous list
+
+	End the list with a blank line.
+Use :: at the start of a function or structure to link to the page 
+for that function in the doxygen documentation. e.g. ::qof_class_foreach
+
+Use the param command to describe function parameters in the text.
+
+Use the 'back reference' to document enumerator values:\n
+enum testenum {\n
+	enum_one **< less than marker tells doxygen to use this line
+		to document enum_one.
 
 \subsection config Editing Doxygen configuration
 
@@ -59,15 +187,50 @@
 *
 doxywizard doxygen.cfg &
 
-\subsection reference Doxygen reference documentation
+*/
+
+/** \page stylediscussion Style discussion
+
+- \ref index Introduction
+- \ref tipshints Tips and hints for using doxygen
+- \ref reference Links to the Doxygen manual
+
+[codehelpgpg 2004-07-25] Doxygen now copes with addgroup and this page
+can be handled more easily by splitting the old single comment into repeated
+comments, split into pages. I've worked on doxygen files in Kate, KWrite and XCode (MacOSX) and
+the comment higlighting works fine. If you do have problems, particularly when
+you start a new line within an existing comment, enter a character at the end of 
+the last highlighted line to refresh the highlighting. Some editors have a specific
+refresh option.
+
+[cstim 2003-03-25] The "Data Structures" page of doxygen doesn't show
+anything useful for gnucash. Obviously doxygen only accepts "real" C
+struct definitions for inclusion on that page. However, all gnucash
+data structures are defined somewhere in private headers, and only the
+typedefs are publically visible. Isn't there a way to have doxygen
+show the documentation for the <i>typedefs</i> on the "Data
+Structures" page? Unfortunately I don't know how.
 
+[codehelpgpg 2004-07-25] Yes, there is a way of linking to these data structures.
+Make sure that the private header is included in the documentation by including a 
+\\file command in the private header file. Then include a short doxygen comment above
+the declaration. Doxygen will accept both valid C struct definition formats.
+
+*/
+
+/** \page reference Doxygen reference documentation
+
+- \ref index Introduction
+- \ref tipshints Tips and hints for using doxygen
+- \ref stylediscussion Long comments, pages, editors
+	
 The Doxygen web site (http://www.stack.nl/~dimitri/doxygen/) has a
 complete user manual.  For the impatient, here are the most
 interesting sections:
 
 - How to write grouped documentation for files, functions, variables,
 etc.: http://www.stack.nl/~dimitri/doxygen/grouping.html .  Do not
-forget to add a file documentation block (@file) at the top of your
+forget to add a file documentation block (\@file) at the top of your
 file. Otherwise, all documentation in that file will <i>not</i> appear
 in the html output.
 
@@ -80,7 +243,9 @@
 News about GnuCash as well as the latest version can always be found at http://www.gnucash.org/
 
 \subsection email Email
-If you have any suggestions concerning this documentation, do not hesitate to send suggestions to gnucash-devel (see http://www.gnucash.org/en/lists.phtml for details)
+If you have any suggestions concerning this documentation, do not hesitate to send suggestions to 
+gnucash-devel (see http://www.gnucash.org/en/lists.phtml for details)
 
-Benoit Grégoire mailto:bock at step.polymtl.ca
+Benoit Grégoire <bock at step.polymtl.ca>
+Neil Williams <linux at codehelp.co.uk>
  */
Index: business.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/business.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/doc/business.txt -Lsrc/doc/business.txt -u -r1.4 -r1.5
--- src/doc/business.txt
+++ src/doc/business.txt
@@ -1,21 +1,25 @@
+/** \page business1 Business Overview
 
-Business Object Overview
-------------------------
+API: \ref Business
 
-The GnuCash Businesness objects, in src/business/business-core, implement
+\section businessoverview Business Objects
+
+The GnuCash Business objects, in src/business/business-core, implement
 certain basic small-business accounting functions.  Below follows a summary
 overview of the objects and the data that they store.  These are listed in
 order of complexity; with the basic building blocks first, and the more 
 complex structures last.
 
-Address:
+\subsection address Address:
 A very simple object, stores strings for name/street-address/phone/fax/email
 The address is not a separate entity, but is meant to be embedded in other 
 objects (that is, there is no addressbook; there is no address database that
 is separate from the objects that use addresses; there is no 'foreach'
 that can be used to iterate over all addresses.)
 
-BillTerm:
+API: \ref Address
+
+\subsection billterm BillTerm:
 Describes billing terms, that is when a bill is due, and what sort of a 
 discount is applied (if any).  The BillTerm object currently supports:
 -- the discount applied to a bill (absolute numeric value),
@@ -24,19 +28,19 @@
 -- cutoff ??
 The proximo type does what ???
 
+API: \ref BillTerm
 
-Entry:
+\subsection entry Entry:
 
-Invoice:
+\subsection invoice Invoice:
 Pulls together info needed to geenrate an invoice, including addresses,
 job, the dates, the billing terms, the amounts, and the accounts
 to be credited.
 
+API: \ref Entry
 
+\section bus_design Business Design & Implementation Notes
 
-
-Business Design & Implementation Notes
----------------------------------------
 Derek Atkins <warlord at mit.edu>
 Version of October 2003
 
@@ -72,5 +76,6 @@
 - A parent has a list of all children.
 - A parent has a pointer to the current 'replica child', if one exists.
 
+*/
 
 ------------------------- end of file ------------------------------
Index: tax.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/tax.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/tax.txt -Lsrc/doc/tax.txt -u -r1.1 -r1.2
--- src/doc/tax.txt
+++ src/doc/tax.txt
@@ -1,6 +1,4 @@
-
-Some notes about taxes
-----------------------
+/** \page taxnotes Some notes about taxes
 
 From: Jon Kaare Hellan <Jon.K.Hellan at item.ntnu.no>
 
@@ -20,4 +18,4 @@
 So I need a way to keep track of these adjustments register for each
 stock in a portfolio.
 
-
+*/
Index: user-prefs-howto.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/user-prefs-howto.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/user-prefs-howto.txt -Lsrc/doc/user-prefs-howto.txt -u -r1.1 -r1.2
--- src/doc/user-prefs-howto.txt
+++ src/doc/user-prefs-howto.txt
@@ -1,8 +1,10 @@
+/** \page userprefs User Preferences HOWTO
+
 Well, since I just explained this issue to Benoit on IRC, I thought I could 
 just post it here. If somebody (Benoit?) considers it helpful, you might add 
 it somewhere to CVS.
 
-How to add a preferences option
+\section userprefsadd How to add a preferences option
 
 This text explains how to add options to the global preference dialog
 from a module. The text uses the example of one simple boolean option
@@ -11,11 +13,13 @@
 The option is created in the file src/import-export/hbci/hbci.scm,
 with the following function call as a top-level function in that file:
 
+\verbatim
 (gnc:register-configuration-option
  (gnc:make-simple-boolean-option
   (N_ "Online Banking & Importing") (N_ "HBCI Remember PIN in memory")
   "b" (N_ "Remember the PIN for HBCI in memory during a session")
   #f))
+\endverbatim
 
 The actual option is created by the function call to
 gnc:make-simple-boolean-option.  Its first (string) argument is the
@@ -34,10 +38,12 @@
 During the actual program run, the option is looked up only once, in
 src/import-export/hbci/hbci-interaction.c line 53:
 
-  cache_pin = 
+\verbatim
+cache_pin = 
     gnc_lookup_boolean_option(N_("Online Banking & Importing"),
 			      "HBCI Remember PIN in memory",
                               FALSE);
+\endverbatim
 
 The third argument here is the default value in case the lookup
 fails. The C function prototypes for lookup of other options can be found in
@@ -45,12 +51,13 @@
 Scheme can be seen e.g. in src/report/standard-reports/register.scm
 line 556:
 
+\verbatim
   (gnc:option-value (gnc:lookup-global-option "User Info" "User Name"))
+\endverbatim
 
 I.e., the option itself has to be looked up first by
 gnc:lookup-global-option (from src/app-utils/prefs.scm), and then the
 function gnc:option-value returns the actual value of the option
 (defined in src/app-utils/options.scm).
 
-
-
+*/
Index: loans.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/loans.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/doc/loans.txt -Lsrc/doc/loans.txt -u -r1.3 -r1.4
--- src/doc/loans.txt
+++ src/doc/loans.txt
@@ -1,7 +1,9 @@
-Handling loan repayment in GnuCash::Scheduled Transactions
-------------------------------------------------------------
+/** \page loanhandling Handling loan repayment in GnuCash::Scheduled Transactions
+
 July, 2002 - jsled at asychronous.org
 
+API: \ref SchedXaction
+
 Bugs 84892 and 84877 detail a request for a new Loan/Mortgage account type,
 and Scheduled Transaction support for loan repayment.  While it's debatable
 that a new account type is required, there is definitely a need for Scheduled
@@ -16,23 +18,23 @@
 
 We define loan repayment values in the following terms:
 
-Identifiers:
+Identifiers:\n
 P  : the original principal.  This is the overall principal afforded by the
-     loan at the time of it's creation.
+     loan at the time of it's creation.\n
 P' : The beginning principal.  This is the principal at the time of entry
-     into GnuCash.
+     into GnuCash.\n
 I :  The interest rate associated with the loan.  Note that this may change
      over time [based on an addition to the Prime rate, for instance], at
      various frequencies [yearly, monthly, quarterly...].  Ideally, we can
-     use the FreqSpec mechanism to facilitate the interest rate adjustment.
-N  : The length of the loan in periods.
-m  : The minimum periodic payment.
+     use the FreqSpec mechanism to facilitate the interest rate adjustment.\n
+N  : The length of the loan in periods.\n
+m  : The minimum periodic payment.\n
 n  : The current period of the repayment.
 
-Functions:
+Functions:\n
 PMT  : Total equal periodic payment, as per Gnumeric/Excel's definitions
-       [see end for more detail].
-IPMT : Monthly payment interest portion,  ""
+       [see end for more detail].\n
+IPMT : Monthly payment interest portion,  ""\n
 PPMT : Monthly payment principal portion, ""
 
 [ NOTE: 'PMT(I,N,P) = IPMT(I, n, N, P) + PPMT(I, n, N, P)' for 0 <= n < N ]
@@ -41,6 +43,7 @@
 The formula entered into the SX template for a loan may then look like:
 
 Example 1:
+\verbatim
 Desc/Memo |                     Account |         Credit |           Debit
 ----------+-----------------------------+----------------+-------------------
 Repayment | Assets:Bank:Checking        |                | =PMT(I,n,N,P)
@@ -49,11 +52,13 @@
 PMI       | Expenses:Loan_Name:Misc     | fixed_amt      |
 Principal | Liabilities:Loan_Name       | =PPMT(I,n,N,P) |
 -----------------------------------------------------------------------------
+\endverbatim
 
 Or, in the case where an escrow account is involved [with thanks to warlord
 for the review and fixes]:
 
 Example 2:
+\verbatim
 Desc/Memo      |             Account         |       Credit   |       Debit
 ---------------+-----------------------------+----------------+--------------
 Repayment      | Assets:Bank:Checking        |                | =PMT(I,n,N,P)
@@ -65,15 +70,20 @@
 PMI            | Expenses:Loan_Name:Misc     | fixed_amt      |
 Principal      | Liabilities:Loan_Name       | =PPMT(I,n,N,P) |
                |                             | + pre_payment  |
+\endverbatim
+
 FreqSpec = 1 month
+\verbatim
 -----------------------------------------------------------------------------
 
 Desc/Memo      |             Account         |       Credit   |       Debit
 ---------------+-----------------------------+----------------+--------------
 Insurance      | Assets:Loan_Escrow_acct     |                | insurance_amt
 Insurance      | Expenses:Home_Insurance     | insurance_amt  |
-FreqSpec = 1 year
+\endverbatim
 
+FreqSpec = 1 year
+\verbatim
 -----------------------------------------------------------------------------
 Desc/Memo      |             Account         |       Credit   |       Debit
 ---------------+-----------------------------+----------------+--------------
@@ -81,15 +91,13 @@
 Taxes          | Expenses:Property_Taxes     | taxes_amt      |
 FreqSpec = Quarterly
 -----------------------------------------------------------------------------
+\endverbatim
 
 
--------------------------
+\section guidpractical Practical questions regarding the implementation of this facility are:
 
-Practical questions regarding the implementation of this facility are:
-
------
-| 1. The transactions as in Example 2 are not going to be scheduled for the
-|    same day; are their values linked at all / do they need to share the
+| 1. The transactions as in Example 2 are not going to be scheduled for the\n
+|    same day; are their values linked at all / do they need to share the\n
 |    same var bindings?
 
 Yes, they would want to be linked.  More precisely, the insurance/tax amounts
@@ -138,7 +146,6 @@
 and potentially allowing a storage place for such frame data in the future
 with less file-versioning headache.  This is the option that will be pursued.
 
-
 Another element implicit in the original requirements to support
 loans/repayment calculations is implicit variables.  These are symbolic names
 which can be used and are automagically bound to values.  The known implicit
@@ -159,16 +166,15 @@
 easier to add support for new functions to the SX code via Scheme.
 
 
------
-| 3. How do we deal with periodic [yearly, semi-yearly] updating of various
+| 3. How do we deal with periodic [yearly, semi-yearly] updating of various\n
 |    "fixed" variables?
 
 Another change in the way variables are used is that some SXes -- especially
 loan-repayment -- may involve variables which are not tied to the instance of
 the SX, but rather to variables which:
-. are also involved in another SX
-. change with a frequency different than the SX
-. are represented by a relationship to the outside world ["prime + 1.7"]
+- are also involved in another SX
+- change with a frequency different than the SX
+- are represented by a relationship to the outside world ["prime + 1.7"]
 
 A partial fix for this problem is to provide multiple levels of scope for
 variable bindings, and expose this to the user by a method of assigning
@@ -189,7 +195,6 @@
 now, we punt on this issue, but hopefully will provide enough of a framework
 for this to be reasonably added in the future.
 
-
 We define four types of variables supported by this scheme:
 
 implicit  : provided only by the system
@@ -210,85 +215,78 @@
             created.
             e.g.: loan tax amount, loan interest rate
 
------
-| 4. From where do we get the dollar amount against which to do the [PI]PMT
+| 4. From where do we get the dollar amount against which to do the [PI]PMT\n
 |    calculation?
 
 The user will specify the parameters of the Loan via some UI... then where
 does the data go?
 
-. KVP data for that account?
-. KVP data for the SX?
-. Do we have a different top-level "Loan" object?
-. Present only in the SX template transactions/variable-frames?
-
+- KVP data for that account?
+- KVP data for the SX?
+- Do we have a different top-level "Loan" object?
+- Present only in the SX template transactions/variable-frames?
 
 I believe that the only location of the data after Druid creation is in the
 variable-binding frames and the formulae in the template transactions.  The
 Druid would thus simply assist the user in creating the following SX-related
 structures:
 
-. SXGroup: Loan Repayment
-  . variable_frame
-    . P [static]
-    . N [static]
-    . n [implicit]
-    . I [periodic]
-    . pmi_amount [periodic]
-    . tax_amount [periodic]
-    . pre_payment [periodic]
-    . insurance_amount [periodic]
-  . SX: Payment
-    . Bank -> { Escrow,
+- SXGroup: Loan Repayment
+	- variable_frame
+		 - P [static]
+		 - N [static]
+		 - n [implicit]
+		 - I [periodic]
+		 - pmi_amount [periodic]
+		 - tax_amount [periodic]
+		 - pre_payment [periodic]
+		 - insurance_amount [periodic]
+- SX: Payment
+	 - Bank -> { Escrow,
                 Liability:Loan:Principal,
                 Expense:Loan:Interest,
                 Expense:Loan:Insurance }
-  . SX: Tax
-    . Escrow -> Expense:Tax
-  . SX: Insurance
-    . Escrow -> Expense:Insurance
+- SX: Tax
+	 - Escrow -> Expense:Tax
+- SX: Insurance
+	 - Escrow -> Expense:Insurance
 
---------------------------------------------------
 
-Questions
+/section loansquestions Questions
 
-1/ UI - visible should all this machination be to the user?  Should they even
+- UI - visible should all this machination be to the user?  Should they even
    see them as such.  The current SX since-last-run UI makes them pretty
    visible, and in my estimation it actually helps to make them a bit more
    formal and visible.  At the same time, it may be overwhelming for the user
    to have to create formal variables with weird types like "implicit",
    "transient", "static", and "periodic".
 
---------------------------------------------------
-
-Priorities, Plan
+\section loansplan Priorities, Plan
 
 The above represents an "ideal" set of extensions to the SX framework to
 enable multiple "enhancement"-level functionalities.  Therefore, the
 following is the prioritized schedule, with annotations:
 
-1. Functions [PMT, [IP]PMT] in exp_parser; implicit variables [n].
-2. [Visual-only] SX grouping
-3. Loan-repayment creation Druid
-4. SX-only static vars
-5. SX-only periodic vars
-6. SX-group vars, var_frames
+-# Functions [PMT, [IP]PMT] in exp_parser; implicit variables [n].
+-# [Visual-only] SX grouping
+-# Loan-repayment creation Druid
+-# SX-only static vars
+-# SX-only periodic vars
+-# SX-group vars, var_frames
 
 After the completion of item 4, the feature can safely be called "finished".
 Items 5 and 6 only serve to increase the robustness of the facility and make
 the user's life slightly easier, at the cost of making _my_ life harder. :)
 
---------------------------------------------------
 
-Reference
--------------------------
+\section loansreference Reference
+
 
-Other software:
-----------
+\subsection loanssoftware Other software:
 
 Gnumeric supports the following functions WRT payment calculation:
 
-* PMT( rate, nper, pv [, fv, type] )
+- PMT( rate, nper, pv [, fv, type] )
   PMT returns the amount of payment for a loan based on a constant interest
   rate and constant payments (ea. payment equal).
   @rate : constant interest rate
@@ -296,39 +294,35 @@
   @pv   : present value
   @fv   : future value
   @type : payment type
-          . 0 : end of period
-          . 1 : beginning of period
+	 - 0 : end of period
+	 - 1 : beginning of period
 
-* IPMT( rate, per, nper, pv, fv, type )
+- IPMT( rate, per, nper, pv, fv, type )
   IPMT calculates the amount of a payment of an annuity going towards
   interest. Formula for IPMT is:
   IPMT(per) = - principal(per-1) * interest_rate
   where:
   principal(per-1) = amount of the remaining principal from last period.
 
-* ISPMT( rate, per, nper, pv )
+- ISPMT( rate, per, nper, pv )
   ISPMT returns the interest paid on a given period.
   If @per < 1 or @per > @nper, returns #NUM! err.
 
-* PPMT(rate, per, nper, pv [, fv, type] )
+- PPMT(rate, per, nper, pv [, fv, type] )
   PPMT calculates the amount of a payment of an annuity going towards
   principal.
   PPMT(per) = PMT - IPMT(per)
   where: PMT is payment
-         IPMT is interest for period per
+	- IPMT is interest for period per
 
-* PV( rate, nper, pmt [, fv, type] )
+- PV( rate, nper, pmt [, fv, type] )
   Calculates the present value of an investment
   @rate : periodic interest rate
   @nper : number of compounding periods
   @pmt  : payment made each period
   @fv   : future value
 
-
---------------------------------------------------
---------------------------------------------------
-
-Day Two:
+/section loanspayment Day Two:
 
 As per warlord's comments, the definition of IPMT needs to be updated to
 account for principal pre-payment.  IPMT is actually defined by computation
@@ -342,25 +336,27 @@
 would need to do something creative about this ... but as it stands, we'll
 leave this as an Excercise for the Reader. :)
 
-
------
-
-Druid thoughts...
+\section loansdruid Druid thoughts...
 
 Page Order:
+
 Intro ->
+
 Params ->
+
 Opts ->
+
 Repayment ->
+
 [Insurance ->]
+
 [PMI ->]
+
 [Taxes ->]
-Review/Approval
 
+Review/Approval
 
---------------------------------------------------
-| Intro
---------------------------------------------------
+\subsection loansdruidintro Intro
 
 "This is a step-by-step method of creating a loan
  repayment setup within GnuCash.  In this Druid,
@@ -372,12 +368,10 @@
 "If you make a mistake or want to make changes
  later, you can edit the created Scheduled
  Transactions directly."
---------------------------------------------------
 
+\subsection loansdruidparams Params
 
---------------------------------------------------
-| Params
---------------------------------------------------
+\verbatim
 Principal        : [amount entry]
 Actual Principal : [[optional] amount entry]
 Interest Rate    : [numeric entry] %
@@ -389,12 +383,10 @@
 Start Date       : [Gnome Date Entry]
 Length           : [num entry] [years|v]
    Remaining     : [num entry]
---------------------------------------------------
-
+\endverbatim
 
---------------------------------------------------
-| Options
---------------------------------------------------
+\section loansoptions Options
+\verbatim
 Do you...
   [ ] ... utilize an escrow account?
       Account: [ acct select |v]
@@ -406,12 +398,10 @@
       [ ] Via the Escrow account?
   [ ] ... have some other expense not listed above?
       [ ] Via the Escrow account?
---------------------------------------------------
+\endverbatim
 
-
---------------------------------------------------
-| Repayment
---------------------------------------------------
+\section loansrepayment Repayment
+\verbatim
 Amount        : [ amount entry ]
 Assets from   : [ account sel |v] 
 Princiapl to  : [ account sel |v]
@@ -421,11 +411,10 @@
 Frequency     : +- freqspec ----------------+
                 |           ....            |
                 +---------------------------+
---------------------------------------------------
+\endverbatim
 
---------------------------------------------------
-| Insurance
---------------------------------------------------
+\section loansinsurance Insurance
+\verbataim
 Amount    : [ amount entry ]
 Account   : [ account sel |v]
 Frequency :
@@ -433,49 +422,42 @@
    [ ] Other:      +- freqspec ----------------+
                    |           ....            |
                    +---------------------------+
---------------------------------------------------
+\endverbatim
 
+\section loanstaxes Taxes/PMI/Other
 
---------------------------------------------------
-| Taxes/PMI/Other
---------------------------------------------------
 [ same as Insurance ]
---------------------------------------------------
 
-===========================================================================
-===========================================================================
+
 
 Options in repayment:
-. loan freq != repayment freq
-  . floated
-  . not
-
-. Where does over-payment go?
-  . where
-    . into the escrow account
-    . directly applied
-  . how
-    . towards principal [interest is then re-calculated]
-    . towards interest  [principal is then re-calculated]
-  
-. still to do...
-  . expression parser/gnc-exp-parser extensions to handle...
-    . ...symbols [account names] into functions
-    . ...errors better
-    . ...iter/count/implicit vars
-  . druid...
-  . add ipmt', ppmt' calculations, using above
-  . kvp storage of "real" data
-  . sx grouping
+- loan freq != repayment freq
+	- floated
+	- not
+
+- Where does over-payment go?
+	 - where
+	 - into the escrow account
+	 - directly applied
+	 - how
+		- towards principal [interest is then re-calculated]
+		- towards interest  [principal is then re-calculated]
+
+- still to do...
+	- expression parser/gnc-exp-parser extensions to handle...
+		- ...symbols [account names] into functions
+		- ...errors better
+		- ...iter/count/implicit vars
+	- druid...
+	- add ipmt', ppmt' calculations, using above
+	- kvp storage of "real" data
+	- sx grouping
 
 http://www.interest.com/hugh/calc/mort_links.html
 
+\section loansfeedback Druid Feedback:
 
-===========================================================================
-===========================================================================
-
-Druid Feedback:
-
+\verbatim
 <Wilddev> jsled: <auspex> Wilddev: The labels need colons, mnemonics, and right-alignment. 
 <Wilddev> <auspex> Wilddev: It may be worthwhile for gnucash to create GtkSpinButton subclasses which show the percent symbol and others within the field.
 <Wilddev> <auspex> Wilddev: I don't know how complicated that will be.
@@ -494,29 +476,29 @@
 <jsled> Hmm.  Okay.  The between-transaction period is a frequency editor on the Repayment page.
 <Wilddev> <auspex> I'm wondering if "Original Principal" should be a vulgate
 such as "Loan Amount"
+\endverbatim
 
-----------
 
-Expression changes, round 2
+\section loansexpression Expression changes, round 2
 
 We need the following abilities in order to get mortgage/loan repayment
 working:
-. Ability to get the original value of an account
-  . [perhaps, ability to reference an external value?]
-. Ability to get the present value of an account
-. Ability to get the current i in an "i-of-N" sequence
+- Ability to get the original value of an account
+	 - [perhaps, ability to reference an external value?]
+- Ability to get the present value of an account
+- Ability to get the current i in an "i-of-N" sequence
 
 As well, it'd be nice to have:
-. some sort of signature checking on functions in expressions
-. safe[r] error handling?
+- some sort of signature checking on functions in expressions
+- safe[r] error handling?
 
 We decide that the original/present value of the account should be handled in
 scheme, and thus we actually need a way to reference accounts down to the
 scheme expressions.  We decide to use the Quote symbols to refer to a string
 literal.  The expression parser should be modified to parse this.
 
-----------
-
 The current 'i' and 'N' are going to be handled by having a list of
 predefined variables which the user cannot have access to.  For the time
 being, this is 'i' and 'N'.
+
+*/
Index: doxygen.cfg.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/doxygen.cfg.in,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/doc/doxygen.cfg.in -Lsrc/doc/doxygen.cfg.in -u -r1.5 -r1.6
--- src/doc/doxygen.cfg.in
+++ src/doc/doxygen.cfg.in
@@ -300,7 +300,7 @@
 # disable (NO) the todo list. This list is created by putting \todo 
 # commands in the documentation.
 
-GENERATE_TODOLIST      = NO
+GENERATE_TODOLIST      = YES
 
 # The GENERATE_TESTLIST tag can be used to enable (YES) or 
 # disable (NO) the test list. This list is created by putting \test 
@@ -400,7 +400,7 @@
 # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp 
 # *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
 
-FILE_PATTERNS          = 
+FILE_PATTERNS          = *.c *.h *.txt 
 
 # The RECURSIVE tag can be used to turn specify whether or not subdirectories 
 # should be searched for input files as well. Possible values are YES and NO. 
@@ -475,12 +475,12 @@
 # Note: To get rid of all source code in the generated output, make sure also 
 # VERBATIM_HEADERS is set to NO.
 
-SOURCE_BROWSER         = NO
+SOURCE_BROWSER         = YES
 
 # Setting the INLINE_SOURCES tag to YES will include the body 
 # of functions and classes directly in the documentation.
 
-INLINE_SOURCES         = NO
+INLINE_SOURCES         = YES
 
 # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
 # doxygen to hide any special comment blocks from generated source code 
@@ -492,7 +492,7 @@
 # then for each documented function all documented 
 # functions referencing it will be listed.
 
-REFERENCED_BY_RELATION = YES
+REFERENCED_BY_RELATION = NO
 
 # If the REFERENCES_RELATION tag is set to YES (the default) 
 # then for each documented function all documented entities 
@@ -882,13 +882,13 @@
 # compilation will be performed. Macro expansion can be done in a controlled 
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
-MACRO_EXPANSION        = NO
+MACRO_EXPANSION        = YES
 
 # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
 # then the macro expansion is limited to the macros specified with the 
 # PREDEFINED and EXPAND_AS_PREDEFINED tags.
 
-EXPAND_ONLY_PREDEF     = NO
+EXPAND_ONLY_PREDEF     = YES
 
 # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
@@ -899,7 +899,7 @@
 # contain include files that are not input files but should be processed by 
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           = @-top_srcdir-@/src/engine/ 
 
 # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
 # patterns (like *.h and *.hpp) to filter out the header-files in the 
@@ -921,7 +921,7 @@
 # The macro definition that is found in the sources will be used. 
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      = DEFINE_ENUM
 
 # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
 # doxygen's preprocessor will remove all function-like macros that are alone 
@@ -1114,4 +1114,5 @@
 # The SEARCHENGINE tag specifies whether or not a search engine should be 
 # used. If set to NO the values of all tags below this one will be ignored.
 
-SEARCHENGINE           = NO
+SEARCHENGINE           = YES
+
Index: qif.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/qif.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/qif.txt -Lsrc/doc/qif.txt -u -r1.1 -r1.2
--- src/doc/qif.txt
+++ src/doc/qif.txt
@@ -1,10 +1,13 @@
-		The (new new) QIF Importer infrastructure
+/** \page qif QIF importer infrastructure.
+
 		    Derek Atkins <derek at ihtfp.com>
 			      2004-01-07
 
 		        A work in progress....
 
-0. Introduction
+API: \ref Import_Export
+
+\section qifintro 0. Introduction
 
 The existing qif importer in src/import-export/qif-import is both hard
 to maintain and hard to re-integrate into the shared import
@@ -25,7 +28,7 @@
 import infrastructure.
 
 
-1. Importer Architecture
+\section qifarch 1. Importer Architecture
 
 The importer is a multi-step, staged system that should implement a
 read, parse, convert, combine, filter, finish process.  The importer
@@ -51,8 +54,7 @@
 questions to ask the user (and how are those responses returned to the
 importer)?
 
-
-2. The Import Process
+\section qifprocess 2. The Import Process
 
 The import process starts when the UI creates a new import context.
 All of a single import is performed within that context.  The context
@@ -101,8 +103,8 @@
 freed.
 
 
-3. Importer Data Objects
-
+\section qifobject 3. Importer Data Objects
+\verbatim
 QifContext
 QifError
 QifFile
@@ -113,16 +115,17 @@
  +-QifSecurity
  +-QifTxn
  +-QifInvstTxn
+\endverbatim
 
-Internal Data Types
+\subsection qifinternal Internal Data Types
 
 QifHandler
 QifData
 
-4. Importer API
-
-QIF Contexts
+\section qifapi 4. Importer API
 
+\subsection qifcontexts QIF Contexts
+\verbatim
 /** Create and destroy an import context */
 QifContext qif_context_create(void)
 void qif_context_destroy(QifContext ctx)
@@ -135,10 +138,10 @@
  * same set of objects within the context.
  */
 void qif_context_merge_files(QifContext ctx);
+\endverbatim
 
-
-QIF Files
-
+\section qiffiles QIF Files
+\verbatim
 /**
  * Open, read, and minimally parse the QIF file, filename.
  * If progress is non-NULL, will call progress with pg_arg and a value from
@@ -166,9 +169,9 @@
  *       Do we need progress-bar info here?
  */
 QifError qif_file_parse(QifFile ctx, gpointer ui_arg)
+\endverbatim
 
-
-5. Importer State Machine
+\section qifstate 5. Importer State Machine
 
 The state machine has the following structure.  Named states (and substates)
 must proceed in order.  Some states (e.g. state b) have multiple choices.
@@ -192,3 +195,4 @@
 f. map qif securities to gnucash commodities
 g. duplicate detection with existing gnucash txns
 h. transaction matcher (map one-sided txns using Payee/Memo info)
+*/
Index: plugin.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/plugin.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/plugin.txt -Lsrc/doc/plugin.txt -u -r1.1 -r1.2
--- src/doc/plugin.txt
+++ src/doc/plugin.txt
@@ -1,10 +1,11 @@
-Date: Mon, 19 Oct 1998 11:08:53 +0200
-From: Stephan Lichtenauer <s_lichtenauer at muenchen.org>
-To: linas at linas.org
+/** \page plugindesign Plugin design proposal
+
+Date: Mon, 19 Oct 1998 11:08:53 +0200\n
+From: Stephan Lichtenauer <s_lichtenauer at muenchen.org>\n
+To: linas at linas.org\n
 Subject: [Fwd: ANNOUNCE version 1.1.20]
 
-DESIGN PROPOSAL (ROUGH OUTLINE)
------------------------------
+\section pluginoutline DESIGN PROPOSAL (ROUGH OUTLINE)
 
 I thought that there is only one engine that manages runtime data, but
 to store and read it it uses the i/o-plugins that handle the data in a very
@@ -15,27 +16,26 @@
 through the application. It could work with the CORBA persistence framework if I
 remember right and the GNOME VFS.
 
-Engine
---------
+\subsection pluginengine Engine
 
 Split the existing engine in the following classes that match the existing data
 structures:
 
-- GcAccountGroup
-- GcAccount
-- GcSplit
-- GcTransaction
-- GcEngine
+- GncAccountGroup
+- GncAccount
+- GncSplit
+- GncTransaction
+- GncEngine
 
 These five classes first of all simply use the design already used in the
 engine. Additionally I would introduce a class
 
-- GcRegistry
+- GncRegistry
 
 that is used to store some metadata that is used by e.g. plug ins or the user
 interface. Since there is in my eyes need for two different classes of metadata,
-global and account-group related one, I would give GcAccountGroup as well as
-GcEngine a gcGetRegistry method that returns the local and the global registry
+global and account-group related one, I would give GncAccountGroup as well as
+GncEngine a gncGetRegistry method that returns the local and the global registry
 object. The registry can store its data in the account database and (global
 data) in the config file in the user's root directory. An example for global
 metadata of my plugin would be a database of all REUTERS codes of stocks
@@ -43,21 +43,19 @@
 save e.g. what codes have been selected to be updated etc. An ui could store
 general options (e.g. user preferences) in the global registry and e.g. last
 position of windows in the local registry.
-GcEngine could as well be a metaclass since it only has to represent the engine
-as such, with methods like gcReadAccountGroup.
-GcSplit could be an abstract class whose functionality can be implemented
+GncEngine could as well be a metaclass since it only has to represent the engine
+as such, with methods like gncReadAccountGroup.
+GncSplit could be an abstract class whose functionality can be implemented
 in derived concrete classes, e.g. for simple money transfers, buy of securities
 (which will be further divided in stocks, futures, bonds) etc. Alternatively
-additional
-data could be stored in an extended comment field with every split in MIME format.
-Infrastructure for that is already partially implemented but is (in my eyes) no
-perfectly
-clear OOP design.
+additional data could be stored in an extended comment field with every split in 
+MIME format.Infrastructure for that is already partially implemented but is 
+(in my eyes) no perfectly clear OOP design.
 
-One GcSplit subclass is GcComment that can store general data like company
+One GncSplit subclass is GncComment that can store general data like company
 statements. Since this could be data that affects more than one account (e.g.
-general economical data), it is stored centralized and the GcComment object in
-the different accounts only point on this data. GcSplit subclasses that
+general economical data), it is stored centralized and the GncComment object in
+the different accounts only point on this data. GncSplit subclasses that
 represent any type of securities will have to have additional fields, e.g. to
 store maturities, volume (for special price quotes) etc.
 
@@ -65,18 +63,18 @@
 different sources is proposed. I would realize this completely with plug in
 objects. So I would introduce
 
-- GcPlugIn
+- GncPlugIn
 
 to be the base class of all plug ins. How to make plugins independent from ui
 toolkits (GTK, QT/KDE), I do not know since they will need an ui in many cases.
 
-- GcIOPlugIn
+- GncIOPlugIn
 
 is derived from it and will be the base class for all i/o plugins, e.g.
-GcIOXacc, GcIOQif, GcIOSql, GcIOOnlineBanking, GcIOReadWww (yeah, my plugin!)
+GncIOXacc, GncIOQif, GncIOSql, GncIOOnlineBanking, GncIOReadWww (yeah, my plugin!)
 etc. Since some of the media is non-persistent, ie it is not sure if you will
-get the data again in the future (e.g. from web pages), GcIOPlugIn has a method
-gcIsPersistentMedia that returns FALSE in such cases. Then the data obtained
+get the data again in the future (e.g. from web pages), GncIOPlugIn has a method
+gncIsPersistentMedia that returns FALSE in such cases. Then the data obtained
 from this source can be copied to a persistent media (e.g. the SQL database).
 An IO plugin has a limited lifespan and is only used to read/write data from/to
 accounts/account groups/splits resp. create these objects as appropriate when
@@ -84,12 +82,12 @@
 
 One example:
 You make a bank transfer in your account. The data is written to the
-GcIOOnlineBanking object that uses the WWW-interface of your bank to give the
+GncIOOnlineBanking object that uses the WWW-interface of your bank to give the
 data to your bank. Then it reads the state of the transfer (via an online
 request to your bank account balance) what will then appear in your account.
-Possibly the GcIOOnlineBanking plugin is not persistent, i.e. you will not get a
+Possibly the GncIOOnlineBanking plugin is not persistent, i.e. you will not get a
 full track of all of your transactions of the past via online banking, then the
-data is stored locally (e.g. via GcIOPlugInXacc).
+data is stored locally (e.g. via GncIOPlugInXacc).
 
 One account group so can use many IO plugins at the same to get its data.
 Perhaps the IO plugins could be based on the GNOME VFS (virtual file system), if
@@ -101,26 +99,26 @@
 quotes or MetaStock data or online banking interfaces that is not that simple;
 and it also has to work the other way round. So we need a
 
-- GcDataMapper
+- GncDataMapper
 
-class that has at least two methods gcFindAccounts and gcFindSources. Both get a
+class that has at least two methods gncFindAccounts and gncFindSources. Both get a
 
-- GcMapInfo
+- GncMapInfo
 
 struct as parameter that contains information on how to find the account or the
-source. Both return a vector of GcMapInfos that contain information about
-the matches. When you call gcFindAccounts you normally fill the fields with data
+source. Both return a vector of GncMapInfos that contain information about
+the matches. When you call gncFindAccounts you normally fill the fields with data
 like the banking account number, REUTERS codes etc. and the method returns a
 list of accounts that could match. If there is more or less then one account the
 user could be prompted to help; the data obtained from a succesful match will be
-stored in the registry by the GcDataMapper so it can be used in the future and
+stored in the registry by the GncDataMapper so it can be used in the future and
 to do reverse mapping. Reverse mapping is what gcFindSources is for. There you
-fill the GcMapInfo with the things like accountId, account name, comments etc.
-and the GcDataMapper tries to find (with the help of its registry if there is
+fill the GncMapInfo with the things like accountId, account name, comments etc.
+and the GncDataMapper tries to find (with the help of its registry if there is
 already some data available) some sources (e.g. quotes web pages, online banking
 interfaces, company web pages etc.) and the IO plugins for this account. Again
 user help could be involved the first time or later again if the user wants to
-modify the matches. How to actually do the mapping is job of the GcDataMapper,
+modify the matches. How to actually do the mapping is job of the GncDataMapper,
 it could use regexp libraries etc. The most simple implementation would to be a
 simple user query where the user has to find the matches.
 
@@ -145,7 +143,7 @@
 
 A second type would be the
 
-- GcReportPlugIn
+- GncReportPlugIn
 
 that is used for report generation/data analyzing. A report interface that
 generates HTML code (that can then be translated to SGML, PS, TeX etc. via an
@@ -164,34 +162,32 @@
 repository.
 
 Report plugins first of all have to have a kind of
-string gcMakeReport(string params);
-method that gets the parameters stored in the HTML command (e.g. accoundId, data
+\verbatim
+string gncMakeReport(string params);
+\endverbatim
+method that gets the parameters stored in the HTML command (e.g. accountId, data
 range, graph type etc.), this has to be obtained through dialogs that are
 maintained by the plugin itself, this is why I have said I do not know how to
 make plugins toolkit-independent) and returns the generated HTML-code. They
 have to have a second method to display this dialog and a
 general plug-in mechanism that allows to find and load GnuCash corba plugins;
-this of course is already introduced in the GcPlugIn class.
-If plugins are chainable the gcMakeReport has to be modified/extended that they
+this of course is already introduced in the GncPlugIn class.
+If plugins are chainable the gncMakeReport has to be modified/extended that they
 get can get an account(-group) as input and return a new, modified
 account(-group) that could be then input for a second plugin (eg the one that
 finally creates the HTML-code). A usage for that could be a filter that eliminates
 noise in stock quotes and so generates new quotes that are then used as input to a
-Chaikin
-Oscillator plugin.
-
+Chaikin Oscillator plugin.
 
 I hope it is in line with all the other proposals (e.g. scripting, budget engine
-etc).
-I did not mention script languages in this document, I think it should be
+etc). I did not mention script languages in this document, I think it should be
 possible to access the engine via CORBA bindings for all these languages and to
 even create new classes or derive them, so writing plugins should be easily
 possible with compiled languages as well as with interpreted ones.
 
-
 Stephan Lichtenauer
 Rassosiedlung 25
 82284 Grafrath
 s_lichtenauer at muenchen.org
 
-
+*/
Index: books.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/books.txt,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/doc/books.txt -Lsrc/doc/books.txt -u -r1.22 -r1.23
--- src/doc/books.txt
+++ src/doc/books.txt
@@ -1,11 +1,11 @@
+/** \page bookperiods Books / Accounting Periods
 
-                Books / Accounting Periods
-                --------------------------
-                 Implementation Overview
+API: \ref Book\n
 
-       Linas Vepstas <linas at linas.org> December 2001
-                 Last Updated August 2003
+\section periodsintro Implementation Overview
 
+		   Linas Vepstas <linas at linas.org> December 2001
+                 Last Updated August 2003
 
 A top, unimplemented request for GnuCash is the ability to 'close 
 the books', that is, to add support for 'accounting periods'.
@@ -13,8 +13,8 @@
 and a GUI is partially finished.  This file reviews the 
 implementation design choices and the current design status.
 
-Definition
-----------
+\subsection periodsdefines Definition
+
 An accounting period or 'book' is a set of accounts and transactions
 that, once closed, must never be modified again.   Books are typically
 closed once a quarter, or once a year.  Generating a report from a 
@@ -34,16 +34,19 @@
 gains, taxes, etc. depend on the dates of the originating
 transaction.  See 'lots.txt' for details.
 
+API: \ref Lot
+
+\subsection periodsrequired Requirements
 
-Requirements
-------------
 Must have good performance (large data files usually mean poor performance).
 Use the idea of 'books' to prevent file bloat.  Must have access to 
 historical data.  Must be able to create bar-charts, graphs, reports
 of multi-year data (i.e. create reports spanning multiple books).
 
-Status
-------
+\ref Period
+
+\subsection periodsstatus Status
+
 The top-level structure that holds references to all of the data in
 a book is implemented in src/engine/qofbook.c.  The routines to 
 split one book into two, automatically setting account balances, 
@@ -52,13 +55,14 @@
 below.  The actual implementation is not yet complete, see 
 "Implementation Notes" at bottom for the current status.
 
+\section periodssolution Possible Solutions
+
+API: \ref Query
 
-Possible Solutions
-------------------
 Listed in order from worst to best:
 
-Plan F:
--------
+\subsection periodsdelete Plan F:
+
 Simply 'delete' old transactions, and adjust the equity to make up for 
 this.  More specifically: Split one file into two, with only 'old' 
 transactions in one, and only 'new' transactions in the other.
@@ -91,37 +95,40 @@
 all 'old' transactions have been cleared/reconciled.  But that might be 
 a bit much for non-bank accounts).
 
-Pros & Cons of plan F:
-----------------------
-pro: simple. The simplest option.
-pro: truncated file loads much faster
-pro: old/irrelevant accounts can be safely deleted from newest file
+API: \ref Transaction
+
+\subsection periodsf Pros & Cons of plan F:
+
+- pro: simple. The simplest option.
+- pro: truncated file loads much faster
+- pro: old/irrelevant accounts can be safely deleted from newest file
      (while still being preserved in old files).
-con: impossible to generate 5 year reports, multi-year graphs.  This
+
+- con: impossible to generate 5 year reports, multi-year graphs.  This
      would really hurt, esp, when tracking stocks/mutual funds/retirement
      accounts over a number of years.
 
 I think this last one is the Achilles heel, the torpedo in the rudder
 that sinks the boat.
 
+\subsection periodspland Plan D
 
-Plan D:
--------
 As above, but instead of deleting, add a kvp to each transaction stating
 '/book/closed-on=12.31.2000'.  Then modify the default query for the 
 registers so that the only displayed transactions are those that are *not*
 part of a closed book.  Modify the Query GUI dialog to add 'book' as 
 a query parameter. 
 
-pro: easy access to historical record
-con: slow loads; file size not reduced.
-con: dealing with opening balances, equity, is icky.
-con: can't delete/hide old/stale accounts.
+- pro: easy access to historical record
+
+- con: slow loads; file size not reduced.
+- con: dealing with opening balances, equity, is icky.
+- con: can't delete/hide old/stale accounts.
 
 We move on....
 
-Plan C:
--------
+\subsection periodsplanc Plan C
+
 As in plan F, but instead of creating two books, clone the account tree
 into two: 'old' and 'new'.   The old and new accounts are identical, 
 except that they get different guid's.  Every  account in the old 
@@ -157,22 +164,22 @@
 or it searches new accounts *and* their corresponding 'old' copies.
 
 (There are three ways to deal with this account continuity issue:
- \\ don't deal with it in query.c:  force various GUI dialogs to explicitly 
+- don't deal with it in query.c:  force various GUI dialogs to explicitly 
     formulate queries involving the /book/previous-guid string.  
     but this gets messy in the GUI's.  May lead to excess cut-n-paste
     of similar code between different GUI's.
     
- \\ 'hide' the distinction between 'old' and 'new' in query.c: 
+- 'hide' the distinction between 'old' and 'new' in query.c: 
     the users of query.c need only to specify a boolean flag: search 
     closed books: yes/no.  However, this is conceptually ugly, and 
     prevents query from doing low-level queries on specific 
     books.
     
- \\ create query utility wrapper/pre-processor that takes a query,
+- create query utility wrapper/pre-processor that takes a query,
     and then modifies it to search through closed books as well.
     This is the 'cleanest' solution. ??
     
- \\ All these are delicate, and need a little more thought and 
+- All these are delicate, and need a little more thought and 
     exploration. Goal is to simplify queries, not burden the system 
     with cryptic, complex code.
 )
@@ -185,18 +192,18 @@
 asset-value-over-time-bar-chart always looks at closed books.
 
 
-pro: safer than plan F, since we really can enforce the 'you aren't 
+- pro: safer than plan F, since we really can enforce the 'you aren't 
      allowed to edit closed books' rule.
-pro: solves the old-account/new-account problem, since new accounts 
+- pro: solves the old-account/new-account problem, since new accounts 
      can be edited/deleted without damaging old account.
-pro: solves the historical reporting problem.
+- pro: solves the historical reporting problem.
 
-con: queries are potentially slow, loading of file is potentially slow.
+- con: queries are potentially slow, loading of file is potentially slow.
 
 But now we have enough info to propose the final solution:
 
-Plan A:
--------
+\subsection periodsplana Plan A:
+
 The kvp markup of plan C coupled to the multi-file solution of plan F.
 In initial startup of GnuCash, only the 'current' book is loaded.  
 If user asks for a report that requires data from old books, then
@@ -206,9 +213,9 @@
 needs to somehow know the filenames of the old books.  I recommend
 against storing the books as different sections of one file, for 
 many reasons:
- % risk of corruption of old books 
- % bloated file size 
- % the single-file solution would need to invent a 'directory' so 
+- risk of corruption of old books 
+- bloated file size 
+- the single-file solution would need to invent a 'directory' so 
    that the location of the old books in the file can be quickly 
    found and lseek()'ed or mmap()'ed.  But why invent a directory? 
    Unix already provides directories!
@@ -222,24 +229,24 @@
 every book gets not only a unique guid, and also stores some 
 meta-information (as book-level kvp's):
 
-/book/title=some-user-supplied-name
-/book/notes=user-supplied-descriptive-comments
-/book/start-date=xxx
-/book/end-date=xxx
-/book/previous-book-guids=(list 0xa 0xb 0xc)
+/book/title=some-user-supplied-name\n
+/book/notes=user-supplied-descriptive-comments\n
+/book/start-date=xxx\n
+/book/end-date=xxx\n
+/book/previous-book-guids=(list 0xa 0xb 0xc)\n
 /book/accounting-period=enum {none, week, month, quarter, trimester, year}
 
-Pro's & Con's
--------------
+\subsection periodsaprocon Pro's & Con's
+
 I am not aware of any con's to plan A at this point.
 
-Implementation Overview
-----------------------
+\section periodsoverview Implementation Overview
+
 Plan A has been implemented in the engine.  To quickly summarize:
--- Partitioning involves splitting one book into two, called the
+- Partitioning involves splitting one book into two, called the
    "old, closing book", and the "current open book".
 
--- Accounts are copied between old and new books.  One of the copies
+- Accounts are copied between old and new books.  One of the copies
    is issued new GUID's, but the rest of the account data is copied.
    KVP pairs are then added so that each copy points at the other,
    and can thus be easily found.  The "gemini" KVP keyword is used.
@@ -248,57 +255,56 @@
    The transaction is a transfer from equity.  An equity account is
    created automagically, if needed.
 
--- Transactions. Transactions are partitioned, and end up either
+- Transactions. Transactions are partitioned, and end up either
    in the old or the new book.  Splits move with transactions.
    Note that some transactions, associated with open lots, may be
    kept in the new book (See below).  
 
--- Lots.  If a transaction has a split in an open lot, then that 
+- Lots.  If a transaction has a split in an open lot, then that 
    transaction is not moved to the closed book.  It needs to stay 
    with the open book.  If a lot is closed, and all of the other 
    lots associated with all of the transactions in this lot are 
    also closed, then the lot may be moved to the closed book 
    (and all of the other associated lots must then also be moved).
 
--- Prices. Prices are sorted into the new and old books according
+- Prices. Prices are sorted into the new and old books according
    to the date on the price.
 
--- Scheduled transactions/recurring transactions.  These are left
+- Scheduled transactions/recurring transactions.  These are left
    in the new book, untouched.   They are not copied into the old
    book, and no trace of their existence is left in the old book.
 
--- Business Objects. Not implemented.
+- Business Objects. Not implemented.
 
+\section periodsnotes Implementation Notes
 
-Implementation Notes:
----------------------
--- src/engine/Period.[ch]
+- src/engine/Period.[ch]
       Implements the main logic to split one book into two, and populate
       it with the appropriate keys, markup, etc. and to carry balances 
       forward, etc.
 
-   src/engine/kvp-util.[ch]
+-  src/engine/kvp-util.[ch]
       Gemini code: code which allows 'linked lists' to be created, using
       nothing but kvp trees and guid's.  These links are used to identify
       peer accounts/ peer transactions, etc.
 
-   src/engine/gnc-lot.[ch]
+-  src/engine/gnc-lot.[ch]
       Implements accounting Lots.
 
-   src/engine/Scrub2.[ch]
+-  src/engine/Scrub2.[ch]
       Implements simple FIFO for lots.  Data is scrubbed with respect to
       this FIFO before the books are closed.  Commodity accounts (e.g.
       stock accounts) must have a coherent Lots structure before books
       can be closed.  The scrubber makes sure there's nothing hanging
       out.
 
-   src/gnome/druid-acct-period.[ch] 
+-  src/gnome/druid-acct-period.[ch] 
       Implements a druid interface to allow user to specify book closing 
       dates, add a title and notes to a book, and walk through the process.
       Uses FreqSpec.[ch] and the widget in gnc-frequency.[ch] to allow
       the user to specify the frequency of book closings.
 
--- The Postgres backend has been modified to support multiple books.
+- The Postgres backend has been modified to support multiple books.
    All books are stored in the same database; there is no performance
    penalty for storing all books together in the same SQL database,
    because they can be easily picked apart by an appropriate SQL query.
@@ -312,14 +318,14 @@
    However, an SQL admin, if they were desperate to trim the DB size, 
    could DELETE FROM * WHERE bookguid='asdfasdfasdf';
 
--- The XML-file backend can store multiple books in one file.  There 
+- The XML-file backend can store multiple books in one file.  There 
    is currently minimal support for writing out multiple books, 
    one per file (this enables faster load, by not loading old books).  
    There is currently no support for loading multiple books from multiple
    files.
 
-ANNOUNCE: Book Closing Beta 2
------------------------------
+\section periodsannounce ANNOUNCE: Book Closing Beta 2
+
 Books AKA Accounting Periods can now be closed by going to the 'Action'
 menu on the main window, and selecting 'close books'.   This will popup
 a druid that will allow you to select closing dates.  Books are closed
@@ -343,103 +349,96 @@
 The old data will be in separate files, and there is currently no
 way to load several files at once.
 
+\section periodsissues Open Issues/Questions that Need Discussion:
 
-Open Issues/Questions that Need Discussion:
--------------------------------------------
-*) How to handle business objects? e.g. vendors, customers should be
+- How to handle business objects? e.g. vendors, customers should be
    copied into both old and new books.  But invoices should be in one 
    or the other.  Need to document which is which.
    Copy:
    customer -- ok, has guid, has for-each
-   employee
-
+   employee\n
    No-op:
    address -- do nothing
 
-*) Discussion Q: What should the naming convention be for the different 
+- Discussion Q: What should the naming convention be for the different 
    books?  When the XML file backend is used, different books need to be 
    stored as different files (in order to avoid the performance 
-   penalty of a large file load).  Currently, what's implemented is
-
-   book-1dc750aa3e6fd045c13ac8afb1a9ac03-my-gnucash-file.xac.gml
-
+   penalty of a large file load).  Currently, what's implemented is\n
+   book-1dc750aa3e6fd045c13ac8afb1a9ac03-my-gnucash-file.xac.gml\n
    where the number is the GUID of the closed book (needed to be able to
    quickly find the book/file) and 'my-gnucash-file.xac' is the name of
-   the original file whose books were closed.
-
+   the original file whose books were closed.\n
    Need to change the name to include the word "archive".
 
-*) Discussion Q: When saving books, make the book title part of the 
+- Discussion Q: When saving books, make the book title part of the 
    book name (user convenience).
 
-*) Should closed books be allowed to have unreconciled transactions?
+- Should closed books be allowed to have unreconciled transactions?
    Answer: probably.  Should there be a warning? 
 
+\section periodstodo Open Issues / ToDo
 
-Open Issues / ToDo
-------------------
-*) Change GUI to allow user to specify a default equity account
+- Change GUI to allow user to specify a default equity account
    for dealing with opening balances.  Should be done with kvp markup. 
 
-*) Fix crash when exiting gnucash after closing books. 
+- Fix crash when exiting gnucash after closing books. 
 
-*) The filename of the old, closed books should probably be saved 
+- The filename of the old, closed books should probably be saved 
    in the KVP tree of the current open book.  This need be done only
    from the file backend.
 
-*) Need to mark closed book as unalterable, and respect that markup.
+- Need to mark closed book as unalterable, and respect that markup.
    I think there's a 'closed' flag in the book, but I don't think its
    respected.
 
-*) The book closing GUI (druid-acct-period.c) needs to save/restore 
+- The book closing GUI (druid-acct-period.c) needs to save/restore 
    period end date (the FreqSpec) to KVP on open book.  This would be
    easy once we have a freq-spec-to-kvp and freq-spec-from-kvp routines.
 
-*) Handling of lots in book closing is implemented but is poorly tested.
+- Handling of lots in book closing is implemented but is poorly tested.
    Need to write test cases.  Also test cases for prices in book
    closing.
 
-*) price-saving in the SQL backend is probably borken, its certainly
+- price-saving in the SQL backend is probably borken, its certainly
    untested.  Need to remove old deprecated price-lookup mechanism, 
    and replace w/ qofquery.
 
-*) Need to provide for loading of closed books, because this is needed
+- Need to provide for loading of closed books, because this is needed
    for reports.
 
-*) Handling of multi-book reports ???  Need to work out the recommended way
+- Handling of multi-book reports ???  Need to work out the recommended way
    of making this happen....
 
-*) Have some way of remembering the quickfill text from older books.
+- Have some way of remembering the quickfill text from older books.
 
-*) Possibly neat idea: 
+- Possibly neat idea: 
    Book closing, as currently implemented in the GUI, is driven entirely
    by the date-posted.  There is no (planned) interface to allow you to
    exclude some certain transactions from a particular closing (although
    it would be 'easy' to add this: right before I close a book, I have a
    list of transactions which can be added to/removed from).
 
-*) add 13-period support to FreqSpec and the FreqSpec widget.  
+- add 13-period support to FreqSpec and the FreqSpec widget.  
    e.g. from the mailing list:
    One of the calendars my company uses is like this:
    13 periods
    1st period begins jan 1st, partial first week plus 4 weeks.
    2nd - 13th period begins on a sunday every four weeks.
-   13th period - 4th week may be less than full week because it ends on 12/31.
-
-   For 2003:
-   01. 01/01 - 02/01
-   02. 02/02 - 03/01
-   03. 03/02 - 03/29
-   04. 03/30 - 04/26
-   05. 04/27 - 05/24
-   06. 05/25 - 06/21
-   07. 06/22 - 07/19
-   08. 07/20 - 08/16
-   09. 08/17 - 09/13
-   10. 09/14 - 10/11
-   11. 10/12 - 11/08
-   12. 11/09 - 12/06
-   13. 12/07 - 12/31
+   13th period - 4th week may be less than full week because it ends on 12/31.\n
+   For 2003:\n
+   01. 01/01 - 02/01\n
+   02. 02/02 - 03/01\n
+   03. 03/02 - 03/29\n
+   04. 03/30 - 04/26\n
+   05. 04/27 - 05/24\n
+   06. 05/25 - 06/21\n
+   07. 06/22 - 07/19\n
+   08. 07/20 - 08/16\n
+   09. 08/17 - 09/13\n
+   10. 09/14 - 10/11\n
+   11. 10/12 - 11/08\n
+   12. 11/09 - 12/06\n
+   13. 12/07 - 12/31\n
                                                                                 
-
+*/
 =========================== end of file ========================
Index: budget.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/budget.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/budget.txt -Lsrc/doc/budget.txt -u -r1.1 -r1.2
--- src/doc/budget.txt
+++ src/doc/budget.txt
@@ -1,12 +1,12 @@
+/** \page budgetplan Some Thoughts about GnuCash Budgeting
 
-
-Some Thoughts about GnuCash Budgeting
+API: \ref Budget
 
 Bob Drzyzgula
 
 18-April-1998
 
-Abstract
+\section budgetabstract Abstract
 
 At this point, this document contains my personal thoughts about possible
 design criteria for a budgeting engine in GnuCash. These should not
@@ -17,29 +17,27 @@
 one might do this, and I hope that this document will serve to continue
 the discussion that began on the GnuCash/Xacc mailing list.
 
-\tableofcontents
+\section bugettoc tableofcontents
 
-1 Definitions
+\subsection budgetdefines Definitions
 
 As with any design paper, we'll need a few definitions. I'll try to
 stick as close to possible to the Xacc usage of these terms, but I'm
 not intimately familiar with the code, so I may have made some errors
 here. 
 
-Journal A journal is a simply a list of transactions with minimal
+- Journal A journal is a simply a list of transactions with minimal
   characterization. For the purposes of this paper, the journal is
   defined to include only transactions that have already occurred,
   i.e., expected or up-coming expenses would not appear in the journal.
-
-Calendar For the purposes of this paper, the calendar as a list of
+- Calendar For the purposes of this paper, the calendar as a list of
   fully-defined future transactions, organized by date. A transaction
   would only appear in the calendar if there was a low likelihood
   that it would change. Future transactions that would only change
   by surprise (e.g. the cable TV bill) could appear in the calendar,
   but utility bills such as from the natural gas company would appear
   in the calendar only after receipt.
-
-Template A template is in effect a partially defined transaction,
+- Template A template is in effect a partially defined transaction,
   possibly containing constraints. For example, one might have a template
   that would identify the price, payee, description, asset account
   and expense account (but not the date) for buying a Value Meal #4
@@ -56,13 +54,11 @@
   could be extremely useful in making projections. Quicken, of course,
   has similar things called ``memorized transactions,'' but Quicken
   gives less control over their creation, meaning and use.
-
-Schedule The schedule is a supplement to the calendar that contains
+- Schedule The schedule is a supplement to the calendar that contains
   only dated references to templates, which could be further narrowed
   as part of the reference, e.g. an undated template could be given
   a date but not a firm value when referenced from the schedule.
-
-Ledger The ledger is in effect documentation of the journal, in that
+- Ledger The ledger is in effect documentation of the journal, in that
   it describes the meaning of the transactions with respect to the
   balances in the various accounts. In Xacc, this appears also to
   be known as the register. It isn't clear to me that Xacc maintans
@@ -71,8 +67,7 @@
   but it is less clear that one would want to include the template
   references from the schedule directly in the ledger; it may make
   more sense for the schedule to be a ledger unto itself.
-
-Budget A budget is an allocation of monetary flows. As funds enter
+- Budget A budget is an allocation of monetary flows. As funds enter
   the system through the income accounts, they must be transferred
   to other accounts; a direct deposit would be a transfer to an asset
   account, a loan payment through payroll deduction a transfer to
@@ -100,11 +95,11 @@
   monthly or per-four-weeks. The former might be referred to as ``budgeting
   on a monthly basis.''
 
-2 Documenting the Budget
+\subsection budgetdocs Documenting the Budget
 
 One possible way to document a budget might be as a classic ``input-ouput
 table''. Consider the following table:
-
+\verbatim
 +---------+----------+---------+-----+------+------+-----+------+------+
 |         | Checking | Savings | MMA | Cash | Visa | Tax | Food | Rent |
 +---------+----------+---------+-----+------+------+-----+------+------+
@@ -123,7 +118,7 @@
 +---------+----------+---------+-----+------+------+-----+------+------+
 |Interest |          |    2    |  3  |      |      |     |      |      |
 +---------+----------+---------+-----+------+------+-----+------+------+
-
+\endverbatim
 
 The first five data columns and the first five data rows have the same
 names. These are the asset and liability accounts. The last three
@@ -131,22 +126,20 @@
 accounts (When I learn a little more SGML I'll try to make the table
 a little more readable). Notice:
 
-* If you sum across the income rows, you obtain the total income for
+- If you sum across the income rows, you obtain the total income for
   each account: $25 from paychecks and $5 from interest, for a total
   of $30. If you sum down the expense rows, you obtain the total expenses
   for each account: $5 for taxes, $13 for food, and $5 for rent (OK,
   so we eat a lot). Just looking at these two figures, we can immediately
   see that we expect to make $30 and spend $23 of it.
-
-* The sense of each amount is positive from the row account to the
+- The sense of each amount is positive from the row account to the
   column account. Thus, $20 of pay is direct-deposited to the checking
   account, and the remaining $5 is withheld for taxes. $1 is transferred
   from the savings account to the money market account. We plan to
   use the Visa card to buy $7 worth of food and to take a $8 cash
   advance. We also plan to pay Visa bills totalling $3 from the checking
   account.
-
-* If you sum down an asset/liability column, you will obtain the total
+- If you sum down an asset/liability column, you will obtain the total
   amount we expect to add to that account (e.g. $6 added to the MMA,
   $20 added to checking, $3 to Visa). If you sum across an asset/liability
   row, you will obtain the total amount we expect to remove from that
@@ -156,11 +149,10 @@
   in that account for the budget period. Thus, we expect checking
   to be a wash, the MMA to grow by $6, and to go $12 further in the
   hole on our Visa card.
-
-* Again, what is documented here is the planned account-to-account
+- Again, what is documented here is the planned account-to-account
   flow across the entire period, not individual transactions.
 
-3 Contributing Data
+\subsection budgetcontrib Contributing Data
 
 (to be done)
 ================================================================
@@ -168,15 +160,14 @@
 
 Where I'm headed for the rest of it is this:
 
- * I expect to point out that the Journal, Calendar and
+- I expect to point out that the Journal, Calendar and
  Ledger as I have described them are only tangentially
  related to the budget. They are the emperical data and
  the Budget and the Schedule are the models. The goal
  would be to have an engine that would allow one to
  measure the deviation of the emperical data from 
  the model in various ways.
-
- * I expect to talk about the task of generating both
+- I expect to talk about the task of generating both
  the schedule and the budget. When one prepares this
  stuff, one usually has a rather diverse collection of
  data to work with. Bi-weekly paychecks, monthly
@@ -188,8 +179,7 @@
  I expect to do this by preparing projected transactions
  as "templates", and then specifying a time series of
  instantiations of the templates.
-
- * I expect to describe a design for a sort of OO
+- I expect to describe a design for a sort of OO
  time series engine, where "time series" is a class.
  Instances of "time series" will have begin dates,
  end dates, frequencies, and the data series itself.
@@ -198,8 +188,7 @@
  to commensurate frequencies before combination.  Thus,
  explicit conversion functions, say "monthly_to_daily"
  will need to be defined.
-
- * Once these pieces are in place, then one should be
+- Once these pieces are in place, then one should be
  able to use the time series engine to digest the
  scraps of paper with scribbles saying "Katie's lunch,
  $2.30 every Monday through Thursday except only
@@ -208,8 +197,7 @@
  still needs milk" into something usable as a
  budget -or- as a schedule (these being two seperate
  outputs).
-
- * While I expect that such an engine would be extremely
+- While I expect that such an engine would be extremely
  useful for about 80% of the data that would go into
  a budget, there will of course be other data for which
  this would be overkill or cumbersome. Like "$85 each
@@ -223,16 +211,15 @@
  it should not, however, be implemented as hand edits to the
  draft table coming out of the time series engine,
  because one will want to be able to iterate on this.
- 
- * Nonetheless, it probably remains true that users
+- Nonetheless, it probably remains true that users
  would wish to take the final budget output of all this
  automated stuff, and hack it up into something
  that somehow pleases them better. Thus it probably
  *does* make sense to allow hand edits at the final
  stage, and/or to simply enter an entire budget by
  hand if that is what you want to do.
-
- * So far, I don't see any simple way to implement
+- So far, I don't see any simple way to implement
  something like Quicken's SuperCategories. Maybe this
  is related to why it works so poorly in Quicken. :-)
 
+*/
Index: currencies.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/currencies.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/currencies.txt -Lsrc/doc/currencies.txt -u -r1.1 -r1.2
--- src/doc/currencies.txt
+++ src/doc/currencies.txt
@@ -1,3 +1,7 @@
+/** \page currencies Currency Issues
+
+API: \ref Commodity
+
 From Bill Gribble <grib at billgribble.com>
 Tue, 3 Oct 2000 11:09:54 -0500 
 
@@ -10,15 +14,15 @@
 I think it's just a "feature" of some particular solutions that they
 are separable.
 
-  - we want to eliminate the need for currency trading accounts.  From
+- we want to eliminate the need for currency trading accounts.  From
     a user interaction perspective, this means we need to allow
     transfers directly between accounts denominated in different
     commodities.
-  - we want transactions to have clear and unambiguous balancing
+- we want transactions to have clear and unambiguous balancing
     semantics.
-  - we want to store the actual amounts of commodities involved 
+- we want to store the actual amounts of commodities involved 
     transactions rather than price and quantity.
-  - we want to be able to globally check and display the terms of the
+- we want to be able to globally check and display the terms of the
     accounting equation (and all account balances) in a
     user-selectable functional currency.
 
@@ -26,12 +30,12 @@
 Basically I'm just agreeing with your last suggestion, Dave; Rob and I
 hammered on it on a white board and weren't able to poke any holes.
 
-  - Eliminate the 'currency' from the Account structure.  Add a
+- Eliminate the 'currency' from the Account structure.  Add a
     'currency' to the Transaction structure.  Each transaction's
     'currency' is by definition the balancing common currency for the
     splits in that transaction.
 
-  - Eliminate the 'share price' field from the Split structure and
+- Eliminate the 'share price' field from the Split structure and
     replace it with a 'value' field.  The 'value' is a translation of
     the Split's 'damount' (which is the amount of the Account's
     security involved) into the Transaction's balancing currency.
@@ -50,3 +54,5 @@
 price database.  There has been discussion about moving to a
 report-based main window; if that were to be the case, we could make
 the accounting equation readily visible to the user.
+
+*/
Index: lots.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/lots.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/doc/lots.txt -Lsrc/doc/lots.txt -u -r1.23 -r1.24
--- src/doc/lots.txt
+++ src/doc/lots.txt
@@ -1,11 +1,9 @@
-
-                           Lots
-                           ====
-             Architecture & Implementation Overview
+/** \page lotsoverview Lots Architecture & Implementation Overview
 
                Linas Vepstas <linas at linas.org>
                   Last Revised May 2004
 
+API \ref Lot
 
 One often needs to know that the item 'bought' in one transaction
 is the same one as the item 'sold' in a different transaction.
@@ -23,8 +21,8 @@
 creation of the lot helps determine when a bill is due, when depreciation
 starts, or the tax rate for capital gains on a stock market investment.
 
-Definition
-==========
+\section lotsdefines Definition
+
 In GnuCash, a 'lot' will consist of a set of splits identified with 
 a unique lot number.  Any given split can belong to one lot and one 
 lot only.  All splits in a lot must also belong to the same account.
@@ -36,14 +34,13 @@
 forward into the current open book; closed lots are left behind in the 
 book in which they were closed.
 
+\section How Lots Are Used
 
-How Lots Are Used
-=================
 The following sections review how lots are used to implement various
 accounting devices, and some of the related issues.
 
-Billing:
---------
+\subsection Billing
+
 Tracking lots is the 'definition' of A/R and A/P.  You want to be able
 to say that this bill is 120 days old, and its balance has been partly
 paid off; and you want to be able to do this whether or not there are
@@ -55,15 +52,15 @@
 information about bills, such as a due date or payment terms, should
 be stored as kvp values associated with the lot.
 
-Billing Example:
-----------------
+\subsection Billing Example
+
 Normally, there is a one-to-one correspondence between bills and 
 lots: there  is one lot per bill, and one bill per lot.  (Note: this 
 is not how gnucash invoices are currently implemented; this is a
 proposed implementation.)
 
 For example:
-
+\verbatim
    invoice #258    customer XXX
    Order placed 20 December 2001
        quant (10)  gallons paint      $10/each   $100
@@ -75,6 +72,7 @@
    Payment received 24 january  2002  $50      Balance Due: $88.27
    Payment received 13 february 2002  $60      Balance Due: $28.27
    Payment received 18 march    2002  $28.27   PAID IN FULL
+\endverbatim
 
 In this example, the lot encompasses four transactions, dated
 December, January, February and March.  The December transaction
@@ -93,9 +91,8 @@
 of a lot in the "Paintbrush Inventory" account.   These lots should
 not be confused with the invoice lot. 
 
+\subsection lotsinventory Inventory
 
-Inventory:
-----------
 The correct way of handling inventory under GnuCash is to have a 
 separate account for each widget type.  The account balance represents
 how many widgets there are in the warehouse.  Lots offer an additional
@@ -115,9 +112,8 @@
 not listing them in account lists, and providing an alternate 
 management GUI.
 
+\subsection Capital Gains
 
-Capital Gains:
---------------
 In the United States, gains on stock investments are taxed at different
 rates depending on how long they were held before being sold. By using
 lots with an investment account, it becomes easy to track when any given
@@ -129,21 +125,25 @@
 For example, the user may have conceptually made the following 
 transactions:
 
+\verbatim
 >        Date     Desc    Buy     Sell    Price    Value
 >        18/1/01  XCORP   500             $10.00   $5000.00
 >        21/3/01  XCORP   500             $12.00   $6000.00
 >        14/7/02  XCORP           750     $20.00  $15000.00   
+\endverbatim
 
 However, the two buy transactions create different lots (because
 you can't add to a stock-investment lot after its been created, because
 the purchases occurred on different dates).  Thus, when the shares are 
 sold, the sale is split across two lots:
 
+\verbatim
 >        Date     Desc    Lot     Buy     Sell    Price    Value
 >        18/1/01  XCORP   187     500             $10.00   $5000.00
 >        21/3/01  XCORP   188     500             $12.00   $6000.00
 >        14/7/02  XCORP   187             500     $20.00  $10000.00   
 >        14/7/02  XCORP   188             250     $20.00   $5000.00   
+\endverbatim
 
 In the above, lot 187 was closed, and lot 188 has a balance of 250 
 shares.  Note that we used a FIFO accounting method in this example:
@@ -167,9 +167,8 @@
 must figure out a way of doing this (i.e. re-combining splits) on
 its own.
 
+\section lotsclosing Closing of Books
 
-Closing of Books
-================
 A few words on lots and the closing of books.  Without lots, there 
 is really no way of correctly implementing book closing.  That is
 because some reports, such as the capital-gains report, need to know 
@@ -190,14 +189,13 @@
 all closed lots that participate in these 'open transations', 
 ad infinitum.
 
+\section lotsdouble The "Double Balance" Requirment
 
-The "Double Balance" Requirment
-===============================
 The following is a proposal for how to handle both realized
 and unrealized gains/losses by means of "adjusting transactions."
 It works for simple cases, but has issues for more complex cases.
 
-------------------
+
 Canonical transaction balancing: If all splits in a transaction 
 are in the same 'currency' as the transaction currency, then the
 sum of the splits *must* equal zero.  This is the old, existing
@@ -208,21 +206,19 @@
 we can't force a zero balance as above.  Instead, we will force
 a different requirement, the 'double-balance' requirement:
 
--- All splits that are *not* in the transaction currency C
+- All splits that are *not* in the transaction currency C
    must be made a part of a lot.   (Thus, for example, 
    the transaction currency C is dollars, whereas the split
    commodity is 'S', shares of RHAT.  If a transaction
    has C in dollars, and 'S' in RHAT, then the S split must 
    be made a part of a Lot.)
-   
--- The lot will have a designated 'lot currency' L that must
+- The lot will have a designated 'lot currency' L that must
    be the same as the C of every split in the lot.  One
    cannot enter a split into the lot if C != L.  (That is,
    if I'm working with a Lot of RHAT shares, then *all*
    splits in the lot must belong to dollar-denominated
    transactions.)
-
--- When a lot is closed, we must have the 'double-balance'
+- When a lot is closed, we must have the 'double-balance'
    condition:  The sum total of all 'S' is zero, and the
    sum total of all 'C' is zero.  Thus, if I buy 100 shares
    of RHAT for $5 and sell 100 shares of RHAT for $10, then
@@ -245,7 +241,7 @@
 that because the 'adjusting transaction' contains a split
 holding S (albeit zero S), it *must* be a part of a Lot.
 
-------------------
+
 The above seems to work for simple stock-transactions, but
 fails in other more complex cases.   Here's an example.
 
@@ -267,14 +263,13 @@
 How is the closing of books to be handled in such a case?
 
 GUI Elements:
--- The user should be able to specify a default 'realized-gain'
+- The user should be able to specify a default 'realized-gain'
    account that is associated witha a stock account.
--- The user should be able to specify a default 'unrealized-gain'
+- The user should be able to specify a default 'unrealized-gain'
    account that is associated witha a stock account.
 	
+\section lotsfifo FIFO's
 
-FIFO's
-======
 What is a FIFO ?  A FIFO is a type of accounting policy where
 income from selling inventory is accounted by selling the oldest
 inventory first.  Thus, the profit/loss of the sale corresponds
@@ -286,9 +281,8 @@
 properly, so that it should be easy to add other policies, 
 e.g. LIFO.  See policy.c for what would need to be implemented.
 
+\section lotsimplement Implementation 
 
-Implementation 
-==============
 Every split has a pointer to a lot (which may be null).   A lot has a list
 of splits in it (so that the other splits in the lot can be easily found).
 A lot does not need to maintain a balance (this is easy enough to calculate 
@@ -301,22 +295,25 @@
 (In principle, the lots can be found by scanning every split in the
 account, but this is a painful process.)
 
-Implementing Cap Gains (Is a Pain in the Neck)
-==============================================
+\section lotscapgains Implementing Cap Gains (Is a Pain in the Neck)
+
 Although Lots provide a good conceptual framework for determing
 gains or losses when a lot is closed, cap-gains on half-open
 lots present additional complexities.   Consider the following
 stock purchase and subsequent sale of half the stock:
 
 Account A is a stock account
+
 Account B is a bank account
-Account C is an income account
 
+Account C is an income account
+\verbatim
                 Acct A       Txn    Acct B    Acct C
 Date     Action  Amt    Prc  Value    Amt      Amt
 1/1/01   buy     100s   $10  $1000   ($1000)   -
 2/2/02   sell    (50)s  $25  $1250    $1250    -
 2/2/02   gain     -      -    $750            $750
+\endverbatim
 
 The gain, shown in the third line, is computed as a straight
 sum of purchase price to sale price. 
@@ -345,22 +342,22 @@
 easier, although it makes the logic for setting the date
 more complex.  Ughh..
 
-Cap Gains Implementation Notes
-==============================
+\section loanscapnotes Cap Gains Implementation Notes
+
 Cap Gains will be handled by GnuCash as described above, using 
 two distinct transactions.  These transactions will be marked up
 using KVP, pointing to each other, so that the one can be found
 from the other.  Implementation in src/engine/cap-gains.c
 
 Quick API Overview:
-   xaccSplitGetCapGains(): Returns the capital gains associated with
+-  xaccSplitGetCapGains(): Returns the capital gains associated with
       a split.  Split must have been a sale/purchase in a previously 
       opened lot.
-   xaccSplitAssignToLot(): If a split is not already in a lot,
+-  xaccSplitAssignToLot(): If a split is not already in a lot,
       then it places it into a lot, using a FIFO accounting policy.
 
-Cap Gains Actual Implementation
-===============================
+\section lotscapimplement Cap Gains Actual Implementation
+
 Cap Gains are noted by creating a separate transaction with two 
 splits in it.  One of the splits is as described above: zero
 amount, non-zero value.   There is a GUI requirement that when
@@ -371,14 +368,14 @@
 source split, so that the one can be quickly found from the other.
 
 Things kept in sync:
--- date posted
--- value
--- void status
--- other things ?
+- date posted
+- value
+- void status
+- other things ?
 
 Things not kept in sync:
--- kvp trees
--- description, memo, action.
+- kvp trees
+- description, memo, action.
 
 The posted date is kept in sync using a data-constraint scheme.
 If xaccTransactionSetDatePosted() is called, the date change is
@@ -402,18 +399,17 @@
 recomputed; this in turn may require the split to be split into
 peices, or to be recombined into one from several pieces.
 
-TODO:
--- need to copy void status when source split date changes.
--- its possible for the the price, as recorded by one split
+\section lotstodo TODO
+- need to copy void status when source split date changes.
+- its possible for the the price, as recorded by one split
    to vary wildly from that in another split in the same
    transaction.  That's bad, prices should be normalized.
    Theres a routine to do this, xaccScrubSubSplitPrice()
    but its not currently used.
--- write automated test cases to handle each situation.
+- write automated test cases to handle each situation.
 
+\section lotsconversion Conversion
 
-Conversion
-==========
 As Lots are put into production, old GnuCash datasets
 will need to be converted.   Conversion will be done by running 
 all splits in an account through an accounting policy (currently, 
@@ -421,7 +417,7 @@
 match up purchases and sales so that these can be assigned to a Lot.
 
 The conversion algorithm will work as follows:
-
+\verbatim
 for each account {
    loop over splits {
       // perform the 'double-balance' check
@@ -433,6 +429,7 @@
       If (split amount < 0)  find oldest lot, put split in that lot
    }
 }
+\endverbatim
 
 See the file Scrub2.h for details of teh low-level API, and Scrub3.h 
 for the high-level API.
@@ -442,11 +439,11 @@
 lots, those cap gains will be ignored and will throw off balances.
 User will need to hand-edit to recover.
 
--- TODO: Modify scrub routines to look for splits with zero amount,
+- TODO: Modify scrub routines to look for splits with zero amount,
    try to assign these to lots as appropriate. ??
 
-GUI
-===
+\section lotsgui GUI
+
 A GUI for handling Lots is needed: ability to view a lot, and to cut/paste
 or move a split from one lot to another.  Need a GUI to create a lot,
 maybe append some notes to it.  Need ability to view account in lot-mode.
@@ -455,81 +452,76 @@
 different accounting policies (of which the FIFO policy is currently 
 implemented in the 'Scrub' routines).
 
-
-Basic GUI: 
+\subsection lotsbasicgui Basic GUI
    The goal of the basic GUI is to handle most usages of
    most lots in most places.  There also need to be special-purpose
    dialogs for specific applications, e.g. stocks, inventory, etc.
 
    Shows three areas: 
-   -- list of lots, one of which can be highlighted.
+- list of lots, one of which can be highlighted.
       Lot names can be edited in-place.
-   -- contents of a single lot (displayed in a narrow, 
+- contents of a single lot (displayed in a narrow, 
       mini-register view, showing only date, memo, quant, 
       balance)
-   -- list of splits not in any lot.
+- list of splits not in any lot.
       (not clear if screen real-estate allows side-by-side 
       placement, or if this must be above/below. above/below
       would suck)
 
    Shows various buttons:
-   -- two arrows, which move split into/out of lot.
+- two arrows, which move split into/out of lot.
       This is a traditional way of moving something from one
       list to another, but some UI designers argue against this.
       Is there a better way to move splits into/out-of a lot?
 
-   -- button, labelled 'close lot', which, when pressed, will
+- button, labelled 'close lot', which, when pressed, will
       set lot balance to zero. (by using fifo on the unassigned 
       splits, if possible).
 
-   -- A field showing realized gain/loss on a closed lot, and
+- A field showing realized gain/loss on a closed lot, and
       a pull-down allowing the gain/loss to be posted to a 
       specific account.
       (The default is stored in kvp:/lots-mgmt/gains-acct/)
 
-   -- button or menu item, 'add notes to this lot'.
+- button or menu item, 'add notes to this lot'.
 
-todo:
----- change lot viewer to use gnc-query-list
----- after the gnome2 port, add the 'unclaimed splits" window
+\subsection lotsguitodo todo:
+- change lot viewer to use gnc-query-list
+- after the gnome2 port, add the 'unclaimed splits" window
      to the lot viewer, this will allow it to be a simple lot editor.
----- Add a new policy (or change the existing fifo policy) to only 
+- Add a new policy (or change the existing fifo policy) to only 
      open lots with a particular sign for the opening split.  This
      way, things like business invoice overpayments are not used
      to start new lots, but are instead applied to new purchases.
 
+\section lotsstatus Status
 
-Status
-======
- o Core support for Lots in the engine is complete (April 2002, ships in 
+- Core support for Lots in the engine is complete (April 2002, ships in 
    version 1.8.x, used by business backend).  
- o See src/engine/gnc-lot.h for the public API.
- o The XML backend support for lot is complete (April 2002,  ships in 
+- See src/engine/gnc-lot.h for the public API.
+- The XML backend support for lot is complete (April 2002,  ships in 
    version 1.8.x).
- o Scrub routines to automatically take old gnucash datasets and
+- Scrub routines to automatically take old gnucash datasets and
    transition them to double-balanced lots have been implemented.
    These implement a FIFO accounting policy (April 2003)
- o Closed/Open lots are handled correctly during book closing.
+- Closed/Open lots are handled correctly during book closing.
    See src/engine/Period.c (August 2003)
- o Work is finished on the automatic computation & tracking 
+- Work is finished on the automatic computation & tracking 
    of gain/loss transactions.  Most of the engine API is in 
    src/engine/cap-gains.h although the high-level 'scrub' API
    is in src/engine/Scrub3.h.  See src/doc/constraints.txt for 
    a 'big picture' view of how its done. (September 2003)
- o A basic lot-viewing GUI is in src/gnome/lot-viewer.c
+- A basic lot-viewing GUI is in src/gnome/lot-viewer.c
    This GUI cannot 'edit' lots. (August 2003)
-
- o The Postgres backend does not yet support lots.
+- The Postgres backend does not yet support lots.
    XXX In particular, the programming API for Lots is currently
    non-transactional. There's no dirty flag, and the backend is not 
    signalled that the lots have changed.  This is the case both for
    Scrub2.c and for src/gnome/lot-viewer.c (which changes KVP's).
-
- o Need to write extensive test cases to verify the rather complex
+- Need to write extensive test cases to verify the rather complex
    constraints between the gains and lots and splits.
+- Need to write a cap-gains report!
 
- o Need to write a cap-gains report!
-
-
+*/
 
 -------------------------- end of file ------------------------------
Index: multicurrency-discussion.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/multicurrency-discussion.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/multicurrency-discussion.txt -Lsrc/doc/multicurrency-discussion.txt -u -r1.1 -r1.2
--- src/doc/multicurrency-discussion.txt
+++ src/doc/multicurrency-discussion.txt
@@ -1,202 +1,281 @@
+/** \page multicurrency Multicurrency Discussion
+
 <cstim> goonie: well...
+
 <goonie> How about this: 
+
 <cstim> goonie: You can print each value as a gnc-monetary
-<cstim> goonie: this?
+ goonie: this?
+
 <goonie> cstim: don't worry, go on with your outline.
+
 <cstim> How are you printing balances right now?
-<cstim> I guess you plug a gnc-numeric into the html code.
-<cstim> If you do a s/gnc-numeric/gnc-monetary/
-<cstim> ... then everything would be multi-currency compilant
-<cstim> Of course the gnc-monetary needs the actual currency specified. 
-<cstim> Would that lead to problems
-<cstim> ?
-<cstim> Definition of gnc-monetary is in src/scm/gnc-numeric.scm
+ I guess you plug a \a gnc-numeric into the html code.
+ If you do a s/\a gnc-numeric/\a gnc-monetary/
+ ... then everything would be multi-currency compilant
+ Of course the \a gnc-monetary needs the actual currency specified. 
+ Would that lead to problems?
+Definition of \a gnc-monetary is in src/scm/gnc-numeric.scm
+
 <goonie> Cool.
-<cstim> Right now every gnc-monetary is printed like $500.23, DEM 123.45, CHF 456.32
+
+<cstim> Right now every \a gnc-monetary is printed like $500.23, DEM 123.45, CHF 456.32
+
 <goonie> I think that should work fine.
-<cstim> but the formatting of gnc-monetary could be modified by any style sheet.
-<cstim> goonie: ok. 
+
+<cstim> but the formatting of \a gnc-monetary could be modified by any style sheet.
+
 <goonie> You also had some code for calculating totals in multiple currencies?
+
 <cstim> goonie: ouch. Yes. But that gets complicated quickly.
+
 <goonie> Yes, it does.
+
 <cstim> goonie: You will need to use a commodity-collector from report-utilities.scm
+
 <goonie> OK, cool, I think I can figure it out.
-<<cstim> goonie: You will need to use a commodity-collector from report-utilities.scm
-<goonie> OK, cool, I think I can figure it out.
+
 <cstim> If you want the total of only one commodity, you can use the 'getpair action of commodity-collector...
-<cstim> but if you want to show (correctly) all of the currencies, you will have a lot of trouble.
-<cstim> Basically, I have the "reference implementation" in html-utilities.scm .
+ but if you want to show (correctly) all of the currencies, you will have a lot of trouble.
+ Basically, I have the "reference implementation" in html-utilities.scm .
+
 <goonie> OK, excellent.  
+
 <cstim> You can see how I print just one balance...
-<cstim> in the big function gnc:html-build-acct-table, line 297, where I print the total sum.
-<cstim> That would be a starting point to see how a balance with a bunch of commodities gets printed.
-<goonie> cstim: taking it up a level for a second, how would you prefer a total for a collection of splits in different currencies to be displayed?
+ in the big function \a gnc:html-build-acct-table, line 297, where I print the total sum.
+ That would be a starting point to see how a balance with a bunch of commodities gets printed.
+
+<goonie> cstim: taking it up a level for a second, how would you prefer a total for a 
+collection of splits in different currencies to be displayed?
+
 <cstim> what do you mean by "total for splits"?
-<goonie> OK, consider a transaction report for the account Expenses:Beer for the period 1/1/2001 to 2/1/2001 (UK date format ;)
-<goonie> and let's say I've had beer in Australia, the US, Germany, and Hong Kong during that period.
-* cstim prefers to have the beer in Germany...
-<goonie> further, let's assume that my "native currency" is AUD.
-<goonie> cstim: try some of the Australian specialty beers.
+
+<goonie> OK, consider a transaction report for the account Expenses:Beer for the period 
+1/1/2001 to 2/1/2001 (UK date format ;)
+ and let's say I've had beer in Australia, the US, Germany, and Hong Kong during that period.
+ further, let's assume that my "native currency" is AUD.
+ cstim: try some of the Australian specialty beers.
+
 <cstim> yes
+
 <goonie> cstim: but even VB or Carlton Draught is an improvement on soap suds . . . er, Budweiser.
-<goonie> but back to Gnucash matters . . . 
-<-- dres has quit (Connection reset by peer)
+ but back to Gnucash matters . . . 
+
 <cstim> yes
+
 <goonie> now there's several possibilities for doing the totals here . . .
+
 <cstim> wait wait
-<cstim> what accounts and what splits are you thinking of?
-<cstim> or in other words, what are your sorting/account/viewing parameters?
+ what accounts and what splits are you thinking of?
+ or in other words, what are your sorting/account/viewing parameters?
+
 <goonie> Only one account selected, sorted by date, say (we'll discuss subtotals in a sec).
+
 <cstim> goonie: One account means that there is only one currency, right?
+
 <goonie> dave_p: hang on, let me just check . . . 
-<goonie> s/dave_p/cstim
+ s/dave_p/cstim
+
 <cstim> oh
-* cstim screwed up his homework about pole-zero plots
+
 <goonie> dave_p: what's the status of currency-in-transaction?
+
 <cstim> s/dave_p/???/ 
+
 <goonie> nope, really dave_p this time :)
+
 <cstim> dave_p is away: I'm doin' stuff
-<cstim> AFAIK an account has a commodity and a transaction has a commodity.
+ AFAIK an account has a commodity and a transaction has a commodity.
+
 <goonie> correct.
-<cstim> gnc:account-get-commodity, gnc:transaction-get-commodity
+
+<cstim> \a gnc:account-get-commodity, \a gnc:transaction-get-commodity
+
 <goonie> However, read the comments in TransactionP.h
-<goonie>   /* The common_currency field indicates the currency type that
-<goonie>    * all of the splits in this transaction share in common.  This
-<goonie>    * field is going to replace the currency field in the account
-<goonie>    * structures. 
-* cstim is reading
+\verbatim
+    * The common_currency field indicates the currency type that
+    * all of the splits in this transaction share in common.  This
+    * field is going to replace the currency field in the account
+    * structures. 
+\endverbatim
+
 <cstim> yeah, that's right.
+
 <goonie> So, in the short term, your assumption is correct.
-<goonie> In the long term, not the case.
+ In the long term, not the case.
+
 <cstim> What I would usually call the "currency" of an account is in Gnucash acctually called "security".
-<cstim> gnc:account-get-commodity will return this security of the account.
+\a gnc:account-get-commodity will return this security of the account.
+
 <goonie> Gotta love terminology.
-<goonie> The reason for the differentiation is for stock/mutual fund accounts, IIRC.
-<cstim> info IIRC?
-<goonie> If I Recall Correctly.
-<cstim> oh
-<cstim> BTW, is cvs down? Seems like...
-<goonie> Yes.
-<goonie> It's driving the rest of us nuts too .
+ The reason for the differentiation is for stock/mutual fund accounts, if I recall correctly.
+
 <cstim> The more recent comments about commodities are in Transaction.h, line 229 ff.
-<cstim> or Account.h, line 203ff.
-<goonie> Yep, so the situation I described above can't happen right now, but will be possible in the near future.
-<goonie> Which brings us back to how should we display things:
-<goonie> A total for each currency.
-* cstim doesn't yet understand the situation.
+ or Account.h, line 203ff.
+
+<goonie> Yep, so the situation I described above can't happen right now, but will be possible 
+in the near future. Which brings us back to how should we display things:
+ A total for each currency.
+
 <cstim> What account would that be?
+
 <goonie> The account Expenses:Beer.
+
 <cstim> What security will it have?
+
 <goonie> AUD
+
 <cstim> okay.
+
 <cstim> go ahead
+
 <goonie> OK, say that there's only four transactions in that account for the period in question:
-<goonie> $2 in AUD, 5 USD, 1 EURO, and 12 HKD being the values.
-<goonie> What should we display as the total(s)?
-<goonie> Or more to the point, what options do we need to offer?
-<cstim> waitwait.
-<cstim> Expenses:beer has security AUD.
---> dres (dres at user-2ivf2cm.dialup.mindspring.com) has joined #gnucash
-<dres> have I pointed out that having a modem connection sucks recently? :)
-<cstim> So there is one Transaction between Cash:USD and the beer.
-<cstim> And one between Cash:Euro and the beer.
-<cstim> And one between (what the heck is) Cash:HKD and the beer.
+ $2 in AUD, 5 USD, 1 EURO, and 12 HKD being the values. What should we display as the total(s)?
+ Or more to the point, what options do we need to offer?
+
+<cstim> waitwait. Expenses:beer has security AUD.
+ So there is one Transaction between Cash:USD and the beer.
+ And one between Cash:Euro and the beer.
+ And one between (what the heck is) Cash:HKD and the beer.
+
 <goonie> Hong Kong Dollar, BTW.
-<dres> hong kong dollars?
-<goonie> yep, they have their own currency.
-<dres> smart of them.
+
 <cstim> And, say, those Transaction have the transaction-commodity according to the Cash:*
+
 <goonie> yep.
+
 <cstim> But the split which belongs to Exp:Beer has only one value
-<cstim> and that value represents the beer expense in AUD.
-<cstim> i.e. in the split's account's security.
+ and that value represents the beer expense in AUD.
+ i.e. in the split's account's security.
+
 <goonie> hang on . . . let me think this through carefully . . . 
+
 <cstim> ok, lets get things straight: Each split has two fields, value and damount
-* goonie is thinking this through.
-<cstim> Quote from a grib posting last October:
-<cstim>   - Eliminate the 'share price' field from the Split structure and
-<cstim>     replace it with a 'value' field.  The 'value' is a translation of
-<cstim>     the Split's 'damount' (which is the amount of the Account's
-<cstim>     security involved) into the Transaction's balancing currency.
-<cstim> the last sentence is the one that matters.
-<goonie>   /* value is the amount of the account's currency involved,
-<goonie>    * damount is the amount of the account's security.  For 
-<goonie>    * bank-type accounts, currency == security and 
-<goonie>    * value == damount. */
-<goonie>   gnc_numeric  value;         
-<goonie>   gnc_numeric  damount;  
-<goonie> from src/engine/TransactionP.h
+ Quote from a grib posting last October:
+\verbatim
+   - Eliminate the 'share price' field from the Split structure and
+     replace it with a 'value' field.  The 'value' is a translation of
+     the Split's 'damount' (which is the amount of the Account's
+     security involved) into the Transaction's balancing currency.
+\endverbatim
+ the last sentence is the one that matters.
+
+<goonie>
+\verbatim
+    * value is the amount of the account's currency involved,
+    * damount is the amount of the account's security.  For 
+    * bank-type accounts, currency == security and 
+    * value == damount. 
+   gnc_numeric  value;         
+   gnc_numeric  damount;  
+\endverbatim
+ from src/engine/ TransactionP.h
+
 <cstim> that's outdated.
-<cstim> In the long run: value is the amount of the transaction-commodity involved, damount is the amount of the account-commodity involved.
-<goonie> OK, but the value returned from gnc:split-get-value is the value rather than the damount.
-<goonie> sorry for the long delay, I was reading code to make sure I understood what was going on.
-<goonie> value being the one denominated in the transaction-commodity.
-<cstim> That's right. gnc:split-get-value gives you the value, whereas gnc:split-get-share-amount gives you the damount
-<cstim> Maybe that functions need some name change in the future.
+ In the long run: value is the amount of the transaction-commodity involved, damount is 
+the amount of the account-commodity involved.
+
+<goonie> OK, but the value returned from \a gnc:split-get-value is the value rather than the damount.
+ sorry for the long delay, I was reading code to make sure I understood what was going on.
+ value being the one denominated in the transaction-commodity.
+
+<cstim> That's right. \a gnc:split-get-value gives you the value, whereas 
+\a gnc:split-get-share-amount gives you the damount
+ Maybe that functions need some name change in the future.
+
 <goonie> perhaps.
-<goonie> the trouble is that there are so many things that need names in gnucash, that you start to run out :)
+ the trouble is that there are so many things that need names in gnucash, that you start to run out :)
+
 <cstim> :)
-<cstim> We could gnc:split-get-share-amount => gnc:split-get-damount
-<cstim> whatever.
-<cstim> My point for the Beer is
-<cstim> let's have some.
-<dres> beer doesn't need a point.  it just is.
+ We could \a gnc:split-get-share-amount => \a gnc:split-get-damount
+ whatever. My point for the Beer is let's have some.
+
 <cstim> oops. 
-<cstim> I would expect that the transaction report uses gnc:split-get-share-amount
-<cstim> which in this case gives you already the amounts exchanged into AUD and everything's fine.
+ I would expect that the transaction report uses \a gnc:split-get-share-amount
+ which in this case gives you already the amounts exchanged into AUD and everything's fine.
+
 <goonie> You would prefer that over the transaction-specific value, then?
-<cstim> Well, if I want the list for one specific account, then I would expect all amounts to be in that account's commodity, i.e. the account-commodity (formerly known as security :)
+
+<cstim> Well, if I want the list for one specific account, then I would expect all amounts to be 
+in that account's commodity, i.e. the account-commodity (formerly known as security :)
+
 <goonie> yep.
-<goonie> But then the problem just arises in a different light if you have multiple accounts, sorted by date, say.
-<cstim> I would recommend a name change for gnc:split-get-share-amount.
-<cstim> multiple accounts.
-<cstim> okay, let's talk about that.
-<cstim> what scenario do you think of?
+ But then the problem just arises in a different light if you have multiple accounts, sorted by date, say.
+
+<cstim> I would recommend a name change for \a gnc:split-get-share-amount.
+ multiple accounts. okay, let's talk about that. what scenario do you think of?
+
 <goonie> cstim: could you mail Dave wrt function renaming?
+
 <cstim> I'll send a mail to the ML
-<goonie> OK, let's say you've selected Expenses:Champagne (in Francs), Expenses:Saki (in Yen), and Expenses:VB (in Aussie dollars), and you want a report for all those transactions for the past month, sorted by date.
-<goonie> You have Cash:Francs, Cash:Yen and Cash:Aussie accounts with the expected currencies.
+
+<goonie> OK, let's say you've selected Expenses:Champagne (in Francs), Expenses:Saki 
+(in Yen), and Expenses:VB (in Aussie dollars), and you want a report for all those transactions 
+for the past month, sorted by date. You have Cash:Francs, Cash:Yen and 
+Cash:Aussie accounts with the expected currencies.
+
 <cstim> what's VB?
+
 <goonie> Victoria Bitter (Australian Beer).
-<cstim> okay.
-<cstim> well...
+
+<cstim> okay. well...
+
 <goonie> If you want a distinctively Australian Alcoholic beverage, s/VB/Sparkling Red
-<cstim> Lets have some.
-* goonie offers cstim a glass of fine Rutherglen sparkling red.
-<cstim> Transaction report: but it doesn't make much sense to show a total sum for that anyway, does it_
-<cstim> s/_/?/
-<cstim> oh well, it might.
+
+<cstim> Lets have some. ( goonie offers cstim a glass of fine Rutherglen sparkling red. )
+ Transaction report: but it doesn't make much sense to show a total sum for that anyway, does it_
+ s/_/?/ oh well, it might.
+
 <goonie> Option 1) display a total for each currency in the report.
+
 <cstim> exactly.
-<cstim> Option 2) shows the total for only one currency, the report-currency.
-<cstim> Option 3) somehow gets the right exchange rate so that it also ends up with only one total.
-<cstim> I'd recommend option 2 for now.
-<cstim> For option one you basically would have to copy the code out of the html-build-acct-table function cited above.
+ Option 2) shows the total for only one currency, the report-currency.
+ Option 3) somehow gets the right exchange rate so that it also ends up with only one total.
+ I'd recommend option 2 for now.  For option one you basically would have to copy the 
+code out of the html-build-acct-table function cited above.
+
 <goonie> So, what happens to transactions not in the report-currency in option 2) - they aren't totalled?
+
 <cstim> Maybe with the tons of comments it is do-able
-<cstim> goonie: yes, they dissolve in heat and aren't totalled.
-<goonie> OK, I think I can implement 1) and 2).  3 (which might have to be split into 3a, 3b . . . ) can probably wait.
-<goonie> Well, I could implement a "quickie" 3a that just grabs a current exchange rate and does the conversion on it.
-<cstim> again, for 1) you "just" have to copy ~100 lines of code from html-utilities.scm and adapt them to your table structure.
+ goonie: yes, they dissolve in heat and aren't totalled.
+
+<goonie> OK, I think I can implement 1) and 2).  3 (which might have to be split into 3a, 3b . . . ) 
+can probably wait. Well, I could implement a "quickie" 3a that just grabs a current exchange 
+rate and does the conversion on it.
+
+<cstim> again, for 1) you "just" have to copy ~100 lines of code from html-utilities.scm and 
+adapt them to your table structure.
+
 <goonie> that has all sorts of problems, but might be useful if taken with a grain of salt.
-<goonie> OK.
+ OK.
+
 <cstim> oh, a quick 3) costs you about 5 lines of extra cost.
+
 <goonie> I think I can cope with that :)
-<cstim> just look into pnl.scm and see how they (i.e. I) use gnc:make-exchange-alist  and gnc:make-exchange-function
-<cstim> both from src/scm/commodity-utilities.scm
-<goonie> OK, cool.
-<goonie> Thanks for your help.
+
+<cstim> just look into pnl.scm and see how they (i.e. I) use gnc:make-exchange-alist  and 
+\a gnc:make-exchange-function both from \a src/scm/commodity-utilities.scm
+
+<goonie> OK, cool. Thanks for your help.
+
 <cstim> what did you mean by "quickie" 3a that just grabs a current exchange rate "
-<cstim> a dialog box? a parameter? gnc-prices?
-<goonie> gnc-prices.
-<goonie> or a parameter.
-<goonie> something other than digging through a bunch of historical data trying to figure out what the exchange rate was at the time of particular transactions.
-<cstim> parameter: Bad. gnc-prices: Goood. I'd be happy if someone could implement that to augment the current code in commodity-utilities.scm
-<cstim> Oh, the exchange rate at the time of a particular *transaction* is easy --
-<cstim> -- that's just the fraction value/damount .
+ a dialog box? a parameter? gnc-prices?
+
+<goonie> gnc-prices. or a parameter.
+ something other than digging through a bunch of historical data trying to figure out what 
+the exchange rate was at the time of particular transactions.
+
+<cstim> parameter: Bad. gnc-prices: Goood. I'd be happy if someone could implement that 
+to augment the current code in commodity-utilities.scm Oh, the exchange rate at the time 
+of a particular *transaction* is easy -- that's just the fraction value/damount .
+
 <goonie> not always - what if the transaction is (say) yen/yen but you want to display in dollars?
-<goonie> for instance, our glass of saki, paid for in cash yen.
-<cstim> Yes, right. currently the commodity-utilities stuff uses a weighted average over the history. But using the last known exchange rate instead may be useful at times.
-<cstim> Maybe I'll implmement something like that
-<cstim> maybe if i have time :)
-<goonie>diff -up 'gnucash/src/engine/Query.c' 'gnucash_transaction_report/src/engine/Query.c'
+ for instance, our glass of saki, paid for in cash yen.
+
+<cstim> Yes, right. currently the commodity-utilities stuff uses a weighted average over the 
+history. But using the last known exchange rate instead may be useful at times. Maybe I'll 
+implmement something like that maybe if i have time :)
+
+<goonie>diff -up 'gnucash/src/engine/ Query.c' 'gnucash_transaction_report/src/engine/ Query.c'
+
+*/
Index: prices.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/prices.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/doc/prices.txt -Lsrc/doc/prices.txt -u -r1.2 -r1.3
--- src/doc/prices.txt
+++ src/doc/prices.txt
@@ -1,10 +1,15 @@
+/** \page pricedocs Price Overview
 
+The Prices and the Price DB overview is in src/doc/design/engine.texinfo
+(also available online as individual HTML:
+http://code.neil.williamsleesmill.me.uk/texi/gnucash-design_4.html#SEC66 )
 
-Prices and the Price DB API is documented in design/engine.texinfo
+API: \ref Price
 
 Below, a few meta-notes about how prices and the GUI (should) interact:
 
-----------
+\section pricecompute Computing Prices
+
 When a price is computed from the (value/amt) that a user entered
 in a register, and this price is stored in the priceDB, then 
 both the register entry and the price must have links to each other
@@ -20,14 +25,15 @@
 the correpsonding priceDB entry must be deleted as well (since
 it is not safe to assume that the price is 'correct').
 
-----------
+\section Rounding errors
+
 When doing price math in the register, one must be careful, because
 round-off errors can make 'obvious' math inaccurate.  Note that if
 we define price as (value/amt), then we will find that 
 value != price * amt due to roundoff handling.  One must be careful
 and consistent in handling this in the register, as otherwise
 users will be driven crazy by inconsitent behaviour.
-----------
-
 
 (Linas Vepstas April 2003)
+
+*/
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/doc/.cvsignore -Lsrc/doc/.cvsignore -u -r1.3 -r1.4
--- src/doc/.cvsignore
+++ src/doc/.cvsignore
@@ -3,3 +3,5 @@
 html
 Makefile
 Makefile.in
+.DS_Store
+
Index: constraints.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/constraints.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/doc/constraints.txt -Lsrc/doc/constraints.txt -u -r1.4 -r1.5
--- src/doc/constraints.txt
+++ src/doc/constraints.txt
@@ -1,12 +1,11 @@
+/** \page financeconstraints Financial Constraints in GnuCash
 
-                  Financial Constraints in GnuCash
-                  --------------------------------
-                  Linas Vepstas <linas at linas.org>
+				Linas Vepstas <linas at linas.org>
                         September 2003
  
 
-Overview:
----------
+\section financeoverview Overview:
+
 The GnuCash Engine implements a set of financial constraints so
 that a set of basic/core accounting rules are obeyed.  The best
 known example is the "double-entry" constraint: the total value
@@ -22,8 +21,8 @@
 easier to add and work with new types of constraints.
 
 
-Introduction:
--------------
+\section financeintro Introduction:
+
 There are three very different classes of constraints within GnuCash,
 which should not be confused with each other. They work in very
 different ways and have very different goals.  First, there are
@@ -61,9 +60,9 @@
 as there is pressure to support more complex constraints that vary
 by region/country, by account type, by industry, etc.
 
-Why Not 'Lazy Evaluation'?
---------------------------
-Lazy evaluation is supperfically like constraints, but differs in an
+\section financelazy Why Not 'Lazy Evaluation'?
+
+Lazy evaluation is superficially like constraints, but differs in an
 important way.  With lazy evaluation, when something changes (e.g.
 the posted date) it is marked dirty. Later, when something else needs
 something (e.g. the posted date on a gains split), the dirty flag
@@ -79,24 +78,21 @@
 deopendencies.  At this time, the sync point is the xaccTransCommitEdit()
 subroutine.
 
-List of Constraints
--------------------
+\section financelist List of Constraints
+
 The following is a list of the constraints that are currently
 implemented in the GnuCash Engine, with a short description of what
 they are, and how they work.
 
--- Double Entry
--- Double-Balance
--- Date Posted of Gains Transaction
+- Double Entry
+- Double-Balance
+- Date Posted of Gains Transaction
    The posted date of the gains transaction is kept in sync with the
    posted date on the transaction that is the source of the gains.
    See the document 'lots.txt', section 'Cap Gains Actual Implementation' 
    for details.
--- Value of Gains Transaction
+- Value of Gains Transaction
    The value recorded by teh gains transaction is kept in sync with
    the value
 
-
-
-
-
+*/
Index: backup.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/backup.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/backup.txt -Lsrc/doc/backup.txt -u -r1.1 -r1.2
--- src/doc/backup.txt
+++ src/doc/backup.txt
@@ -1,3 +1,6 @@
+/** \page backuppolicy Backup Design
+
+API: \ref Backend
 
 Currently, backups and log files are automatically stored by the engine
 with date/time stamps every time the user hits 'save' in the gui.
@@ -5,36 +8,31 @@
 (The actual file writing is done by xaccWriteAccountGroupFile() in
 in src/engine/FileIOP.h)
 
-Proposed design changes:
-------------------------
-a) Allow user to configure which directory backups should be put into.
-   (currently, this is same as current directory).  Requires changes to
-   engine FileIOP.h as well as GUI.
+\section backupchanges Proposed design changes:
 
+-# Allow user to configure which directory backups should be put into.
+   (currently, this is same as current directory).  Requires changes to
+   engine FileIOP.h as well as GUI.\n
    One possible default is ~/.gnucash/data/  (Which is supposed to 
    be the place where files are saved if no directory is specified.!?)
-
-b) Prompt the user to make a backup every third save.  Make this number
+-# Prompt the user to make a backup every third save.  Make this number
    configurable. If no default backup path set, prompt to set it,
    with suggested path being ~/.gnucash/backups/
-
-c) If save format was XML text, then could use RCS ...
-   Alternately,
-For those that don't know, xdelta is like RCS, but it's designed to
-handle any kind of data, including binary, is supposed to work really
-well, and transparently handles gzipped data with some form of MD5sum
-verification.  It's also available in library form.  Like RCS it would
-give us the ability to do cool things like snapshot the data every so
-often for nearly no cost.  Want to see what things looked like 6
-months ago?  Just enter the right date into the "time-warp" dialog :>
-
-For those on Debian systems, just install the xdelta and
-libxdelta2-dev packages.  Others can get the source from
-ftp://www.xcf.berkeley.edu/pub/xdelta/, or just go to
-ftp.debian.org:/pub/debian/dists/unstable/main/source/utils/xdelta*.tar.gz
-
-
-d) Could monitor how many changes (records altered) the user has made,
+-# If save format was XML text, then could use RCS ...
+	Alternately,
+	For those that don't know, xdelta is like RCS, but it's designed to
+	handle any kind of data, including binary, is supposed to work really
+	well, and transparently handles gzipped data with some form of MD5sum
+	verification.  It's also available in library form.  Like RCS it would
+	give us the ability to do cool things like snapshot the data every so
+	often for nearly no cost.  Want to see what things looked like 6
+	months ago?  Just enter the right date into the "time-warp" dialog :>\n
+	For those on Debian systems, just install the xdelta and
+	libxdelta2-dev packages.  Others can get the source from
+	ftp://www.xcf.berkeley.edu/pub/xdelta/, or just go to
+	ftp.debian.org:/pub/debian/dists/unstable/main/source/utils/xdelta*.tar.gz
+-# Could monitor how many changes (records altered) the user has made,
    and could prompt for more frequent saves if lots of editing has
    ocurred...
 
+*/
Index: netlogin.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/netlogin.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/netlogin.txt -Lsrc/doc/netlogin.txt -u -r1.1 -r1.2
--- src/doc/netlogin.txt
+++ src/doc/netlogin.txt
@@ -1,26 +1,20 @@
+/** \page networkoverview GnuCash Network Login
 
-GnuCash Network Login
----------------------
 A quick sketch of how network login works when using the xml-web backend
 for communicating with a gnucash server.
 
-
-1) User enters in a URL Location via GUI dialogue. Location is assumed
+-# User enters in a URL Location via GUI dialogue. Location is assumed
    to be plain html, and is displayed with gnc_html_show_url()
    in its own window.
-
-2) The displayed page is presumably some kind of login page.  It is not
+-# The displayed page is presumably some kind of login page.  It is not
    gnucash specific, and is entirely up to the webmaster or sysadmin
    to provide, modify, etc. the login & authentication information.
    The user types in name, passord, whatever.
-
-3) The authentication mechanism issues a guid which will be used
+-# The authentication mechanism issues a guid which will be used
    to identify the session. The guid is placed in a cookie labelled
-   "gnc-server-sesion-guid=xxxxxxxxxxxxxxxxxxxxx"
-
+   "gnc-server-sesion-guid=xxxxxxxxxxxxxxxxxxxxx"\n
    Because a cookie can be snoopedand then used to steal a session, 
    the only secure way of doing this is to use SSL.
+-# The cookie is used to identify the session to the gnc-server.
 
-4) The cookie is used to identify the session to the gnc-server.
-
-
+*/
Index: backend-api.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/backend-api.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/backend-api.txt -Lsrc/doc/backend-api.txt -u -r1.1 -r1.2
--- src/doc/backend-api.txt
+++ src/doc/backend-api.txt
@@ -1,74 +1,62 @@
-		GnuCash Backend API (v2)
+/** \page backendapi QOF Backend Design
 
 		     Derek Atkins
 		   <derek at ihtfp.com>
 
+		   Neil Williams
+		   <linux at codehelp.co.uk>
+
 Created: 2002-10-07
+Updated: 2005-05-22
 
-Problem:
---------
+API: \ref Backend
 
-The current Backend API is hardcoded to dealing with Accounts,
-Transactions, and Splits.  The Backend Query API does not allow
-caching of a Query (meaning the Backend has to recompile the Query
-every time the query is executed).  With the inclusion of a multitude
-of new datatypes and plugable architure, the Backend API requires
-modification to handle the new data.
+\section outline Outline:
 
+The Backend Query API allows caching of a Query (meaning the Backend
+does not have to recompile the Query every time the query is executed).
 
-"Dynamic" Data Types:
----------------------
+\section newobjects New QOF Objects
 
 The engine has a set of APIs to load new data types into the engine.
-The Backends need this as well.  Currently the engine supplies a set
-of registration functions to register Backend handlers for new data
-types.  Each Backend defines a plug-in API and then data types can
-register themselves.  This is how extensibility works.
-
-For example, the "file" Backend defines the API for plug-in data
-types.  It requires data types to implement four functions:
-create_parser(), add_item(), get_count(), and write().
-
-A new data-type, the GncFOO type, implements the required APIs and
-registers itself with gncObjectRegisterBackend().  The file backend
-can then either lookup the GncFOO object by name by calling
-gncObjectLookupBackend(), or can iterate over all the registered
-objects by using gncObjectForeachBackend(), depending on the
-particular backend operation.
-
-By using these functions, new data types can be registered and new
-types of data stored using generic Backend API functions.  The backend
-implementing generic *_edit() or session_load() APIs could then lookup
-data types by name or iterate over all known data types to determine
-how to load or save data.  Each backend can define the set of
-interfaces it requires data-types to implement.
-
-
-Handling Queries:
------------------
-
-The version-1 Backend provides a single run-query method that returns
-a list of splits.  This has proven to be limiting, and recompiling the
-query into the backend format each time can be time consuming.  To fix
-this the backend query API needs to be broken into three pieces:
-
-    gpointer (*query_compile)(Backend* be, Query* query);
-
-	compiles a Query* into whatever Backend Language is necessary.
-
-    void (*query_free)(Backend* be, gpointer query);
-
+The Backends use this as well. There is a noticeable difference
+between QOF and GnuCash: GnuCash extends the backend by defining routines
+for each object. QOF backends handle each object equally and generically.
+
+A new object is declared using the base QOF types and zero or more
+references to other QOF objects. Each QOF backend must handle each
+base QOF type and references to other objects - usually by storing
+the type of the referenced object and the GUID of the referenced object
+as the value and the GUID of the original object as the key in a
+GHashTable or other lookup mechanism within the backend. See
+::QofEntityReference.
+
+\section backendqueries Handling Queries:
+
+The backend query API is broken into three pieces:
+
+\subsection querycompile Compiling a QofQuery
+\verbatim
+	gpointer (*query_compile)(QofBackend* be, QofQuery* query);
+\endverbatim
+	compiles a QofQuery* into whatever QofBackend language is necessary.
+
+\subsection queryfree Free the query
+\verbatim
+	void (*query_free)(Backend* be, gpointer query);
+\endverbatim
 	frees the compiled Query (obtained from the query_compile method).
 
+\subsection queryrun Run the query
+\verbatim
     void (*query_run)(Backend* be, gpointer query);
-
+\endverbatim
 	executes the compiled Query and inserts the responses into the
 	engine.  It will search for the type corresponding to the
 	Query search_for type: gncQueryGetSearchFor().  Note that the
 	search type CANNOT change between a compile and the execute,
 	but the query infrastructure maintains that invariant.
 
-
 In this manner, a Backend (e.g. the Postgres backend) can compile the
 Query into its own format (e.g. a SQL expression) and then use the
 pre-compiled expression every run instead of rebuilding the
@@ -81,80 +69,17 @@
 and not even a challenging one, but it needs to be clearly
 acknowledged up front.
 
-Also note that this API can usurp the price_lookup() method, assuming
-the GNCPriceLookup can be subsumed by the Query.
-
-
-Handling Multiple Datatypes:
-----------------------------
-
-The current API specifically defines "edit" functions for Accounts and
-Transactions.  This rather rigid API does not allow for adding new
-data types to the Backend.  A better approach is to generalize the
-begin_edit, rollback_edit, and commit_edit APIs into a general API
-which is dynamically sub-typed at runtime:
-
-    void (*begin_edit)(Backend* be, GNCIdTypeConst data_type, gpointer object);
-    void (*rollback_edit)(Backend* be, GNCIdTypeConst data_type, gpointer object);
-    void (*commit_edit)(Backend* be, GNCIdTypeConst data_type, gpointer object);
-
-This API looks just like the existing API for Accounts, Periods, and
-Price entries, although it quite obviously does not match the
-Transaction commit.  Note that not all data-types need to implement
-all three types (there is no rollback on Accounts, Prices, or
-Periods).  Note that certain data-types can _still_ be special (e.g.
-the Period handling).
-
-Question: why does the transaction commit have two transactions?  In
-particular, can't the backend "know" that the "original" transaction
-is in "trans->orig".  Besides, if the Backend is truly in charge of
-the data, then the engine can make changes to the local copy and can
-"back out" by accessing the backend (or commit by sending it to the
-backend).  Can't one assume that the "backend" knows how the engine is
-implementing the rollback caching?
-
-
-When to load data?
-------------------
+\section backendload When to load data?
 
 Data loads into the engine at two times, at start time and at query
-time.  Loading data during queries is discussed above.  This section
+time. Loading data during queries is discussed above.  This section
 discusses data loaded at startup.
 
-Currently the API has book_load() and price_load().  That's nice for
-the book and price DB, but there may be other items that need to be
-loaded at "start" time.  A better approach would be to combine all
-the _load() APIs into a single API:
-
-    void session_load(Backend*, GNCBook*);
-
-This one API would load all the necessary "start-time" data, including
-the Chart of Accounts, the Commodity Table, the Scheduled Transaction
-List, the Pricedb, etc.  There is no need to have multiple APIs for
-each of the data types loaded at start-time.  Dynamic data-types that
-require data to be loaded at start-time can register a specific API
-for the backend to execute the load.
-
-
-Usefulness of sync_*()?
------------------------
-
-What is the point of sync_all(), sync_group(), and sync_price()?
-Obviously one of them is necessary to implement "save-as", but there
-is no need for multiple versions.  New datatypes can just be plugged
-in by the dynamic API.  There is no reason to differentiate the book
-from the pricedb, as they are still attached to each other.
-Therefore, sync_all() should be left and sync_group() and sync_price()
-should be removed.
-
-
-Usefulness of export()?
------------------------
-
-The export() method is used to export a Chart of Accounts to a file.
-Is it really necessary that this be in the backend?  What does it mean
-to "export" in anything else?  Note that only the file backend even
-IMPLEMENTS this method...  How general is export?
-
-
-============================== END OF DOCUMENT ===================== 
+\verbatim
+    void session_load(QofBackend*, QofBook*);
+\endverbatim
+
+This one API loads all the necessary "start-time" data, There is no
+need to have multiple APIs for each of the data types loaded at start-time.
+*/
+============================== END OF DOCUMENT =====================
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/doc/Makefile.am -Lsrc/doc/Makefile.am -u -r1.18 -r1.19
--- src/doc/Makefile.am
+++ src/doc/Makefile.am
@@ -20,7 +20,6 @@
   backend-errors.txt \
   books.txt \
   currencies.txt \
-  gnc-commodity.txt \
   loans.txt \
   lots.txt \
   multicurrency-discussion.txt \
@@ -42,10 +41,6 @@
 #	$(MAKE) -C latex/ 
 #	mv latex/refman.pdf ./refman.pdf
 
-dist-hook: doc
-	echo "dist-hook: " && pwd
-	cp -rp html ${distdir}
-
 distclean-local:
 	echo "distclean-local: " && pwd
 	rm -f doxygen.cfg doxygen.log
@@ -55,12 +50,6 @@
 	rm -rf html latex
 	rm -f refman.pdf
 
-install-data-hook:
-	$(mkinstalldirs) $(DESTDIR)$(docdir)/html
-	mkdir -p html #Workaround to allow libofx-cvs user to install without doc.
-#	cp -rp $(srcdir)/html ${docdir}
-	cp -rp html $(DESTDIR)$(docdir)/html
-
 uninstall-hook:
 	rm -rf ${docdir}/html
 
Index: guid.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/guid.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/doc/guid.txt -Lsrc/doc/guid.txt -u -r1.2 -r1.3
--- src/doc/guid.txt
+++ src/doc/guid.txt
@@ -1,12 +1,11 @@
-
-                 GUID's - Globally Unique Identifiers
-                           Design Issues 
-                           -------------
+/** \page guid Globally Unique Identifiers: Design Issues 
 
                    Linas Vepstas November 2003
 
-Summary:
---------
+API: \ref GUID
+
+\section guidsummary Summary
+
 GUID's are meant to uniquely identify a GnuCash object. However,
 when that object is backed up (by copying a gnucash data file),
 the identified object is no longer unique.  Book closing is a
@@ -19,9 +18,8 @@
 uniqueness, searchability, copies and storage-space issues 
 that come up when handling GUID's on book closing.
 
+\section guidintro Introduction
 
-Introduction:
--------------
 GUID's are meant to be a way of identifying a given GnuCash entity.
 Accounts, transactions, splits, prices and lots all have GUID's.
 GUID's can be used as a reference: by knowing a GUID, the matching
@@ -48,9 +46,8 @@
 transactions, while the 'open book' looks just like it (has the 
 same accounts, etc), but doesn't have the old transactions.
 
+\section guidissue The Issue
 
-The Issue:
-----------
 The current book-closing code makes a copy of the account tree,
 and sorts all transactions, by date, into the new or the old
 account tree.  With the goal of not confusing the new and the
@@ -58,5 +55,6 @@
 a new set of guids.  The Pro's & Con's of this scheme:
 
 Pro: The 'old', closed accounts can be uniquely accessed according 
-to thier GUID's, without causing confusion with similar/same.
+to their GUID's, without causing confusion with similar/same.
 
+*/
Index: backend-errors.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/backend-errors.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/backend-errors.txt -Lsrc/doc/backend-errors.txt -u -r1.1 -r1.2
--- src/doc/backend-errors.txt
+++ src/doc/backend-errors.txt
@@ -1,189 +1,94 @@
+/** \page backenderrors  Handling Backend Communications Errors
 
-              Handling Backend Communications Errors
-              --------------------------------------
-                  Architectural Discussion 
-                        December 2001
-     Proposed/Reviewed, Linas Vepstas, Dave Peticolas
+  Architectural Discussion
+  December 2001
+  Proposed/Reviewed, Linas Vepstas, Dave Peticolas
+
+  Updated and adapted for general QOF usage, May 2005
+  Neil Williams <linux at codehelp.co.uk>
+
+API: \ref Backend
+
+\section backendproblem Problem:
 
-Problem: 
---------
 What to do if a serious error occurs in a backend while
-GnuCash is being used?  For example, what happens if the connection
-to the SQL server is lost, because the SQL server has died, and/or
+QOF is being used?  For example, what happens if the connection
+to a SQL server is lost, because the SQL server has died, and/or
 because there is a network problem (unplugged ethernet cable, etc.)
+With the QSF backend, what happens if the write operation fails?
+(disk full, permission failure, etc.)
 
+\section backendgeneric The "Generic Handler, Report it to the User" idea:
 
-Discussion:
------------
-There are a set of macros in the Postgres backend that check for
-a Postgres error, and completely shut down the connection to the
-Postgres server whenever even a minor error occurs.  This is 
-excessively harsh.  How to do better?
-
-
-The "Handle it Automatically in the Backend" idea:  
---------------------------------------------------
-Detect the error in the backend, and do something 'intelligent'
-in the backend, trying to recover from it.  What one does depends on
-the actual context (depending one what is going on in the code at that
-point.)  In other words, implement automatic session-reconnection in 
-the backend.
-
-To do this, you can't just handle the errors in the macros (SEND_QUERY,
-FINISH_QUERY, etc) since it depends on the context and how much work 
-you've sent to the postgres process so far. One error that would
-be nice to be able to recover from is a simple loss of connection (the
-postmaster gets killed and restarted).  This might require one to 
-'replay' some last few queries,
-
-
-The "Generic Handler, Report it to the User" idea:
---------------------------------------------------
-There's a simple, direct thing we should get working first:
-
-Go ahead and close the connection, but then return to the engine
-in some nice way, let the engine report the error by GUI, and then
+Go ahead and close the connection / clean up, but then return to
+QOF in some nice way, use qof_session_get_error to report the error
+to any GUI using program-specific handlers and then
 allow the user to initiaite a new session (or maybe try to do it
-automatically): and do all this without deleting all the accounts
-and transactions.
-
-Its some fair amount of work just to untangle the flow of control
-for this case, and leave gnucash in a usable state without having
-an open session.
+automatically): and do all this without deleting any data.
 
 I like this for several reasons:
--- its generic, it can handle any backend error anywhere in the code.
+- its generic, it can handle any backend error anywhere in the code.
    You don't have to second-guess based on whether some recent query
    may or might not have completed.
--- I beleive that reconnect will be quicker, because you won't need
+- I believe that reconnect will be quicker, because you won't need
    reload piles of accounts and transactions.
--- If the user can't reconnect, then they can always save to a file.
+- If the user can't reconnect, then they can always save to a file.
    This can be a double bonus if done right:  e.g. user works on laptop,
    saves to file, takes laptop to airport, works off-line, and then
    syncs her changes back up when she goes on-line again.
 
+\section backendresults Discussion:
 
-Discussion:
-----------
-> Should the backend try reconnecting first, or just go ahead and 
-> return an error condition immediately?    If the latter, then the 
-> current backend error-handling can just stay as it is and the gui 
-> codes need to add checks in several places, right?
-
-The backend can try reconnecting automatically.  But lets think through
-what this implies, and we'll see its not that good an idea:
-
-It will need to remember the user's password to reconnect (It currently
-drops the passwd as a security precaution).   I don't have an opinion
-as to whether it should log the reconnect in the gncSession table.
-I don't know if it should try to do a streamlined reconnect -- e.g.
-skip checking the version numbers ... but maybe the SQL server was
-rebooted (or at least, all users were kicked) precisely because the
-version  numbers changed ??
+Should the backend try reconnecting first, or just go ahead and
+return an error condition immediately?    If the latter, then the
+current backend error-handling can just stay as it is and the gui
+codes need to add checks in several places, right?
 
 The problem with automatic reconnect from within the backend is that you
 don't know quite where to restart... or rather, you have trouble getting
-to the right place to restart.   Take for example
+to the right place to restart.
 
-pgendStoreTransaction (PGBackend *be, Transaction *trans)
-{
-   /* lock it up so that we store atomically */
-   bufp = "BEGIN;\n"
-          "LOCK TABLE gncTransaction IN EXCLUSIVE MODE;\n"
-          "LOCK TABLE gncEntry IN EXCLUSIVE MODE;\n";
-   SEND_QUERY (be,bufp, );
-   FINISH_QUERY(be->connection);
-
-   pgendStoreTransactionNoLock (be, trans, TRUE);
-
-   bufp = "COMMIT;\n"
-          "NOTIFY  gncTransaction;";
-   SEND_QUERY (be,bufp, );
-   FINISH_QUERY(be->connection);  // << network error occurs here!!!
-
-Well, you can't just re-login, and reissue the commit.  You really need
+You can't just re-login, and reissue the commit.  You really need
 to rewind to the begining of the subroutine.   How can you do this?
 
-Alternative 1) wrap this routine:
-
-   pgendStoreTransaction (PGBackend *be, Transaction *trans)
-   {
-       do {
-          pgendIfNotLoggedInThenReLogin(be);
-          pgendStoreTransactionOnceOnly(be, trans);
-       } while (NO_ERROR ! pgendGetError());
-   }
-
-   well, maybe not infinite loop, maybe three retries or something.
+Alternative 1) wrap the routine and retry three times.
 
 Alternative 2) throw an error, let some much higher layer catch it.
 
 Well, approach 1) seems reasonable... until you think about what happens
 if three retries doesn't cut it:  then you have to throw an error
 anyway, and hope the higher layer deals with it.   So even if you
-implement 1), you *still* have to implement 2) anyway.  
+implement 1), you *still* have to implement 2) anyway.
 
 So my attitude is to skip doing 1 for now (maybe we can add it later)
 and just make sure that when we "throw" the error, it really does behave
 like a throw should behave, and short-cuts its way up to where its
 caught.  The catcher should probably be a few strategic places in the
-GUI, like wherever a xaccQuery() is issued, and wherever an
-xaccTransCommitEdit() is issued (which is hopefully not a lot of
-places ?).
-
+GUI, like wherever a QofQuery() is issued, and wherever an
+object is edited.
 
 What's the point of doing 2 cleanly?   Because I suspect that most
-network errors won't be automatically recoverable.  Most likely,
-either someone tripped over an ethernet cable, or the server crashed,
-and you gotta call the sysadmin on the phone, etc.  The goal is not
-to crash the client when the network is down, but rather let the user
-continue to work off-line (rather than a forced coffee break).
-
-Alternately, user might take a forced coffee break, and 10 minutes
-later, manually reconnects and resumes work ... without having to
-stop & restart gnucash, without having to close and reopen a register,
-re-run a report window, etc.   Because its the re-opening of the
-app that is the major pain in the butt.
-
-
-How to Report Errors to the GUI
--------------------------------
-> How would the engine->GUI error reporting happen? A direct callback? 
-> Or having the GUI always check for session errors?
+network / filesystem errors won't be automatically recoverable.
+Most likely, either someone tripped over an ethernet cable, or the
+server crashed or the disc is full and you gotta call the sysadmin on
+the phone or clear out some files, etc.  The goal is not to crash the
+client when the backend reports an error, but rather let the user
+continue to work.
 
-We should use the session error mechanism for reporting these errors.  
-Note that the API allows a simple 'try-throw-catch' style error
-handling in C.  Because we don't/can't unwind the stack as a true 
-'throw' would, we need to make sure that when we "throw" the error, 
-it emulates this as best it can:  it short-cuts its way up and out of
-the engine, to where its caught in the GUI.  The catcher should probably 
-be a few strategic places in the GUI, like wherever a xaccQuery() is 
-issued, and wherever an xaccTransCommitEdit() is issued.
-
-Unfortunately, there are a *lot* of places where these calls are
-issued, and therefore, its a lot of work to modify all of these places
-to check for an error condition.  It would simplify things if there
-was also a callback medchanism.
-
-Propose:
-Maybe gnc-event.h should be extended to generate events for errors
-as well ... 
+\section errorreport How to Report Errors to the GUI
 
-How about this idea:
+How would the engine->GUI error reporting happen? A direct callback?
+Or having the GUI always check for session errors?
 
-change gnc_session_push_error() so that it calls 
-gnc_engine_generate_event (GUID_of_session, GNC_EVENT_ERROR)
-
-The GUI would register a handler; the handler would call 
-gnc_session_get_error() to find out the details of the error; and 
-maybe put a popup on the screen, maybe set some flags so that the 
-GUI starts working differently...
-
-This would save a *lot* of trouble of having to check the error code
-in the zillion places where CommitEdit is called.  Of course, if the
-error occurs, then all the code that executes following the CommitEdit 
-is 'suspect', and is potentially buggy/non-robust in the face of that
-error.  Alligators lie here ...
+We should use the session error mechanism for reporting these errors.
+Note that the API allows a simple 'try-throw-catch' style error
+handling in C.  Because we don't/can't unwind the stack as a true
+'throw' would, we need to make sure that when we "throw" the error,
+it emulates this as best it can:  it short-cuts its way up and out of
+the engine, to where its caught in the GUI.
 
+If there are a *lot* of places where these calls are
+issued, simplify things by implementing your own callback mechanism.
+*/
 
-============================== END OF DOCUMENT ===================== 
+============================== END OF DOCUMENT =====================
Index: engine.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/engine.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/doc/engine.txt -Lsrc/doc/engine.txt -u -r1.2 -r1.3
--- src/doc/engine.txt
+++ src/doc/engine.txt
@@ -1,17 +1,21 @@
+/** \page engine Engine Framework
 
+API: \ref Engine
 
-The engine API documentation can be found in the src/doc/design/engine.texinfo file.
+Additional engine API documentation can be found in the src/doc/design/engine.texinfo file.
 
 This file contains some extra meta-information that is not directly relevant
 to the API documentation.
 
+\section firstclass First Class Objects (C structs) vs. Storing Data in KVP Trees
+
+API: \ref KVP
 
-First Class Objects (C structs) vs. Storing Data in KVP Trees
--------------------------------------------------------------
 Suppose you have a neat idea for a new feature for the GnuCash engine.
 Should you create a C structure (a "first class object") and all
 of the required machinery for it (e.g. an SQL backend), or should you
-just put all of the data in a suitable KVP frame somewhere? 
+just put all of the data in a suitable KVP (Key Value Pair) frame
+somewhere? 
 
 The answer depends on whether the concept requires extensive
 pointer chasing between different types of existing C structs,
@@ -20,21 +24,22 @@
 If it seems to be an independent concept, it can still be placed
 in the KVP tree of the book, which gives it a 'top-level' existance.
 
-If the concept is used only infreqeuntly, then it probably belongs 
+If the concept is used only infrequently, then it probably belongs 
 in a KVP tree.  If the concept has performance-critical requriements,
 then it is better to implement it as a C struct, and similarly
 design an appropriate SQL table around it, so that the database
 can be queried efficiently and rapidly.
 
-Terminology:
+\subsection terms Terminology:
 
-First-class object:  something that has a C struct associated with it,
-nad has its own specialized  backend infrastructure for storing/quering
+- First-class object:  something that has a C struct associated with it,
+and has its own specialized backend infrastructure for storing/quering
 it.
 
-Second-class object: something that lives entirely in a KVP tree.
+- Second-class object: something that lives entirely in a KVP tree.
 Note, however, that not all data in a KVP tree deserves to be called
 an 'object'.  Some things in a KVP tree are merely 'attributes'.
 If you push on this point, there is indeed a gray area between
 second-class objects and attributes. 
 
+*/
Index: generic-druid-framework.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/generic-druid-framework.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/generic-druid-framework.txt -Lsrc/doc/generic-druid-framework.txt -u -r1.1 -r1.2
--- src/doc/generic-druid-framework.txt
+++ src/doc/generic-druid-framework.txt
@@ -1,11 +1,11 @@
-		      Generic (Import) Druid Framework
+/** \page druidframework Generic (Import) Druid Framework
+
 			Derek Atkins <derek at ihtfp.com>
 			          2004-01-12
 
 			       Work in progress
 
-
-0. Background
+\section druidbackground Background
 
 The GNOME Druid infrastructure wants to force you to be UI-driven.
 What this means is that the druid is started and lives in gtk_main()
@@ -32,8 +32,7 @@
 whenever possible.  This means the importer should be GUI-driven, not
 backend-driven.
 
-
-1. The Problem
+\section druidproblem The Problem
 
 For a generic importer druid, we want to create a single druid (or set
 of druid components) that all importers can use.  Moreover, this
@@ -64,8 +63,7 @@
 preference).  Each sub-process can have a set of doc pages available
 which can be displayed (or not) based on a user preference.
 
-
-2. The Druid Framework
+\section druidmain The Druid Framework
 
 In order to refrain from pulling Gnome and GTK into the backend
 implementations, we need a GUI-independent UI framework for Druids.
@@ -110,8 +108,7 @@
 means the import backend should be completely callback-based,
 including the cleanup code in case the user interrupts the import.
 
-
-3. Druid Sub-Process Providers 
+\section druidprocess Druid Sub-Process Providers 
 
 In order to abstract the Druid from the various importer backends, the
 import process is broken into a set of sub-processes.  Each
@@ -144,8 +141,7 @@
 back-page callback, or any other callbacks required by the specific
 provider.
 
-
-4. Putting the Druid Together
+\section druidtogether Putting the Druid Together
 
 In order to build the druid, the import backend builds the list of
 providers and passes that list to the Druid Builder.  The Builder
@@ -153,8 +149,7 @@
 provider and inserts them into the druid.  Finally, the builder
 displays the druid and starts the process.
 
-
-5. Linking into the Backend
+\section druidbackend Linking into the Backend
 
 When supplying the list of providers to the builder, the backend also
 provides a set of callbacks.  Since the backend knows what providers
@@ -163,16 +158,15 @@
 The callback function should process the data, set the next druid
 page, and then return.
 
+\section druidcore Core GncDruid Types
 
-6. Core GncDruid Types
-
-GncDruidPage
+\subsection druidpage GncDruidPage
 
   Opaque (toolkit-specific) type:  a druid page.  Used to pass an
   opaque object from the provider, through the backend, to the druid
   system (e.g. in order to set the druid page).
 
-GncDruidCB
+\subsection druidcallback GncDruidCB
 
   Base type of a druid callback.  Minimum information is the backend context.
 
@@ -180,24 +174,24 @@
 
   gpointer backend_ctx;
 
-GncDruid
+\subsection druidobject GncDruid
 
   The context object of a druid.  This object contains all the
   necessary data to maintain the druid and reference all it's data.
 
   Members:
 
-  void set_page(
-		GncDruid,
+  void set_page(\n
+		GncDruid,\n
 		GncDruidPage);
 
     Set the current page of the druid to the GncDruidPage.
 
-  GncDruidProvider current_provider;
-  GncDruidProvider (*next_provider)(GncDruid);
+  GncDruidProvider current_provider;\n
+  GncDruidProvider (*next_provider)(GncDruid);\n
   GncDruidProvider (*prev_provider)(GncDruid);
 
-GncDruidProviderDesc
+\subsection druidproviderdesc GncDruidProviderDesc
 
   The Druid Provider Description base class.  This defines the minimal
   information to name a provider and provide the interface required to
@@ -207,12 +201,12 @@
 
   Members:
 
-  const gchar *name;
-  gboolean (*provider_needed)(GncDruidCB);
-  gboolean (*next_cb)(GncDruid, GncDruidCB);
+  const gchar *name;\n
+  gboolean (*provider_needed)(GncDruidCB);\n
+  gboolean (*next_cb)(GncDruid, GncDruidCB);\n
   gboolean (*prev_cb)(GncDruid, GncDruidCB);
 
-GncDruidProvider
+\subsection druidprovider GncDruidProvider
 
   An instance of a Druid Provider.  Still toolkit-independent (a
   toolkit-specific subclass actually implements the functions
@@ -221,16 +215,15 @@
 
   Members:
 
-  GncDruidPage (*first_page)(GncDruidProvider);
-  GncDruidPage (*next_page)(GncDruidProvider);
+  GncDruidPage (*first_page)(GncDruidProvider);\n
+  GncDruidPage (*next_page)(GncDruidProvider);\n
   GncDruidPage (*prev_page)(GncDruidProvider);
 
+\section druidapi The Druid Builder API
 
-7. The Druid Builder API
-
-GncDruid gnc_druid_build(
-		GList *providers,
-		gpointer backend_ctx,
+GncDruid gnc_druid_build(\n
+		GList *providers,\n
+		gpointer backend_ctx,\n
 		void (*end)(gpointer))
 
   Build a druid using the supplied list of providers descriptions
@@ -240,28 +233,26 @@
   the case of the user clicking "cancel".  It cleans up the backend
   context.
 
+\section druidinternal The Basic (internal) Provider APIs
 
-8. The Basic (internal) Provider APIs
-
-GncDruidProvider gnc_provider_get_instance(
-		GncDruid druid_ctx,
-		GncDruidProviderDesc description,
+GncDruidProvider gnc_provider_get_instance(\n
+		GncDruid druid_ctx,\n
+		GncDruidProviderDesc description,\n
 		gpointer backend_ctx)
 
   Obtain an instance of a Druid Provider based on the Provider
   Description.  This is used by the druid builder to obtain a Provider
   Instance given the Provider Description.
 
-void gnc_provider_register(
-		const gchar* name,
+void gnc_provider_register(\n
+		const gchar* name,\n
 		gnc_provider_get_instance);
 
   Register a Provider Implementation of the provided name.  Provide a
   creation function that gnc_provider_get_instance() can use to obtain
   a fully initialized provider object.
 
-
-9. Specific GncDruidProviderDesc APIs
+\section druidproviderapi Specific GncDruidProviderDesc APIs
 
 Each provider needs to create its own subclass of GncDruidProviderDesc
 that defines its specific interface to the backend.  The following
@@ -276,9 +267,9 @@
 
     Members:
 
-    void (*get_ambiguity)(
-		gpointer be_ctx,
-		GncImportFormat* choices,
+    void (*get_ambiguity)(\n
+		gpointer be_ctx,\n
+		GncImportFormat* choices,\n
 		GncImportFormat* last_choice);
 
   GncDruidChooseFmtCB
@@ -294,10 +285,10 @@
 
     Members:
 
-    gboolean multi_file;
-    gchar* last_directory;
-    GList * (*get_files)(gpointer be_ctx);
-    const gchar* (*get_filename)(GncImportFile file);
+    gboolean multi_file;\n
+    gchar* last_directory;\n
+    GList * (*get_files)(gpointer be_ctx);\n
+    const gchar* (*get_filename)(GncImportFile file);\n
     void (*remove_file)(gpointer be_ctx, GncImportFile file)
 
   GncDruidSelectFileCB
@@ -305,3 +296,5 @@
     Members:
 
     gchar* filename;
+
+*/
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/design/.cvsignore,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/doc/design/.cvsignore -Lsrc/doc/design/.cvsignore -u -r1.7 -r1.8
--- src/doc/design/.cvsignore
+++ src/doc/design/.cvsignore
@@ -19,3 +19,5 @@
 *.info-*
 *.html
 texinfo.tex
+.DS_Store
+
Index: engine.texinfo
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/design/engine.texinfo,v
retrieving revision 1.50
retrieving revision 1.51
diff -Lsrc/doc/design/engine.texinfo -Lsrc/doc/design/engine.texinfo -u -r1.50 -r1.51
--- src/doc/design/engine.texinfo
+++ src/doc/design/engine.texinfo
@@ -246,7 +246,7 @@
 @subsection How to use GUIDs
 
 The Engine API functions which access the GUID for a specific entity
-return a pointer to the GUID. @strong{Note:} Do not store the pointer
+return a pointer to the GUID.  NOTE: Do not store the pointer
 itself! Instead, store a copy of the GUID. Storing the pointer itself
 would present some of the same problems as using the account pointer
 directly. Example:
@@ -282,12 +282,12 @@
 You can encode and decode GUIDs and their string representations using the
 next two functions.
 
- at deftypefun {char *} guid_to_string (const GUID * @var{guid})
+ at deftypefun {const char *} guid_to_string (const GUID * @var{guid})
 Return a null-terminated string encoding of @var{guid}. String encodings
 of identifiers are hex numbers printed only with the characters @code{0}
 through @code{9} and @code{a} through @code{f}.  The encoding will
 always be @code{GUID_ENCODING_LENGTH} characters long. The returned
-string should be freed when no longer needed.
+string must NOT be freed when no longer needed.
 @end deftypefun
 
 @deftypefun {char *} guid_to_string_buff (const GUID * @var{guid}, char * @var{buff})
Index: component-manager.texinfo
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/design/component-manager.texinfo,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/doc/design/component-manager.texinfo -Lsrc/doc/design/component-manager.texinfo -u -r1.5 -r1.6
--- src/doc/design/component-manager.texinfo
+++ src/doc/design/component-manager.texinfo
@@ -207,7 +207,7 @@
 
 There is a utility function for accessing the @var{changes} hash:
 
- at deftypefun {const EventInfo *} gnc_gui_get_entity_events (GHashTable * @var{changes}, GUID * @var{entity})
+ at deftypefun {const EventInfo *} gnc_gui_get_entity_events (GHashTable * @var{changes}, const GUID * @var{entity})
 Return the event info for the entity specified by @var{entity}. If there
 are no events for that entity, @code{NULL} is returned.
 @end deftypefun
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/doc/xml/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/doc/xml/.cvsignore -Lsrc/doc/xml/.cvsignore -u -r1.1 -r1.2
--- src/doc/xml/.cvsignore
+++ src/doc/xml/.cvsignore
@@ -1,2 +1,4 @@
 Makefile
 Makefile.in
+.DS_Store
+
Index: TransLog.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/TransLog.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lsrc/engine/TransLog.c -Lsrc/engine/TransLog.c -u -r1.38 -r1.39
--- src/engine/TransLog.c
+++ src/engine/TransLog.c
@@ -34,7 +34,6 @@
 #include "Transaction.h"
 #include "TransactionP.h"
 #include "TransLog.h"
-#include "gnc-date.h"
 #include "gnc-engine-util.h"
 
 /* 
@@ -218,7 +217,7 @@
       /* use tab-separated fields */
       fprintf (trans_log,
                "%c\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t"
-               "%s\t%s\t%s\t%s\t%c\t%lld/%lld\t%lld/%lld\t%s\n",
+               "%s\t%s\t%s\t%s\t%c\t%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "\t%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT "\t%s\n",
                flag,
                trans_guid_str, split_guid_str,  /* trans+split make up unique id */
                dnow ? dnow : "",
@@ -232,10 +231,10 @@
                split->memo ? split->memo : "",
                split->action ? split->action : "",
                split->reconciled,
-               (long long int) gnc_numeric_num(amt), 
-               (long long int) gnc_numeric_denom(amt),
-               (long long int) gnc_numeric_num(val), 
-               (long long int) gnc_numeric_denom(val),
+               gnc_numeric_num(amt), 
+               gnc_numeric_denom(amt),
+               gnc_numeric_num(val), 
+               gnc_numeric_denom(val),
                drecn ? drecn : "");
    }
 
Index: qofquery.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lsrc/engine/qofquery.c -Lsrc/engine/qofquery.c -u -r1.26 -r1.27
--- src/engine/qofquery.c
+++ src/engine/qofquery.c
@@ -29,8 +29,8 @@
 #include <regex.h>
 #include <string.h>
 
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
 
 #include "qofbackend-p.h"
 #include "qofbook.h"
@@ -43,7 +43,7 @@
 #include "qofquerycore.h"
 #include "qofquerycore-p.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_QUERY;
 
 struct _QofQueryTerm 
 {
@@ -409,6 +409,7 @@
     }
     if (and_terms_ok) 
     {
+      LEAVE (" (terms are OK)");
       return 1;
     }
   }
@@ -418,8 +419,8 @@
    * may want to get all objects, but in a particular sorted 
    * order.
    */
+  LEAVE (" ");
   if (NULL == q->terms) return 1;
-
   return 0;
 }
 
@@ -477,7 +478,7 @@
   sort->obj_cmp = NULL;
 
   /* An empty param_list implies "no sort" */
-  if (!sort->param_list) return;
+  if (!sort->param_list) { LEAVE (" "); return; }
 
   /* Walk the parameter list of obtain the parameter functions */
   sort->param_fcns = compile_params (sort->param_list, obj, &resObj);
@@ -564,7 +565,6 @@
     ql->list = g_list_prepend (ql->list, object);
     ql->count++;
   }
-
   return;
 }
 
@@ -703,10 +703,10 @@
   GList *node;
   int        object_count = 0;
 
-  ENTER (" q=%p", q);
   if (!q) return NULL;
   g_return_val_if_fail (q->search_for, NULL);
   g_return_val_if_fail (q->books, NULL);
+  ENTER (" q=%p", q);
 
   /* XXX: Prioritize the query terms? */
 
@@ -718,7 +718,7 @@
   }
 
   /* Maybe log this sucker */
-  if (gnc_should_log (module, GNC_LOG_DETAIL)) qof_query_print (q);
+  if (gnc_should_log (log_module, GNC_LOG_DETAIL)) qof_query_print (q);
 
   /* Now run the query over all the objects and save the results */
   {
@@ -895,6 +895,26 @@
   return FALSE;
 }
 
+GSList * qof_query_get_term_type (QofQuery *q, GSList *term_param)
+{
+  GList *or;
+  GList *and;
+  GSList *results = NULL;
+
+  if (!q || !term_param)
+    return FALSE;
+
+  for(or = q->terms; or; or = or->next) {
+    for(and = or->data; and; and = and->next) {
+      QofQueryTerm *qt = and->data;
+      if (!param_list_cmp (term_param, qt->param_list))
+        results = g_slist_append(results, qt->pdata);
+    }
+  }
+
+  return results;
+}
+
 void qof_query_destroy (QofQuery *q)
 {
   if (!q) return;
@@ -1627,7 +1647,7 @@
   gs = g_string_new ("    Pred Data:\n      ");
   g_string_append (gs, (gchar *) pd->type_name);
 
-  /* Char Predicate and GUID predicate dosn't use the 'how' field. */
+  /* Char Predicate and GUID predicate don't use the 'how' field. */
   if (safe_strcmp (pd->type_name, QOF_TYPE_CHAR) &&
       safe_strcmp (pd->type_name, QOF_TYPE_GUID))
   {
@@ -1680,6 +1700,7 @@
                        qof_query_printGuidMatch (pdata->options));
     for (node = pdata->guids; node; node = node->next)
     {
+        /* THREAD-UNSAFE */
       g_string_sprintfa (gs, ", guids: %s",
 			 guid_to_string ((GUID *) node->data));
     }
@@ -1721,7 +1742,7 @@
   if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64))
   {
     query_int64_t pdata = (query_int64_t) pd;
-    g_string_sprintfa (gs, " int64: %lld", pdata->val);
+    g_string_sprintfa (gs, " int64: %" G_GINT64_FORMAT, pdata->val);
     return;
   }
   if (!safe_strcmp (pd->type_name, QOF_TYPE_INT32))
@@ -1758,6 +1779,7 @@
     g_string_sprintfa (gs, " boolean: %s", pdata->val?"TRUE":"FALSE");
     return;
   }
+  /** \todo QOF_TYPE_COLLECT */
   return;
 }                               /* qof_query_printValueForParam */
 
@@ -1789,8 +1811,8 @@
   {
     case QOF_DATE_MATCH_NORMAL:
       return "QOF_DATE_MATCH_NORMAL";
-    case QOF_DATE_MATCH_ROUNDED:
-      return "QOF_DATE_MATCH_ROUNDED";
+    case QOF_DATE_MATCH_DAY:
+      return "QOF_DATE_MATCH_DAY";
   }
   return "UNKNOWN MATCH TYPE";
 }                               /* qof_query_printDateMatch */
Index: gnc-lot-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-lot-p.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/gnc-lot-p.h -Lsrc/engine/gnc-lot-p.h -u -r1.11 -r1.12
--- src/engine/gnc-lot-p.h
+++ src/engine/gnc-lot-p.h
@@ -23,7 +23,7 @@
 /*
  * FILE:
  * gnc-lot-p.h
- * 
+ *
  * FUNCTION:
  * Lots implement the fundamental conceptual idea behind invoices,
  * inventory lots, and stock market investment lots.  See the file
@@ -37,24 +37,21 @@
 #ifndef GNC_LOT_P_H
 #define GNC_LOT_P_H
 
-#include "gnc-engine.h"
-#include "kvp_frame.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofid-p.h"
+#include "gnc-lot.h"
+#include "Account.h"
 
 struct gnc_lot_struct
 {
   QofEntity entity;     /* Unique guid for this lot */
 
   /* Book that this lot belongs to */
-  QofBook *book;  
+  QofBook *book;
 
   /* Anchor for generic lot-specific data. */
   KvpFrame *kvp_data;
 
   /* Account to which this lot applies.  All splits in the lot must
-   * belong to this account. 
+   * belong to this account.
    */
   Account * account;
 
@@ -72,7 +69,6 @@
 #define gnc_lot_set_guid(L,G)  qof_entity_set_guid(QOF_ENTITY(L),&(G))
 
 /* Register with the Query engine */
-void gnc_lot_register (void);
+gboolean gnc_lot_register (void);
 
 #endif /* GNC_LOT_P_H */
-
Index: Account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.c,v
retrieving revision 1.282
retrieving revision 1.283
diff -Lsrc/engine/Account.c -Lsrc/engine/Account.c -u -r1.282 -r1.283
--- src/engine/Account.c
+++ src/engine/Account.c
@@ -32,31 +32,13 @@
 #include "Group.h"
 #include "GroupP.h"
 #include "TransactionP.h"
-#include "gnc-date.h"
-#include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
 #include "gnc-pricedb.h"
-#include "gnc-trace.h"
-#include "kvp_frame.h"
-#include "kvp-util-p.h"
 #include "messages.h"
 #include "policy.h"
 
-#include "qofbackend.h"
-#include "qofbackend-p.h"
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofclass.h"
-#include "qofid-p.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-
-static short module = MOD_ACCOUNT; 
-
+static QofLogModule log_module = GNC_MOD_ACCOUNT;
 
 /********************************************************************\
  * Because I can't use C++ for this project, doesn't mean that I    *
@@ -71,7 +53,7 @@
 \********************************************************************/
 
 G_INLINE_FUNC void mark_account (Account *account);
-G_INLINE_FUNC void
+void
 mark_account (Account *account)
 {
   if (account->parent) account->parent->saved = FALSE;
@@ -84,6 +66,7 @@
 static void
 xaccInitAccount (Account * acc, QofBook *book)
 {
+  ENTER ("book=%p\n", book);
   qof_instance_init (&acc->inst, GNC_ID_ACCOUNT, book);
 
   acc->parent   = NULL;
@@ -318,7 +301,8 @@
 void 
 xaccAccountBeginEdit (Account *acc) 
 {
-  QOF_BEGIN_EDIT (&acc->inst);
+	g_return_if_fail(acc);
+	qof_begin_edit(&acc->inst);
 }
 
 static inline void noop(QofInstance *inst) {}
@@ -338,7 +322,7 @@
 void 
 xaccAccountCommitEdit (Account *acc) 
 {
-  QOF_COMMIT_EDIT_PART1 (&acc->inst);
+  if(!qof_commit_edit(&acc->inst)) { return;}
 
   /* If marked for deletion, get rid of subaccounts first,
    * and then the splits ... */
@@ -352,7 +336,7 @@
     xaccFreeAccountGroup (acc->children);
     acc->children = NULL;
 
-    PINFO ("freeing splits for account %p (%s)\n",
+    PINFO ("freeing splits for account %p (%s)",
            acc, acc->accountName ? acc->accountName : "(null)");
 
     while (acc->splits)
@@ -632,6 +616,7 @@
 static gint
 split_sort_func(gconstpointer a, gconstpointer b) {
   /* don't coerce xaccSplitDateOrder so we'll catch changes */
+  /* huh?  what changes? */
   Split *sa = (Split *) a;
   Split *sb = (Split *) b;
   return(xaccSplitDateOrder(sa, sb));
@@ -831,7 +816,7 @@
       }
    }
    xaccAccountCommitEdit(acc);
-   xaccAccountCommitEdit(old_acc);
+   if(old_acc) { xaccAccountCommitEdit(old_acc); }
    LEAVE ("(acc=%p, lot=%p)", acc, lot);
 }
 
@@ -855,7 +840,7 @@
   old_amt = xaccSplitGetAmount (split);
 
   xaccAccountBeginEdit(acc);
-  xaccTransBeginEdit(trans);
+  if(trans) { xaccTransBeginEdit(trans); }
 
   acc->balance_dirty = TRUE;
   acc->sort_dirty = TRUE;
@@ -891,12 +876,12 @@
       mark_account (acc);
   }
 
-  /* Setting the amount casues a conversion to the new account's 
+  /* Setting the amount causes a conversion to the new account's
    * denominator AKA 'SCU Smallest Currency Unit'. */
   /* xaccSplitSetAmount(split, old_amt); */
   split->amount = gnc_numeric_convert (old_amt,
                 xaccAccountGetCommoditySCU(acc), GNC_HOW_RND_ROUND);
-  xaccTransCommitEdit(trans);
+  if(trans) { xaccTransCommitEdit(trans); }
   xaccAccountCommitEdit(acc);
   LEAVE ("(acc=%p, split=%p)", acc, split);
 }
@@ -997,8 +982,8 @@
   cleared_balance    = acc->starting_cleared_balance;
   reconciled_balance = acc->starting_reconciled_balance;
 
-  PINFO ("acct=%s starting baln=%lld/%lld", acc->accountName, 
-         balance.num, balance.denom);
+  PINFO ("acct=%s starting baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
+	 acc->accountName, balance.num, balance.denom);
   for(lp = acc->splits; lp; lp = lp->next) 
   {
     Split *split = (Split *) lp->data;
@@ -1061,7 +1046,9 @@
  *                                                                  *
  * Return: int -- non-zero if out of order                          *
 \********************************************************************/
-
+/* CAS: Umm, we say we're checking the split, but we're actually
+   resorting all the splits.  Why not just leave the split out of
+   it? */
 void
 xaccAccountFixSplitDateOrder (Account * acc, Split *split) 
 {
@@ -1364,7 +1351,7 @@
 }
 
 int
-xaccAccountGetCommoditySCUi (Account * acc) 
+xaccAccountGetCommoditySCUi (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1372,7 +1359,7 @@
 }
 
 int
-xaccAccountGetCommoditySCU (Account * acc) 
+xaccAccountGetCommoditySCU (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1396,7 +1383,7 @@
 }
 
 gboolean
-xaccAccountGetNonStdSCU (Account * acc) 
+xaccAccountGetNonStdSCU (const Account * acc)
 {
   if (!acc) return 0;
 
@@ -1471,6 +1458,22 @@
    return (acc->type);
 }
 
+static const char*
+qofAccountGetTypeString (Account *acc)
+{
+	if(!acc) { return NULL; }
+	return (xaccAccountTypeEnumAsString(acc->type));
+}
+
+static void
+qofAccountSetType (Account *acc, const char *type_string)
+{
+	GNCAccountType type;
+
+	type = xaccAccountStringToEnum(type_string);
+	xaccAccountSetType(acc, type);
+}
+
 const char *
 xaccAccountGetName (Account *acc)
 {
@@ -1560,7 +1563,7 @@
 }
 
 gnc_commodity * 
-DxaccAccountGetCurrency (Account *acc)
+DxaccAccountGetCurrency (const Account *acc)
 {
   KvpValue *v;
   const char *s;
@@ -1580,7 +1583,7 @@
 }
 
 gnc_commodity * 
-xaccAccountGetCommodity (Account *acc)
+xaccAccountGetCommodity (const Account *acc)
 {
   if (!acc) return NULL;
 
@@ -1667,6 +1670,14 @@
   /* Since transaction post times are stored as a Timespec,
    * convert date into a Timespec as well rather than converting
    * each transaction's Timespec into a time_t.
+   *
+   * FIXME: CAS: I think this comment is a bogus justification for
+   * using xaccTransGetDatePostedTS.  There's no benefit to using
+   * Timespec when the input argument is time_t, and it's hard to
+   * imagine that casting long long to long and comparing two longs is
+   * worse than comparing two long longs every time.  IMO,
+   * xaccAccountGetPresentBalance gets this right, and its algorithm
+   * should be used here.
    */
   ts.tv_sec = date;
   ts.tv_nsec = 0;
@@ -1676,7 +1687,7 @@
   {
     xaccTransGetDatePostedTS( xaccSplitGetParent( (Split *)lp->data ),
                               &trans_ts );
-    if( timespec_cmp( &trans_ts, &ts ) > 0 )
+    if( timespec_cmp( &trans_ts, &ts ) >= 0 )
       found = TRUE;
     else
       lp = lp->next;
@@ -1716,8 +1727,7 @@
   GList *node;
   time_t today;
 
-  if (!account)
-    return gnc_numeric_zero ();
+  g_return_val_if_fail(account, gnc_numeric_zero());
 
   today = gnc_timet_get_today_end();
   for (node = g_list_last (account->splits); node; node = node->prev)
@@ -1757,7 +1767,8 @@
   book = xaccGroupGetBook (xaccAccountGetRoot (account));
   pdb = gnc_pricedb_get_db (book);
 
-  balance = gnc_pricedb_convert_balance_latest_price(pdb, balance, balance_currency, new_currency);
+  balance = gnc_pricedb_convert_balance_latest_price(
+      pdb, balance, balance_currency, new_currency);
 
   return balance;
 }
@@ -1787,7 +1798,8 @@
   ts.tv_sec = date;
   ts.tv_nsec = 0;
 
-  balance = gnc_pricedb_convert_balance_nearest_price(pdb, balance, balance_currency, new_currency, ts);
+  balance = gnc_pricedb_convert_balance_nearest_price(
+      pdb, balance, balance_currency, new_currency, ts);
 
   return balance;
 }
@@ -1807,11 +1819,22 @@
   if (!account || !fn || !report_currency) return gnc_numeric_zero ();
   balance = fn(account);
   balance = xaccAccountConvertBalanceToCurrency(account, balance,
-					     account->commodity,
-					     report_currency);
+                                                account->commodity,
+                                                report_currency);
   return balance;
 }
 
+static gnc_numeric
+xaccAccountGetXxxBalanceAsOfDateInCurrency(Account *account, time_t date,
+                                           xaccGetBalanceAsOfDateFn fn,
+                                           gnc_commodity *report_commodity)
+{
+    g_return_val_if_fail(account && fn && report_commodity,
+                         gnc_numeric_zero());
+    return xaccAccountConvertBalanceToCurrency(
+        account, fn(account, date), account->commodity, report_commodity);
+}
+
 /*
  * Data structure used to pass various arguments into the following fn.
  */
@@ -1820,6 +1843,8 @@
   gnc_commodity *currency;
   gnc_numeric balance;
   xaccGetBalanceFn fn;
+  xaccGetBalanceAsOfDateFn asOfDateFn;
+  time_t date;
 } CurrencyBalance;
 
 
@@ -1842,13 +1867,33 @@
                                  GNC_HOW_RND_ROUND);
   return NULL;
 }
+static gpointer
+xaccAccountBalanceAsOfDateHelper (Account *account, gpointer data)
+{
+    CurrencyBalance *cb = data;
+    gnc_numeric balance;
+
+    g_return_val_if_fail (cb->asOfDateFn && cb->currency, NULL);
+
+    balance = xaccAccountGetXxxBalanceAsOfDateInCurrency (
+        account, cb->date, cb->asOfDateFn, cb->currency);
+    cb->balance = gnc_numeric_add (cb->balance, balance,
+                                   gnc_commodity_get_fraction (cb->currency),
+                                   GNC_HOW_RND_ROUND);
+    return NULL;
+}
+
+
 
 /*
  * Common function that iterates recursively over all accounts below
- * the specified account.  It uses the previous routine to sum up the
- * balances of all its children, and uses the specified function for
- * extracting the balance.  This function may extract the current
- * value, the reconciled value, etc.
+ * the specified account.  It uses xaccAccountBalanceHelper to sum up
+ * the balances of all its children, and uses the specified function
+ * 'fn' for extracting the balance.  This function may extract the
+ * current value, the reconciled value, etc.
+ *
+ * If 'report_commodity' is NULL, just use the account's commodity.
+ * If 'include_children' is FALSE, this function doesn't recurse at all.
  */
 static gnc_numeric
 xaccAccountGetXxxBalanceInCurrencyRecursive (Account *account,
@@ -1862,14 +1907,44 @@
     return gnc_numeric_zero ();
   if (!report_commodity)
     report_commodity = xaccAccountGetCommodity (account);
+
   balance = xaccAccountGetXxxBalanceInCurrency (account, fn, report_commodity);
 
-  /* If needed, sum up the children converting to *this* account's commodity. */
+  /* If needed, sum up the children converting to the *requested*
+     commodity. */
   if (include_children)
   {
-    CurrencyBalance cb = { report_commodity, balance, fn };
+    CurrencyBalance cb = { report_commodity, balance, fn, NULL, 0 };
+
+    xaccGroupForEachAccount (account->children, xaccAccountBalanceHelper,
+                             &cb, TRUE);
+    balance = cb.balance;
+  }
+
+  return balance;
+}
+
+static gnc_numeric
+xaccAccountGetXxxBalanceAsOfDateInCurrencyRecursive (
+    Account *account, time_t date, xaccGetBalanceAsOfDateFn fn,
+    gnc_commodity *report_commodity, gboolean include_children)
+{
+  gnc_numeric balance;
 
-    xaccGroupForEachAccount (account->children, xaccAccountBalanceHelper, &cb, TRUE);
+  g_return_val_if_fail(account, gnc_numeric_zero());
+  if (!report_commodity)
+      report_commodity = xaccAccountGetCommodity (account);
+
+  balance = xaccAccountGetXxxBalanceAsOfDateInCurrency(
+      account, date, fn, report_commodity);
+
+  /* If needed, sum up the children converting to the *requested*
+     commodity. */
+  if (include_children) {
+    CurrencyBalance cb = { report_commodity, balance, NULL, fn, date };
+
+    xaccGroupForEachAccount (account->children,
+                             xaccAccountBalanceAsOfDateHelper, &cb, TRUE);
     balance = cb.balance;
   }
 
@@ -1885,7 +1960,7 @@
   rc = xaccAccountGetXxxBalanceInCurrencyRecursive (account, 
                    xaccAccountGetBalance,
 						 report_commodity, include_children);
-  PINFO (" baln=%lld/%lld", rc.num, rc.denom);
+  PINFO (" baln=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, rc.num, rc.denom);
   return rc;
 }
 
@@ -1895,9 +1970,9 @@
 					gnc_commodity *report_commodity,
 					gboolean include_children)
 {
-  return
-    xaccAccountGetXxxBalanceInCurrencyRecursive (account, xaccAccountGetClearedBalance,
-						 report_commodity, include_children);
+  return xaccAccountGetXxxBalanceInCurrencyRecursive (
+      account, xaccAccountGetClearedBalance, report_commodity,
+      include_children);
 }
 
 
@@ -1906,9 +1981,9 @@
 				 gnc_commodity *report_commodity,
 				 gboolean include_children)
 {
-  return
-    xaccAccountGetXxxBalanceInCurrencyRecursive (account, xaccAccountGetReconciledBalance,
-						 report_commodity, include_children);
+  return xaccAccountGetXxxBalanceInCurrencyRecursive (
+      account, xaccAccountGetReconciledBalance, report_commodity,
+      include_children);
 }
 
 gnc_numeric
@@ -1916,19 +1991,29 @@
 					gnc_commodity *report_commodity,
 					gboolean include_children)
 {
-  return
-    xaccAccountGetXxxBalanceInCurrencyRecursive (account, xaccAccountGetPresentBalance,
-						 report_commodity, include_children);
+  return xaccAccountGetXxxBalanceInCurrencyRecursive (
+      account, xaccAccountGetPresentBalance, report_commodity,
+      include_children);
 }
 
 gnc_numeric
-xaccAccountGetProjectedMinimumBalanceInCurrency (Account *account,
-						 gnc_commodity *report_commodity,
-						 gboolean include_children)
-{
-  return
-    xaccAccountGetXxxBalanceInCurrencyRecursive (account, xaccAccountGetProjectedMinimumBalance,
-						 report_commodity, include_children);
+xaccAccountGetProjectedMinimumBalanceInCurrency (
+    Account *account, gnc_commodity *report_commodity,
+    gboolean include_children)
+{
+  return xaccAccountGetXxxBalanceInCurrencyRecursive (
+      account, xaccAccountGetProjectedMinimumBalance, report_commodity,
+      include_children);
+}
+
+gnc_numeric
+xaccAccountGetBalanceAsOfDateInCurrency(
+    Account *account, time_t date, gnc_commodity *report_commodity,
+    gboolean include_children)
+{
+    return xaccAccountGetXxxBalanceAsOfDateInCurrencyRecursive (
+        account, date, xaccAccountGetBalanceAsOfDate, report_commodity,
+        include_children);
 }
 
 /********************************************************************\
@@ -2878,12 +2963,12 @@
     { ACCOUNT_BALANCE_, 		QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetBalance, 		NULL },
     { ACCOUNT_CLEARED_, 		QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetClearedBalance, 	NULL },
     { ACCOUNT_RECONCILED_,	 	QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetReconciledBalance, NULL },
-	{ ACCOUNT_TYPE_, 			QOF_TYPE_INT32,   (QofAccessFunc)xaccAccountGetType, 			(QofSetterFunc)xaccAccountSetType },
-    { ACCOUNT_FUTURE_MINIMUM_, 	QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetProjectedMinimumBalance, NULL },
+   { ACCOUNT_TYPE_,          QOF_TYPE_STRING,  (QofAccessFunc)qofAccountGetTypeString,   (QofSetterFunc)qofAccountSetType },
+   { ACCOUNT_FUTURE_MINIMUM_,QOF_TYPE_NUMERIC, (QofAccessFunc)xaccAccountGetProjectedMinimumBalance, NULL },
     { ACCOUNT_TAX_RELATED, 		QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccAccountGetTaxRelated, 		(QofSetterFunc) xaccAccountSetTaxRelated },
-	{ ACCOUNT_SCU, 				QOF_TYPE_INT32,   (QofAccessFunc)xaccAccountGetCommoditySCU, 	(QofSetterFunc)xaccAccountSetCommoditySCU },
+   { ACCOUNT_SCU,            QOF_TYPE_INT32,   (QofAccessFunc)xaccAccountGetCommoditySCU,(QofSetterFunc)xaccAccountSetCommoditySCU },
 	{ ACCOUNT_NSCU, 			QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccAccountGetNonStdSCU, 		(QofSetterFunc)xaccAccountSetNonStdSCU },
-	{ ACCOUNT_PARENT,			GNC_ID_ACCOUNT,	  (QofAccessFunc)xaccAccountGetParentAccount,	(QofSetterFunc)qofAccountSetParent },
+   { ACCOUNT_PARENT,         GNC_ID_ACCOUNT,   (QofAccessFunc)xaccAccountGetParentAccount,(QofSetterFunc)qofAccountSetParent },
     { QOF_PARAM_BOOK, 			QOF_ID_BOOK, 	  (QofAccessFunc)qof_instance_get_book, 		NULL },
     { QOF_PARAM_GUID, 			QOF_TYPE_GUID,    (QofAccessFunc)qof_instance_get_guid, 		NULL },
     { ACCOUNT_KVP, 				QOF_TYPE_KVP, 	  (QofAccessFunc)qof_instance_get_slots, 		NULL },
Index: kvp-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp-util.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/engine/kvp-util.h -Lsrc/engine/kvp-util.h -u -r1.4 -r1.5
--- src/engine/kvp-util.h
+++ src/engine/kvp-util.h
@@ -21,12 +21,14 @@
 \********************************************************************/
 
 /** @addtogroup KVP
-    @{ */
+    @{ 
+*/
 /** @file kvp-util.h 
     @brief GnuCash KVP utility functions 
  */
-/**  @name Hash Utilities */
-/* @{ */
+/**  @name Hash Utilities
+ @{ 
+*/
 
 #ifndef GNC_KVP_UTIL_H
 #define GNC_KVP_UTIL_H
@@ -57,6 +59,6 @@
 
 /***********************************************************************/
 
-/* @} */
-/* @} */
+/** @} */
+/** @} */
 #endif /* GNC_KVP_UTIL_H */
Index: gnc-pricedb.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -Lsrc/engine/gnc-pricedb.h -Lsrc/engine/gnc-pricedb.h -u -r1.43 -r1.44
--- src/engine/gnc-pricedb.h
+++ src/engine/gnc-pricedb.h
@@ -24,15 +24,9 @@
 #define GNC_PRICEDB_H
 
 #include <stdio.h>
-
+#include "qof.h"
 #include "gnc-commodity.h"
-#include "gnc-date.h"
 #include "gnc-engine.h"
-#include "gnc-numeric.h"
-#include "guid.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
 
 /** @addtogroup PriceDB
     @{ */
@@ -222,7 +216,7 @@
 
 /** gnc_price_list_insert - insert a price into the given list, calling
      gnc_price_ref on it during the process. */
-gboolean gnc_price_list_insert(GList **prices, GNCPrice *p);
+gboolean gnc_price_list_insert(GList **prices, GNCPrice *p, gboolean check_dupl);
 
 /** gnc_price_list_remove - remove the price, p, from the given list,
      calling gnc_price_unref on it during the process. */
@@ -271,6 +265,11 @@
 void gnc_pricedb_begin_edit (GNCPriceDB *);
 void gnc_pricedb_commit_edit (GNCPriceDB *);
 
+/** Indicate whether or not the database is in the middle of a bulk
+ *  update.  Setting this flag will disable checks for duplicate
+ *  entries. */
+void gnc_pricedb_set_bulk_update(GNCPriceDB *db, gboolean bulk_update);
+
 /** gnc_pricedb_add_price - add a price to the pricedb, you may drop
      your reference to the price (i.e. call unref) after this
      succeeds, whenever you're finished with the price. */
@@ -280,6 +279,8 @@
      pricedb.   Returns TRUE if successful, FALSE otherwise. */
 gboolean     gnc_pricedb_remove_price(GNCPriceDB *db, GNCPrice *p);
 
+gboolean     gnc_pricedb_remove_old_prices(GNCPriceDB *db, Timespec cutoff);
+
 /** gnc_pricedb_lookup_latest - find the most recent price for the
      given commodity in the given currency.  Returns NULL on
      failure. */
@@ -293,6 +294,13 @@
 GList      *gnc_pricedb_lookup_latest_any_currency(GNCPriceDB *db,
                                                    gnc_commodity *commodity);
 
+/** gnc_pricedb_has_prices - return an indication of whether or not
+    there are any prices for a given commodity in the given currency.
+    Returns TRUE if there are prices, FALSE otherwise. */
+gboolean     gnc_pricedb_has_prices(GNCPriceDB *db,
+                                    gnc_commodity *commodity,
+                                    gnc_commodity *currency);
+
 /** gnc_pricedb_get_prices - return all the prices for a given
      commodity in the given currency.  Returns NULL on failure.  The
      result is a GNCPrice list (see above).  */
Index: gnc-numeric.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-numeric.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/engine/gnc-numeric.h -Lsrc/engine/gnc-numeric.h -u -r1.23 -r1.24
--- src/engine/gnc-numeric.h
+++ src/engine/gnc-numeric.h
@@ -20,6 +20,7 @@
  *******************************************************************/
 
 /** @addtogroup Numeric
+
     The 'Numeric' functions provide a way of working with rational
     numbers while maintaining strict control over rounding errors
     when adding rationals with different denominators.  The Numeric
@@ -35,31 +36,22 @@
     addition and multiplication, but 64-bit rationals do not have 
     the dynamic range of floating point numbers.  
 
-@{ */
-/** @file gnc-numeric.h
-    @brief An exact-rational-number library for gnucash.
-    @author Copyright (C) 2000 Bill Gribble
-    @author Copyright (C) 2004 Linas Vepstas <linas at linas.org>
-*/
-
-/* ----------------------------------------------------------------
-
-EXAMPLE
--------
-The following program finds the best @code{gnc_numeric} approximation to
-the @file{math.h} constant @code{M_PI} given a maximum denominator. For
-large denominators, the @code{gnc_numeric} approximation is accurate to
+EXAMPLE\n
+-------\n
+The following program finds the best ::gnc_numeric approximation to
+the \a math.h constant \a M_PI given a maximum denominator. For
+large denominators, the ::gnc_numeric approximation is accurate to
 more decimal places than will generally be needed, but in some cases
 this may not be good enough. For example,
 
- at example
+ at verbatim
     M_PI                   = 3.14159265358979323846
     245850922 / 78256779   = 3.14159265358979311599  (16 sig figs)
     3126535 / 995207       = 3.14159265358865047446  (12 sig figs)
     355 / 113              = 3.14159292035398252096  (7 sig figs)
- at end example
+ at endverbatim
 
- at example
+ at verbatim
 #include <glib.h>
 #include "gnc-numeric.h"
 #include <math.h>
@@ -88,8 +80,15 @@
     }
   }
 }
+ at endverbatim
+
+@{ */
+/** @file gnc-numeric.h
+    @brief An exact-rational-number library for gnucash.
+    @author Copyright (C) 2000 Bill Gribble
+    @author Copyright (C) 2004 Linas Vepstas <linas at linas.org>
+*/
 
------------------------------------------------------------------ */
 
 #ifndef GNC_NUMERIC_H
 #define GNC_NUMERIC_H
@@ -107,8 +106,7 @@
  * This is a rational number, defined by numerator and denominator. */
 typedef struct _gnc_numeric gnc_numeric;
 
-/** @name Arguments 
-  * @brief Standard Arguments to most functions
+/** @name Arguments Standard Arguments to most functions
 
     Most of the gnc_numeric arithmetic functions take two arguments
     in addition to their numeric args: 'denom', which is the denominator
@@ -120,7 +118,7 @@
 
     Valid values for denom are:
     GNC_DENOM_AUTO  -- compute denominator exactly
-    integer n       -- Force the denominator of teh result to be this integer
+    integer n       -- Force the denominator of the result to be this integer
     GNC_DENOM_RECIPROCAL -- Use 1/n as the denominator (???huh???)
 
     Valid values for 'how' are bitwise combinations of zero or one
@@ -153,10 +151,11 @@
    the same denominator as each other and as the result), use
    GNC_DENOM_AUTO as 'denom' and 
    GNC_HOW_DENOM_FIXED | GNC_HOW_RND_NEVER as 'how'.
+@{
+*/
 
-  @{ */
+/** \brief bitmasks for HOW flags.
 
-/** bitmasks for HOW flags.
  * bits 8-15 of 'how' are reserved for the number of significant
  * digits to use in the output with GNC_HOW_DENOM_SIGFIG 
  */ 
@@ -164,7 +163,8 @@
 #define GNC_NUMERIC_DENOM_MASK   0x000000f0
 #define GNC_NUMERIC_SIGFIGS_MASK 0x0000ff00
 
-/** Rounding/Truncation modes for operations.
+/** \brief Rounding/Truncation modes for operations.
+
  *  Rounding instructions control how fractional parts in the specified
  *  denominator affect the result. For example, if a computed result is
  *  "3/4" but the specified denominator for the return value is 2, should
@@ -264,7 +264,7 @@
 
 /** Values that can be passed as the 'denom' argument.  
  *  The include a positive number n to be used as the 
- *  denominator of teh output value.  Other possibilities 
+ *  denominator of the output value.  Other possibilities
  *  include the list below:
  */
 
@@ -278,8 +278,9 @@
 
 /**  @} */
 
-/** @name Constructors */
-/*@{*/
+/** @name Constructors
+@{
+*/
 /** Make a gnc_numeric from numerator and denominator */
 static inline 
 gnc_numeric gnc_numeric_create(gint64 num, gint64 denom) {
@@ -310,10 +311,11 @@
  *  noted by error_code, rather than a number. 
  */
 gnc_numeric gnc_numeric_error(GNCNumericErrorCode error_code);
-/*@}*/
+/** @} */
 
-/** @name Value Accessors */
-/** @{*/
+/** @name Value Accessors
+ @{
+*/
 /** Return numerator */
 static inline 
 gint64 gnc_numeric_num(gnc_numeric a) { return a.num; }
@@ -333,8 +335,9 @@
 gchar * gnc_num_dbg_to_string(gnc_numeric n);
 /** @}*/
 
-/** @name Comparisons and Predicates */
-/** @{ */
+/** @name Comparisons and Predicates 
+ @{
+*/
 /** Check for error signal in value. Returns GNC_ERROR_OK (==0) if
  *  the number appears to be valid, otherwise it returns the
  *  type of error.  Error values always have a denominator of zero.
@@ -378,10 +381,11 @@
  */ 
 int gnc_numeric_same(gnc_numeric a, gnc_numeric b,   
                      gint64 denom, gint how);
-/** @}*/
+/** @} */
 
-/** @name Arithmetic Operations */
-/** @{*/
+/** @name Arithmetic Operations 
+ @{ 
+*/
 /** Return a+b. */
 gnc_numeric gnc_numeric_add(gnc_numeric a, gnc_numeric b, 
                             gint64 denom, gint how);
@@ -432,10 +436,11 @@
   return gnc_numeric_sub(a, b, GNC_DENOM_AUTO,
                          GNC_HOW_DENOM_FIXED | GNC_HOW_RND_NEVER);
 }
-/** @}*/
+/** @} */
 
-/** @name Arithmetic Functions with Exact Error Returns */
-/** @{*/
+/** @name Arithmetic Functions with Exact Error Returns 
+ @{
+*/
 /** The same as gnc_numeric_add, but uses 'error' for accumulating
  *  conversion roundoff error. */
 gnc_numeric gnc_numeric_add_with_error(gnc_numeric a, gnc_numeric b,
@@ -461,10 +466,11 @@
 gnc_numeric gnc_numeric_div_with_error(gnc_numeric a, gnc_numeric b,
                                        gint64 denom, gint how,
                                        gnc_numeric * error);
-/** @}*/
+/** @} */
 
-/** @name Change Denominator */
-/** @{*/
+/** @name Change Denominator 
+ @{
+*/
 /** Change the denominator of a gnc_numeric value to the 
  *  specified denominator under standard arguments 
  *  'denom' and 'how'. 
@@ -482,10 +488,11 @@
 /** Return input after reducing it by Greated Common Factor (GCF) 
  *  elimination */
 gnc_numeric gnc_numeric_reduce(gnc_numeric in);
-/** @}*/
+/** @} */
 
 /** @name Deprecated, backwards-compatible definitions 
-  @{ */
+  @{
+*/
 #define GNC_RND_FLOOR	GNC_HOW_RND_FLOOR
 #define GNC_RND_CEIL 	GNC_HOW_RND_CEIL 
 #define GNC_RND_TRUNC	GNC_HOW_RND_TRUNC
@@ -503,6 +510,6 @@
 
 #define GNC_DENOM_SIGFIGS(X)  GNC_HOW_DENOM_SIGFIGS(X)
 #define GNC_NUMERIC_GET_SIGFIGS(X) GNC_HOW_GET_SIGFIGS(X)
-/** @}*/
-/** @}*/
+/** @} */
+/** @} */
 #endif
Index: Scrub3.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Scrub3.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/Scrub3.c -Lsrc/engine/Scrub3.c -u -r1.14 -r1.15
--- src/engine/Scrub3.c
+++ src/engine/Scrub3.c
@@ -20,7 +20,7 @@
 \********************************************************************/
 
 /** @file Scrub3.c
- *  @breif Constrain Cap Gains to Track Sources of Gains
+ *  @brief Constrain Cap Gains to Track Sources of Gains
  *  @author Created by Linas Vepstas Sept 2003
  *  @author Copyright (c) 2003,2004 Linas Vepstas <linas at linas.org>
  *
@@ -37,10 +37,6 @@
 #include "gnc-commodity.h"
 #include "gnc-engine.h"
 #include "gnc-lot.h"
-#include "gnc-numeric.h"
-#include "gnc-trace.h"
-#include "kvp_frame.h"
-#include "kvp-util-p.h"
 #include "policy-p.h"
 #include "Account.h"
 #include "AccountP.h"
@@ -50,7 +46,7 @@
 #include "Transaction.h"
 #include "TransactionP.h"
 
-static short module = MOD_LOT;
+static QofLogModule log_module = GNC_MOD_LOT;
 
 /* ================================================================= */
 /** Cap gains are possible only if the lot commodity is not the same
Index: gnc-engine-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine-util.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lsrc/engine/gnc-engine-util.c -Lsrc/engine/gnc-engine-util.c -u -r1.35 -r1.36
--- src/engine/gnc-engine-util.c
+++ src/engine/gnc-engine-util.c
@@ -1,5 +1,5 @@
 /********************************************************************\
- * gnc-engine-util.c -- GnuCash engine utility functions            *
+ * gnc-engine-util.c -- QOF utility functions                       *
  * Copyright (C) 1997 Robin D. Clark                                *
  * Copyright (C) 1997-2001,2004 Linas Vepstas <linas at linas.org>     *
  *                                                                  *
@@ -30,7 +30,7 @@
 #include <glib.h>
 #include <stdlib.h>
 #include <string.h>
-
+#include "qof.h"
 #include "gnc-engine-util.h"
 
 
@@ -221,15 +221,43 @@
 
 static GCache * gnc_string_cache = NULL;
 
+#ifdef THESE_CAN_BE_USEFUL_FOR_DEGUGGING
+static guint g_str_hash_KEY(gconstpointer v) {
+    return g_str_hash(v);
+}
+static guint g_str_hash_VAL(gconstpointer v) {
+    return g_str_hash(v);
+}
+static gpointer g_strdup_VAL(gpointer v) {
+    return g_strdup(v);
+}
+static gpointer g_strdup_KEY(gpointer v) {
+    return g_strdup(v);
+}
+static void g_free_VAL(gpointer v) {
+    return g_free(v);
+}
+static void g_free_KEY(gpointer v) {
+    return g_free(v);
+}
+static gboolean gnc_str_equal(gconstpointer v, gconstpointer v2)
+{
+    return (v && v2) ? g_str_equal(v, v2) : FALSE;
+}
+#endif
+
 GCache*
 gnc_engine_get_string_cache(void)
 {
-    if(!gnc_string_cache) 
-    {
+    if(!gnc_string_cache) {
         gnc_string_cache = g_cache_new(
-            (GCacheNewFunc) g_strdup, g_free,
-            (GCacheDupFunc) g_strdup, g_free, g_str_hash, 
-            g_str_hash, g_str_equal);
+            (GCacheNewFunc) g_strdup, /* value_new_func     */
+            g_free,                   /* value_destroy_func */
+            (GCacheDupFunc) g_strdup, /* key_dup_func       */
+            g_free,                   /* key_destroy_func   */
+            g_str_hash,               /* hash_key_func      */
+            g_str_hash,               /* hash_value_func    */
+            g_str_equal);             /* key_equal_func     */
     }
     return gnc_string_cache;
 }
@@ -237,9 +265,43 @@
 void
 gnc_engine_string_cache_destroy (void)
 {
-  g_cache_destroy (gnc_string_cache);
-  gnc_string_cache = NULL;
+    if (gnc_string_cache)
+        g_cache_destroy (gnc_string_cache);
+    gnc_string_cache = NULL;
+}
+
+void
+gnc_string_cache_remove(gconstpointer key)
+{
+    g_cache_remove(gnc_engine_get_string_cache(), key);
+}
+
+
+gpointer
+gnc_string_cache_insert(gpointer key)
+{
+    return g_cache_insert(gnc_engine_get_string_cache(), key);
+}
+
+void
+qof_init (void)
+{
+	gnc_engine_get_string_cache ();
+	guid_init ();
+	qof_object_initialize ();
+	qof_query_init ();
+	qof_book_register ();
 }
 
+void
+qof_close(void)
+{
+	qof_query_shutdown ();
+	qof_object_shutdown ();
+	guid_shutdown ();
+	gnc_engine_string_cache_destroy ();
+}
+
+
 /************************* END OF FILE ******************************\
 \********************************************************************/
Index: GroupP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/GroupP.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lsrc/engine/GroupP.h -Lsrc/engine/GroupP.h -u -r1.29 -r1.30
--- src/engine/GroupP.h
+++ src/engine/GroupP.h
@@ -37,13 +37,8 @@
 #define XACC_GROUP_P_H
 
 #include "config.h"
-
+#include "Group.h"
 #include "Transaction.h"
-#include "gnc-numeric.h"
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofid.h"
-
 
 /** STRUCTS *********************************************************/
 struct account_group_s
Index: qofquery-serialize.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery-serialize.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qofquery-serialize.h -Lsrc/engine/qofquery-serialize.h -u -r1.3 -r1.4
--- src/engine/qofquery-serialize.h
+++ src/engine/qofquery-serialize.h
@@ -20,27 +20,23 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup Query
-   @{ */
-/** @file qofquery-serialize.h
-    @brief Convert QofQuery to XML
-    @author Copyright (C) 2001,2002,2004 Linas Vepstas <linas at linas.org>
+/* qofquery-serialize.h
+   Convert QofQuery to XML
+   Copyright (C) 2001,2002,2004 Linas Vepstas <linas at linas.org>
  */
 
 #ifndef QOF_QUERY_SERIALIZE_H
 #define QOF_QUERY_SERIALIZE_H
 
-#include <qof/qofquery.h>
+#include "qofquery.h"
 #include <libxml/tree.h>
 
-/** @addtogroup XML Serialize Queries to/from XML */
-/* @{ */
-/** Take the query passed as input, and serialize it into XML.
+/* XML Serialize Queries to/from XML */
+
+/* Take the query passed as input, and serialize it into XML.
  *  The DTD used will be a very qofquery specific DTD
  *  This is NOT the XQuery XML.
  */
 xmlNodePtr qof_query_to_xml (QofQuery *q);
-/* @} */
 
 #endif /* QOF_QUERY_SERIALIZE_H */
-/* @} */
Index: qofquery-deserial.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery-deserial.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qofquery-deserial.h -Lsrc/engine/qofquery-deserial.h -u -r1.3 -r1.4
--- src/engine/qofquery-deserial.h
+++ src/engine/qofquery-deserial.h
@@ -20,28 +20,28 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup Query
-    @{ */
-/** @file qofquery-deserial.h
-    @brief Convert Qof-Query XML to QofQuery 
-    @author Copyright (C) 2004 Linas Vepstas <linas at linas.org>
+/* 
+ qofquery-deserial.h
+ Convert Qof-Query XML to QofQuery 
+author Copyright (C) 2004 Linas Vepstas <linas at linas.org>
 */
 
 #ifndef QOF_QUERY_DESERIAL_H
 #define QOF_QUERY_DESERIAL_H
 
-#include <qof/qofquery.h>
+#include "qofquery.h"
 #include <libxml/tree.h>
 
-/** @addtogroup XML 
+/*
     Qof Queries can be converted to and from XML so that they
     can be sent from here to there. This file implements the
     routine needed to convert the XML back into a C struct.
 
- @{ */
-/** Given an XML tree, reconstruct and return the equivalent query. */
+    Unfinished. XXX Why is this easier than reading a text/sql
+    file? 
+
+ */
+/* Given an XML tree, reconstruct and return the equivalent query. */
 QofQuery *qof_query_from_xml (xmlNodePtr);
-/* @} */
 
 #endif /* QOF_QUERY_DESERIAL_H */
-/* @} */
Index: FreqSpec.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/FreqSpec.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lsrc/engine/FreqSpec.c -Lsrc/engine/FreqSpec.c -u -r1.38 -r1.39
--- src/engine/FreqSpec.c
+++ src/engine/FreqSpec.c
@@ -74,7 +74,6 @@
 \********************************************************************/
 
 #include "config.h"
-
 #include <time.h>
 
 #include <glib.h>
@@ -85,25 +84,9 @@
 #endif
 
 #include "FreqSpecP.h"
-#include "gnc-date.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-#include "gnc-trace.h"
 #include "messages.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofid-p.h"
-
-/* I have done this to prevent compiler warnings...
- * This is used to convert a const GDate* to a GDate* for passing
- * to the glib g_date_xxx functions which don't use const...
- * Strangely, most of the rest of glib does use const, so
- * perhaps this will change? When it does, just define this macro to
- * nothing and the compiler will check the constness of each pointer....
- */
-#define CONST_HACK (GDate*)
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 /* 
  *  FIXME: should be in a header file
  */
@@ -122,12 +105,18 @@
  
 /** PROTOTYPES ******************************************************/
 
+FROM_STRING_FUNC(UIFreqType, ENUM_LIST_UI)
+AS_STRING_FUNC(UIFreqType, ENUM_LIST_UI)
+
+FROM_STRING_FUNC(FreqType, ENUM_LIST_TYPE)
+AS_STRING_FUNC(FreqType, ENUM_LIST_TYPE)
+
 static int int_cmp( int a, int b );
 
-/**
+/*
  * Destroys all sub-FreqSpecs in a composite FreqSpec.
  * Assertion error if it's not a COMPOSITE FreqSpec.
- **/
+ */
 void xaccFreqSpecCompositesClear( FreqSpec *fs );
 
 void subSpecsListMapDelete( gpointer data, gpointer user_data );
@@ -167,12 +156,12 @@
   return month_name;
 }
 
-/**
+/*
  * Initializes a FreqSpec by setting it's to type INVALID.
  * Use this to initialise a stack object.
  * FreqSpec objects must be initalised before being used by
  * any other method.
- **/
+ */
 
 static void
 xaccFreqSpecInit( FreqSpec *fs, QofBook *book )
@@ -283,8 +272,8 @@
       break;
 
    case ONCE:
-      if ( g_date_compare( &(fs->s.once.date),
-                 CONST_HACK in_date ) > 0 ) {
+      if ( g_date_compare( &(fs->s.once.date), in_date ) > 0 ) 
+      {
          *out_date = fs->s.once.date;
       } else {
          /* Date is past due. Return an invalid date. */
@@ -295,7 +284,7 @@
    case DAILY: {
       guint32 julian_in_date, julian_next_repeat, complete_intervals;
 
-      julian_in_date = g_date_julian( CONST_HACK in_date );
+      julian_in_date = g_date_julian( in_date );
       complete_intervals =
          (julian_in_date - fs->s.daily.offset_from_epoch) /
          fs->s.daily.interval_days;
@@ -311,7 +300,7 @@
        * It is very similar to the daily repeat representation. */
       guint32 julian_in_date, julian_next_repeat, complete_intervals;
 
-      julian_in_date = g_date_julian( CONST_HACK in_date );
+      julian_in_date = g_date_julian( in_date );
       complete_intervals =
          (julian_in_date - fs->s.weekly.offset_from_epoch) /
          (fs->s.weekly.interval_weeks * 7);
@@ -325,18 +314,18 @@
       guint32 in_months_from_epoch, after_repeat_in_month_interval,
          complete_intervals, next_repeat_months_from_epoch, month, year;
 
-      in_months_from_epoch = (g_date_year( CONST_HACK in_date )-1) * 12 +
-         g_date_month( CONST_HACK in_date ) - 1;
+      in_months_from_epoch = (g_date_year( in_date )-1) * 12 +
+         g_date_month( in_date ) - 1;
       complete_intervals =
          (in_months_from_epoch - fs->s.monthly.offset_from_epoch) /
          fs->s.monthly.interval_months;
       after_repeat_in_month_interval =
-         (g_date_day( CONST_HACK in_date ) >= fs->s.monthly.day_of_month ||
+         (g_date_day( in_date ) >= fs->s.monthly.day_of_month ||
           (in_months_from_epoch - fs->s.monthly.offset_from_epoch) %
           fs->s.monthly.interval_months > 0 ||
-          g_date_day( CONST_HACK in_date ) >=
-          g_date_days_in_month( g_date_month( CONST_HACK in_date ),
-                      g_date_year( CONST_HACK in_date ) ) )  ? 1 : 0;
+          g_date_day( in_date ) >=
+          g_date_days_in_month( g_date_month( in_date ),
+                      g_date_year( in_date ) ) )  ? 1 : 0;
       next_repeat_months_from_epoch =
          fs->s.monthly.offset_from_epoch +
          (complete_intervals + after_repeat_in_month_interval) *
@@ -363,19 +352,19 @@
          wday_of_1st, day_of_repeat;
 
       GDate date1;
-      in_months_from_epoch = (g_date_year( CONST_HACK in_date )-1) * 12 +
-         g_date_month( CONST_HACK in_date ) - 1;
+      in_months_from_epoch = (g_date_year( in_date )-1) * 12 +
+         g_date_month( in_date ) - 1;
       complete_intervals =
          (in_months_from_epoch - fs->s.month_relative.offset_from_epoch) /
          fs->s.month_relative.interval_months;
-      month = g_date_month( CONST_HACK in_date );
-      year = g_date_year( CONST_HACK in_date );
+      month = g_date_month( in_date );
+      year = g_date_year( in_date );
       g_date_set_dmy( &date1, 1, month, year );
-      wday_of_1st = g_date_weekday( &date1 );
+      wday_of_1st = g_date_get_weekday( &date1 );
       day_of_repeat = (fs->s.month_relative.occurrence-1)*7 +
          ((fs->s.month_relative.weekday + 7 - wday_of_1st)%7 + 1);
       after_repeat_in_month_interval =
-         (g_date_day( CONST_HACK in_date ) >= day_of_repeat ||
+         (g_date_day( in_date ) >= day_of_repeat ||
           day_of_repeat > g_date_days_in_month( month, year ) ||
           (in_months_from_epoch - fs->s.month_relative.offset_from_epoch) %
           fs->s.month_relative.interval_months > 0 )  ? 1 : 0;
@@ -386,17 +375,18 @@
       month = next_repeat_months_from_epoch % 12 + 1;
       year = next_repeat_months_from_epoch / 12 + 1;
       g_date_set_dmy( &date1, 1, month, year );
-      wday_of_1st = g_date_weekday( &date1 );
+      wday_of_1st = g_date_get_weekday( &date1 );
       /* This calculates the day of the month in the month which forms
        * the next month in the cycle after the given input date.
-       * However, this day may be larger than the number of days in that month... */
+       * However, this day may be larger than the number of days in
+       * that month... */
       day_of_repeat = (fs->s.month_relative.occurrence-1)*7 +
          ((fs->s.month_relative.weekday + 7 - wday_of_1st)%7 + 1);
       while( day_of_repeat > g_date_days_in_month( month, year ) ) {
-         /* If the repeat occurs after the end of the month, then
-          * find the next month containing a day which satisfies the request.
-          * Each candiate month separated by interval_months is considered
-          * by this loop.*/
+         /* If the repeat occurs after the end of the month, then find
+          * the next month containing a day which satisfies the
+          * request.  Each candiate month separated by interval_months
+          * is considered by this loop.*/
          ++complete_intervals;
          next_repeat_months_from_epoch =
             fs->s.month_relative.offset_from_epoch +
@@ -404,7 +394,7 @@
          month = next_repeat_months_from_epoch % 12 + 1;
          year = next_repeat_months_from_epoch / 12 + 1;
          g_date_set_dmy( &date1, 1, month, year );
-         wday_of_1st = g_date_weekday( &date1 );
+         wday_of_1st = g_date_get_weekday( &date1 );
          day_of_repeat = (fs->s.month_relative.occurrence-1)*7 +
             ((fs->s.month_relative.weekday + 7 - wday_of_1st)%7 + 1);
          /* Hmmm... It would be nice to know that this loop is
@@ -484,7 +474,7 @@
    fs->type = DAILY;
    fs->s.daily.interval_days = interval_days;
 
-   julian_days_since_epoch = g_date_julian( CONST_HACK initial_date );
+   julian_days_since_epoch = g_date_julian( initial_date );
    fs->s.daily.offset_from_epoch = julian_days_since_epoch % interval_days;
 }
 
@@ -513,7 +503,7 @@
    fs->type = DAILY;
    fs->s.daily.interval_days = 7 * interval_weeks;
 
-   julian_days_since_epoch = g_date_julian( CONST_HACK initial_date );
+   julian_days_since_epoch = g_date_julian( initial_date );
    fs->s.daily.offset_from_epoch = julian_days_since_epoch % (7*interval_weeks);
 #endif
 #if 1
@@ -527,7 +517,7 @@
    fs->type = WEEKLY;
    fs->s.weekly.interval_weeks = interval_weeks;
 
-   julian_days_since_epoch = g_date_julian( CONST_HACK initial_date );
+   julian_days_since_epoch = g_date_julian( initial_date );
    fs->s.weekly.offset_from_epoch = julian_days_since_epoch % (7*interval_weeks);
 #endif
 #if 0
@@ -545,7 +535,7 @@
    fs->type = WEEKLY;
    fs->s.weekly.interval_weeks = interval_weeks;
 
-   julian_day_initial = g_date_julian( CONST_HACK initial_date );
+   julian_day_initial = g_date_julian( initial_date );
    weeks_since_epoch = (julian_day_initial-1) / 7;
    fs->s.weekly.day_of_week = (julian_day_initial-1) % 7;
    fs->s.weekly.offset_from_epoch = weeks_since_epoch % interval_weeks;
@@ -569,10 +559,10 @@
    fs->type = MONTHLY;
    fs->s.monthly.interval_months = interval_months;
 
-   months_since_epoch = (g_date_year( CONST_HACK initial_date )-1) * 12 +
-      g_date_month( CONST_HACK initial_date ) - 1;
+   months_since_epoch = (g_date_year( initial_date )-1) * 12 +
+      g_date_month( initial_date ) - 1;
    fs->s.monthly.offset_from_epoch = months_since_epoch % interval_months;
-   fs->s.monthly.day_of_month = g_date_day( CONST_HACK initial_date );
+   fs->s.monthly.day_of_month = g_date_day( initial_date );
 
    g_return_if_fail( fs->s.monthly.offset_from_epoch <
       fs->s.monthly.interval_months );
@@ -590,12 +580,12 @@
    fs->type = MONTH_RELATIVE;
    fs->s.month_relative.interval_months = interval_months;
 
-   months_since_epoch = (g_date_year( CONST_HACK initial_date )-1) * 12 +
-      g_date_month( CONST_HACK initial_date ) - 1;
+   months_since_epoch = (g_date_year( initial_date )-1) * 12 +
+      g_date_month( initial_date ) - 1;
    fs->s.month_relative.offset_from_epoch = months_since_epoch % interval_months;
    
-   fs->s.month_relative.weekday = g_date_weekday( CONST_HACK initial_date );
-   fs->s.month_relative.occurrence = (g_date_day( CONST_HACK initial_date )-1) / 7 + 1;
+   fs->s.month_relative.weekday = g_date_get_weekday( initial_date );
+   fs->s.month_relative.occurrence = (g_date_day( initial_date )-1) / 7 + 1;
    
    g_return_if_fail( fs->s.month_relative.weekday > 0 );
    g_return_if_fail( fs->s.month_relative.weekday <= 7 );
@@ -653,8 +643,6 @@
    return 0;
 }
 
-/* FIXME: add month-relative getter */
-
 GList*
 xaccFreqSpecCompositeGet( FreqSpec *fs )
 {
@@ -704,7 +692,19 @@
   return str;
 }
 
-    
+static const char*
+qofFreqSpecPrintable (gpointer obj)
+{
+	FreqSpec *fs;
+	GString  *str;
+
+	fs = (FreqSpec*)obj;
+	g_return_val_if_fail(fs != NULL, NULL);
+	str = g_string_new("");
+	xaccFreqSpecGetFreqStr(fs, str);
+	return str->str;
+}
+
 void
 xaccFreqSpecGetFreqStr( FreqSpec *fs, GString *str )
 {
@@ -996,9 +996,9 @@
    return 1;
 }
 
-/**
+/*
  * Returns the "min" FreqSpec sub-element of a composite FreqSpec.
- **/
+ */
 static
 FreqSpec*
 _gnc_freq_spec_get_min( FreqSpec *fs )
@@ -1111,3 +1111,235 @@
    }
    return 0;
 }
+
+/*  QOF routines. */
+
+static int
+qofFreqSpecGetMonthDay(FreqSpec *fs)
+{
+	int outDayOfMonth;
+
+	outDayOfMonth = 0;
+	if ( fs->type != MONTHLY ) { return outDayOfMonth; }
+	outDayOfMonth = fs->s.monthly.day_of_month;
+	return outDayOfMonth;
+}
+/*
+static int
+qofFreqSpecGetMonthOffset(FreqSpec *fs)
+{
+	int outMonthOffset;
+
+	outMonthOffset = 0;
+	if ( fs->type != MONTHLY ) { return outMonthOffset; }
+	outMonthOffset = fs->s.monthly.offset_from_epoch;
+	return outMonthOffset;
+}
+*/
+static Timespec
+qofFreqSpecGetBaseDate(FreqSpec *fs)
+{
+	GDate       *when;
+	struct tm   number;
+	time_t      start_t;
+	Timespec ts = {0,0};
+
+	g_return_val_if_fail( fs != NULL , ts);
+	when = g_date_new();
+	if(xaccFreqSpecGetOnce(fs, when) == -1) { return ts; }
+	g_date_to_struct_tm(when, &number);
+	start_t = mktime(&number);
+	timespecFromTime_t(&ts, start_t);
+	return ts;
+}
+
+static char*
+qofFreqSpecGetUIType(FreqSpec *fs)
+{
+	char *type_string;
+
+	g_return_val_if_fail(fs, NULL);
+	type_string = g_strdup(UIFreqTypeasString(fs->uift));
+	return type_string;
+}
+
+static int
+qofFreqSpecGetRepeat(FreqSpec *fs)
+{
+	int repeat, dump, dump2;
+
+	g_return_val_if_fail(fs != NULL, -1);
+	repeat = -1;
+	dump = dump2 = 0;
+	switch(xaccFreqSpecGetType(fs))
+	{
+		case INVALID: {
+			break;
+		}
+		case ONCE: {
+			repeat = 0;
+			break;
+		}
+		case DAILY: {
+			xaccFreqSpecGetDaily(fs, &repeat);
+			break;
+		}
+		case WEEKLY: {
+			xaccFreqSpecGetWeekly(fs, &repeat, &dump);
+			break;
+		}
+		case MONTHLY: {
+			xaccFreqSpecGetMonthly(fs, &repeat, &dump, &dump2);
+			break;
+		}
+		case MONTH_RELATIVE: {
+			repeat = 0;
+			break;
+		}
+		case COMPOSITE: {
+			repeat = 0;
+			break;
+		}
+		default: {
+			break;
+		}
+	}
+	return repeat;
+}
+
+/* QOF set routines - may look a little strange as QOF can set parameters in any order. */
+/* Initial state:  UIFREQ_ONCE, INVALID, union s memset to zero and value == 0 */
+
+static void 
+qofFreqSpecCalculate(FreqSpec *fs, gint value)
+{
+	GDate *when;
+
+	g_return_if_fail(fs != NULL);
+	/* If it's INVALID, nothing can be done until more data is set. */
+	if(xaccFreqSpecGetType(fs) == INVALID) { return; }
+	/* If it's still UIFREQ_ONCE, nothing needs to be done */
+	if(xaccFreqSpecGetUIType(fs) == UIFREQ_ONCE) { return; }
+	/* If value is zero, nothing needs to be done. */
+	if(value == 0) { return; }
+	when = g_date_new();
+	xaccFreqSpecGetOnce(fs, when);
+	switch (xaccFreqSpecGetUIType(fs)) {
+		case UIFREQ_NONE : {
+			xaccFreqSpecSetNone(fs);
+		}
+		break;
+		case UIFREQ_ONCE : {
+			/*  should be impossible but just to be sure. */
+			break;
+		}
+		case UIFREQ_DAILY : {
+			xaccFreqSpecSetDaily(fs, when, value);
+			break;
+		}
+		case UIFREQ_DAILY_MF : {
+			
+			break;
+		}
+		case UIFREQ_WEEKLY : {
+			xaccFreqSpecSetWeekly(fs, when, value);
+			break;
+		}
+		case UIFREQ_BI_WEEKLY : {
+			
+			break;
+		}
+		case UIFREQ_SEMI_MONTHLY : {
+			
+			break;
+		}
+		case UIFREQ_MONTHLY : {
+			 xaccFreqSpecSetMonthly(fs, when, value);
+			break;
+		}
+		case UIFREQ_QUARTERLY : {
+			
+			break;
+		}
+		case UIFREQ_TRI_ANUALLY : {
+			
+			break;
+		}
+		case UIFREQ_SEMI_YEARLY : {
+			
+			break;
+		}
+		case UIFREQ_YEARLY : {
+			
+			break;
+		}
+		default: { break; }
+	}
+}
+
+static void
+qofFreqSpecSetUIType (FreqSpec *fs, const char *type_string)
+{
+	g_return_if_fail(fs != NULL);
+	xaccFreqSpecSetUIType(fs, UIFreqTypefromString(type_string));
+	qofFreqSpecCalculate(fs, fs->value);
+}
+
+static void
+qofFreqSpecSetBaseDate(FreqSpec *fs, Timespec start_date)
+{
+	time_t      start_t;
+	FreqType    type;
+	GDate       *when;
+
+	g_return_if_fail( fs != NULL );
+	when = g_date_new();
+	type = xaccFreqSpecGetType(fs);
+	start_t = timespecToTime_t(start_date);
+	g_date_set_time(when, (GTime)start_t);
+	/* QOF sets this before a type is assigned. */
+	if(type == INVALID) {
+		fs->type = ONCE;
+	}
+	xaccFreqSpecSetOnceDate(fs, when);
+	/* Now we have a GDate available for the calculation. */
+	qofFreqSpecCalculate(fs, fs->value);
+}
+
+static void
+qofFreqSpecSetRepeat(FreqSpec *fs, gint value)
+{
+	fs->value = value;
+	qofFreqSpecCalculate(fs, value);
+}
+
+static QofObject FreqSpecDesc = 
+{
+	interface_version : QOF_OBJECT_VERSION,
+	e_type            : QOF_ID_FREQSPEC,
+	type_label        : "Frequency Specification",
+	create            : (gpointer)xaccFreqSpecMalloc,
+	book_begin        : NULL,
+	book_end          : NULL,
+	is_dirty          : NULL,
+	mark_clean        : NULL,
+	foreach           : qof_collection_foreach,
+	printable         : qofFreqSpecPrintable,
+	version_cmp       : (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+};
+
+gboolean FreqSpecRegister (void)
+{
+	static QofParam params[] = {
+	 { FS_UI_TYPE, QOF_TYPE_STRING, (QofAccessFunc)qofFreqSpecGetUIType, (QofSetterFunc)qofFreqSpecSetUIType },
+	 { FS_REPEAT, QOF_TYPE_INT64, (QofAccessFunc)qofFreqSpecGetRepeat, (QofSetterFunc)qofFreqSpecSetRepeat },
+	 { FS_BASE_DATE, QOF_TYPE_DATE, (QofAccessFunc)qofFreqSpecGetBaseDate, 
+		 (QofSetterFunc)qofFreqSpecSetBaseDate },
+	 { FS_MONTH_DAY, QOF_TYPE_STRING, (QofAccessFunc)qofFreqSpecGetMonthDay, NULL },
+	 { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
+	 { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
+	 { NULL },
+	};
+	qof_class_register(QOF_ID_FREQSPEC, (QofSortFunc)gnc_freq_spec_compare, params);
+	return qof_object_register(&FreqSpecDesc);
+}
Index: kvp_doc.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp_doc.txt,v
retrieving revision 1.46
retrieving revision 1.47
diff -Lsrc/engine/kvp_doc.txt -Lsrc/engine/kvp_doc.txt -u -r1.46 -r1.47
--- src/engine/kvp_doc.txt
+++ src/engine/kvp_doc.txt
@@ -1,15 +1,14 @@
+/** \page kvpvalues KVP Values used By GnuCash
 
-                    KVP Values used By GnuCash
-                    --------------------------
                     Date Last Revised: August 2003
 
+API: \ref KVP
 
 This file documents the use of keys in the key-value pair system
 used by the GnuCash Application (both the engine, and non-engine, GUI
 pieces).  Before assigning keys for use, please read the Key-Value 
 Policy in the GnuCash Design Document located under src/doc/design.
 
-
 The format of the data below is:
 
 Name: The name of the key, including key names of parent frames
@@ -27,9 +26,9 @@
      for using the key here. Also include any API calls which use
      the key. If more than one entity can use the key, 
 
-
 Example:
 
+\verbatim
 Name: /my-favorite-thing
 Type: string
 Entities: Account
@@ -37,244 +36,333 @@
       This key stores a text description of the user's
       favorite thing. Do not use this key to store things
       which the user merely likes!
-
+\endverbatim
 
 Please put the keys in alphabetical order.
 
---------------------------------------------------------------------------
+\section kvpvaluelist List of existing values
+
+[ \ref kvpA ] [ \ref kvpB ] [ \ref kvpC ] [ \ref kvpD ] [ \ref kvpE ]
+[ \ref kvpF ] [ \ref kvpG ] [ \ref kvpH ] [ \ref kvpJ ] [ \ref kvpK ] [ \ref kvpL ]\n
+[ \ref kvpM ] [ \ref kvpN ] [ \ref kvpO ] [ \ref kvpP ] [ \ref kvpQ ] 
+[ \ref kvpR ] [ \ref kvpS ] [ \ref kvpT ] [ \ref kvpU ] [ \ref kvpV ] [ \ref kvpW ]
+
+\subsection kvpA A
+
+\subsection kvpB B
+
+\verbatim
 Name: /book/
 Type: kvp_frame
 Entities: Account, Book, Transaction
 Use:  kvp subdirectory holding info relating to accounting periods, including
       the 'twin' of an open/closed account, pointers to the open-balance
       transactions, the closing dates, etc.
+\endverbatim
 
+\verbatim
 Name: /book/accounting-period
-Type: string, enum {none, week, month, quarter, trimester, year} XXX not used, should be UIFreqSpec stuff ..
+Type: string, enum {none, week, month, quarter, trimester, year} 
+	XXX not used, should be UIFreqSpec stuff ..
 Entities: Book
 Use:  An enumerated identifier indicating how often books are supposed
       to be closed.  This key will typically be present only in an
       open book, as it seems meaningless in a closed book.
+\endverbatim
 
+\verbatim
 Name: /book/close-date
 Type: Timespec
 Entities: Book
 Use:  The posted closing date of this book.  This book only contains 
       transactions whose posted date is earlier than this closing date.
+\endverbatim
 
+\verbatim
 Name: /book/closed-acct
 Type: GUID
 Entities: Transaction
 Use:  The GUID of the account for which this transaction represents the 
       opening balance.  This value will occur *only* in transactions that
       are opening balances.
+\endverbatim
 
+\verbatim
 Name: /book/closed-book
 Type: GUID
 Entities: Transaction
 Use:  The GUID of the book for which this transaction represents the 
       opening balance.  This value will occur *only* in transactions that
       are opening balances.
+\endverbatim
 
+\verbatim
 Name: /book/log-date
 Type: Timespec
 Entities: Book
 Use:  A log of the date which the user performed the closing of the book.
+\endverbatim
 
+\verbatim
 Name: /book/next-acct
 Type: GUID
 Entities: Account
 Use:  The GUID of the account that follows this one, chronologically.
       Note that the open-date of the next book should equal the close-date
       of the book that this account belongs to.
+\endverbatim
 
+\verbatim
 Name: /book/next-book
 Type: GUID
 Entities: Account, Book
 Use:  The GUID of the book that follows this one, chronologically.
       Note that the open-date of the next book should equal the close-date
       of this book.
+\endverbatim
 
+\verbatim
 Name: /book/notes
 Type: string
 Entities: Book
 Use:  User-suplied notes for the book.  The user can set this to any value
       and change it at any time for any reason.
+\endverbatim
 
+\verbatim
 Name: /book/open-date
 Type: Timespec
 Entities: Book
 Use:  The posted opening date of this book.  This book only contains transactions
       whose posted date is later than this closing date.
+\endverbatim
 
+\verbatim
 Name: /book/prev-acct
 Type: GUID
 Entities: Account
 Use:  The GUID of the account that preceeds this one, chronologically.
       Note that the close-date of the previous book should equal the open-date
       of the book that this account belongs to.
+\endverbatim
 
+\verbatim
 Name: /book/prev-book
 Type: GUID
 Entities: Account, Book
 Use:  The GUID of the book that preceeds this one, chronologically.
       Note that the close-date of the previous book should equal the open-date
       of this book.
+\endverbatim
 
+\verbatim
 Name: /book/title
 Type: string
 Entities: Book
 Use:  A user-suplied title for the book.  The user can set this to any value
       and change it at any time for any reason.
 
------------------------
+\endverbatim
 
+\subsection kvpC C
+
+\verbatim
 Name: /counters/...
 Type: int64
 Entities: Book
 Use:  Holders for a bunch of counters for various types.  Used specifically
       in the business objects for ID counters.  The counter name is the path
       that follows /counters/, e.g. "/counters/GncCustomer"
-      
+\endverbatim      
+
+\subsection kvpD D
+
+\subsection kvpE E
 
------------------------
+\subsection kvpF F
 
+\verbatim
 Name: /from-sched-xaction
 Type: GUID
 Entities: Transaction
 Use: Identifies that the Transaction was created from a ScheduledTransaction,
      and stores the GUID of that SX.
+\endverbatim
 
+\subsection kvpG G
+
+\verbatim
 Name: /gains-source
 Type: guid
 Entities: Split
 Use:  GUID of the split that is at the source of the cap gains recorded
       in this split.
+\endverbatim
 
+\verbatim
 Name: /gains-split
 Type: guid
 Entities: Split
 Use:  GUID of the split that records the capital gains for this split.
+\endverbatim
 
------------------------
-
+\verbatim
 Name: /gemini/
 Type: kvp_glist
 Entities: Account, Book
 Use:  kvp bag holding frames that identify accounts or books 
       that are copies of this account.
+\endverbatim
 
-Name: /gemini/*
+\verbatim
+Name: /gemini/.*
 Type: kvp_frame
 Entities: Account, Book
 Use:  bag value holds a frame that identifies a single copied account.
       Other copies would appear in other bag values.
+\endverbatim
 
-Name: /gemini/*/acct_guid
+\verbatim
+Name: /gemini/<type>/acct_guid
 Type: guid
 Entities: Account
 Use:  guid of another account that is a copy of this one.
+\endverbatim
 
-Name: /gemini/*/book_guid
+\verbatim
+Name: /gemini/<type>/book_guid
 Type: guid
 Entities: Account, Book
 Use:  When this appears in an account, then it contains the guid of 
       the book that the other account belongs to.  When this appears
       in a book, then this is the guid of the other book.
+\endverbatim
 
-Name: /gemini/*/date
+\verbatim
+Name: /gemini/<type>/date
 Type: timespec
 Entities: Account, Book
 Use:  date that the copy was created.
+\endverbatim
 
------------------------
+\subsection kvpH H
 
+\verbatim
 Name: /hbci/
 Type: frame
 Entitites: Account, Book
 Use: subdirectory for information related to the German online banking
 protocol HBCI
+\endverbatim
 
+\verbatim
 Name: /hbci/account-id
 Type: string
 Entities: Account
 Use: HBCI Account code of the HBCI counterpart of this gnucash account
 in the real world
+\endverbatim
 
+\verbatim
 Name: /hbci/bank-code
 Type: string
 Entitites: Account
 Use: Bank code of HBCI account
+\endverbatim
 
+\verbatim
 Name: /hbci/country-code
 Type: gint64
 Entitites: Account
 Use: Country code of the bank of HBCI account
+\endverbatim
 
+\verbatim
 Name: /hbci/trans-retrieval
 Type: Timespec
 Entities: Account
 Use: Time of the last statement retrieval through HBCI for this
 specific account
+\endverbatim
 
+\verbatim
 Name: /hbci/config-filename
 Type: string
 Entitied: Book
 Use: OpenHBCI configuration file name, where the real HBCI
 configuration for the OpenHBCI library can be found 
+\endverbatim
+
+\subsection kvpJ J
 
------------------------
+\subsection kvpK K
 
+\subsection kvpL L
+
+\verbatim
 Name: last-num
 Type: string
 Entities: Account
 Use: xaccAccountGetLastNum, xaccAccountSetLastNum
      Store the last number used in an account's transactions.
      Used in auto-filling the Num field.
+\endverbatim
 
------------------------
-
+\verbatim
 Name: /lot-mgmt/
 Type: kvp_frame
 Entities: Account
 Use: Frame holding info regarding how lots should be managed in this
      account, including what accounting policy to use, where realized
      gains should be reported, and etc. 
+\endverbatim
 
+\verbatim
 Name: /lot-mgmt/gains-acct/
 Type: frame
 Entities: Account
 Use: When a lot in this account is double-balanced, this frame 
      holds per-currency accounts to which realized gains are to 
      be posted.
+\endverbatim
 
+\verbatim
 Name: /lot-mgmt/gains-acct/xxxxx
 Type: guid
 Entities: Account
 Use: When a lot in this account is double-balanced, this key specifies
      the account to which realized gains are to be posted.
+\endverbatim
 
+\verbatim
 Name: /lot-mgmt/next-id
 Type: int64
 Entities: Account
 Use: The next unused lot id number, used to autogenerate
      a lot title.
+\endverbatim
 
-
+\verbatim
 Name: /lot-split/
 Type: kvp_glist
 Entities: Split
 Use:  A bag of kvp frames holding identification of splits
       that were split off of this split.  Same style as the 
       /gemini/, look there for additional doco's.
+\endverbatim
 
-Name: /lot-split/*/peer_guid
+\verbatim
+Name: /lot-split/<type>/peer_guid
 Type: GUID
 Entities: Split
 Use:  The GUID of the peer split which was split from this split.
+\endverbatim
 
------------------------
+\subsection kvpM M
 
+\subsection kvpN N
+
+\verbatim
 Name: /notes
 Type: string
 Entities: Account, Lot, Transaction
@@ -282,26 +370,36 @@
      any value and change it at any time for any reason.
      Accessors: xaccAccountGetNotes(), xaccAccountSetNotes(),
      xaccTransGetNotes(), xaccTransSetNotes()
+\endverbatim
+
+\subsection kvpO O
 
+\verbatim
 Name: old-currency
 Type: string
 Entities: Account
 Use: This string holds the canonical name of the old Account
      currency. This may be deleted at some point in the future.
+\endverbatim
 
+\verbatim
 Name: old-currency-scu
 Type: gint64
 Entities: Account
 Use: This holds the old currency scu. This may be deleted at
      some point in the future.
+\endverbatim
 
+\verbatim
 Name: old-docref
 Type: string
 Entities: Transactions, Splits
 Use: This string holds the old Docref value which was supported in earlier
      versions of GnuCash but which was never used for any purpose. The
      value is retained in case any users were making use of it.
+\endverbatim
 
+\verbatim
 Name: old-price-source
 Type: string
 Entities: Account
@@ -310,47 +408,67 @@
      this value will be deprecated when the new version of Finance::Quote
      is fully supported. The new version of Finance::Quote uses a different
      scheme to identify sources for price quotes.
+\endverbatim
 
+\verbatim
 Name: old-security
 Type: string
 Entities: Account
 Use: This string holds the canonical name of the old Account
      security. This may be deleted at some point in the future.
+\endverbatim
 
+\verbatim
 Name: old-security-scu
 Type: gint64
 Entities: Account
 Use: This holds the old security scu. This may be deleted at
      some point in the future.
+\endverbatim
+
+\subsection kvpP P
 
------------------------
+\subsection kvpQ Q
 
+\subsection kvpR R
+
+\verbatim
 Name: /reconcile-info/
 Type: frame
 Entities: Account
 Use: store reconcile information about accounts
+\endverbatim
 
+\verbatim
 Name: /reconcile-info/include-children
 Type: gint64
 Entities: Account
 Use: A boolean flag indicating whether transactions in sub-accounts should be
      included during reconcilition.
+\endverbatim
 
+\verbatim
 Name: /reconcile-info/last-date
 Type: frame
 Entities: Account
 Use: store the statement date of the last reconciliation
+\endverbatim
 
+\verbatim
 Name: /reconcile-info/postpone/date
 Type: gint64
 Entities: Account
 Use: store the ending statement date of a postponed reconciliation
+\endverbatim
 
+\verbatim
 Name: /reconcile-info/postpone/balance
 Type: numeric
 Entities: Account
 Use: store the ending balance of a postponed reconciliation
+\endverbatim
 
+\verbatim
 Name: /reconcile-info/auto-interest-transfer
 Type: string
 Entities: Account
@@ -358,82 +476,114 @@
      "Automatic interest transfer" on a per-account basis.
      Acceptable values are "true" and "false".
      (This really could use a KVP_TYPE_BOOLEAN.)
+\endverbatim
 
------------------------
+\subsection kvpS S
 
+\verbatim
 Name: /sched-xaction/
 Type: frame
 Entities: Split in a SchedXaction
 Use: Storage for the various fields of a scheduled transaction's
      template Splits.
+\endverbatim
 
+\verbatim
 Name: /sched-xaction/account
 Type: GUID
 Entities: Split associated with a SchedXaction
 Use: The GUID of this Split's xfrm account.
+\endverbatim
 
+\verbatim
 Name: /sched-xaction/credit-formula
 Type: string
 Entities: Split associated with a SchedXaction
 Use: Store the formula for the credit side of the split
+\endverbatim
 
+\verbatim
 Name: /sched-xaction/debit-formula
 Type: string
 Entities: Split associated with a SchedXaction
 Use: Formula for the debit.  Either the credit or the 
      debit formula must be empty.
+\endverbatim
 
------------------------
-
+\verbatim
 Name: split-type
 Entities: Split
 Use: xaccSplitGetType, xaccSplitMakeStockSplit
      Store a string representing the type of split, if not normal.
+\endverbatim
+
+\subsection kvpT T
 
+\verbatim
 Name: /tax-US/code
 Type: string
 Entities: Account
 Use: see src/scm/report/[tax,txf]*.scm
+\endverbatim
 
+\verbatim
 Name: /tax-US/payer-name-source
 Type: string
 Entities: Account
 Use: see src/scm/report/[tax,txf]*.scm
+\endverbatim
 
+\verbatim
 Name: tax-related
 Type: gint64
 Entities: Account
 Use: A boolean flag indicated whether the Account is tax-related.
+\endverbatim
 
+\verbatim
 Name: /title
 Type: string
 Entities: Lot
-Use:  A user-suplied title for the lot.  The user can set this to 
+Use:  A user-supplied title for the lot.  The user can set this to 
       any value and change it at any time for any reason.
+\endverbatim
 
+\verbatim
 Name: trans-date-due
 Type: Timespec
 Entities: Transaction
 Use: Accounts/Receivable, Accounts/Payable Due Date.
+\endverbatim
 
+\verbatim
 Name: trans-txn-type
 Type: string
 Entities: Transaction
 Use: A/R, A/P Transaction Type (Invoice or Payment)
+\endverbatim
 
+\subsection kvpU U
+
+\verbatim
 Name: user-keys
 Type: frame
 Entities: All
 Use: This frame is used to store keys which are editable directly by
      the user. The program should not attach any semantics to keys
      under this frame.
+\endverbatim
+
+\subsection kvpV V
 
+\verbatim
 Name: void-reason
 Type: string
 Entities: Transaction
 Use: This string is used to store the reason why a transaction has been 
 voided.  Note that it should only exist if the transaction has been voided.
+\endverbatim
 
+\verbatim
 Name: void-former-amount
 Type: gnc_numeric
 Entities: Split
@@ -441,5 +591,9 @@
 that it should only exist if the parent transaction has been voided (but
 checking the reconcile status of the split is a more direct way of finding
 out a split has been voided).
+\endverbatim
+
+\subsection kvpW W
+*/
 
 --------------------------- end of document ------------------------
Index: iso-currencies-to-c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/iso-currencies-to-c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/engine/iso-currencies-to-c -Lsrc/engine/iso-currencies-to-c -u -r1.8 -r1.9
--- src/engine/iso-currencies-to-c
+++ src/engine/iso-currencies-to-c
@@ -38,7 +38,8 @@
          output-port "
   {
     const char *fullname = ~S;
-    gnc_commodity *c = gnc_commodity_new(_(fullname),
+    gnc_commodity *c = gnc_commodity_new(book,
+					 _(fullname),
                                          ~S,
                                          ~S,
                                          ~S,
Index: gnc-associate-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-associate-account.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/engine/gnc-associate-account.c -Lsrc/engine/gnc-associate-account.c -u -r1.16 -r1.17
--- src/engine/gnc-associate-account.c
+++ src/engine/gnc-associate-account.c
@@ -31,12 +31,9 @@
 #include "AccountP.h"
 #include "gnc-associate-account.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-trace.h"
-#include "qofbook.h"
-#include "qofid.h"
+#include "qof.h"
 
-static short module = MOD_ENGINE;
+static QofLogModule log_module = GNC_MOD_ENGINE;
 
 /* Maps GNCTrackingIncomeCategory to string keys.  If this enum
    changes, update */
@@ -90,8 +87,8 @@
   for(; accounts; accounts = g_list_next(accounts))
   {
     acc_frame = xaccAccountGetSlots(accounts->data);
-    g_return_if_fail(val = kvp_frame_get_slot(acc_frame, 
-					      "associated-stock-account"));
+    g_return_if_fail((val = kvp_frame_get_slot(acc_frame, 
+					      "associated-stock-account")));
     g_return_if_fail(kvp_value_get_type(val) == KVP_TYPE_GUID);
     existing_acc_guid = kvp_value_get_guid(val);
 
@@ -123,8 +120,8 @@
   for(; accounts; accounts = g_list_next(accounts))
   {
     acc_frame = xaccAccountGetSlots(accounts->data);
-    g_return_if_fail(val = kvp_frame_get_slot(acc_frame, 
-					      "associated-stock-account"));
+    g_return_if_fail((val = kvp_frame_get_slot(acc_frame, 
+					      "associated-stock-account")));
     g_return_if_fail(kvp_value_get_type(val) == KVP_TYPE_GUID);
     existing_acc_guid = kvp_value_get_guid(val);
 
@@ -455,22 +452,22 @@
 
   stock_account_kvpframe = xaccAccountGetSlots(stock_account);
 
-  g_return_if_fail(stock_account_kvpval =
+  g_return_if_fail((stock_account_kvpval =
                    kvp_frame_get_slot(stock_account_kvpframe,
-                                      "associated-accounts"));
+                                      "associated-accounts")));
 
   assoc_acc_kvpframe = kvp_value_get_frame(stock_account_kvpval);
 
-  g_return_if_fail(acc_list_kvpval = kvp_frame_get_slot(assoc_acc_kvpframe, 
-							category_name));
-  g_return_if_fail(assoc_acc_list_start =
-                   kvp_value_get_glist(acc_list_kvpval));
+  g_return_if_fail((acc_list_kvpval = kvp_frame_get_slot(assoc_acc_kvpframe, 
+							category_name)));
+  g_return_if_fail((assoc_acc_list_start =
+                   kvp_value_get_glist(acc_list_kvpval)));
   
   for(assoc_acc_list = assoc_acc_list_start;
       assoc_acc_list;
       assoc_acc_list = g_list_next(assoc_acc_list))
   {
-    g_return_if_fail(current_guid = kvp_value_get_guid(assoc_acc_list->data));
+    g_return_if_fail((current_guid = kvp_value_get_guid(assoc_acc_list->data)));
     if(guid_equal(current_guid, inc_or_expense_account_guid))
     {
       assoc_acc_list_start =
Index: kvp-util-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp-util-p.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/kvp-util-p.h -Lsrc/engine/kvp-util-p.h -u -r1.10 -r1.11
--- src/engine/kvp-util-p.h
+++ src/engine/kvp-util-p.h
@@ -29,19 +29,15 @@
 #include "kvp_frame.h"
 
 /** @addtogroup KVP
-    @{ */
-/** @addtogroup KVP_Private
-    Private interfaces, not meant to be used by applications.
-    @{ */
-/* @file kvp-util-p.h
+    @{ 
+*/
+/** @file kvp-util-p.h
  * @brief misc odd-job kvp utils engine-private routines
  * @author Copyright (C) 2001, 2003 Linas Vepstas <linas at linas.org>               *
- * @note PRIVATE FILE 
- * -- these routines are private to the engine. The should not be used 
- *    outside of the engine.
- */
-/** @name KvpBag Bags of GUID Pointers */
-/* @{ */
+*/
+/** @name KvpBag Bags of GUID Pointers 
+ @{ 
+*/
 
 /** The gnc_kvp_bag_add() routine is used to maintain a collection 
  *  of pointers in a kvp tree.
@@ -107,7 +103,6 @@
 void gnc_kvp_bag_remove_frame (KvpFrame *root, const char *path,
                                KvpFrame *fr);
 
-/* @} */
-/* @} */
-/* @} */
+/** @} */
+/** @} */
 #endif /* XACC_KVP_UTIL_P_H */
Index: gnc-lot.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-lot.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/engine/gnc-lot.h -Lsrc/engine/gnc-lot.h -u -r1.23 -r1.24
--- src/engine/gnc-lot.h
+++ src/engine/gnc-lot.h
@@ -59,11 +59,8 @@
 #ifndef GNC_LOT_H
 #define GNC_LOT_H
 
-#include "gnc-engine.h"
-#include "gnc-numeric.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofobject.h"
+#include "qof.h"
+#include "gnc-lot-p.h"
 
 GNCLot * gnc_lot_new (QofBook *);
 void gnc_lot_destroy (GNCLot *);
Index: qof-be-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof-be-utils.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qof-be-utils.h -Lsrc/engine/qof-be-utils.h -u -r1.3 -r1.4
--- src/engine/qof-be-utils.h
+++ src/engine/qof-be-utils.h
@@ -21,28 +21,34 @@
 /** @addtogroup Object
     @{ */
 /** @addtogroup Backend
- *  @{
- *  @file qof-be-utils.h 
- *  @brief QOF Backend Utilities
- *  @author Derek Atkins <derek at ihtfp.com>
- *    Common code used by objects to define begin_edit() and
- *    commit_edit() functions.
- *
- */
+   @{ */
+/**  @file qof-be-utils.h 
+   @brief QOF Backend Utilities
+   @author Derek Atkins <derek at ihtfp.com>
+   @author Neil Williams <linux at codehelp.co.uk>
+
+  Common code used by objects to define begin_edit() and
+  commit_edit() functions.
+
+*/
 
 #ifndef QOF_BE_UTILS_H
 #define QOF_BE_UTILS_H
 
+#include "gnc-trace.h"
 #include "gnc-engine-util.h"
 #include "qofbackend-p.h"
 #include "qofbook.h"
+#include "qofinstance.h"
 
 /** begin_edit helper
  *
- * @args:
- *        inst: an instance of QofInstance
+ * @param  inst: an instance of QofInstance
  *
  * The caller should use this macro first and then perform any other operations.
+
+ Uses newly created functions to allow the macro to be used
+ when QOF is linked as a library. qofbackend-p.h is a private header.
  */
 
 #define QOF_BEGIN_EDIT(inst)                                        \
@@ -61,13 +67,20 @@
                                                                     \
   /* See if there's a backend.  If there is, invoke it. */          \
   be = qof_book_get_backend ((inst)->book);                         \
-  if (be && be->begin) {                                            \
-     (be->begin) (be, (inst));                                      \
+    if (be && qof_backend_begin_exists((be))) {                     \
+     qof_backend_run_begin((be), (inst));                           \
   } else {                                                          \
      /* We tried and failed to start transaction! */                \
      (inst)->dirty = TRUE;                                          \
-  }
+  }                                                                 \
+  LEAVE (" ");
+
+/** \brief function version of QOF_BEGIN_EDIT
 
+The macro cannot be used in a function that returns a value,
+this function can be used instead.
+*/
+gboolean qof_begin_edit(QofInstance *inst);
 
 /**
  * commit_edit helpers
@@ -80,8 +93,7 @@
 /**
  * part1 -- deal with the editlevel
  * 
- * @args:
- *        inst: an instance of QofInstance
+ * @param inst: an instance of QofInstance
  */
 
 #define QOF_COMMIT_EDIT_PART1(inst) {                            \
@@ -97,8 +109,8 @@
   {                                                              \
     QofBackend * be;                                             \
     be = qof_book_get_backend ((inst)->book);                    \
-    if (be && be->begin) {                                       \
-     (be->begin) (be, (inst));                                   \
+    if (be && qof_backend_begin_exists((be))) {                  \
+     qof_backend_run_begin((be), (inst));                        \
     }                                                            \
     (inst)->editlevel = 0;                                       \
   }                                                              \
@@ -111,18 +123,24 @@
             (inst), (inst)->dirty, (inst)->do_free);             \
 }
 
+/** \brief function version of QOF_COMMIT_EDIT_PART1
+
+The macro cannot be used in a function that returns a value,
+this function can be used instead. Only Part1 is implemented.
+*/
+gboolean qof_commit_edit(QofInstance *inst);
+
 /**
  * part2 -- deal with the backend
  * 
- * @args:
- *        inst: an instance of QofInstance
- *        on_error: a function called if there is a backend error.
+ * @param inst: an instance of QofInstance
+ * @param on_error: a function called if there is a backend error.
  *                void (*on_error)(inst, QofBackendError)
- *        on_done: a function called after the commit is complete 
+ * @param on_done: a function called after the commit is complete 
  *                but before the instect is freed. Perform any other 
  *                operations after the commit.
  *                void (*on_done)(inst)
- *        on_free: a function called if inst->do_free is TRUE. 
+ * @param on_free: a function called if inst->do_free is TRUE. 
  *                void (*on_free)(inst)
  */
 #define QOF_COMMIT_EDIT_PART2(inst,on_error,on_done,on_free) {   \
@@ -130,7 +148,7 @@
                                                                  \
   /* See if there's a backend.  If there is, invoke it. */       \
   be = qof_book_get_backend ((inst)->book);                      \
-  if (be && be->commit)                                          \
+  if (be && qof_backend_commit_exists((be)))                     \
   {                                                              \
     QofBackendError errcode;                                     \
                                                                  \
@@ -139,7 +157,7 @@
       errcode = qof_backend_get_error (be);                      \
     } while (ERR_BACKEND_NO_ERR != errcode);                     \
                                                                  \
-    (be->commit) (be, (inst));                                   \
+    qof_backend_run_commit((be), (inst));                        \
     errcode = qof_backend_get_error (be);                        \
     if (ERR_BACKEND_NO_ERR != errcode)                           \
     {                                                            \
Index: qofobject.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofobject.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/engine/qofobject.h -Lsrc/engine/qofobject.h -u -r1.19 -r1.20
--- src/engine/qofobject.h
+++ src/engine/qofobject.h
@@ -30,6 +30,11 @@
 
     QOF Objects are also used by the query system .... 
     
+    To work with your own QOF Objects, you can use the QOF
+    Generator to create sample objects and a mini-application
+    with the SQL-type query interface.
+    http://qof-gen.sourceforge.net/
+
     XXX todo, we should split out the storage aspects of this 
     thing from the 'foreach' that query depends on.  These are
     kinda unrelated concepts.
@@ -45,6 +50,7 @@
 
 #include "qofbook.h"
 #include "qofid.h"
+#include "qofchoice.h"
 
 /** Defines the version of the core object object registration
  * interface.  Only object modules compiled against this version
@@ -52,6 +58,7 @@
  */
 #define QOF_OBJECT_VERSION 3
 
+#define QOF_MOD_OBJECT "qof-object"
 
 typedef struct _QofObject QofObject;
 typedef void (*QofForeachCB) (gpointer obj, gpointer user_data);
Index: qofbook-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook-p.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/engine/qofbook-p.h -Lsrc/engine/qofbook-p.h -u -r1.9 -r1.10
--- src/engine/qofbook-p.h
+++ src/engine/qofbook-p.h
@@ -101,12 +101,6 @@
 
 void qof_book_set_backend (QofBook *book, QofBackend *be);
 
-/** The qof_book_mark_saved() routine marks the book as having been
- *    saved (to a file, to a database). Used by backends to mark the 
- *    notsaved flag as FALSE just after loading.  Do not use otherwise!
- */
-void qof_book_mark_saved(QofBook *book);
-
 /** Register books with the engine */
 gboolean qof_book_register (void);
 
Index: Period.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Period.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -Lsrc/engine/Period.c -Lsrc/engine/Period.c -u -r1.60 -r1.61
--- src/engine/Period.c
+++ src/engine/Period.c
@@ -34,25 +34,18 @@
  */
 
 #include "AccountP.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
+#include "qof.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
 #include "gnc-pricedb.h"
 #include "gnc-pricedb-p.h"
-#include "gnc-trace.h"
 #include "Group.h"
 #include "GroupP.h"
-#include "kvp-util-p.h"
 #include "Period.h"
 #include "TransactionP.h"
-#include "qofbackend-p.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofid-p.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_BOOK;
+static QofLogModule log_module = GNC_MOD_BOOK;
 
 /* ================================================================ */
 
@@ -147,7 +140,7 @@
 
    /* If the old and new book don't share backends, then clobber-copy;
     * i.e. destroy it in one backend, create it in another.  */
-   if (book->backend != trans->inst.book->backend)
+   if (qof_book_get_backend(book) != qof_book_get_backend(trans->inst.book))
    {
       gnc_book_insert_trans_clobber (book, trans);
       return;
@@ -219,12 +212,13 @@
    QofCollection *col;
    SplitList *snode;
    Account *twin;
+
    if (!lot || !book) return;
    
    /* If this is the same book, its a no-op. */
    if (lot->book == book) return;
 
-   if (book->backend != lot->book->backend)
+   if (qof_book_get_backend(book) != qof_book_get_backend(lot->book))
    {
       gnc_book_insert_lot_clobber (book, lot);
       return;
@@ -272,7 +266,7 @@
 
    /* If the old and new book don't share backends, then clobber-copy;
     * i.e. destroy it in one backend, create it in another.  */
-   if (book->backend != pr->inst.book->backend)
+   if (qof_book_get_backend(book) != qof_book_get_backend(pr->inst.book))
    {
       gnc_book_insert_price_clobber (book, pr);
       return;
@@ -511,6 +505,7 @@
 
    gnc_pricedb_begin_edit (src_pdb);
    gnc_pricedb_begin_edit (dest_pdb);
+   gnc_pricedb_set_bulk_update (dest_pdb, TRUE);
 
    qof_query_set_book (query, src_book);
    price_list = qof_query_run (query);
@@ -522,6 +517,7 @@
       gnc_book_insert_price (dest_book, pr);
    }
 
+   gnc_pricedb_set_bulk_update (dest_pdb, FALSE);
    gnc_pricedb_commit_edit (dest_pdb);
    gnc_pricedb_commit_edit (src_pdb);
 
@@ -538,6 +534,7 @@
    time_t now;
    TransList *trans_list, *tnode;
    LotList *lot_list, *lnode;
+   QofInstance *book_inst;
 
    if (!src_book || !dest_book || !query) return;
    ENTER (" src_book=%p dest_book=%p", src_book, dest_book);
@@ -546,8 +543,9 @@
    /* hack alert -- FIXME -- this should really be a merge, not a
     * clobber copy, but I am too lazy to write a kvp merge routine,
     * and it is not needed for the current usage. */
-   kvp_frame_delete (dest_book->inst.kvp_data);
-   dest_book->inst.kvp_data = kvp_frame_copy (src_book->inst.kvp_data);
+   kvp_frame_delete (qof_book_get_slots(dest_book));
+   book_inst = (QofInstance*)dest_book;
+   book_inst->kvp_data = kvp_frame_copy (qof_book_get_slots(src_book));
 
    /* Next, copy the commodity tables */
    src_tbl = gnc_commodity_table_get_table (src_book);
@@ -598,11 +596,11 @@
 
    /* Make note of the sibling books */
    now = time(0);
-   gnc_kvp_bag_add (src_book->inst.kvp_data, "gemini", now, 
-                          "book_guid", &dest_book->inst.entity.guid, 
+   gnc_kvp_bag_add (qof_book_get_slots(src_book), "gemini", now, 
+                          "book_guid", qof_book_get_guid(dest_book),
                            NULL);
-   gnc_kvp_bag_add (dest_book->inst.kvp_data, "gemini", now, 
-                          "book_guid", &src_book->inst.entity.guid, 
+   gnc_kvp_bag_add (qof_book_get_slots(dest_book), "gemini", now, 
+                          "book_guid", qof_book_get_guid(src_book),
                            NULL);
    LEAVE (" ");
 }
@@ -670,6 +668,7 @@
    AccountList *acc_list, *node;
 
    if (!closed_grp) return;
+
    ENTER (" enter=%s post=%s desc=%s", gnc_print_date(*date_entered),
        gnc_print_date (*post_date), desc);
    xaccAccountBeginEdit (equity_account);
@@ -693,7 +692,7 @@
       xaccAccountBeginEdit (twin);
       cwd = xaccAccountGetSlots (twin);
       kvp_frame_set_guid (cwd, "/book/prev-acct", xaccAccountGetGUID (candidate));
-      kvp_frame_set_guid (cwd, "/book/prev-book", &closed_book->inst.entity.guid);
+      kvp_frame_set_guid (cwd, "/book/prev-book", qof_book_get_guid(closed_book));
 
       xaccAccountSetSlots_nc (twin, twin->inst.kvp_data);
       
@@ -702,7 +701,7 @@
        * the next book is. */
       xaccAccountBeginEdit (candidate);
       cwd = xaccAccountGetSlots (candidate);
-      kvp_frame_set_guid (cwd, "/book/next-book", &open_book->inst.entity.guid);
+      kvp_frame_set_guid (cwd, "/book/next-book", qof_book_get_guid(open_book));
       kvp_frame_set_guid (cwd, "/book/next-acct", xaccAccountGetGUID (twin));
 
       xaccAccountSetSlots_nc (candidate, candidate->inst.kvp_data);
@@ -760,7 +759,7 @@
             /* Add KVP data showing where the balancing 
              * transaction came from */
             cwd = xaccTransGetSlots (trans);
-            kvp_frame_set_guid (cwd, "/book/closed-book", &closed_book->inst.entity.guid);
+            kvp_frame_set_guid (cwd, "/book/closed-book", qof_book_get_guid(closed_book));
             kvp_frame_set_guid (cwd, "/book/closed-acct", xaccAccountGetGUID(candidate));
             
             xaccTransCommitEdit (trans);
@@ -802,7 +801,7 @@
 period_begin_edit (QofBook *src_book, QofBook *dest_book)
 {
    QofBackend *be;
-   be = src_book->backend;
+   be = qof_book_get_backend(src_book);
    if (be && be->begin)
    {
       // (*be->begin)(be, GNC_ID_PERIOD, dest_book);
@@ -813,7 +812,7 @@
 period_commit_edit (QofBook *src_book, QofBook *dest_book)
 {
    QofBackend *be;
-   be = src_book->backend;
+   be = qof_book_get_backend(src_book);
    if (be && be->commit)
    {
       // (*be->commit)(be, GNC_ID_PERIOD, dest_book);
@@ -840,8 +839,8 @@
 
    /* Setup closing book */
    closing_book = qof_book_new();
-   qof_book_set_backend (closing_book, existing_book->backend);
-   closing_book->book_open = 'n';
+   qof_book_set_backend (closing_book, qof_book_get_backend(existing_book));
+   qof_book_mark_closed(closing_book);
 
    period_begin_edit (existing_book, closing_book);
 
@@ -870,8 +869,8 @@
 
    /* Now add the various identifying kvp's */
    /* cwd == 'current working directory' */
-   exist_cwd = existing_book->inst.kvp_data;
-   partn_cwd = closing_book->inst.kvp_data;
+   exist_cwd = qof_book_get_slots(existing_book);
+   partn_cwd = qof_book_get_slots(closing_book);
    
    /* Mark the boundary date between the books */
    kvp_frame_set_timespec (exist_cwd, "/book/open-date", calve_date);
@@ -883,8 +882,8 @@
    kvp_frame_set_timespec (partn_cwd, "/book/log-date", ts);
 
    /* Set up pointers to each book from the other. */
-   kvp_frame_set_guid (partn_cwd, "/book/next-book", &existing_book->inst.entity.guid);
-   kvp_frame_set_guid (exist_cwd, "/book/prev-book", &closing_book->inst.entity.guid);
+   kvp_frame_set_guid (partn_cwd, "/book/next-book", qof_book_get_guid(existing_book));
+   kvp_frame_set_guid (exist_cwd, "/book/prev-book", qof_book_get_guid(closing_book));
 
    /* add in transactions to equity accounts that will
     * hold the colsing balances */
Index: SchedXaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SchedXaction.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/engine/SchedXaction.h -Lsrc/engine/SchedXaction.h -u -r1.34 -r1.35
--- src/engine/SchedXaction.h
+++ src/engine/SchedXaction.h
@@ -21,71 +21,53 @@
  * @addtogroup Engine
  * @{ */
 /**
- * @addtogroup SchedXaction Scheduled/Periodic/Recurring Transactions
-   Scheduled Transactions provides a framework for remembering
+   @addtogroup SchedXaction Scheduled/Periodic/Recurring Transactions
+
+   Scheduled Transactions provide a framework for remembering
    information about a transactions that are set to occur in the 
    future, either once or periodically.
- * @{ */
+ @{ */
 /**
  * @file SchedXaction.h
  * @brief Scheduled Transactions public handling routines.
  * @author Copyright (C) 2001 Joshua Sled <jsled at asynchronous.org>
- **/
+*/
 
 #ifndef XACC_SCHEDXACTION_H
 #define XACC_SCHEDXACTION_H
 
 #include <time.h>
 #include <glib.h>
-
+#include "qof.h"
 #include "FreqSpec.h"
-#include "gnc-date.h"
 #include "gnc-engine.h"
-#include "guid.h"
-#include "kvp_frame.h"
-#include "qofbook.h"
-
-/* 
- * #defines for KvpFrame strings
- * FIXME: Is this the right spot for them <rgmerk>?
- * FIXME: No, they should be private data and there should
- *        be an api for getting/setting the values <dave_p>
- */
-
-#define GNC_SX_ID                    "sched-xaction"
-#define GNC_SX_ACCOUNT               "account"
-#define GNC_SX_CREDIT_FORMULA        "credit-formula"
-#define GNC_SX_DEBIT_FORMULA         "debit-formula"
-#define GNC_SX_SHARES                "shares"
-#define GNC_SX_AMOUNT                "amnt"
-#define GNC_SX_FROM_SCHED_XACTION    "from-sched-xaction"
 
 /**
  * The SchedXaction data.
- **/
+*/
 typedef struct gncp_SchedXaction SchedXaction;
 
 /**
  * Creates and initializes a scheduled transaction.
- **/
+*/
 SchedXaction *xaccSchedXactionMalloc(QofBook *book);
 
 /**
  * Cleans up and frees a SchedXaction and it's associated data.
- **/
+*/
 void xaccSchedXactionFree( SchedXaction *sx );
 
 FreqSpec *xaccSchedXactionGetFreqSpec( SchedXaction *sx );
 /**
  * The FreqSpec is given to the SchedXaction for mem mgmt; it should
  * not be freed by the external code.
- **/
+*/
 void xaccSchedXactionSetFreqSpec( SchedXaction *sx, FreqSpec *fs );
 
 gchar *xaccSchedXactionGetName( SchedXaction *sx );
 /**
  * A copy of the name is made.
- **/
+*/
 void xaccSchedXactionSetName( SchedXaction *sx, const gchar *newName );
 
 GDate* xaccSchedXactionGetStartDate( SchedXaction *sx );
@@ -94,11 +76,11 @@
 int xaccSchedXactionHasEndDate( SchedXaction *sx );
 /**
  * Returns invalid date when there is no end-date specified.
- **/
+*/
 GDate* xaccSchedXactionGetEndDate( SchedXaction *sx );
 /**
  * Set to an invalid GDate to turn off 'end-date' definition.
- **/
+*/
 void xaccSchedXactionSetEndDate( SchedXaction *sx, GDate* newEnd );
 
 GDate* xaccSchedXactionGetLastOccurDate( SchedXaction *sx );
@@ -107,28 +89,30 @@
 /**
  * Returns true if the scheduled transaction has a defined number of
  * occurances, false if not.
- **/
+*/
 gboolean xaccSchedXactionHasOccurDef( SchedXaction *sx );
 gint xaccSchedXactionGetNumOccur( SchedXaction *sx );
 /**
  * Set to '0' to turn off number-of-occurances definition.
- **/
+*/
 void xaccSchedXactionSetNumOccur( SchedXaction *sx, gint numNum );
 gint xaccSchedXactionGetRemOccur( SchedXaction *sx );
 void xaccSchedXactionSetRemOccur( SchedXaction *sx, gint numRemain );
 
-/**
- * Set the instance count.  This is incremented by one for every created
+/** \brief Set the instance count.
+ *
+ *   This is incremented by one for every created
  * instance of the SX.  Returns the instance num of the SX unless stateData
  * is non-null, in which case it returns the instance num from the state
  * data.
+ * @param sx The instance whose state should be retrieved.
  * @param stateData may be NULL.
- **/
+*/
 gint gnc_sx_get_instance_count( SchedXaction *sx, void *stateData );
 /**
  * Sets the instance count to something other than the default.  As the
  * default is the incorrect value '0', callers should DTRT here.
- **/
+*/
 void gnc_sx_set_instance_count( SchedXaction *sx, gint instanceNum );
 
 GList *xaccSchedXactionGetSplits( SchedXaction *sx );
@@ -147,31 +131,30 @@
 gint xaccSchedXactionGetAdvanceReminder( SchedXaction *sx );
 void xaccSchedXactionSetAdvanceReminder( SchedXaction *sx, gint reminderDays );
 
-///@{
-/**
- * Temporal state data.
+/** \name Temporal state data.
  *
  * These functions allow us to opaquely save the entire temporal state of
  * ScheduledTransactions.  This is used by the "since-last-run" dialog to
  * store the initial state of SXes before modification ... if it later
  * becomes necessary to revert an entire set of changes, we can 'revert' the
  * SX without having to rollback all the individual state changes.
- **/
+@{
+*/
 void *gnc_sx_create_temporal_state( SchedXaction *sx );
 void gnc_sx_incr_temporal_state( SchedXaction *sx, void *stateData );
 void gnc_sx_revert_to_temporal_state( SchedXaction *sx,
                                       void *stateData );
 void gnc_sx_destroy_temporal_state( void *stateData );
-/**
- * Allocates and returns a copy of the given temporal state.  Destroy with
- * gnc_sx_destroy_temporal_state(), as you'd expect.
- **/
+/** \brief Allocates and returns a copy of the given temporal state.
+
+ *   Destroy with gnc_sx_destroy_temporal_state(), as you'd expect.
+*/
 void *gnc_sx_clone_temporal_state( void *stateData );
-///@}
+/** @} */
 
-/**
- * Returns the next occurance of a scheduled transaction.  If the
- * transaction hasn't occured, then it's based off the start date.
+/** \brief Returns the next occurance of a scheduled transaction.
+
+ *   If the transaction hasn't occured, then it's based off the start date.
  * Otherwise, it's based off the last-occurance date.
  *
  * If state data is NULL, the current value of the SX is used for
@@ -179,49 +162,70 @@
  * allows the caller to correctly create a set of instances into the future
  * for possible action without modifying the SX state until action is
  * actually taken.
- **/
+*/
 GDate xaccSchedXactionGetNextInstance( SchedXaction *sx, void *stateData );
 GDate xaccSchedXactionGetInstanceAfter( SchedXaction *sx,
                                         GDate *date,
                                         void *stateData );
 
-/*
- * Set the schedxaction's template transaction.  t_t_list is a glist of
- * TTInfo's as defined in SX-ttinfo.h.  The edit dialog doesn't use this
- * mechanism; maybe it should.
- */
+/** \brief Set the schedxaction's template transaction.
+
+t_t_list is a glist of TTInfo's as defined in SX-ttinfo.h.
+The edit dialog doesn't use this mechanism; maybe it should.
+*/
 void xaccSchedXactionSetTemplateTrans( SchedXaction *sx,
                                        GList *t_t_list,
                                        QofBook *book );
 
-/**
- * Adds an instance to the deferred list of the SX.  Added instances are
- * added in date-sorted order.
- **/
+/** \brief Adds an instance to the deferred list of the SX.
+
+Added instances are added in date-sorted order.
+*/
 void gnc_sx_add_defer_instance( SchedXaction *sx, void *deferStateData );
 
-/**
- * Removes an instance from the deferred list.  If the instance is no longer
- * useful; gnc_sx_destroy_temporal_state() it.
- **/
+/** \brief Removes an instance from the deferred list.
+
+If the instance is no longer useful; gnc_sx_destroy_temporal_state() it.
+*/
 void gnc_sx_remove_defer_instance( SchedXaction *sx, void *deferStateData );
 
-/**
- * Returns the defer list from the SX; this is a date-sorted state-data
- * instance list.  The list should not be modified by the caller; use the
- * gnc_sx_{add,remove}_defer_instance() functions to modifiy the list.
- **/
+/** \brief Returns the defer list from the SX.
+
+ This is a date-sorted state-data instance list.
+ The list should not be modified by the caller; use the
+ gnc_sx_{add,remove}_defer_instance() functions to modifiy the list.
+*/
 GList *gnc_sx_get_defer_instances( SchedXaction *sx );
 
+/* #defines for KvpFrame strings and QOF */
+#define GNC_SX_ID                    "sched-xaction"
+#define GNC_SX_ACCOUNT               "account"
+#define GNC_SX_CREDIT_FORMULA        "credit-formula"
+#define GNC_SX_DEBIT_FORMULA         "debit-formula"
+#define GNC_SX_SHARES                "shares"
+#define GNC_SX_AMOUNT                "amnt"
+#define GNC_SX_FROM_SCHED_XACTION    "from-sched-xaction"
+#define GNC_SX_FREQ_SPEC             "scheduled-frequency"
+#define GNC_SX_NAME                  "sched-xname"
+#define GNC_SX_START_DATE            "sched-start-date"
+#define GNC_SX_LAST_DATE             "sched-last-date"
+#define GNC_SX_NUM_OCCUR             "sx-total-number"
+#define GNC_SX_REM_OCCUR             "sx-remaining-num"
+
+/** \brief QOF registration. */
+gboolean SXRegister (void);
 
-/** deprecated routines */
+/** \deprecated */
 #define xaccSchedXactionIsDirty(X) qof_instance_is_dirty (QOF_INSTANCE(X))
+/** \deprecated */
 #define xaccSchedXactionGetGUID(X) qof_entity_get_guid(QOF_ENTITY(X))
+/** \deprecated */
 #define xaccSchedXactionGetSlots(X) qof_instance_get_slots(QOF_INSTANCE(X))
 
-/** Deprecated, to be replaced with 'dirty' kvp's */
+/** \deprecated to be replaced with 'dirty' kvp's */
 KvpValue *xaccSchedXactionGetSlot( SchedXaction *sx, 
 				    const char *slot );
+/** \deprecated to be replaced with 'dirty' kvp's */
 void xaccSchedXactionSetSlot( SchedXaction *sx, 
 			      const char *slot,
 			      const KvpValue *value );
Index: gnc-trace.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-trace.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/gnc-trace.c -Lsrc/engine/gnc-trace.c -u -r1.13 -r1.14
--- src/engine/gnc-trace.c
+++ src/engine/gnc-trace.c
@@ -1,6 +1,7 @@
-/********************************************************************\
- * gnc-trace.c -- GnuCash error loging and tracing facility         *
+/* *****************************************************************\
+ * gnc-trace.c -- QOF error logging and tracing facility            *
  * Copyright (C) 1997-2003 Linas Vepstas <linas at linas.org>          *
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>          *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -23,6 +24,14 @@
  *   Author: Linas Vepstas (linas at linas.org)                        *
 \********************************************************************/
 
+/** @addtogroup Trace
+@{ */
+
+/** @file gnc-trace.c
+    @brief QOF error logging facility 
+		@author Neil Williams <linux at codehelp.co.uk>
+*/
+
 #include "config.h"
 
 #include <glib.h>
@@ -34,43 +43,22 @@
 #include <stdarg.h>
 #include <string.h>
 #include <sys/time.h>
-
+#include "qof.h"
 #include "gnc-trace.h"
 
-/* This static indicates the debugging module that this .o belongs to.  */
-/* static short module = MOD_ENGINE; */
-
-gncLogLevel gnc_log_modules[MOD_LAST + 1] =
-{
-  GNC_LOG_FATAL,        /* DUMMY */
-  GNC_LOG_WARNING,      /* ENGINE */
-  GNC_LOG_WARNING,      /* IO */
-  GNC_LOG_WARNING,      /* REGISTER */
-  GNC_LOG_WARNING,      /* LEDGER */
-  GNC_LOG_WARNING,      /* HTML */
-  GNC_LOG_WARNING,      /* GUI */
-  GNC_LOG_WARNING,      /* SCRUB */
-  GNC_LOG_WARNING,      /* GTK_REG */
-  GNC_LOG_WARNING,      /* GUILE */
-  GNC_LOG_WARNING,      /* BACKEND */
-  GNC_LOG_WARNING,      /* QUERY */
-  GNC_LOG_WARNING,      /* PRICE */
-  GNC_LOG_WARNING,      /* SQL EVENT */
-  GNC_LOG_WARNING,      /* SQL TXN */
-  GNC_LOG_WARNING,      /* KVP */
-  GNC_LOG_WARNING,      /* SX */
-  GNC_LOG_WARNING,      /* BOOK */
-  GNC_LOG_TRACE,        /* TEST */
-  GNC_LOG_WARNING,      /* LOT */
-  GNC_LOG_WARNING,      /* ACCOUNT */
-  GNC_LOG_WARNING,      /* IMPORT */
-  GNC_LOG_WARNING,      /* BUSINESS */
-  GNC_LOG_WARNING,      /* DRUID */
-  GNC_LOG_WARNING,      /* COMMODITY */
-};
-
 static FILE *fout = NULL;
+static gchar* filename = NULL;
+
 static const int MAX_TRACE_FILENAME = 100;
+static GHashTable *log_table = NULL;
+
+AS_STRING_FUNC(gncLogLevel, LOG_LEVEL_LIST)  /**< enum_as_string function
+
+uses the enum_as_string macro from QOF
+but the From macro is not required. Lookups
+are done on the string. */
+
+FROM_STRING_FUNC(gncLogLevel, LOG_LEVEL_LIST)
 
 /* Don't be fooled: gnc_trace_num_spaces has external linkage and
    static storage, but can't be defined with 'extern' because it has
@@ -93,12 +81,13 @@
 void 
 gnc_log_init (void)
 {
-   char *filename;
-
-   fout = fopen ("/tmp/gnucash.trace", "w");
+   if(!fout) //allow gnc_set_logfile
+   {
+	   fout = fopen ("/tmp/qof.trace", "w");
+   }
 
    if(!fout && (filename = (char *)g_malloc(MAX_TRACE_FILENAME))) {
-      snprintf(filename, MAX_TRACE_FILENAME-1, "/tmp/gnucash.trace.%d", 
+      snprintf(filename, MAX_TRACE_FILENAME-1, "/tmp/qof.trace.%d", 
 	       getpid());
       fout = fopen (filename, "w");
       g_free(filename);
@@ -112,30 +101,67 @@
 
 /* Set the logging level of the given module. */
 void
-gnc_set_log_level(gncModuleType module, gncLogLevel level)
+gnc_set_log_level(QofLogModule log_module, gncLogLevel level)
 {
-  if ((module < 0) || (module > MOD_LAST))
-    return;
+	gchar* level_string;
+
+	if(!log_module || level == 0) { return; }
+	level_string = g_strdup(gncLogLevelasString(level));
+	if(!log_table)
+	{
+		log_table = g_hash_table_new(g_str_hash, g_str_equal);
+	}
+	g_hash_table_insert(log_table, (gpointer)log_module, level_string);
+}
 
-  gnc_log_modules[module] = level;
+static void
+log_module_foreach(gpointer key, gpointer value, gpointer data)
+{
+	g_hash_table_insert(log_table, key, data);
 }
 
-/* Set the logging level for all modules. */
+/* Set the logging level for all known modules. */
 void
 gnc_set_log_level_global(gncLogLevel level)
 {
-  gncModuleType module;
+	gchar* level_string;
 
-  for (module = 0; module <= MOD_LAST; module++)
-    gnc_log_modules[module] = level;
+	if(!log_table || level == 0) { return; }
+	level_string = g_strdup(gncLogLevelasString(level));
+	g_hash_table_foreach(log_table, log_module_foreach, level_string);
 }
 
 void
 gnc_set_logfile (FILE *outfile)
 {
+   if(!outfile) { fout = stderr; return; }
    fout = outfile;
 }
 
+void
+qof_log_init_filename (const gchar* logfilename)
+{
+	if(!logfilename)
+	{
+		fout = stderr;
+	}
+	else
+	{
+		filename = g_strdup(logfilename);
+		fout = fopen(filename, "w");
+	}
+	gnc_log_init();
+}
+
+void
+qof_log_shutdown (void)
+{
+	if(fout && fout != stderr) { fclose(fout); }
+	if(filename) { g_free(filename); }
+	g_hash_table_destroy(log_table);
+}
+
+#define MAX_CHARS 50
 /* gnc_log_prettify() cleans up subroutine names. AIX/xlC has the habit
  * of printing signatures not names; clean this up. On other operating
  * systems, truncate name to 30 chars. Note this routine is not thread
@@ -150,7 +176,7 @@
   if (!name)
     return "";
 
-  strncpy (bf, name, 29); bf[28] = 0;
+  strncpy (bf, name, MAX_CHARS-1); bf[MAX_CHARS-2] = 0;
   p = strchr (bf, '(');
 
   if (p)
@@ -159,7 +185,7 @@
     *(p+2) = 0x0;
   }
   else
-    strcpy (&bf[26], "...()");
+    strcpy (&bf[MAX_CHARS-4], "...()");
 
   return bf;
 }
@@ -182,7 +208,7 @@
 };
 
 void
-gnc_start_clock (int clockno, gncModuleType module, gncLogLevel log_level,
+gnc_start_clock (int clockno, QofLogModule log_module, gncLogLevel log_level,
                  const char *function_name, const char *format, ...)
 {
   struct timezone tz;
@@ -207,7 +233,7 @@
 }
 
 void
-gnc_report_clock (int clockno, gncModuleType module, gncLogLevel log_level,
+gnc_report_clock (int clockno, QofLogModule log_module, gncLogLevel log_level,
                   const char *function_name, const char *format, ...)
 {
   struct timezone tz;
@@ -247,7 +273,7 @@
 
 void
 gnc_report_clock_total (int clockno,
-                        gncModuleType module, gncLogLevel log_level,
+                        QofLogModule log_module, gncLogLevel log_level,
                         const char *function_name, const char *format, ...)
 {
   va_list ap;
@@ -280,10 +306,65 @@
 }
 
 gboolean
-gnc_should_log(gncModuleType module, gncLogLevel log_level)
+gnc_should_log(QofLogModule log_module, gncLogLevel log_level)
+{
+	gchar* log_string;
+	gncLogLevel maximum; /* Any log_level less than this will be logged. */
+
+	log_string = NULL;
+	if(!log_table || log_module == NULL || log_level == 0) { return FALSE; }
+	log_string = (gchar*)g_hash_table_lookup(log_table, log_module);
+	/* if log_module not found, do not log. */
+	if(!log_string) { return FALSE; }
+	maximum = gncLogLevelfromString(log_string);
+	if(log_level <= maximum) { return TRUE; }
+	return FALSE;
+}
+
+void qof_log_set_default(gncLogLevel log_level)
+{
+	gnc_set_log_level(QOF_MOD_BACKEND, log_level);
+	gnc_set_log_level(QOF_MOD_CLASS,   log_level);
+	gnc_set_log_level(QOF_MOD_ENGINE,  log_level);
+	gnc_set_log_level(QOF_MOD_OBJECT,  log_level);
+	gnc_set_log_level(QOF_MOD_KVP,     log_level);
+	gnc_set_log_level(QOF_MOD_MERGE,   log_level);
+	gnc_set_log_level(QOF_MOD_QUERY,   log_level);
+	gnc_set_log_level(QOF_MOD_SESSION, log_level);
+}
+
+struct hash_s
+{
+	QofLogCB cb;
+	gpointer data;
+};
+
+static void hash_cb (gpointer key, gpointer value, gpointer data)
 {
-  return (log_level <= gnc_log_modules[module]);
+	struct hash_s *iter;
+
+	iter = (struct hash_s*)data;
+	if(!iter) { return; }
+	(iter->cb)(key, value, iter->data);
 }
 
+void qof_log_module_foreach(QofLogCB cb, gpointer data)
+{
+	struct hash_s iter;
+
+	if(!cb) { return; }
+	iter.cb = cb;
+	iter.data = data;
+	g_hash_table_foreach(log_table, hash_cb, (gpointer)&iter);
+}
+
+gint qof_log_module_count(void)
+{
+	if(!log_table) { return 0; }
+	return g_hash_table_size(log_table);
+}
+
+/** @} */
+
 /************************* END OF FILE ******************************\
 \********************************************************************/
Index: gnc-pricedb-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb-p.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/engine/gnc-pricedb-p.h -Lsrc/engine/gnc-pricedb-p.h -u -r1.30 -r1.31
--- src/engine/gnc-pricedb-p.h
+++ src/engine/gnc-pricedb-p.h
@@ -26,15 +26,9 @@
 #define GNC_PRICEDB_P_H
 
 #include <glib.h>
-
+#include "qof.h"
 #include "gnc-engine.h"
 #include "gnc-pricedb.h"
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
 
 struct gnc_price_s
 {
@@ -61,6 +55,7 @@
 {
   QofInstance inst;              /* globally unique object identifier */
   GHashTable *commodity_hash;
+  gboolean bulk_update;		 /* TRUE while reading XML file, etc. */
 };
 
 /* These structs define the kind of price lookup being done
Index: Group.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Group.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -Lsrc/engine/Group.c -Lsrc/engine/Group.c -u -r1.135 -r1.136
--- src/engine/Group.c
+++ src/engine/Group.c
@@ -32,17 +32,8 @@
 #include "Group.h"
 #include "GroupP.h"
 #include "TransactionP.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-#include "gnc-numeric.h"
-#include "gnc-trace.h"
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofid-p.h"
-#include "qofobject.h"
 
-static short module = MOD_ENGINE;
+static QofLogModule log_module = GNC_MOD_ENGINE;
 
 /********************************************************************\
  * Because I can't use C++ for this project, doesn't mean that I    *
@@ -394,7 +385,7 @@
 }
 
 /********************************************************************\
- * Get all of the accounts, including subaccounts                   *
+ * Recursively get all of the accounts, including subaccounts       *
 \********************************************************************/
 
 static void
@@ -671,6 +662,8 @@
     return;
   }
 
+  gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_REMOVE);
+
   acc->parent = NULL;
 
   grp->accounts = g_list_remove (grp->accounts, acc);
@@ -730,6 +723,7 @@
   if (!grp || !grp->book) return;
   if (!acc) return;
 
+  ENTER("group %p, account %p named %s", grp, acc, xaccAccountGetName(acc));
   /* If the account is currently in another group, remove it there
    * first. Basically, we can't have accounts being in two places at
    * once. If old and new parents are the same, reinsertion causes
@@ -762,7 +756,7 @@
           *
           * Note also, we need to reparent the children to the new book as well.
           */
-         PWARN ("reparenting accounts accross books is not correctly supported\n");
+         PWARN ("reparenting accounts across books is not correctly supported\n");
 
          gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_DESTROY);
          col = qof_book_get_collection (grp->book, GNC_ID_ACCOUNT);
@@ -776,6 +770,7 @@
 
     grp->accounts = g_list_insert_sorted (grp->accounts, acc,
                                           group_sort_helper);
+    gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_ADD);
 
     acc->inst.dirty = TRUE;
     xaccAccountCommitEdit (acc);
@@ -784,6 +779,7 @@
   grp->saved = 0;
 
   gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
+  LEAVE(" ");
 }
 
 /********************************************************************\
@@ -945,6 +941,7 @@
         node_b = node_b->prev;
 
         /* remove from list -- node_a is ok, it's before node_b */
+	gnc_engine_gen_event (&acc_b->inst.entity, GNC_EVENT_REMOVE);
         grp->accounts = g_list_remove (grp->accounts, acc_b);
 
         xaccAccountBeginEdit (acc_b);
@@ -1011,7 +1008,6 @@
 
 /********************************************************************\
 \********************************************************************/
-
 void
 xaccSplitsBeginStagedTransactionTraversals (GList *splits)
 {
@@ -1228,7 +1224,7 @@
 {
   grp = xaccGroupGetRoot (grp);
   if (!grp || !grp->book) return NULL;
-  return grp->book->backend;
+  return qof_book_get_backend(grp->book);
 }
 
 /* ============================================================== */
Index: engine-helpers.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/engine-helpers.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/engine-helpers.h -Lsrc/engine/engine-helpers.h -u -r1.13 -r1.14
--- src/engine/engine-helpers.h
+++ src/engine/engine-helpers.h
@@ -33,7 +33,6 @@
 #include "Query.h"
 #include "Transaction.h"
 #include "guid.h"
-#include "guile-mappings.h"
 #include "qofbook.h"
 #include "qofsession.h"
 
Index: qofbackend.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbackend.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/engine/qofbackend.h -Lsrc/engine/qofbackend.h -u -r1.8 -r1.9
--- src/engine/qofbackend.h
+++ src/engine/qofbackend.h
@@ -18,9 +18,8 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup Object
-    @{ */
 /** @addtogroup Backend
+
     The QOF Backend is a pseudo-object providing an interface between the
     engine and a persistant data store (e.g. a server, a database, or
     a file).   Backends are not meant to be used directly by an
@@ -31,17 +30,23 @@
     the GUI & other front-end users.  This file defines these errors.
    
     Backends are used to save and restore Entities in a Book.
-    @{ */
+    @{ 
+*/
 /** @file qofbackend.h
     @brief API for data storage Backend
     @author Copyright (C) 2000-2001 Linas Vepstas <linas at linas.org>
+    @author Copyright 2004-2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef QOF_BACKEND_H
 #define QOF_BACKEND_H
 
+#include "qofinstance.h"
+
+#define QOF_MOD_BACKEND "qof-backend"
+
 /** \brief The errors that can be reported to the GUI & other front-end users
- *  \warning If you modify QofBackendError, please update 
+ *  \warning (GnuCash) If you modify QofBackendError, please update 
  *   src/engine/gw-engine-spec.scm 
 */
 typedef enum {
@@ -65,7 +70,38 @@
   ERR_BACKEND_MOD_DESTROY,  /**< commit of object update failed because 
                                another user has deleted the object */
   ERR_BACKEND_MISC,         /**< undetermined error */
+
+  /* QSF add-ons */
+  ERR_QSF_INVALID_OBJ, 		/**< The QSF object failed to validate against the QSF object schema */
+  ERR_QSF_INVALID_MAP, 		/**< The QSF map failed to validate against the QSF map schema */
+  ERR_QSF_BAD_OBJ_GUID,		/**< The QSF object contains one or more invalid GUIDs. */
+  ERR_QSF_BAD_QOF_VERSION,	/**< QSF map or object doesn't match the current QOF_OBJECT_VERSION. */
+  ERR_QSF_BAD_MAP,			/**< The selected map validates but is unusable.
   
+  This is usually because not all the required parameters for the defined objects 
+  have calculations described in the map.
+  */
+  ERR_QSF_NO_MAP,		/**< The QSF object file was loaded without a map
+  
+  The QSF Object file requires a map but it was not provided.
+  */
+  ERR_QSF_WRONG_MAP,		/**< The selected map validates but is for different objects.
+  
+  The list of objects defined in this map does not include all the objects described in
+  the current QSF object file.
+  */
+  ERR_QSF_MAP_NOT_OBJ,		/**< Selected file is a QSF map and cannot be opened as a QSF object */
+  ERR_QSF_OVERFLOW,			/**< EOVERFLOW - generated by strtol or strtoll.
+
+  When converting XML strings into numbers, an overflow has been detected. The XML file
+  contains invalid data in a field that is meant to hold a signed long integer or signed long long
+  integer.
+  */
+  ERR_QSF_OPEN_NOT_MERGE,	/** QSF files cannot be opened alone. The data must be merged.
+
+  This error is more of a warning that can be ignored by any routine
+  that uses qof_book_merge on the new session.
+  */
   /* fileio errors */
   ERR_FILEIO_FILE_BAD_READ = 1000,  /**< read failed or file prematurely truncated */
   ERR_FILEIO_FILE_EMPTY,     /**< file exists, is readable, but is empty */
@@ -75,6 +111,7 @@
   ERR_FILEIO_UNKNOWN_FILE_TYPE, /**< didn't recognize the file type */
   ERR_FILEIO_PARSE_ERROR,    /**< couldn't parse the data in the file */
   ERR_FILEIO_BACKUP_ERROR,   /**< couldn't make a backup of the file */
+  ERR_FILEIO_WRITE_ERROR,    /**< couldn't write to the file */
 
   /* network errors */
   ERR_NETIO_SHORT_READ = 2000,  /**< not enough bytes received */
@@ -117,6 +154,112 @@
 /** \brief DOCUMENT ME! */
 typedef void (*QofBePercentageFunc) (const char *message, double percent);
 
+/** @name Allow access to the begin routine for this backend.
+
+QOF_BEGIN_EDIT and QOF_COMMIT_EDIT_PART1 and part2 rely on 
+calling QofBackend *be->begin and be->commit. This means the
+QofBackend struct becomes part of the public API.
+These function replaces those calls to allow the macros to be
+used when QOF is built as a library. */
+//@{
+
+void qof_backend_run_begin(QofBackend *be, QofInstance *inst);
+
+gboolean qof_backend_begin_exists(QofBackend *be);
+
+void qof_backend_run_commit(QofBackend *be, QofInstance *inst);
+
+gboolean qof_backend_commit_exists(QofBackend *be);
+//@}
+
+/** @name Backend Configuration using KVP
+
+The backend uses qof_backend_get_config to pass back a KvpFrame of QofBackendOption
+that includes the \b translated strings that serve as description and
+tooltip for that option. i.e. backends need to run gettext in the init function.
+
+qof_backend_prepare_frame, qof_backend_prepare_option and qof_backend_complete_frame
+are intended to be used by the backend itself to create the options.
+
+qof_backend_get_config, qof_backend_option_foreach and qof_backend_load_config
+are intended for either the backend or the frontend to retrieve the option data
+from the frame or set new data.
+
+@{
+*/
+
+/** A single Backend Configuration Option. */
+typedef struct QofBackendOption_s {
+	KvpValueType type;        /**< Only GINT64, DOUBLE, NUMERIC, STRING and TIMESPEC supported. */
+	const char *option_name;  /**< non-translated, key. */
+	const char *description;  /**< translatable description. */
+	const char *tooltip;      /**< translatable tooltip */
+	gpointer value;           /**< The value of the option. */
+}QofBackendOption;
+
+/** Initialise the backend_configuration */
+void qof_backend_prepare_frame(QofBackend *be);
+
+/** Add an option to the backend_configuration. Repeat for more. */
+void qof_backend_prepare_option(QofBackend *be, QofBackendOption *option);
+
+/** Complete the backend_configuration and return the frame. */
+KvpFrame* qof_backend_complete_frame(QofBackend *be);
+
+/** Backend configuration option foreach callback prototype. */
+typedef void (*QofBackendOptionCB)(QofBackendOption*, gpointer data);
+
+/** Iterate over the frame and process each option. */
+void qof_backend_option_foreach(KvpFrame *config, QofBackendOptionCB cb, gpointer data);
+
+/** \brief Load configuration options specific to this backend.
+
+ at param be The backend to configure.
+ at param config A KvpFrame of QofBackendOptions that this backend
+will recognise. Each backend needs to document their own config
+types and acceptable values.
+
+*/
+void qof_backend_load_config (QofBackend *be, KvpFrame *config);
+
+/** \brief Get the available configuration options
+
+To retrieve the options from the returned KvpFrame, the caller
+needs to parse the XML file that documents the option names and
+data types. The XML file itself is part of the backend and is
+installed in a directory determined by the backend. Therefore,
+loading a new backend requires two paths: the path to the .la file
+and the path to the xml. Both paths are available by including a
+generated header file, e.g. gncla-dir.h defines GNC_LIB_DIR for
+the location of the .la file and GNC_XML_DIR for the xml.
+
+ at param be The QofBackend to be configured.
+
+ at return A new KvpFrame containing the available options or
+NULL on failure.
+
+*/
+KvpFrame* qof_backend_get_config(QofBackend *be);
+//@}
+
+/** \brief Load a QOF-compatible backend shared library.
+
+\param directory Can be NULL if filename is a complete path.
+\param filename  Name of the .la file that describes the
+	shared library. This provides platform independence,
+	courtesy of libtool.
+\param init_fcn  The QofBackendProvider init function.
+
+\return FALSE in case or error, otherwise TRUE.
+*/
+gboolean
+qof_load_backend_library (const char *directory, 
+			const char* filename, const char* init_fcn);
+
+/** \brief Retrieve the backend used by this book */
+QofBackend* qof_book_get_backend (QofBook *book);
+
+void qof_book_set_backend (QofBook *book, QofBackend *);
+
 #endif /* QOF_BACKEND_H */
-/**@}*/
-/**@}*/
+/** @} */
Index: gnc-engine.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lsrc/engine/gnc-engine.h -Lsrc/engine/gnc-engine.h -u -r1.29 -r1.30
--- src/engine/gnc-engine.h
+++ src/engine/gnc-engine.h
@@ -37,7 +37,33 @@
 #define GNC_ENGINE_H
 
 #include <glib.h>
-#include "qofid.h"
+#include "qof.h"
+
+/** \name QofLogModule identifiers */
+// @{
+#define GNC_MOD_ENGINE    "gnucash-engine-objects"
+#define GNC_MOD_ACCOUNT   "gnucash-account"
+#define GNC_MOD_SX        "gnucash-schedX"
+#define GNC_MOD_QUERY     "gnucash-query"
+#define GNC_MOD_SCRUB     "gnucash-scrub"
+#define GNC_MOD_LOT       "gnucash-lots"
+#define GNC_MOD_COMMODITY "gnucash-commodity"
+#define GNC_MOD_BACKEND   "gnucash-backend-general"
+#define GNC_MOD_PRICE     "gnucash-pricedb"
+#define GNC_MOD_BUSINESS  "gnucash-business"
+#define GNC_MOD_IO        "gnucash-inputoutput"
+#define GNC_MOD_BOOK      "gnucash-book-period"
+#define GNC_MOD_GUI       "gnucash-gui"
+#define GNC_MOD_GUILE     "gnucash-guile"
+#define GNC_MOD_LEDGER    "gnucash-ledger"
+#define GNC_MOD_REGISTER  "gnucash-register"
+#define GNC_MOD_HTML      "gnucash-html"
+#define GNC_MOD_PREFS     "gnucash-preferences"
+#define GNC_MOD_IMPORT    "gnucash-import-export"
+#define GNC_MOD_DRUID     "gnucash-druids"
+#define GNC_MOD_TEST      "gnucash-tests"
+#define GNC_MOD_BUDGET    "gnucash-budget"
+//@}
 
 /** @brief IDENTIFIERS
  *  GUID Identifiers can be used to reference Accounts, Transactions, 
@@ -63,6 +89,7 @@
 
 #define GNC_ID_ACCOUNT        "Account"
 #define GNC_ID_COMMODITY      "Commodity"
+#define GNC_ID_COMMODITY_NAMESPACE "CommodityNamespace"
 #define GNC_ID_COMMODITY_TABLE "CommodityTable"
 #define GNC_ID_FREQSPEC       "FreqSpec"
 #define GNC_ID_GROUP          "AccountGroup"
@@ -72,12 +99,30 @@
 #define GNC_ID_PRICEDB        "PriceDB"
 #define GNC_ID_SPLIT          "Split"
 #define GNC_ID_SCHEDXACTION   "SchedXaction"
+#define GNC_ID_BUDGET         "Budget"
 #define GNC_ID_SXTG           "SXTGroup"
 #define GNC_ID_SXTT           "SXTTrans"
 #define GNC_ID_TRANS          "Trans"
                                                                                 
 /* TYPES **********************************************************/
 
+/* CAS: ISTM, it would make more sense to put the typedefs in their
+   corresponding header files, (e.g. Account.h), and to #include all
+   the engine API header files right here.  After all, when I jump to
+   the definition "Account", I want to end up in Account.h, not this
+   file, like I do now.
+
+   Also, as it is now, if I want to use the engine api, I need to
+   include this header, plus all the other engine headers for the
+   types whose functions I call, so this header is providing almost no
+   benefit of aggregation.  But, if it included all the headers I
+   could just include this file.  Or would that cause a massive
+   recompile everytime one engine header changed?
+   Even if including all the headers here doesn't make sense, I think
+   distributing the stuff in the "Types" section does.
+*/
+
+
 /** @brief Account in Gnucash. 
  * This is the typename for an account. The actual structure is
  * defined in the private header AccountP.h, but no one outside the
@@ -128,10 +173,13 @@
  * the functions in gnc-commodity.h .*/
 typedef struct gnc_commodity_s       gnc_commodity;
 
+/** @brief A gnc_commodity_namespace is an collection of commodities. */
+typedef struct gnc_commodity_namespace_s gnc_commodity_namespace;
+
 /** @brief A gnc_commodity_table is a database of commodity info. */
 typedef struct gnc_commodity_table_s gnc_commodity_table;
 
-/** @breif Identifies that something sold at one time was bought at another.
+/** @brief Identifies that something sold at one time was bought at another.
  * A GNCLot provides a way of tracking physical items as they are 
  * bought and sold in different transactions.  By identifying 
  * the individual, underlying physical objects, it provides the
@@ -142,7 +190,7 @@
  */
 typedef struct gnc_lot_struct        GNCLot;
 
-/** @breif Price of commodity on a given date.
+/** @brief Price of commodity on a given date.
  * A GNCPrice encapsulates price information: the cost of a commodity
  * expressed as a currency, on a given date.  It also holds info about 
  * the provenance of the price: where it came from, its general validity.
@@ -181,16 +229,28 @@
 /** GnuCash version number infomation. */
 unsigned int gnucash_micro_version (void);
 
-/** gnc_engine_init MUST be called before gnc engine functions can 
- * be used. */
+/** gnc_engine_init should be called before gnc engine
+ * functions can be used - see also ::qof_init for a
+ * method that does not require Guile. */
 void gnc_engine_init(int argc, char ** argv);
 
-/** Called to shutdown the engine */
+/** Called to shutdown the engine, see also ::qof_close
+ * for use without Guile. */
 void gnc_engine_shutdown (void);
 
+/** check the engine is fully initialized */
+gboolean gnc_engine_is_initialized(void);
+
 /** Pass a function pointer to gnc_engine_add_init_hook and 
  * it will be called during the evaluation of gnc_engine_init */
 void gnc_engine_add_init_hook(gnc_engine_init_hook_t hook);
 
+gboolean
+qof_session_export (QofSession *tmp_session,
+                    QofSession *real_session,
+                    QofPercentageFunc percentage_func);
+
+void gnc_run_rpc_server(void);
+
 #endif
 /** @} */
Index: AccountP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/AccountP.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -Lsrc/engine/AccountP.h -Lsrc/engine/AccountP.h -u -r1.64 -r1.65
--- src/engine/AccountP.h
+++ src/engine/AccountP.h
@@ -40,21 +40,11 @@
 #define XACC_ACCOUNT_P_H
 
 #include "config.h"
-
 #include "Account.h"
 #include "gnc-commodity.h"
 #include "gnc-engine.h"
-#include "gnc-numeric.h"
-#include "kvp_frame.h"
 #include "policy.h"
 
-#include "qofbackend.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-
-
 /** STRUCTS *********************************************************/
 
 /** This is the data that describes an account. 
Index: qofsession-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsession-p.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/qofsession-p.h -Lsrc/engine/qofsession-p.h -u -r1.5 -r1.6
--- src/engine/qofsession-p.h
+++ src/engine/qofsession-p.h
@@ -32,20 +32,24 @@
 #include "qofbook.h"
 #include "qofsession.h"
 
-/** \struct QofSession
-*/
 struct _QofSession
 {
-  /** A book holds pointers to the various types of datasets used
-   * by GnuCash.  A session may have open multiple books.  */
+  /* This is just a "fake" entry point to allow me to pass a Session as
+   * an Entity.  NOTE:  THIS IS NOT AN ENTITY!  THE ONLY PART OF ENTITY
+   * THAT IS VALID IS E_TYPE!
+   */
+  QofEntity entity;
+
+  /* A book holds pointers to the various types of datasets.
+   * A session may have multiple books. */
   GList *books;
 
-  /** The requested book id, in the form or a URI, such as
+  /* The requested book id, in the form or a URI, such as
    * file:/some/where, or sql:server.host.com:555
    */
   char *book_id;
 
-  /** If any book subroutine failed, this records the failure reason 
+  /* If any book subroutine failed, this records the failure reason 
    * (file not found, etc).
    * This is a 'stack' that is one deep.  (Should be deeper ??)
    * FIXME: Each backend has its own error stack. The session
@@ -56,7 +60,7 @@
   char *error_message;
 
   /* ---------------------------------------------------- */
-  /** Pointer to the backend that is actually used to move data
+  /* Pointer to the backend that is actually used to move data
    * between the persistant store and the local engine.  */
   QofBackend *backend;
 };
Index: qof.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/qof.h -Lsrc/engine/qof.h -u -r1.6 -r1.7
--- src/engine/qof.h
+++ src/engine/qof.h
@@ -21,8 +21,9 @@
 
 #ifndef QOF_H_
 #define QOF_H_
-/** @defgroup QOF Query Object Framework */
-/** @{ */
+/** @defgroup QOF Query Object Framework 
+ @{
+*/
 
 /**
     @addtogroup Date Date:  Date and Time Printing, Parsing and Manipulation
@@ -49,6 +50,9 @@
     @addtogroup Object Object: Dynamic Object Class Framework
     @ingroup QOF
 */
+/** @addtogroup Choice Choice and collect : One to many links.
+	@ingroup QOF
+*/
 /**
     @addtogroup Query Query: Querying for Objects
     @ingroup QOF
@@ -57,27 +61,41 @@
     @addtogroup Trace Trace: Error Reporting and Debugging
     @ingroup QOF
 */
+/** @addtogroup BookMerge Merging QofBook structures
+	@ingroup QOF
+*/
+/** @addtogroup Event Event: QOF event handlers.
+	@ingroup QOF
+*/
 /**
     @addtogroup Utilities Misc Utilities
     @ingroup QOF
 */
 /** @} */
 
-#include "qof/gnc-date.h"
-#include "qof/gnc-engine-util.h"
-#include "qof/gnc-numeric.h"
-#include "qof/gnc-event.h"
-#include "qof/gnc-trace.h"
-#include "qof/guid.h"
-#include "qof/kvp_frame.h"
-#include "qof/qofbackend.h"
-#include "qof/qofid.h"
-#include "qof/qofbook.h"
-#include "qof/qofclass.h"
-#include "qof/qofobject.h"
-#include "qof/qofquery.h"
-#include "qof/qofquerycore.h"
-#include "qof/qofsession.h"
-#include "qof/qofsql.h"
+#include "qofid.h"
+#include "gnc-trace.h"
+#include "gnc-date.h"
+#include "gnc-numeric.h"
+#include "gnc-event.h"
+#include "gnc-engine-util.h"
+#include "guid.h"
+#include "kvp_frame.h"
+#include "kvp-util.h"
+#include "kvp-util-p.h"
+#include "qofbackend.h"
+#include "qofid-p.h"
+#include "qofinstance-p.h"
+#include "qofbook.h"
+#include "qofclass.h"
+#include "qofobject.h"
+#include "qofquery.h"
+#include "qofquerycore.h"
+#include "qofsession.h"
+#include "qofsql.h"
+#include "qofchoice.h"
+#include "qof_book_merge.h"
+#include "qof-be-utils.h"
+#include "qofla-dir.h"
 
 #endif /* QOF_H_ */
Index: qofbook.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/engine/qofbook.h -Lsrc/engine/qofbook.h -u -r1.16 -r1.17
--- src/engine/qofbook.h
+++ src/engine/qofbook.h
@@ -41,9 +41,7 @@
 #define QOF_BOOK_H
 
 #include <glib.h>
-
 #include "qofid.h"
-#include "qofbackend.h"
 #include "kvp_frame.h"
 
 /** @brief Encapsulates all the information about a dataset
@@ -81,6 +79,13 @@
     associated with it. */
 void      qof_book_destroy (QofBook *book);
 
+/** Close a book to editing.
+
+It is up to the application to check this flag,
+and once marked closed, books cannnot be marked as open.
+*/
+void qof_book_mark_closed (QofBook *book);
+
 /** \return The table of entities of the given type.  
  *
  *  When an object's constructor calls qof_instance_init(), a
@@ -125,16 +130,12 @@
  *  when the book is destroyed.  The argument to the callback will be 
  *  the book followed by the data pointer.
  */
-void qof_book_set_data_fin (QofBook *book, const char *key, gpointer data, QofBookFinalCB);
+void qof_book_set_data_fin (QofBook *book, const char *key, gpointer data,
+                            QofBookFinalCB);
 
 /** Retrieves arbitrary pointers to structs stored by qof_book_set_data. */
 gpointer qof_book_get_data (QofBook *book, const char *key);
 
-/** DOCUMENT ME! */
-QofBackend *qof_book_get_backend (QofBook *book);
-
-void qof_book_set_backend (QofBook *book, QofBackend *);
-
 /** Is the book shutting down? */
 gboolean qof_book_shutting_down (QofBook *book);
 
@@ -148,6 +149,13 @@
  */
 gboolean qof_book_not_saved (QofBook *book);
 
+/** The qof_book_mark_saved() routine marks the book as having been
+ *    saved (to a file, to a database). Used by backends to mark the
+ *    notsaved flag as FALSE just after loading.  Also used by the
+ *    main window code when the used has said to abandon any changes.
+ */
+void qof_book_mark_saved(QofBook *book);
+
 /** Call this function when you change the book kvp, to make sure the book
  * is marked 'dirty'. */
 void qof_book_kvp_changed (QofBook *book);
Index: qofsession.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsession.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/qofsession.h -Lsrc/engine/qofsession.h -u -r1.10 -r1.11
--- src/engine/qofsession.h
+++ src/engine/qofsession.h
@@ -75,13 +75,22 @@
  * make that assumption, in order to store the different accounting
  * periods in a clump so that one can be found, given another.
  *
- *  @{ 
+
+   The session now calls QofBackendProvider->check_data_type
+   to check that the incoming path contains data that the
+   backend provider can open. The backend provider should
+   also check if it can contact it's storage media (disk,
+   network, server, etc.) and abort if it can't.  Malformed
+   file URL's would be handled the same way.
+  
+ @{ 
  */
 
 /** @file qofsession.h
  * @brief Encapsulates a connection to a backend (persistent store)
  * @author Copyright (c) 1998, 1999, 2001, 2002 Linas Vepstas <linas at linas.org>
  * @author Copyright (c) 2000 Dave Peticolas
+ * @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
  */
 
 #ifndef QOF_SESSION_H
@@ -89,6 +98,10 @@
 
 #include "qofbackend.h"
 #include "qofbook.h"
+#include "qofclass.h"
+#include "qofobject.h"
+
+#define QOF_MOD_SESSION "qof-session"
 
 /* PROTOTYPES ******************************************************/
 
@@ -180,24 +193,25 @@
  *    See qofbackend.h for a listing of returned errors.
  */
 QofBackendError qof_session_pop_error (QofSession *session);
-/* @} */
+/** @} */
 
 /** The qof_session_add_book() allows additional books to be added to
  *    a session. 
  * XXX Under construction, clarify the following when done:
  * XXX There must already be an open book in the session already!?
- * XXX Only one open bok at a time per session is alowed!?
+ * XXX Only one open book at a time per session is allowed!?
  * XXX each book gets its own unique backend ???
  */
 void qof_session_add_book (QofSession *session, QofBook *book);
 
 QofBook * qof_session_get_book (QofSession *session);
 
-/** The qof_session_get_file_path() routine returns the fully-qualified file
+/**
+ *    The qof_session_get_file_path() routine returns the fully-qualified file
  *    path for the session. That is, if a relative or partial filename
  *    was for the session, then it had to have been fully resolved to
  *    open the session. This routine returns the result of this resolution.
- *    The path is always guarenteed to reside in the local file system, 
+ *    The path is always guaranteed to reside in the local file system, 
  *    even if the session itself was opened as a URL.  (currently, the
  *    filepath is derived from the url by substituting commas for
  *    slashes).
@@ -207,6 +221,7 @@
  *    file:/some/where/some/file.gml
  */
 const char * qof_session_get_file_path (QofSession *session);
+
 const char * qof_session_get_url (QofSession *session);
 
 /**
@@ -236,8 +251,267 @@
  */
 void     qof_session_end  (QofSession *session);
 
-/** @name Event Handling
+/** @name Copying entities between sessions.
+
+Only certain backends can cope with selective copying of
+entities and only fully defined QOF entities can be copied
+between sessions - see the \ref QSF (QSF) documentation 
+(::qsf_write_file) for more information.
+
+The recommended backend for the new session is QSF or a future
+SQL backend. Using any of these entity copy functions sets a 
+flag in the backend that this is now a partial QofBook.
+When you save a session containing a partial QofBook,
+the session will check that the backend is able to handle the
+partial book. If not, the backend will be replaced by one that
+can handle partial books, preferably one using the same
+::access_method. Currently, this means that a book 
+using the GnuCash XML v2 file backend will be switched to QSF.
+
+Copied entities are identical to the source entity, all parameters
+defined with ::QofAccessFunc and ::QofSetterFunc in QOF are copied
+and the ::GUID of the original ::QofEntity is set in the new entity.
+Sessions containing copied entities are intended for use
+as mechanisms for data export.
+
+It is acceptable to add entities to new_session in batches. Note that
+any of these calls will fail if an entity already exists in new_session
+with the same GUID as any entity to be copied. 
+
+To merge a whole QofBook or where there is any possibility
+of collisions or requirement for user intervention,
+see \ref BookMerge
+
+@{
+
+*/
+
+/** \brief Copy a single QofEntity to another session
+ 
+Checks first that no entity in the session book contains
+the GUID of the source entity. 
+
+ @param new_session - the target session
+ @param original - the QofEntity* to copy
+
+ at return FALSE without copying if the session contains an entity
+with the same GUID already, otherwise TRUE.
+*/
+
+gboolean qof_entity_copy_to_session(QofSession* new_session, QofEntity* original);
+
+/** @brief Copy a GList of entities to another session
+
+The QofBook in the new_session must \b not contain any entities
+with the same GUID as any of the source entities - there is
+no support for handling collisions, instead use \ref BookMerge
+
+Note that the GList (e.g. from ::qof_sql_query_run) can contain
+QofEntity pointers of any ::QofIdType, in any sequence. As long
+as all members of the list are ::QofEntity*, and all GUID's are
+unique, the list can be copied.
+
+ @param new_session - the target session
+ @param entity_list - a GList of QofEntity pointers of any type(s).
+
+ at return FALSE, without copying, if new_session contains any entities
+with the same GUID. Otherwise TRUE.
+
+*/
+gboolean qof_entity_copy_list(QofSession *new_session, GList *entity_list);
+
+/** @brief Copy a QofCollection of entities.
+
+The QofBook in the new_session must \b not contain any entities
+with the same GUID as any entities in the collection - there is
+no support for handling collisions - instead, use \ref BookMerge
+
+ at param new_session - the target session
+ at param entity_coll - a QofCollection of any QofIdType.
+
+ at return FALSE, without copying, if new_session contains any entities
+with the same GUID. Otherwise TRUE.
+*/
+
+gboolean qof_entity_copy_coll(QofSession *new_session, QofCollection *entity_coll);
+
+/** \brief Recursively copy a collection of entities to a session.
+
+\note This function creates a <b>partial QofBook</b>. See 
+::qof_entity_copy_to_session for more information.
+
+The QofBook in the new_session must \b not contain any entities
+with the same GUID as any entities to be copied - there is
+no support for handling collisions - instead, use \ref BookMerge
+
+Objects can be defined solely in terms of QOF data types or
+as a mix of data types and other objects, which may in turn
+include other objects. These references can be copied recursively
+down to the third level. e.g. ::GncInvoice refers to ::GncOwner which
+refers to ::GncCustomer which refers to ::GncAddress. See
+::QofEntityReference.
+
+\note This is a deep recursive copy - every referenced entity is copied
+to the new session, including all parameters. The starting point is all
+entities in the top level collection. It can take some time.
+
+ at param coll A QofCollection of entities that may or may not have 
+references.
+
+ at param new_session The QofSession to receive the copied entities.
+
+ at return TRUE on success; if any individual copy fails, returns FALSE.
+<b>Note</b> : Some entities may have been copied successfully even if
+one of the references fails to copy.
+
+*/
+gboolean
+qof_entity_copy_coll_r(QofSession *new_session, QofCollection *coll);
+
+/** \brief Recursively copy a single entity to a new session.
+
+Copy the single entity and all referenced entities to the second level.
+
+Only entities that are directly referenced by the top level entity are
+copied.
+
+This is a deep copy - all parameters of all referenced entities are copied. If 
+the top level entity has no references, this is identical to 
+::qof_entity_copy_to_session.
+
+ at param ent A single entity that may or may not have references.
+
+ at param new_session The QofSession to receive the copied entities.
+
+ at return TRUE on success; if any individual copy fails, returns FALSE.
+<b>Note</b> : Some entities may have been copied successfully even if
+one of the references fails to copy.
+*/
+gboolean
+qof_entity_copy_one_r(QofSession *new_session, QofEntity *ent);
+
+/** @} 
+*/
+
+/** @name Using a partial QofBook.
+
+Part of the handling for partial books requires a storage mechanism for
+references to entities that are not within reach of the partial book.
+This requires a GList in the book data to contain the reference 
+QofIdType and GUID so that when the book is written out, the
+reference can be included. See ::qof_book_get_data. 
+
+When the file is imported back in, the list needs to be rebuilt.
+The QSF backend rebuilds the references by linking to real entities. Other
+backends can process the hash table in similar ways.
+
+The list stores the QofEntityReference to the referenced entity -
+a struct that contains the GUID and the QofIdType of the referenced entity 
+as well as the parameter used to obtain the reference.
+
+Partial books need to be differentiated in the backend, the 
+flag in the book data is used by qof_session_save to prevent a partial
+book being saved using a backend that requires a full book.
+
  @{ */
+
+
+/** \brief External references in a partial QofBook.
+
+For use by any session that deals with partial QofBooks.
+It is used by the entity copy functions and by the QSF backend.
+Creates a GList stored in the Book hashtable to contain
+repeated references for a single entity.
+*/
+typedef struct qof_entity_reference {
+	QofIdType       choice_type;/**< When the reference is a different type.*/
+	QofIdType        type;       /**< The type of entity */
+	GUID             *ref_guid;  /**< The GUID of the REFERENCE entity */
+	const QofParam  *param;      /**< The parameter name and type. */
+	const GUID      *ent_guid;   /**< The GUID of the original entity. */
+}QofEntityReference;
+
+/** \brief Get a reference from this entity to another entity.
+
+Used in the preparation of a partial QofBook when the known entity
+(the one currently being copied into the partial book) refers to
+any other entity, usually as a parent or child.
+The routine calls the param_getfcn of the supplied parameter,
+which must return an object (QofEntity*), not a known QOF data type, to
+retrieve the referenced entity and therefore the GUID. The GUID of
+both entities are stored in the reference which then needs to be added
+to the reference list which is added to the partial book data hash.
+The reference itself is used by the backend to preserve the relationship
+between entities within and outside the partial book.
+
+See also ::qof_class_get_referenceList to obtain the list of 
+parameters that provide references to the known entity whilst
+excluding parameters that return known QOF data types.
+
+Note that even if the referenced entity \b exists in the partial
+book (or will exist later), a reference must still be obtained and
+added to the reference list for the book itself. This maintains
+the integrity of the partial book during sequential copy operations.
+
+ at param ent   The known entity.
+ at param param  The parameter to use to get the referenced entity.
+
+ at return FALSE on error, otherwise a pointer to the QofEntityReference.
+*/
+QofEntityReference*
+qof_entity_get_reference_from(QofEntity *ent, const QofParam *param);
+
+/** \brief Adds a new reference to the partial book data hash.
+
+Retrieves any existing reference list and appends the new reference.
+
+If the book is not already marked as partial, it will be marked as partial.
+*/
+void
+qof_session_update_reference_list(QofSession *session, QofEntityReference *reference);
+
+/** Used as the key value for the QofBook data hash.
+ *
+ * Retrieved later by QSF (or any other suitable backend) to
+ * rebuild the references from the QofEntityReference struct
+ * that contains the QofIdType and GUID of the referenced entity
+ * of the original QofBook as well as the parameter data and the
+ * GUID of the original entity.
+ * */
+#define ENTITYREFERENCE "QofEntityReference"
+
+/** \brief Flag indicating a partial QofBook.
+
+When set in the book data with a gboolean value of TRUE,
+the flag denotes that only a backend that supports partial
+books can be used to save this session.
+*/
+
+#define PARTIAL_QOFBOOK "PartialQofBook"
+
+/** @}
+*/
+
+/** \brief Allow session data to be printed to stdout
+
+book_id can't be NULL and we do need to have an access_method,
+so use one to solve the other.
+
+To print a session to stdout, use ::qof_session_begin. Example:
+
+\a qof_session_begin(session,QOF_STDOUT,TRUE,FALSE);
+
+When you call qof_session_save(session, NULL), the output will appear
+on stdout and can be piped or redirected to other processes.
+
+Currently, only the QSF backend supports writing to stdout, other
+backends may return a ::QofBackendError.
+*/
+#define QOF_STDOUT "file:"
+
+/** @name Event Handling
+
+  @{ */
 /** The qof_session_events_pending() method will return TRUE if the backend
  *    has pending events which must be processed to bring the engine
  *    up to date with the backend.
@@ -249,7 +523,7 @@
  *    engine was modified while engine events were suspended.
  */
 gboolean qof_session_process_events (QofSession *session);
-/* @} */
+/** @} */
 
 #ifdef GNUCASH_MAJOR_VERSION
 /** Run the RPC Server 
@@ -264,7 +538,21 @@
 			     QofSession *real_session,
 			     QofPercentageFunc percentage_func);
 
-#endif /* GNUCASH_MJOR_VERSION */
+#endif /* GNUCASH_MAJOR_VERSION */
+
+/** Register a function to be called just before a session is closed.
+ *
+ *  @param fn The function to be called.  The function definition must
+ *  be func(gpointer session, gpointer user_data);
+ *
+ *  @param data The data to be passed to the function. */
+void qof_session_add_close_hook (GFunc fn, gpointer data);
+
+/** Call all registered session close hooks, informing them that the
+ *  specified session is about to be closed.
+ *
+ *  @param session A pointer to the session being closed. */
+void qof_session_call_close_hooks (QofSession *session);
 
 #endif /* QOF_SESSION_H */
 /** @} */
Index: gw-engine-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gw-engine-spec.scm,v
retrieving revision 1.75
retrieving revision 1.76
diff -Lsrc/engine/gw-engine-spec.scm -Lsrc/engine/gw-engine-spec.scm -u -r1.75 -r1.76
--- src/engine/gw-engine-spec.scm
+++ src/engine/gw-engine-spec.scm
@@ -26,6 +26,7 @@
     "#include <guid.h>\n"
     "#include <Group.h>\n"
     "#include <Query.h>\n"
+    "#include <gnc-budget.h>\n"
     "#include <gnc-commodity.h>\n"
     "#include <gnc-date.h>\n"
     "#include <gnc-engine.h>\n"
@@ -38,6 +39,7 @@
     "#include <qofbackend.h>\n"
     "#include <qofbook.h>\n"
     "#include <qofsession.h>\n"
+    "#include <gnc-hooks-scm.h>\n"
     "#include <engine-helpers.h>\n")))
 
 (gw:wrapset-add-cs-initializers!
@@ -104,6 +106,9 @@
 (gw:wrap-as-wct ws '<gnc:Split*> "Split*" "const Split*")
 (gw:wrap-as-wct ws '<gnc:Transaction*> "Transaction*" "const Transaction*")  
 (gw:wrap-as-wct ws '<gnc:commodity*> "gnc_commodity*" "const gnc_commodity*")
+(gw:wrap-as-wct ws '<gnc:commodity-namespace*>
+                "gnc_commodity_namespace*" 
+                "const gnc_commodity_namespace*")
 (gw:wrap-as-wct ws '<gnc:commodity-table*>
                 "gnc_commodity_table*" 
                 "const gnc_commodity_table*")
@@ -142,7 +147,7 @@
 
 (let ((wt (gw:wrap-enumeration ws '<gnc:date-match-how> "QofDateMatch")))
   (gw:enum-add-value! wt "QOF_DATE_MATCH_NORMAL" 'date-match-normal)
-  (gw:enum-add-value! wt "QOF_DATE_MATCH_ROUNDED" 'date-match-rounded)
+  (gw:enum-add-value! wt "QOF_DATE_MATCH_DAY" 'date-match-rounded)
   #t)
 
 (let ((wt (gw:wrap-enumeration ws '<gnc:numeric-match-how> "QofNumericMatch")))
@@ -256,6 +261,7 @@
 ;
 (gw:wrap-value ws 'gnc:id-account '<gnc:id-type> "GNC_ID_ACCOUNT")
 (gw:wrap-value ws 'gnc:id-book '<gnc:id-type> "GNC_ID_BOOK")
+(gw:wrap-value ws 'gnc:id-budget '<gnc:id-type> "GNC_ID_BUDGET")
 (gw:wrap-value ws 'gnc:id-lot '<gnc:id-type> "GNC_ID_LOT")
 (gw:wrap-value ws 'gnc:id-price '<gnc:id-type> "GNC_ID_PRICE")
 (gw:wrap-value ws 'gnc:id-split '<gnc:id-type> "GNC_ID_SPLIT")
@@ -2017,7 +2023,8 @@
  'gnc:commodity-create
  '<gnc:commodity*>
  "gnc_commodity_new"
- '(((<gw:mchars> caller-owned const) fullname)
+ '((<gnc:Book*> book)
+   ((<gw:mchars> caller-owned const) fullname)
    ((<gw:mchars> caller-owned const) namespace)
    ((<gw:mchars> caller-owned const) mnemonic)
    ((<gw:mchars> caller-owned const) exchange-code)
@@ -2145,7 +2152,7 @@
 (gw:wrap-function
  ws
  'gnc:commodity-table-add-namespace
- '<gw:void>
+ '<gnc:commodity-namespace*>
  "gnc_commodity_table_add_namespace"
  '((<gnc:commodity-table*> table)
    ((<gw:mchars> caller-owned const) namespace))
@@ -2183,7 +2190,8 @@
  'gnc:commodity-table-add-default-data
  '<gw:bool>
  "gnc_commodity_table_add_default_data"
- '((<gnc:commodity-table*> table))
+ '((<gnc:commodity-table*> table)
+   (<gnc:Book*> book))
  "Add default commodities to the commodity table.")
 
 ;;=========
@@ -2484,3 +2492,152 @@
  "gnc_quote_source_set_fq_installed"
  '(((gw:glist-of (<gw:mchars> callee-owned) callee-owned) choices))
  "Takes a list of installed Finance::Quote souces and records it internally.")
+
+
+;; Budget functions
+
+(gw:wrap-as-wct ws '<gnc:Budget*> "GncBudget *" "const GncBudget *")
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-guid
+ '<gnc:guid-scm>
+ "gnc_budget_return_guid"
+ '((<gnc:Budget*> budget))
+ "Gets the guid of the budget")
+
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-lookup
+ '<gnc:Budget*>
+ "gnc_budget_lookup_direct"
+ '((<gnc:guid-scm> guid)
+   (<gnc:Book*> book))
+ "Lookup a budget from its GUID.")
+
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-default
+ '<gnc:Budget*>
+ "gnc_budget_get_default"
+ '((<gnc:Book*> book))
+ "Get the default budget for the book.")
+
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-name
+ '(<gw:mchars> callee-owned const)
+ "gnc_budget_get_name"
+ '((<gnc:Budget*> budget))
+ "Get the brief name for the budget.")
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-num-periods
+ '<gw:unsigned-int>
+ "gnc_budget_get_num_periods"
+ '((<gnc:Budget*> budget))
+ "Get the number of periods in a budget.")
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-account-period-value
+ '<gnc:numeric>
+ "gnc_budget_get_account_period_value"
+ '((<gnc:Budget*> budget)
+   (<gnc:Account*> acct)
+   (<gw:unsigned-int> period_num)
+   )
+ "Get the budgeted value for the given account and budget period.")
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-account-period-actual-value
+ '<gnc:numeric>
+ "gnc_budget_get_account_period_actual_value"
+ '((<gnc:Budget*> budget)
+   (<gnc:Account*> acct)
+   (<gw:unsigned-int> period_num)
+   )
+ "Get the actual account value for the given account and budget period.")
+
+(gw:wrap-function
+ ws
+ 'gnc:budget-get-period-start-date
+ '<gnc:time-pair>
+ "gnc_budget_get_period_start_date"
+ '((<gnc:Budget*> budget)
+   (<gw:unsigned-int> period_num)
+   )
+ "Get the date that the given period begins.")
+
+;;
+;; gnc-hooks-scm.h
+;;   (and gnc-hooks.h)
+;;
+(gw:wrap-function
+ ws
+ 'gnc:hook-define
+ '(<gw:mchars> caller-owned)
+ "gnc_hook_create"
+ '(((<gw:mchars> caller-owned) name) (<gw:int> how) ((<gw:mchars> caller-owned) desc))
+ "Define (create) a new hook")
+
+(gw:wrap-function
+ ws
+ 'gnc:hook-get-description
+ '(<gw:mchars> callee-owned)
+ "gnc_hook_get_description"
+ '(((<gw:mchars> caller-owned) hook))
+ "Get the description of a hook")
+
+(gw:wrap-function
+ ws
+ 'gnc:hook-add-dangler
+ '<gw:void>
+ "gnc_hook_add_scm_dangler"
+ '(((<gw:mchars> caller-owned) hook) (<gw:scm> procedure))
+ "Add a hook dangler to an existing hook")
+
+(gw:wrap-function
+ ws
+ 'gnc:hook-remove-dangler
+ '<gw:void>
+ "gnc_hook_del_scm_dangler"
+ '(((<gw:mchars> caller-owned) hook) (<gw:scm> procedure))
+ "Remove a hook dangler from an existing hook")
+
+(gw:wrap-function
+ ws
+ 'gnc:hook-run-danglers-real
+ '<gw:void>
+ "gnc_hook_run"
+ '(((<gw:mchars> caller-owned) name) (<gnc:Session*> arg))
+ "Run the danglers on a hook.")
+
+; Now wrap all the 'known' hooks
+(gw:wrap-value ws 'gnc:*startup-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_STARTUP")
+(gw:wrap-value ws 'gnc:*shutdown-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_SHUTDOWN")
+(gw:wrap-value ws 'gnc:*ui-startup-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_UI_STARTUP")
+(gw:wrap-value ws 'gnc:*ui-post-startup-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_UI_POST_STARTUP")
+(gw:wrap-value ws 'gnc:*ui-shutdown-hook* 
+	       '(<gw:mchars> callee-owned) "HOOK_UI_SHUTDOWN")
+(gw:wrap-value ws 'gnc:*new-book-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_NEW_BOOK")
+(gw:wrap-value ws 'gnc:*report-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_REPORT")
+(gw:wrap-value ws 'gnc:*save-options-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_SAVE_OPTIONS")
+(gw:wrap-value ws 'gnc:*add-extension-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_ADD_EXTENSION")
+(gw:wrap-value ws 'gnc:*book-opened-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_BOOK_OPENED")
+(gw:wrap-value ws 'gnc:*book-closed-hook*
+	       '(<gw:mchars> callee-owned) "HOOK_BOOK_CLOSED")
Index: qofsession.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsession.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/engine/qofsession.c -Lsrc/engine/qofsession.c -u -r1.17 -r1.18
--- src/engine/qofsession.c
+++ src/engine/qofsession.c
@@ -19,24 +19,16 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
 \********************************************************************/
 
-/*
- * FILE:
- * qofsession.c
- *
- * FUNCTION:
- * Encapsulate a connection to a storage backend.
+/**
+ * @file qofsession.c
+ * @brief Encapsulate a connection to a storage backend.
  *
  * HISTORY:
  * Created by Linas Vepstas December 1998
- * Copyright (c) 1998-2004 Linas Vepstas <linas at linas.org>
- * Copyright (c) 2000 Dave Peticolas
- */
-
-  /* TODO: XXX we should probably move this resolve function to the
-   * file backend.  I think the idea would be to open the backend
-   * and then ask it if it can contact it's storage media (disk,
-   * network, server, etc.) and abort if it can't.  Mal-formed
-   * file URL's would be handled the same way!
+
+ @author Copyright (c) 1998-2004 Linas Vepstas <linas at linas.org>
+ @author Copyright (c) 2000 Dave Peticolas
+ @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
    */
 
 #include "config.h"
@@ -49,22 +41,22 @@
 #include <unistd.h>
 
 #include <glib.h>
-
-#include "gnc-event.h"
+#include "qofla-dir.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
+#include "gnc-event.h"
+#include "qofsession.h"
 #include "qofbackend-p.h"
+#include "qof-be-utils.h"
 #include "qofbook.h"
 #include "qofbook-p.h"
-#include "qofsession.h"
+#include "qofobject.h"
 #include "qofsession-p.h"
 
-/* Some gnucash-specific code */
-#ifdef GNUCASH_MAJOR_VERSION
-#include "gnc-module.h"
-#endif /* GNUCASH */
-
+/** \deprecated should not be static */
 static QofSession * current_session = NULL;
-static short module = MOD_BACKEND;
+static GHookList * session_closed_hooks = NULL;
+static QofLogModule log_module = QOF_MOD_SESSION;
 static GSList *provider_list = NULL;
 
 /* ====================================================================== */
@@ -76,6 +68,46 @@
 }
 
 /* ====================================================================== */
+
+/* hook routines */
+
+void
+qof_session_add_close_hook (GFunc fn, gpointer data)
+{
+  GHook *hook;
+
+  if (session_closed_hooks == NULL) {
+      session_closed_hooks = malloc(sizeof(GHookList)); /* LEAKED */
+    g_hook_list_init (session_closed_hooks, sizeof(GHook));
+  }
+
+  hook = g_hook_alloc(session_closed_hooks);
+  if (!hook)
+    return;
+
+  hook->func = (GHookFunc)fn;
+  hook->data = data;
+  g_hook_append(session_closed_hooks, hook);
+}
+
+void
+qof_session_call_close_hooks (QofSession *session)
+{
+  GHook *hook;
+  GFunc fn;
+
+  if (session_closed_hooks == NULL)
+    return;
+
+  hook = g_hook_first_valid (session_closed_hooks, FALSE);
+  while (hook) {
+    fn = (GFunc)hook->func;
+    fn(session, hook->data);
+    hook = g_hook_next_valid (session_closed_hooks, hook, FALSE);
+  }
+}
+
+/* ====================================================================== */
 /* error handling routines */
 
 static void
@@ -165,6 +197,7 @@
 {
   if (!session) return;
 
+  session->entity.e_type = QOF_ID_SESSION;
   session->books = g_list_append (NULL, qof_book_new ());
   session->book_id = NULL;
   session->backend = NULL;
@@ -180,6 +213,8 @@
   return session;
 }
 
+/** \deprecated Each application should keep
+their \b own session context. */
 QofSession *
 qof_session_get_current_session (void)
 {
@@ -193,6 +228,8 @@
   return current_session;
 }
 
+/** \deprecated Each application should keep
+their \b own session context. */
 void
 qof_session_set_current_session (QofSession *session)
 {
@@ -269,140 +306,578 @@
    return session->book_id;
 }
 
-#ifdef GNUCASH_MAJOR_VERSION 
+/* =============================================================== */
+
+typedef struct qof_entity_copy_data {
+	QofEntity *from;
+	QofEntity *to;
+	GList  *referenceList;
+	GSList *param_list;
+	QofSession *new_session;
+	gboolean error;
+}QofEntityCopyData;
 
 static void
-qof_session_int_backend_load_error(QofSession *session,
-                                   char *message, char *dll_err)
+qof_book_set_partial(QofBook *book)
 {
-    PWARN ("%s %s", message, dll_err ? dll_err : "");
+	gboolean partial;
+
+	partial =
+	  (gboolean)GPOINTER_TO_INT(qof_book_get_data(book, PARTIAL_QOFBOOK));
+	if(!partial) {
+		qof_book_set_data(book, PARTIAL_QOFBOOK, (gboolean*)TRUE);
+	}
+}
 
-    g_free(session->book_id);
-    session->book_id = NULL;
+void
+qof_session_update_reference_list(QofSession *session, QofEntityReference *reference)
+{
+	QofBook  *book;
+	GList    *book_ref_list;
 
-    qof_session_push_error (session, ERR_BACKEND_NO_BACKEND, NULL);
+	book = qof_session_get_book(session);
+	book_ref_list = (GList*)qof_book_get_data(book, ENTITYREFERENCE);
+	book_ref_list = g_list_append(book_ref_list, reference);
+	qof_book_set_data(book, ENTITYREFERENCE, book_ref_list);
+	qof_book_set_partial(book);
 }
 
-/* Gnucash uses its module system to load a backend; other users
- * use traditional dlopen calls.
- */
 static void
-qof_session_load_backend(QofSession * session, char * backend_name)
+qof_entity_param_cb(QofParam *param, gpointer data)
 {
-  GNCModule  mod = 0;
-  QofBackend    *(* be_new_func)(void);
-  char       * mod_name = g_strdup_printf("gnucash/backend/%s", backend_name);
+	QofEntityCopyData *qecd;
 
-  /* FIXME : reinstate better error messages with gnc_module errors */
-  ENTER (" ");
-  /* FIXME: this needs to be smarter with version numbers. */
-  /* FIXME: this should use dlopen(), instead of guile/scheme, 
-   *    to load the modules.  Right now, this requires the engine to
-   *    link to scheme, which is an obvious architecture flaw. 
-   *    XXX this is fexed below, in the non-gnucash version. Cut
-   *    over at some point.
-   */
-  mod = gnc_module_load(mod_name, 0);
+	g_return_if_fail(data != NULL);
+	qecd = (QofEntityCopyData*)data;
+	g_return_if_fail(param != NULL);
+	if((param->param_getfcn != NULL)&&(param->param_setfcn != NULL)) {
+			qecd->param_list = g_slist_prepend(qecd->param_list, param);
+	}
+}
 
-  if (mod) 
-  {
-    be_new_func = gnc_module_lookup(mod, "gnc_backend_new");
+QofEntityReference*
+qof_entity_get_reference_from(QofEntity *ent, const QofParam *param)
+{
+	QofEntityReference *reference;
+	QofEntity    *ref_ent;
+	const GUID   *cm_guid;
+	char         cm_sa[GUID_ENCODING_LENGTH + 1];
+	gchar        *cm_string;
+
+	g_return_val_if_fail(param, NULL);
+	ref_ent = (QofEntity*)param->param_getfcn(ent, param);
+	if(ref_ent != NULL) {
+		reference = g_new0(QofEntityReference, 1);
+		reference->type = ent->e_type;
+		reference->ref_guid = g_new(GUID, 1);
+		reference->ent_guid = &ent->guid;
+		reference->param = qof_class_get_parameter(ent->e_type, param->param_name);
+		cm_guid = qof_entity_get_guid(ref_ent);
+		guid_to_string_buff(cm_guid, cm_sa);
+		cm_string = g_strdup(cm_sa);
+		if(TRUE == string_to_guid(cm_string, reference->ref_guid)) {
+			return reference;
+		}
+	}
+	return NULL;
+}
 
-    if(be_new_func) 
-    {
-      GList *node;
-      session->backend = be_new_func();
+static void
+qof_entity_foreach_copy(gpointer data, gpointer user_data)
+{
+	QofEntity          *importEnt, *targetEnt, *referenceEnt;
+	QofEntityCopyData  *context;
+	QofEntityReference *reference;
+	gboolean           registered_type;
+	/* cm_ prefix used for variables that hold the data to commit */
+	QofParam     *cm_param;
+	gchar        *cm_string, *cm_char;
+	const GUID   *cm_guid;
+	KvpFrame     *cm_kvp;
+	/* function pointers and variables for parameter getters that don't use pointers normally */
+	gnc_numeric cm_numeric, (*numeric_getter) (QofEntity*, QofParam*);
+	double      cm_double,  (*double_getter)  (QofEntity*, QofParam*);
+	gboolean    cm_boolean, (*boolean_getter) (QofEntity*, QofParam*);
+	gint32      cm_i32,     (*int32_getter)   (QofEntity*, QofParam*);
+	gint64      cm_i64,     (*int64_getter)   (QofEntity*, QofParam*);
+	Timespec    cm_date,    (*date_getter)    (QofEntity*, QofParam*);
+	/* function pointers to the parameter setters */
+	void (*string_setter)    (QofEntity*, const char*);
+	void (*date_setter)      (QofEntity*, Timespec);
+	void (*numeric_setter)   (QofEntity*, gnc_numeric);
+	void (*guid_setter)      (QofEntity*, const GUID*);
+	void (*double_setter)    (QofEntity*, double);
+	void (*boolean_setter)   (QofEntity*, gboolean);
+	void (*i32_setter)       (QofEntity*, gint32);
+	void (*i64_setter)       (QofEntity*, gint64);
+	void (*char_setter)      (QofEntity*, char*);
+	void (*kvp_frame_setter) (QofEntity*, KvpFrame*);
+	
+	g_return_if_fail(user_data != NULL);
+	context = (QofEntityCopyData*) user_data;
+	cm_date.tv_nsec = 0;
+	cm_date.tv_sec =  0;
+	importEnt = context->from;
+	targetEnt = context->to;
+	registered_type = FALSE;
+	cm_param = (QofParam*) data;
+	g_return_if_fail(cm_param != NULL);
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_STRING) == 0)  { 
+		cm_string = g_strdup((gchar*)cm_param->param_getfcn(importEnt, cm_param));
+		string_setter = (void(*)(QofEntity*, const char*))cm_param->param_setfcn;
+		if(string_setter != NULL) { string_setter(targetEnt, cm_string); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_DATE) == 0) { 
+		date_getter = (Timespec (*)(QofEntity*, QofParam*))cm_param->param_getfcn;
+		cm_date = date_getter(importEnt, cm_param);
+		date_setter = (void(*)(QofEntity*, Timespec))cm_param->param_setfcn;
+		if(date_setter != NULL) { date_setter(targetEnt, cm_date); }
+		registered_type = TRUE;
+	}
+	if((safe_strcmp(cm_param->param_type, QOF_TYPE_NUMERIC) == 0)  ||
+	(safe_strcmp(cm_param->param_type, QOF_TYPE_DEBCRED) == 0)) { 
+		numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*))cm_param->param_getfcn;
+		cm_numeric = numeric_getter(importEnt, cm_param);
+		numeric_setter = (void(*)(QofEntity*, gnc_numeric))cm_param->param_setfcn;
+		if(numeric_setter != NULL) { numeric_setter(targetEnt, cm_numeric); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_GUID) == 0) { 
+		cm_guid = (const GUID*)cm_param->param_getfcn(importEnt, cm_param);
+		guid_setter = (void(*)(QofEntity*, const GUID*))cm_param->param_setfcn;
+		if(guid_setter != NULL) { guid_setter(targetEnt, cm_guid); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_INT32) == 0) { 
+		int32_getter = (gint32 (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+		cm_i32 = int32_getter(importEnt, cm_param);
+		i32_setter = (void(*)(QofEntity*, gint32))cm_param->param_setfcn;
+		if(i32_setter != NULL) { i32_setter(targetEnt, cm_i32); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_INT64) == 0) { 
+		int64_getter = (gint64 (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+		cm_i64 = int64_getter(importEnt, cm_param);
+		i64_setter = (void(*)(QofEntity*, gint64))cm_param->param_setfcn;
+		if(i64_setter != NULL) { i64_setter(targetEnt, cm_i64); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_DOUBLE) == 0) { 
+		double_getter = (double (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+		cm_double = double_getter(importEnt, cm_param);
+		double_setter = (void(*)(QofEntity*, double))cm_param->param_setfcn;
+		if(double_setter != NULL) { double_setter(targetEnt, cm_double); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_BOOLEAN) == 0){ 
+		boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+		cm_boolean = boolean_getter(importEnt, cm_param);
+		boolean_setter = (void(*)(QofEntity*, gboolean))cm_param->param_setfcn;
+		if(boolean_setter != NULL) { boolean_setter(targetEnt, cm_boolean); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_KVP) == 0) { 
+		cm_kvp = kvp_frame_copy((KvpFrame*)cm_param->param_getfcn(importEnt,cm_param));
+		kvp_frame_setter = (void(*)(QofEntity*, KvpFrame*))cm_param->param_setfcn;
+		if(kvp_frame_setter != NULL) { kvp_frame_setter(targetEnt, cm_kvp); }
+		registered_type = TRUE;
+	}
+	if(safe_strcmp(cm_param->param_type, QOF_TYPE_CHAR) == 0) { 
+		cm_char = (gchar*)cm_param->param_getfcn(importEnt,cm_param);
+		char_setter = (void(*)(QofEntity*, char*))cm_param->param_setfcn;
+		if(char_setter != NULL) { char_setter(targetEnt, cm_char); }
+		registered_type = TRUE;
+	}
+	if(registered_type == FALSE) {
+		referenceEnt = (QofEntity*)cm_param->param_getfcn(importEnt, cm_param);
+		if(!referenceEnt || !referenceEnt->e_type) { return; }
+		reference = qof_entity_get_reference_from(importEnt, cm_param);
+		if(reference) {
+			qof_session_update_reference_list(context->new_session, reference);
+		}
+	}
+}
 
-      for (node=session->books; node; node=node->next)
-      {
-         QofBook *book = node->data;
-         qof_book_set_backend (book, session->backend);
-      }
-    }
-    else
-    {
-      qof_session_int_backend_load_error(session, " can't find backend_new ",
-                                         "");
-    }      
-  }
-  else
-  {
-    qof_session_int_backend_load_error(session,
-                                       " failed to load '%s' backend", 
-                                       backend_name);
-  }
+static gboolean
+qof_entity_guid_match(QofSession *new_session, QofEntity *original)
+{
+	QofEntity *copy;
+	const GUID *g;
+	QofIdTypeConst type;
+	QofBook *targetBook;
+	QofCollection *coll;
+	
+	copy = NULL;
+	g_return_val_if_fail(original != NULL, FALSE);
+	targetBook = qof_session_get_book(new_session);
+	g_return_val_if_fail(targetBook != NULL, FALSE);
+	g = qof_entity_get_guid(original);
+	type = g_strdup(original->e_type);
+	coll = qof_book_get_collection(targetBook, type);
+	copy = qof_collection_lookup_entity(coll, g);
+	if(copy) { return TRUE; }
+	return FALSE;
+}
 
-  g_free(mod_name);
-  LEAVE (" ");
+static void
+qof_entity_list_foreach(gpointer data, gpointer user_data)
+{
+	QofEntityCopyData *qecd;
+	QofEntity *original;
+	QofInstance *inst;
+	QofBook *book;
+	const GUID *g;
+	
+	g_return_if_fail(data != NULL);
+	original = (QofEntity*)data;
+	g_return_if_fail(user_data != NULL);
+	qecd = (QofEntityCopyData*)user_data;
+	if(qof_entity_guid_match(qecd->new_session, original)) { return; }
+	qecd->from = original;
+	book = qof_session_get_book(qecd->new_session);
+	inst = (QofInstance*)qof_object_new_instance(original->e_type, book);
+	qecd->to = &inst->entity;
+	g = qof_entity_get_guid(original);
+	qof_entity_set_guid(qecd->to, g);
+	if(qecd->param_list != NULL) { 
+		g_slist_free(qecd->param_list);
+		qecd->param_list = NULL;
+	}
+	qof_class_param_foreach(original->e_type, qof_entity_param_cb, qecd);
+	qof_begin_edit(inst);
+	g_slist_foreach(qecd->param_list, qof_entity_foreach_copy, qecd);
+	qof_commit_edit(inst);
+}
+
+static void
+qof_entity_coll_foreach(QofEntity *original, gpointer user_data)
+{
+	QofEntityCopyData *qecd;
+	const GUID *g;
+	QofBook *targetBook;
+	QofCollection *coll;
+	QofEntity *copy;
+	
+	g_return_if_fail(user_data != NULL);
+	copy = NULL;
+	qecd = (QofEntityCopyData*)user_data;
+	targetBook = qof_session_get_book(qecd->new_session);
+	g = qof_entity_get_guid(original);
+	coll = qof_book_get_collection(targetBook, original->e_type);
+	copy = qof_collection_lookup_entity(coll, g);
+	if(copy) { qecd->error = TRUE; }
 }
 
-#else /* GNUCASH */
+static void
+qof_entity_coll_copy(QofEntity *original, gpointer user_data)
+{
+	QofEntityCopyData *qecd;
+	QofBook *book;
+	QofInstance *inst;
+	const GUID *g;
+	
+	g_return_if_fail(user_data != NULL);
+	qecd = (QofEntityCopyData*)user_data;
+	book = qof_session_get_book(qecd->new_session);
+	inst = (QofInstance*)qof_object_new_instance(original->e_type, book);
+	qecd->to = &inst->entity;
+	qecd->from = original;
+	g = qof_entity_get_guid(original);
+	qof_entity_set_guid(qecd->to, g);
+	qof_begin_edit(inst);
+	g_slist_foreach(qecd->param_list, qof_entity_foreach_copy, qecd);
+	qof_commit_edit(inst);
+}
+
+gboolean qof_entity_copy_to_session(QofSession* new_session, QofEntity* original)
+{
+	QofEntityCopyData qecd;
+	QofInstance *inst;
+	QofBook *book;
+
+	if(!new_session || !original) { return FALSE; }
+	if(qof_entity_guid_match(new_session, original)) { return FALSE; }
+	gnc_engine_suspend_events();
+	qecd.param_list = NULL;
+	book = qof_session_get_book(new_session);
+	qecd.new_session = new_session;
+	qof_book_set_partial(book);
+	inst = (QofInstance*)qof_object_new_instance(original->e_type, book);
+	qecd.to = &inst->entity;
+	qecd.from = original;
+	qof_entity_set_guid(qecd.to, qof_entity_get_guid(original));
+	qof_begin_edit(inst);
+	qof_class_param_foreach(original->e_type, qof_entity_param_cb, &qecd);
+	qof_commit_edit(inst);
+	if(g_slist_length(qecd.param_list) == 0) { return FALSE; }
+	g_slist_foreach(qecd.param_list, qof_entity_foreach_copy, &qecd);
+	g_slist_free(qecd.param_list);
+	gnc_engine_resume_events();
+	return TRUE;
+}
+
+gboolean qof_entity_copy_list(QofSession *new_session, GList *entity_list)
+{
+	QofEntityCopyData *qecd;
+
+	if(!new_session || !entity_list) { return FALSE; }
+	ENTER (" list=%d", g_list_length(entity_list));
+	qecd = g_new0(QofEntityCopyData, 1);
+	gnc_engine_suspend_events();
+	qecd->param_list = NULL;
+	qecd->new_session = new_session;
+	qof_book_set_partial(qof_session_get_book(new_session));
+	g_list_foreach(entity_list, qof_entity_list_foreach, qecd);
+	gnc_engine_resume_events();
+	g_free(qecd);
+	LEAVE (" ");
+	return TRUE;
+}
+
+gboolean qof_entity_copy_coll(QofSession *new_session, QofCollection *entity_coll)
+{
+	QofEntityCopyData qecd;
+
+	gnc_engine_suspend_events();
+	qecd.param_list = NULL;
+	qecd.new_session = new_session;
+	qof_book_set_partial(qof_session_get_book(qecd.new_session));
+	qof_collection_foreach(entity_coll, qof_entity_coll_foreach, &qecd);
+	qof_class_param_foreach(qof_collection_get_type(entity_coll), qof_entity_param_cb, &qecd);
+	qof_collection_foreach(entity_coll, qof_entity_coll_copy, &qecd);
+	if(qecd.param_list != NULL) { g_slist_free(qecd.param_list); }
+	gnc_engine_resume_events();
+	return TRUE;
+}
+
+struct recurse_s
+{
+	QofSession *session;
+	gboolean   success;
+	GList      *ref_list;
+	GList      *ent_list;
+};
+
+static void
+recurse_collection_cb (QofEntity *ent, gpointer user_data)
+{
+	struct recurse_s *store;
+
+	if(user_data == NULL) { return; }
+	store = (struct recurse_s*)user_data;
+	if(!ent || !store) { return; }
+	store->success = qof_entity_copy_to_session(store->session, ent);
+	if(store->success) {
+	store->ent_list = g_list_append(store->ent_list, ent);
+	}
+}
 
-/* Specify a library, and a function name. Load the library, 
- * call the function name in the library.  */
 static void
-load_backend_library (const char * libso, const char * loadfn)
+recurse_ent_cb(QofEntity *ent, gpointer user_data)
 {
-	void (*initfn) (void);
-	void *dl_hand = dlopen (libso, RTLD_LAZY);
-	if (NULL == dl_hand)
+	GList      *ref_list, *i, *j, *ent_list, *child_list;
+	QofParam   *ref_param;
+	QofEntity  *ref_ent, *child_ent;
+	QofSession *session;
+	struct recurse_s *store;
+	gboolean   success;
+
+	if(user_data == NULL) { return; }
+	store = (struct recurse_s*)user_data;
+	session = store->session;
+	success = store->success;
+	ref_list = NULL;
+	child_ent = NULL;
+	ref_list = g_list_copy(store->ref_list);
+	if((!session)||(!ent)) { return; }
+	ent_list = NULL;
+	child_list = NULL;
+	i = NULL;
+	j = NULL;
+	for(i = ref_list; i != NULL; i=i->next)
 	{
-		const char * err_str = dlerror();
-		PERR("Can't load %s backend, %s\n", libso, err_str);
-		return;
+		if(i->data == NULL) { continue; }
+		ref_param = (QofParam*)i->data;
+		if(ref_param->param_name == NULL) { continue; }
+		if(ref_param->param_type == QOF_TYPE_COLLECT) {
+			QofCollection *col;
+			col = ref_param->param_getfcn(ent, ref_param);
+			qof_collection_foreach(col, recurse_collection_cb, store);
+			continue;
+		}
+		ref_ent = (QofEntity*)ref_param->param_getfcn(ent, ref_param);
+		if((ref_ent)&&(ref_ent->e_type))
+		{
+			store->success = qof_entity_copy_to_session(session, ref_ent);
+			if(store->success) { ent_list = g_list_append(ent_list, ref_ent); }
+		}
 	}
-	initfn = dlsym (dl_hand, loadfn);
-	if (initfn)
+	for(i = ent_list; i != NULL; i = i->next)
 	{
-		 (*initfn)();
+		if(i->data == NULL) { continue; }
+		child_ent = (QofEntity*)i->data;
+		if(child_ent == NULL) { continue; }
+		ref_list = qof_class_get_referenceList(child_ent->e_type);
+		for(j = ref_list; j != NULL; j = j->next)
+		{
+			if(j->data == NULL) { continue; }
+			ref_param = (QofParam*)j->data;
+			ref_ent = ref_param->param_getfcn(child_ent, ref_param);
+			if(ref_ent != NULL)
+			{
+				success = qof_entity_copy_to_session(session, ref_ent);
+				if(success) { child_list = g_list_append(child_list, ref_ent); }
+			}
+		}
 	}
-	else
+	for(i = child_list; i != NULL; i = i->next)
 	{
-		const char * err_str = dlerror();
-		PERR("Can't find %s:%s, %s\n", libso, loadfn, err_str);
+		if(i->data == NULL) { continue; }
+		ref_ent = (QofEntity*)i->data;
+		if(ref_ent == NULL) { continue; }
+		ref_list = qof_class_get_referenceList(ref_ent->e_type);
+		for(j = ref_list; j != NULL; j = j->next)
+		{
+			if(j->data == NULL) { continue; }
+			ref_param = (QofParam*)j->data;
+			child_ent = ref_param->param_getfcn(ref_ent, ref_param);
+			if(child_ent != NULL)
+			{
+				qof_entity_copy_to_session(session, child_ent);
+			}
+		}
 	}
 }
 
+gboolean
+qof_entity_copy_coll_r(QofSession *new_session, QofCollection *coll)
+{
+	struct recurse_s store;
+	gboolean success;
+
+	if((!new_session)||(!coll)) { return FALSE; }
+	store.session = new_session;
+	success = TRUE;
+	store.success = success;
+	store.ent_list = NULL;
+	store.ref_list = qof_class_get_referenceList(qof_collection_get_type(coll));
+	success = qof_entity_copy_coll(new_session, coll);
+	if(success){ qof_collection_foreach(coll, recurse_ent_cb, &store); }
+	return success;
+}
+
+gboolean qof_entity_copy_one_r(QofSession *new_session, QofEntity *ent)
+{
+	struct recurse_s store;
+	QofCollection *coll;
+	gboolean success;
+
+	if((!new_session)||(!ent)) { return FALSE; }
+	store.session = new_session;
+	success = TRUE;
+	store.success = success;
+	store.ref_list = qof_class_get_referenceList(ent->e_type);
+	success = qof_entity_copy_to_session(new_session, ent);
+	if(success == TRUE) {
+		coll = qof_book_get_collection(qof_session_get_book(new_session), ent->e_type);
+		qof_collection_foreach(coll, recurse_ent_cb, &store);
+	}
+	return success;
+}
+
+
+/* ====================================================================== */
+
+/* Programs that use their own backends also need to call
+the default QOF ones. The backends specified here are
+loaded only by applications that do not have their own. */
+struct backend_providers
+{
+	const char *libdir;
+	const char *filename;
+	const char *init_fcn;
+};
+
+/* All available QOF backends need to be described here
+and the last entry must be three NULL's.
+Remember: Use the libdir from the current build environment
+and use the .la NOT the .so - .so is not portable! */
+struct backend_providers backend_list[] = {
+	{ QOF_LIB_DIR, "libqof-backend-qsf.la", "qsf_provider_init" },
+#ifdef HAVE_DWI
+	{ QOF_LIB_DIR, "libqof_backend_dwi.la", "dwiend_provider_init" },
+#endif
+	{ NULL, NULL, NULL }
+};
+
 static void
 qof_session_load_backend(QofSession * session, char * access_method)
 {
 	GSList *p;
 	GList *node;
-	ENTER (" ");
-
-	/* If the provider list is null, try to register the 'well-known'
-	 *  backends. Right now, there's only one. */
+	QofBackendProvider *prov;
+	QofBook *book;
+	char *msg;
+	gint num;
+	gboolean prov_type;
+	gboolean (*type_check) (const char*);
+	
+	ENTER (" list=%d", g_slist_length(provider_list));
+	prov_type = FALSE;
 	if (NULL == provider_list)
 	{
-		load_backend_library ("libqof_backend_dwi.so", "dwiend_provider_init");
+		for (num = 0; backend_list[num].filename != NULL; num++) {
+			if(!qof_load_backend_library(backend_list[num].libdir,
+				backend_list[num].filename, backend_list[num].init_fcn))
+			{
+				PWARN (" failed to load %s from %s using %s",
+				backend_list[num].filename, backend_list[num].libdir,
+				backend_list[num].init_fcn);
+			}
+		}
 	}
-
-	for (p = provider_list; p; p=p->next)
+	p = g_slist_copy(provider_list);
+	while(p != NULL)
 	{
-		QofBackendProvider *prov = p->data;
-
+		prov = p->data;
 		/* Does this provider handle the desired access method? */
 		if (0 == strcasecmp (access_method, prov->access_method))
 		{
-			if (NULL == prov->backend_new) continue;
-
+			/* More than one backend could provide this
+			access method, check file type compatibility. */
+			type_check = (gboolean (*)(const char*)) prov->check_data_type;
+			prov_type = (type_check)(session->book_id);
+			if(!prov_type)
+			{
+				PINFO(" %s not usable", prov->provider_name);
+				p = p->next;
+				continue;
+			}
+			PINFO (" selected %s", prov->provider_name);
+			if (NULL == prov->backend_new) 
+			{
+				p = p->next;
+				continue;
+			}
 			/* Use the providers creation callback */
-      	session->backend = (*(prov->backend_new))();
-
+      	    session->backend = (*(prov->backend_new))();
+			session->backend->provider = prov;
 			/* Tell the books about the backend that they'll be using. */
 			for (node=session->books; node; node=node->next)
 			{
-				QofBook *book = node->data;
+				book = node->data;
 				qof_book_set_backend (book, session->backend);
 			}
+			LEAVE (" ");
 			return;
 		}
+		p = p->next;
 	}
-
-	qof_session_push_error (session, ERR_BACKEND_NO_HANDLER, NULL);
+	msg = g_strdup_printf("failed to load '%s' using access_method", access_method);
+	qof_session_push_error (session, ERR_BACKEND_NO_HANDLER, msg);
 	LEAVE (" ");
 }
-#endif /* GNUCASH */
 
 /* ====================================================================== */
 
@@ -435,7 +910,9 @@
 qof_session_begin (QofSession *session, const char * book_id, 
                    gboolean ignore_lock, gboolean create_if_nonexistent)
 {
-  char * p;
+  char *p, *access_method, *msg;
+  int err;
+
   if (!session) return;
 
   ENTER (" sess=%p ignore_lock=%d, book-id=%s", 
@@ -474,7 +951,7 @@
   p = strchr (book_id, ':');
   if (p)
   {
-    char * access_method = g_strdup (book_id);
+    access_method = g_strdup (book_id);
     p = strchr (access_method, ':');
     *p = 0;
     qof_session_load_backend(session, access_method);
@@ -498,8 +975,6 @@
   /* If there's a begin method, call that. */
   if (session->backend->session_begin)
   {
-      int err;
-      char * msg;
       
       (session->backend->session_begin)(session->backend, session,
                                   session->book_id, ignore_lock,
@@ -512,7 +987,7 @@
           g_free(session->book_id);
           session->book_id = NULL;
           qof_session_push_error (session, err, msg);
-          LEAVE("backend error %d", err);
+          LEAVE(" backend error %d %s", err, msg);
           return;
       }
       if (msg != NULL) 
@@ -532,85 +1007,85 @@
 qof_session_load (QofSession *session,
                   QofPercentageFunc percentage_func)
 {
-  QofBook *newbook;
-  QofBookList *oldbooks, *node;
-  QofBackend *be;
-  QofBackendError err;
-
-  if (!session) return;
-  if (!session->book_id) return;
-
-  ENTER ("sess=%p book_id=%s", session, session->book_id
-         ? session->book_id : "(null)");
-
-
-  /* At this point, we should are supposed to have a valid book 
-   * id and a lock on the file. */
-
-  oldbooks = session->books;
-
-  /* XXX why are we creating a book here? I think the books
-   * need to be handled by the backend ... especially since 
-   * the backend may need to load multiple books ... XXX. FIXME.
-   */
-  newbook = qof_book_new();
-  session->books = g_list_append (NULL, newbook);
-  PINFO ("new book=%p", newbook);
-
-  qof_session_clear_error (session);
-
-  /* This code should be sufficient to initialize *any* backend,
-   * whether http, postgres, or anything else that might come along.
-   * Basically, the idea is that by now, a backend has already been
-   * created & set up.  At this point, we only need to get the
-   * top-level account group out of the backend, and that is a
-   * generic, backend-independent operation.
-   */
-  be = session->backend;
-  qof_book_set_backend(newbook, be);
-
-  /* Starting the session should result in a bunch of accounts
-   * and currencies being downloaded, but probably no transactions;
-   * The GUI will need to do a query for that.
-   */
-  if (be)
-  {
-      be->percentage = percentage_func;
-
-      if (be->load) 
-      {
-          be->load (be, newbook);
-          qof_session_push_error (session, qof_backend_get_error(be), NULL);
-      }
-  }
-
-  /* XXX if the load fails, then we try to restore the old set of books;
-   * however, we don't undo the session id (the URL).  Thus if the 
-   * user attempts to save after a failed load, they weill be trying to 
-   * save to some bogus URL.   This is wrong. XXX  FIXME.
-   */
-  err = qof_session_get_error(session);
-  if ((err != ERR_BACKEND_NO_ERR) &&
-      (err != ERR_FILEIO_FILE_TOO_OLD) &&
-      (err != ERR_SQL_DB_TOO_OLD))
-  {
-      /* Something broke, put back the old stuff */
-      qof_book_set_backend (newbook, NULL);
-      qof_book_destroy (newbook);
-      g_list_free (session->books);
-      session->books = oldbooks;
-      LEAVE("error from backend %d", qof_session_get_error(session));
-      return;
-  }
+	QofBook *newbook, *ob;
+	QofBookList *oldbooks, *node;
+	QofBackend *be;
+	QofBackendError err;
+	
+	if (!session) return;
+	if (!session->book_id) return;
+	
+	ENTER ("sess=%p book_id=%s", session, session->book_id
+		 ? session->book_id : "(null)");
+	
+	/* At this point, we should are supposed to have a valid book 
+	* id and a lock on the file. */
+	
+	oldbooks = session->books;
+	
+	/* XXX why are we creating a book here? I think the books
+	* need to be handled by the backend ... especially since 
+	* the backend may need to load multiple books ... XXX. FIXME.
+	*/
+	newbook = qof_book_new();
+	session->books = g_list_append (NULL, newbook);
+	PINFO ("new book=%p", newbook);
+	
+	qof_session_clear_error (session);
+	
+	/* This code should be sufficient to initialize *any* backend,
+	* whether http, postgres, or anything else that might come along.
+	* Basically, the idea is that by now, a backend has already been
+	* created & set up.  At this point, we only need to get the
+	* top-level account group out of the backend, and that is a
+	* generic, backend-independent operation.
+	*/
+	be = session->backend;
+	qof_book_set_backend(newbook, be);
+	
+	/* Starting the session should result in a bunch of accounts
+	* and currencies being downloaded, but probably no transactions;
+	* The GUI will need to do a query for that.
+	*/
+	if (be)
+	{
+		be->percentage = percentage_func;
+		
+		if (be->load) 
+		{
+			be->load (be, newbook);
+			qof_session_push_error (session, qof_backend_get_error(be), NULL);
+		}
+	}
 
-  for (node=oldbooks; node; node=node->next)
-  {
-     QofBook *ob = node->data;
-     qof_book_set_backend (ob, NULL);
-     qof_book_destroy (ob);
-  }
+	/* XXX if the load fails, then we try to restore the old set of books;
+	* however, we don't undo the session id (the URL).  Thus if the 
+	* user attempts to save after a failed load, they weill be trying to 
+	* save to some bogus URL.   This is wrong. XXX  FIXME.
+	*/
+	err = qof_session_get_error(session);
+	if ((err != ERR_BACKEND_NO_ERR) &&
+		(err != ERR_FILEIO_FILE_TOO_OLD) &&
+		(err != ERR_SQL_DB_TOO_OLD))
+	{
+		/* Something broke, put back the old stuff */
+		qof_book_set_backend (newbook, NULL);
+		qof_book_destroy (newbook);
+		g_list_free (session->books);
+		session->books = oldbooks;
+		LEAVE("error from backend %d", qof_session_get_error(session));
+		return;
+	}
 
-  LEAVE ("sess = %p, book_id=%s", session, session->book_id
+	for (node=oldbooks; node; node=node->next)
+	{
+		ob = node->data;
+		qof_book_set_backend (ob, NULL);
+		qof_book_destroy (ob);
+	}
+        /* Um, I think we're leaking the oldbooks list. */
+	
+	LEAVE ("sess = %p, book_id=%s", session, session->book_id
          ? session->book_id : "(null)");
 }
 
@@ -635,17 +1110,6 @@
     if (ERR_BACKEND_NO_ERR != err)
     {
         qof_session_push_error (session, err, NULL);
-      
-        /* We close the backend here ... isn't this a bit harsh ??? 
-         * Actually, yes, it is harsh, and causes bug #117657,
-         * so let's NOT end the session just because it failed to save.
-         */
-#if cause_crash_when_saves_fail
-        if (be->session_end)
-        {
-            (be->session_end)(be);
-        }
-#endif
         return TRUE;
     }
     return FALSE;
@@ -655,92 +1119,146 @@
 qof_session_save (QofSession *session,
                   QofPercentageFunc percentage_func)
 {
-  GList *node;
-  QofBackend *be;
-
-  if (!session) return;
-
-  ENTER ("sess=%p book_id=%s", 
-         session, session->book_id ? session->book_id : "(null)");
-
-  /* If there is a backend, and the backend is reachable
-   * (i.e. we can communicate with it), then synchronize with 
-   * the backend.  If we cannot contact the backend (e.g.
-   * because we've gone offline, the network has crashed, etc.)
-   * then give the user the option to save to the local disk. 
-   *
-   * hack alert -- FIXME -- XXX the code below no longer
-   * does what the words above say.  This needs fixing.
-   */
-  be = session->backend;
-  if (be)
-  {
-    for (node = session->books; node; node=node->next)
-    {
-      QofBook *abook = node->data;
-
-      /* if invoked as SaveAs(), then backend not yet set */
-      qof_book_set_backend (abook, be);
-      be->percentage = percentage_func;
-  
-      if (be->sync)
-      {
-        (be->sync)(be, abook);
-        if (save_error_handler(be, session)) return;
-      }
-    }
-    
-    /* If we got to here, then the backend saved everything 
-     * just fine, and we are done. So return. */
-    qof_session_clear_error (session);
-    LEAVE("Success");
-    return;
-  } 
-
-  LEAVE("error -- No backend!");
-}
-
-/* ====================================================================== */
-/* XXX This exports the list of accounts to a file.  It does not export
- * any transactions.  Its a place-holder until full book-closing is implemented.
- */
-
-#ifdef GNUCASH_MAJOR_VERSION
-
-gboolean
-qof_session_export (QofSession *tmp_session,
-                    QofSession *real_session,
-                    QofPercentageFunc percentage_func)
-{
-  QofBook *book;
-  QofBackend *be;
-
-  if ((!tmp_session) || (!real_session)) return FALSE;
-
-  book = qof_session_get_book (real_session);
-  ENTER ("tmp_session=%p real_session=%p book=%p book_id=%s", 
-         tmp_session, real_session, book,
-         tmp_session -> book_id
-         ? tmp_session->book_id : "(null)");
-
-  /* There must be a backend or else.  (It should always be the file
-   * backend too.)
-   */
-  be = tmp_session->backend;
-  if (!be)
-    return FALSE;
-
-  be->percentage = percentage_func;
-  if (be->export)
-    {
-
-      (be->export)(be, book);
-      if (save_error_handler(be, tmp_session)) return FALSE;
-    }
-
-  return TRUE;
+	GList *node;
+	QofBackend *be;
+	gboolean partial, change_backend;
+	QofBackendProvider *prov;
+	GSList *p;
+	QofBook *book, *abook;
+	int err;
+	gint num;
+	char *msg, *book_id;
+	
+	if (!session) return;
+	ENTER ("sess=%p book_id=%s", 
+		 session, session->book_id ? session->book_id : "(null)");
+	/* Partial book handling. */
+	book = qof_session_get_book(session);
+	partial = (gboolean)GPOINTER_TO_INT(qof_book_get_data(book, PARTIAL_QOFBOOK));
+	change_backend = FALSE;
+	msg = g_strdup_printf(" ");
+	book_id = g_strdup(session->book_id);
+	if(partial == TRUE)
+	{
+		if(session->backend && session->backend->provider) {
+			prov = session->backend->provider;
+			if(TRUE == prov->partial_book_supported)
+			{
+				/* if current backend supports partial, leave alone. */
+				change_backend = FALSE;
+			}
+			else { change_backend = TRUE; }
+		}
+		/* If provider is undefined, assume partial not supported. */
+		else { change_backend = TRUE; }
+	}
+	if(change_backend == TRUE)
+	{
+		qof_session_destroy_backend(session);
+		if (NULL == provider_list)
+		{
+			for (num = 0; backend_list[num].filename != NULL; num++) {
+				qof_load_backend_library(backend_list[num].libdir,
+					backend_list[num].filename, backend_list[num].init_fcn);
+			}
+		}
+		p = g_slist_copy(provider_list);
+		while(p != NULL)
+		{
+			prov = p->data;
+			if(TRUE == prov->partial_book_supported)
+			{
+			/** \todo check the access_method too, not in scope here, yet. */
+			/*	if((TRUE == prov->partial_book_supported) && 
+			(0 == strcasecmp (access_method, prov->access_method)))
+			{*/
+				if (NULL == prov->backend_new) continue;
+				/* Use the providers creation callback */
+				session->backend = (*(prov->backend_new))();
+				session->backend->provider = prov;
+				if (session->backend->session_begin)
+				{
+					/* Call begin - backend has been changed,
+					   so make sure a file can be written,
+					   use ignore_lock and create_if_nonexistent */
+					g_free(session->book_id);
+					session->book_id = NULL;
+					(session->backend->session_begin)(session->backend, session,
+						book_id, TRUE, TRUE);
+					PINFO("Done running session_begin on changed backend");
+					err = qof_backend_get_error(session->backend);
+					msg = qof_backend_get_message(session->backend);
+					if (err != ERR_BACKEND_NO_ERR)
+					{
+						g_free(session->book_id);
+						session->book_id = NULL;
+						qof_session_push_error (session, err, msg);
+						LEAVE("changed backend error %d", err);
+						return;
+					}
+					if (msg != NULL) 
+					{
+						PWARN("%s", msg);
+						g_free(msg);
+					}
+				}
+				/* Tell the books about the backend that they'll be using. */
+				for (node=session->books; node; node=node->next)
+				{
+					book = node->data;
+					qof_book_set_backend (book, session->backend);
+				}
+				p = NULL;
+			}
+			if(p) {
+				p = p->next;
+			}
+		}
+		if(!session->backend) 
+		{
+			msg = g_strdup_printf("failed to load backend");
+			qof_session_push_error(session, ERR_BACKEND_NO_HANDLER, msg);
+			return;
+		}
+	}
+	/* If there is a backend, and the backend is reachable
+	* (i.e. we can communicate with it), then synchronize with 
+	* the backend.  If we cannot contact the backend (e.g.
+	* because we've gone offline, the network has crashed, etc.)
+	* then give the user the option to save to the local disk. 
+	*
+	* hack alert -- FIXME -- XXX the code below no longer
+	* does what the words above say.  This needs fixing.
+	*/
+	be = session->backend;
+	if (be)
+	{
+		for (node = session->books; node; node=node->next)
+		{
+			abook = node->data;
+			/* if invoked as SaveAs(), then backend not yet set */
+			qof_book_set_backend (abook, be);
+			be->percentage = percentage_func;
+			if (be->sync)
+			{
+				(be->sync)(be, abook);
+				if (save_error_handler(be, session)) return;
+			}
+		}
+		/* If we got to here, then the backend saved everything 
+		* just fine, and we are done. So return. */
+		/* Return the book_id to previous value. */
+		qof_session_clear_error (session);
+		LEAVE("Success");
+		return;
+	}
+	else
+	{
+		msg = g_strdup_printf("failed to load backend");
+		qof_session_push_error(session, ERR_BACKEND_NO_HANDLER, msg);
+	}
+	LEAVE("error -- No backend!");
 }
-#endif /* GNUCASH_MAJOR_VERSION */
 
 /* ====================================================================== */
 
@@ -781,7 +1299,7 @@
   /* destroy the backend */
   qof_session_destroy_backend(session);
 
-  for (node=session->books; node; node=node->next)
+  for (node = session->books; node; node = node->next)
   {
     QofBook *book = node->data;
     qof_book_set_backend (book, NULL);
@@ -852,48 +1370,4 @@
   return session->backend->process_events (session->backend);
 }
 
-/* ====================================================================== */
-
-#ifdef GNUCASH_MAJOR_VERSION
-
-/* this should go in a separate binary to create a rpc server */
-
-void
-gnc_run_rpc_server (void)
-{
-  const char * dll_err;
-  void * dll_handle;
-  int (*rpc_run)(short);
-  int ret;
- 
-  /* open and resolve all symbols now (we don't want mystery 
-   * failure later) */
-#ifndef RTLD_NOW
-# ifdef RTLD_LAZY
-#  define RTLD_NOW RTLD_LAZY
-# endif
-#endif
-  dll_handle = dlopen ("libgnc_rpc.so", RTLD_NOW);
-  if (! dll_handle) 
-  {
-    dll_err = dlerror();
-    PWARN (" can't load library: %s\n", dll_err ? dll_err : "");
-    return;
-  }
-  
-  rpc_run = dlsym (dll_handle, "rpc_server_run");
-  dll_err = dlerror();
-  if (dll_err) 
-  {
-    dll_err = dlerror();
-    PWARN (" can't find symbol: %s\n", dll_err ? dll_err : "");
-    return;
-  }
-  
-  ret = (*rpc_run)(0);
-
-  /* XXX How do we force an exit? */
-}
-#endif /* GNUCASH_MAJOR_VERSION */
-
 /* =================== END OF FILE ====================================== */
Index: Group.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Group.h,v
retrieving revision 1.75
retrieving revision 1.76
diff -Lsrc/engine/Group.h -Lsrc/engine/Group.h -u -r1.75 -r1.76
--- src/engine/Group.h
+++ src/engine/Group.h
@@ -36,16 +36,13 @@
 #define XACC_ACCOUNT_GROUP_H
 
 #include <glib.h>
-
+#include "qof.h"
 #include "Account.h"
-#include "gnc-engine.h"
-#include "guid.h"
-#include "qofbook.h"
-
 
-/** PROTOTYPES ******************************************************/
-/** @name Constructors, Destructors */
-/** @{ */
+/* PROTOTYPES ******************************************************/
+/** @name Constructors, Destructors 
+ @{
+*/
 /**
  * The xaccMallocAccountGroup() routine will create a new account group.
  *    This is an internal-use function, you almost certainly want to
@@ -90,8 +87,9 @@
 
 /** @} */
 
-/** @name Editing */
-/** @{ */
+/** @name Editing
+ @{
+*/
 /** Start of begine/commit sequence.  All changes to an account 
  *  group should be bracketed by calls to begin-edit/commit-edit
  */
@@ -124,8 +122,9 @@
 void     xaccGroupMarkNotSaved (AccountGroup *grp);
 /** @} */
 
-/** @name Concatenation, Merging */
-/** @{ */
+/** @name Concatenation, Merging
+ @{
+*/
 /**
  * The xaccGroupConcatGroup() subroutine will move (reparent) 
  *    all accounts from the "src" group to the "dest" group,
@@ -167,8 +166,9 @@
 void    xaccAccountInsertSubAccount (Account *parent, Account *child);
 /** @} */
 
-/** @name Counting the Size and Depth of the Account Tree */
-/** @{ */
+/** @name Counting the Size and Depth of the Account Tree
+ @{
+*/
 /** The xaccGroupGetNumSubAccounts() subroutine returns the number
  *    of accounts, including subaccounts, in the account group
  */
@@ -186,8 +186,9 @@
 int     xaccGroupGetDepth (AccountGroup *grp);
 /** @} */
 
-/** @name Getting Accounts and Subaccounts */
-/** @{ */
+/** @name Getting Accounts and Subaccounts
+ @{
+*/
 /** DOCUMENT ME! is this routine deprecated? XXX using index is weird! */
 Account * xaccGroupGetAccount (AccountGroup *group, int index);
 
@@ -220,8 +221,9 @@
 
 /** @} */
 
-/** @name Getting Accounts and Subaccounts by Name */
-/** @{ */
+/** @name Getting Accounts and Subaccounts by Name
+ @{
+*/
 /** The xaccGetAccountFromName() subroutine fetches the
  *    account by name from the collection of accounts
  *    in the indicated AccountGroup group.  It returns NULL if the
@@ -254,8 +256,9 @@
 
 /** @} */
 
-/** @name Traversal, ForEach */
-/** @{ */
+/** @name Traversal, ForEach
+ @{
+*/
 
 typedef  gpointer (*AccountCallback)(Account *a, gpointer data);
 
@@ -266,25 +269,29 @@
       you are done with it.
 */
 AccountList *xaccGroupMapAccounts(AccountGroup *grp,
-                             AccountCallback,
-                             gpointer data);
+                                  AccountCallback func,
+                                  gpointer data);
 
 /** The xaccGroupForEachAccount() method will traverse the AccountGroup
  *    tree, calling 'func' on each account.   Traversal will stop when
- *    func returns a non-null value, and the routine wil return with that 
- *    value.  If 'deeply' is FALSE, then only the immediate children of 
+ *    func returns a non-null value, and the routine will return with that
+ *    value.  Therefore, this function will return null iff func returns
+ *    null for every account.
+ *
+ *    If 'deeply' is FALSE, then only the immediate children of
  *    the account will be traversed.  If TRUE, then the whole tree will
  *    be traversed.
  */
 
 gpointer xaccGroupForEachAccount (AccountGroup *grp,
-                                  AccountCallback,
+                                  AccountCallback func,
                                   gpointer data,
                                   gboolean deeply);
 
 /** @} */
 
-/** @name Staged Traversal 
+/** @name Staged Traversal
+
  * The following functions provide support for "staged traversals"
  * over all of the transactions in an account or group.  The idea
  * is to be able to perform a sequence of traversals ("stages"),
@@ -318,9 +325,9 @@
  *
  * Note that currently, there is a hard limit of 256 stages, which
  * can be changed by enlarging "marker" in the transaction struct.
- * */
-
-/** @{ */
+ *
+ @{
+*/
 /** xaccGroupBeginStagedTransactionTraversals() resets the traversal
  *    marker inside each of all the transactions in the group so that
  *    a new sequence of staged traversals can begin.
@@ -382,7 +389,7 @@
 
 int xaccAccountStagedTransactionTraversal(Account *a,
                                           unsigned int stage,
-                                          TransactionCallback,
+                                          TransactionCallback thunk,
                                           void *data);
 
 /** Traverse all of the transactions in the given account group.
@@ -408,15 +415,14 @@
 
    Note that this routine is just a trivial wrapper for 
    
-   xaccGroupBeginStagedTransactionTraversals(grp);
-   xaccGroupStagedTransactionTraversal(grp, 42, cb, data);
+   xaccGroupBeginStagedTransactionTraversals(g);
+   xaccGroupStagedTransactionTraversal(g, 42, proc, data);
  */
 
 int xaccGroupForEachTransaction(AccountGroup *g, 
-                                TransactionCallback, void *data);
+                                TransactionCallback proc, void *data);
 
 /** @} */
 #endif /* XACC_ACCOUNT_GROUP_H */
 /** @} */
 /** @} */
-
Index: FreqSpecP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/FreqSpecP.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/FreqSpecP.h -Lsrc/engine/FreqSpecP.h -u -r1.7 -r1.8
--- src/engine/FreqSpecP.h
+++ src/engine/FreqSpecP.h
@@ -22,7 +22,7 @@
  *                                                                  *
 \********************************************************************/
 
-/********************************************************************\
+/* *******************************************************************\
 This file contains private definitions and should not be used by
 other parts of the engine. This is private data and is subject to
 change.
@@ -34,30 +34,7 @@
 #define XACC_FREQSPECP_H
 
 #include "FreqSpec.h"
-#include "qofid.h"
 
-/**
- * Scheduled transactions have a frequency defined by a frequency
- * specifier.  This specifier, given a start date, end date [present
- * in the scheduled transaction] and last occurance date [possibly not
- * present] can be used to determine that a s.transaction should be
- * instantiated on a given date [the given query date].
- *
- * There is a split between the UIFreqType and the 'internal' FreqType
- * to reduce the complexity of some of the code involved.
- *
- * Hmmm... having this in the private header file actually prevents
- * client code from allocating this 'class' on the stack.
- * Is that a problem?
- *
- * This still needs to deal with:
- * . exceptions
- * . 13 periods: (4 weeks/period 4x13=52 weeks/year)
- * . yearly 360/365?
- * . re-based frequencies [based around a non-standard [read:
- *   not-Jan-1-based/fiscal] year]
- * . "business days" -- m-f sans holidays [per-user list thereof]
- **/
 struct gncp_freq_spec 
 {
         QofEntity       entity;
@@ -65,13 +42,13 @@
         UIFreqType      uift;
         union u {
                 struct {
-                         /** The date on which the single event occurs. */
+                         /* The date on which the single event occurs. */
                         GDate date;
                 } once;
                 struct {
-                         /** number of days from one repeat to the next. */
+                         /* number of days from one repeat to the next. */
                         guint interval_days;
-                         /** epoch is defined by glib to be 1/1/1. Offset
+                         /* epoch is defined by glib to be 1/1/1. Offset
                              measured in days. 0 <= offset < interval */
                         guint offset_from_epoch;
                 } daily;
@@ -79,16 +56,16 @@
                         /* A week here is measured as 7 days. The first week starts at epoch.
                          * 1/1/1 was a ?. */
 
-                        /** number of weeks from one repeat to the next. */
+                        /* number of weeks from one repeat to the next. */
                         guint interval_weeks;
                          /* offset measured in days.  This combines the week
                           * offset and the day of the week offset.  */
                         guint offset_from_epoch;
-/*                        guint offset_from_epoch;*/ /* offset measured in weeks, 0 <= offset < interval */
-/*                        guint day_of_week;*/ /* I'm not sure what days each value represents, but it's not important. */
+                         /* guint offset_from_epoch;*/ /* offset measured in weeks, 0 <= offset < interval */
+                         /* guint day_of_week;*/ /* I'm not sure what days each value represents, but it's not important. */
                 } weekly;
                 struct {
-                         /** number of months from one repeat to the next. */
+                         /* number of months from one repeat to the next. */
                         guint interval_months;
                          /* offset measured in months */
                         guint offset_from_epoch;
@@ -96,7 +73,7 @@
                         guint day_of_month;
                 } monthly;
                 struct {
-                         /** Number of months from one repeat to the next. */
+                         /* Number of months from one repeat to the next. */
                         guint interval_months;
                          /* offset measured in months */
                         guint offset_from_epoch;
@@ -106,10 +83,12 @@
                         guint occurrence;
                 } month_relative;
                 struct {
-                        /** A list of specs for a composite freq. */
+                        /* A list of specs for a composite freq. */
                         GList *subSpecs;
                 } composites;
         } s;
+        /* temporary storage for QOF */
+        gint            value;
 };
 
 #endif /* XACC_FREQSPECP_H */
Index: gnc-session-scm.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-session-scm.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/engine/gnc-session-scm.h -Lsrc/engine/gnc-session-scm.h -u -r1.4 -r1.5
--- src/engine/gnc-session-scm.h
+++ src/engine/gnc-session-scm.h
@@ -40,7 +40,6 @@
 #define GNC_SESSION_SCM_H
 
 #include <libguile.h>
-#include "guile-mappings.h"
 #include "gnc-engine.h"
 #include "qofsession.h"
 
Index: extensions.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/extensions.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/extensions.txt -Lsrc/engine/extensions.txt -u -r1.6 -r1.7
--- src/engine/extensions.txt
+++ src/engine/extensions.txt
@@ -1,16 +1,16 @@
+/** \page gnucashextension Proposed GnuCash Extensions
 
-Proposed Extensions
--------------------
 The following are proposals for various, as-yet-unimplemented
 enhancements.  The goal of this document is to understand some
 of the changes that will come soon to the interfaces.
 
-Accounting Periods
-------------------
+\section accountperiods Accounting Periods
+
 Acconting periods are implemented by creating an object that
 describes the accounting period, and then assigning every 
 transaction to at least one period.
 
+\verbatim
 typedef struct _accountingPeriod {
         GUID guid;           // id
 	char *name;          // user-selectable name
@@ -19,6 +19,7 @@
 	Timespec * end_date;
         AccountGroup  *topgrp;  // chart of accounts for this period.
 } AccountingPeriod;
+\endverbatim
 
 The Transaction struct has to be extended with a period guid.
 Every transaction can belong to at most one accounting period.
@@ -29,27 +30,24 @@
 closed books.  Basically, a new chart of accounts needs to be written
 out/read from the engine for each new accounting period.
 
-
 The xaccPeriodClose() subroutine performs the following:
--- crawl over all transactions and mark them as being part of this
+- crawl over all transactions and mark them as being part of this
    accounting period (actually, new transactions should by default be
    getting put into the currently open period...)
--- find the equity account (what if there is more than one equity account
+- find the equity account (what if there is more than one equity account
    ?? what if equity has sub-accounts ?? )
--- transfer all income/expense to equity  (shouldn't the equity account
+- transfer all income/expense to equity  (shouldn't the equity account
    match the income/expense heirarchy?)
--- return a new account group with new opening balances ...
-
+- return a new account group with new opening balances ...
 
+\section transactionchanges Changes to Transaction Structure
 
-Changes to Transaction Structure
---------------------------------
 Add an accounting period guid (see above).
 
-Changes to Journal Entry (Split) Structure
-------------------------------------------
-Voucher Reference
------------------
+\section splitchanges Changes to Journal Entry (Split) Structure
+
+\subsection splitvoucher Voucher Reference
+
 Add a char * voucher;  This is a generic id string that somehow
 identifies the piece of paper/electronic document(s) that indicate
 where/how to find the paper trial for this entry.   This list of id's
@@ -58,19 +56,15 @@
 that the user wants to store.  For the SQL backend, this is a key
 to a user-definable table.
 
-====================================================================
-
-Additional Banking Info
+\section bankingchanges Additional Banking Info
 
 BankId -- routing & transit number (US) or Bankleitzan (DE) or Banque (FR)
 BranchID -- Agence (FR), blank for other countries
 
 AcctKey -- Cle (FR), blank in others
 
-
 Account type enumerants:
 bank account types:
     checking, savings, moneymarket, creditline, cma (cash amangement account)
 
-
-
+*/
Index: qof_book_merge.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof_book_merge.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qof_book_merge.h -Lsrc/engine/qof_book_merge.h -u -r1.3 -r1.4
--- src/engine/qof_book_merge.h
+++ src/engine/qof_book_merge.h
@@ -21,13 +21,15 @@
  *                                                                   *
  ********************************************************************/
 
-#define _GNU_SOURCE
 #ifndef QOFBOOKMERGE_H
 #define QOFBOOKMERGE_H
 
-/** @addtogroup QOF
-	@{ */
-/** @addtogroup BookMerge Merging QofBook structures.
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#define QOF_MOD_MERGE "qof-merge"
+
+/** @addtogroup BookMerge
 
 <b>Collision handling principles.</b>\n
 \n
@@ -66,18 +68,19 @@
 pointer to the ::qof_book_mergeData struct - the calling process needs to
 make sure this is non-NULL to know that the Init has been successful.
 
-	@{ */
-/**@file  qof_book_merge.h
-	@brief API for merging two \c QofBook* structures with collision handling
-	@author Copyright (c) 2004 Neil Williams <linux at codehelp.co.uk>
+ @{
+*/
+/** @file  qof_book_merge.h
+    @brief API for merging two \c QofBook structures with collision handling
+    @author Copyright (c) 2004-2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #include <glib.h>
-#include "qof/gnc-engine-util.h"
+#include "gnc-engine-util.h"
 #include "qofbook.h"
 #include "qofclass.h"
 #include "qofobject.h"
-#include "qofinstance-p.h"
+#include "qofinstance.h"
 #include "gnc-trace.h"
 
 /** \brief Results of collisions and user resolution.
@@ -117,17 +120,15 @@
  final commit leaves the existing book completely untouched.
 */
 typedef enum { 
-	MERGE_UNDEF, 		/**< default value before comparison is made. */
-	MERGE_ABSOLUTE, 	/**< GUID exact match, no new data - \b ignore */
-	MERGE_NEW, 			/**< import object does \b not exist in the
-							target book - \b add */
-	MERGE_REPORT, 		/**< import object needs user intervention - \b report */
-	MERGE_DUPLICATE, 	/**< import object with different GUID exactly
-							matches existing GUID - \b ignore */
-	MERGE_UPDATE, 		/**< import object matches an existing entity but 
-							includes new or modified parameter data - \b update */
-	MERGE_INVALID 		/**< import object didn't match registered object
-							or parameter types or user decided to abort - \b abort */
+	MERGE_UNDEF,     /**< default value before comparison is made. */
+	MERGE_ABSOLUTE,  /**< GUID exact match, no new data - \b ignore */
+	MERGE_NEW,       /**< import object does \b not exist in the target book - \b add */
+	MERGE_REPORT,    /**< import object needs user intervention - \b report */
+	MERGE_DUPLICATE, /**< import object with different GUID exactly matches existing GUID - \b ignore */
+	MERGE_UPDATE,    /**< import object matches an existing entity but includes new or 
+                             modified parameter data - \b update */
+	MERGE_INVALID    /**< import object didn't match registered object or parameter 
+                             types or user decided to abort - \b abort */
 }qof_book_mergeResult;
 
 /** \brief One rule per entity, built into a single GList for the entire merge 
@@ -137,7 +138,7 @@
 If the ::GUID matches it's the always same semantic object,
 regardless of whether other data fields are changed.
 \n	
-The boolean value mergeAbsolute defaults to \c FALSE\n
+The boolean value mergeAbsolute defaults to \c FALSE
 
 NOTE 1: if mergeAbsolute == \c TRUE, ::qof_book_mergeResult will still be set to 
 ::MERGE_UPDATE if parameters within this entity have been modified.
@@ -155,15 +156,15 @@
 typedef struct 
 {
 	/* internal counters and reference variables */
-	gboolean mergeAbsolute;			/**< Only set if the GUID of the import matches the target */
-	double difference;				/**< used to find best match in a book where no GUID matches */
-	gboolean updated;				/**< prevent the mergeResult from being overwritten. */
+	gboolean mergeAbsolute;   /**< Only set if the GUID of the import matches the target */
+	double difference;       /**< used to find best match in a book where no GUID matches */
+	gboolean updated;        /**< prevent the mergeResult from being overwritten. */
 	/* rule objects set from or by external calls */
-	QofIdType mergeType;			/**< type of comparison required for check for collision */
-	const char* mergeLabel;			/**< Descriptive label for the object type, useful for the
-											user intervention dialog. */
-	GSList *mergeParam;				/**< list of usable parameters for the object type */
-	GSList *linkedEntList;			/**< list of complex data types included in this object. 
+	QofIdType mergeType;     /**< type of comparison required for check for collision */
+	const char* mergeLabel;  /**< Descriptive label for the object type, useful for the
+                                 user intervention dialog. */
+	GSList *mergeParam;      /**< list of usable parameters for the object type */
+	GSList *linkedEntList;   /**< list of complex data types included in this object. 
 
 	linkedEntList contains an ::QofEntity reference to any parameter that is not
 	one of the core QOF_TYPE data types. This entity must be already registered with QOF
@@ -172,8 +173,8 @@
 	the invoice will be set to MERGE_REPORT and the customer as MERGE_NEW.
 	*/
 	qof_book_mergeResult mergeResult; /**< result of comparison with main ::QofBook */
-	QofEntity *importEnt;			/**< pointer to the current entity in the import book. */
-	QofEntity *targetEnt;			/**< pointer to the corresponding entity in the target book, if any. */
+	QofEntity *importEnt;    /**< pointer to the current entity in the import book. */
+	QofEntity *targetEnt;    /**< pointer to the corresponding entity in the target book, if any. */
 }qof_book_mergeRule;
 
 
@@ -192,28 +193,28 @@
 */
 typedef struct
 {
-	GSList 	*mergeObjectParams;	/**< GSList of ::QofParam details for each parameter in the current object. */
-	GList 	*mergeList;			/**< GList of all ::qof_book_mergeRule rules for the merge operation. */
-	GSList 	*targetList;		/**< GSList of ::QofEntity * for each object of this type in the target book */
-	QofBook *mergeBook;			/**< pointer to the import book for this merge operation. */
-	QofBook *targetBook;		/**< pointer to the target book for this merge operation. */
-	gboolean abort;				/**< set to TRUE if MERGE_INVALID is set. */
+	GSList 	*mergeObjectParams;  /**< GSList of ::QofParam details for each parameter in the current object. */
+	GList 	*mergeList;          /**< GList of all ::qof_book_mergeRule rules for the merge operation. */
+	GSList 	*targetList;         /**< GSList of ::QofEntity * for each object of this type in the target book */
+	QofBook *mergeBook;          /**< pointer to the import book for this merge operation. */
+	QofBook *targetBook;         /**< pointer to the target book for this merge operation. */
+	gboolean abort;	             /**< set to TRUE if MERGE_INVALID is set. */
 	qof_book_mergeRule *currentRule; /**< placeholder for the rule currently being tested or applied. */
-	GSList *orphan_list;			/**< List of QofEntity's that need to be rematched.
+	GSList *orphan_list;         /**< List of QofEntity's that need to be rematched.
 
 	When one QofEntity has a lower difference to the targetEnt than the previous best_match,
 	the new match takes precedence. This list holds those orphaned entities that are not a good
 	enough match so that these can be rematched later. The ranking is handled using
 	the private qof_entity_rating struct and the GHashTable ::qof_book_mergeData::target_table.
 	*/
-	GHashTable *target_table;	/**< The GHashTable to hold the qof_entity_rating values.  */
+	GHashTable *target_table;    /**< The GHashTable to hold the qof_entity_rating values.  */
 
 }qof_book_mergeData;
 
 
 /* ======================================================================== */
-/** @name qof_book_merge API */
-/** @{
+/** @name qof_book_merge API
+ @{
 */
 /** \brief Initialise the qof_book_merge process
 
@@ -312,14 +313,12 @@
 return the two specific entities.
 
 */
-void qof_book_mergeRuleForeach( qof_book_mergeData*,
-								qof_book_mergeRuleForeachCB, 
-								qof_book_mergeResult );
+void qof_book_mergeRuleForeach( qof_book_mergeData* mergeData,
+                                qof_book_mergeRuleForeachCB callback , 
+                                qof_book_mergeResult mergeResult);
 
 /** \brief provides easy string access to parameter data for dialog use
 
-<b>Must only be used for display purposes!</b>
-
 Uses the param_getfcn to retrieve the parameter value as a string, suitable for
 display in dialogs and user intervention output. Within a qof_book_merge context,
 only the parameters used in the merge are available, i.e. parameters where both
@@ -405,15 +404,13 @@
 ::qof_book_merge_abort(mergeData) if non-zero.
 
 @param	mergeData	the merge context, ::qof_book_mergeData*
- at param	resolved	the current rule, ::qof_book_mergeRule*
 @param	tag			the result to attempt to set, ::qof_book_mergeResult
 
 \return -1 if supplied parameters are invalid or NULL, 0 on success.
 		
 */
 qof_book_mergeData*
-qof_book_mergeUpdateResult(qof_book_mergeData *mergeData,
-						qof_book_mergeResult tag);
+qof_book_mergeUpdateResult(qof_book_mergeData *mergeData, qof_book_mergeResult tag);
 
 
 /** \brief Commits the import data to the target book
@@ -459,277 +456,6 @@
 void
 qof_book_merge_abort(qof_book_mergeData *mergeData);
 
-/** @} */
-
-/* ======================================================================== */
-/* Internal callback routines */
-
-/** @name Phase 1: Import book */
-/** @{
-*/
-
-/** \brief Looks up all import objects and calls ::qof_book_mergeCompare for each. 
-
-	This callback is used to obtain a list of all objects and their parameters
-	in the book to be imported.\n
-
-	Called by ::qof_book_mergeForeachType.\n
-	Receives all instances of only those objects that exist in the import book,
-	from ::qof_object_foreach. ::qof_book_mergeData contains a full list of all registered 
-	parameters for each object in the mergeObjectParams GSList. \n
-	Looks up the live parameter data (via ::QofEntity and ::QofParam), creates the rule, 
-	compares the data and stores the result of the comparison.
-
-Process:
-
-	-# Sets default ::qof_book_mergeResult as MERGE_UNDEF - undefined.\n
-	-# Obtains GUID, parameter data, type and rule.
-	-# Compares GUID with original book, sets ::qof_book_mergeData .mergeAbsolute
-	to TRUE if exact match.
-	-# Inserts rule into ::qof_book_mergeData rule list.
-	-# Runs the comparison for that data type using ::qof_book_mergeCompare.
-	
-*/
-void qof_book_mergeForeach (QofEntity* mergeEnt, gpointer mergeData);
-
-/** \brief Registered Object Callback.
-
-	Receives one object at a time from ::qof_object_foreach_type.\n
-	Note: generic type data only, no live data accesses.\n
-	::qof_object_foreach_type called directly by ::qof_book_mergeInit.
-
-	This callback is used to obtain a list of all registered
-	objects, whether or not the objects exist in either the import or
-	original books.\n
-	
-	Invokes the callback ::qof_book_mergeForeach on every instance of a particular object type.
-	The callback will be invoked only for those instances stored in the import book and therefore
-	qof_book_mergeForeach gains the first access to any live data.
-*/
-void qof_book_mergeForeachType (QofObject* merge_obj, gpointer mergeData);
-
-/** \brief Iterates over each parameter name within the selected QofObject.
-
-	 Receives the list of parameter names from ::QofParam and fills the GSList in
-	 ::qof_book_mergeData.\n
-	 No live data access - object typing and parameter listing only.\n
-	 \b Note: This function is called by ::qof_book_mergeForeachType in the comparison
-	 stage and ::qof_book_mergeCommitRuleLoop in the commit stage. Change with care!
-*/
-void qof_book_mergeForeachParam(QofParam* param_name, gpointer mergeData);
-
-/** @} */
-/** @name Phase 2: Target book */
-/** @{
-*/
-
-/** \brief Registered Object Callback for the \b target book.
-
-	Receives one object at a time from ::qof_object_foreach_type.\n
-\n
-	This callback is used to iterate through all the registered
-	objects, in the \b Target book. When the target object type
-	matches the object type of the current import object, calls
-	::qof_book_mergeForeachTarget to store details of the possible target
-	matches in the GSList *targetList in ::qof_book_mergeData .
-	\n
-*/
-void qof_book_mergeForeachTypeTarget ( QofObject* merge_obj, gpointer mergeData);
-
-
-/** \brief Looks up all \b target objects of a specific type.
-
-	This callback is used to obtain a list of all suitable objects and their parameters
-	in the \b target book.\n
-\n
-	Called by ::qof_book_mergeForeachTypeTarget.\n
-	Receives all instances of only those objects that exist in the target book,
-	that match the object type of the current \b import object.
-	This is done when there is no GUID match and there is no way to know if
-	a corresponding object exists in the target book that would conflict with the
-	data in the import object.
-\n
-	Stores details of the QofEntity* of each suitable object in the target book
-	for later comparison by ::qof_book_mergeCompare .
-	
-*/
-void qof_book_mergeForeachTarget (QofEntity* mergeEnt, gpointer mergeData);
-
-/** \brief build the table of target comparisons
-
-This can get confusing, so bear with me. (!)
-
-Whilst iterating through the entities in the mergeBook, qof_book_mergeForeach assigns
-a targetEnt to each mergeEnt (until it runs out of targetEnt or mergeEnt). Each match
-is made against the one targetEnt that best matches the mergeEnt. Fine so far.
-
-Any mergeEnt is only ever assigned a targetEnt if the calculated difference between
-the two is less than the difference between that targetEnt and any previous mergeEnt
-match.
-
-The next mergeEnt may be a much better match for that targetEnt and the target_table
-is designed to solve the issues that result from this conflict. The previous match
-must be re-assigned because if two mergeEnt's are matched with only one targetEnt,
-data loss \b WILL follow. Equally, the current mergeEnt must replace the previous
-one as it is a better match. qof_entity_rating holds the details required to identify
-the correct mergeEnt to be re-assigned and these mergeEnt entities are therefore
-orphaned - to be re-matched later.
-
-Meanwhile, the current mergeEnt is entered into target_table with it's difference and
-rule data, in case an even better match is found later in the mergeBook.
-
-Finally, each mergeEnt in the orphan_list is now put through the comparison again.
-	
-*/
-gboolean qof_book_merge_rule_cmp(gconstpointer a, gconstpointer b);
-
-/** \brief Recursively matches orphaned entities
-
-Any entities from the import book that were superceded by a better match are
-retained in the mergeData orphan_list. This function processes each one
-and finds the best remaining match and adds the rule back to the
-::qof_book_mergeData::mergeList 
-until ::qof_book_mergeData::orphan_list is empty.
-
-*/
-void qof_book_merge_match_orphans(qof_book_mergeData *mergeData);
-
-/** @} */
-/** @name Phase 3: User Intervention
-*/
-/** @{
-*/
-
-/** \brief Iterates over the rules and declares the number of rules left to match
-
-	The second argument is a guint holding the remainder which might be
-	useful for progress feedback in the GUI. 
-*/
-void qof_book_mergeRuleCB(gpointer, gpointer);
-
-/** @} */
-/** @name Phase 4: Commit import to target book
-*/
-/** @{
-*/
-
-/** \brief Separates the rules according to the comparison results.
-
-	Used to create a list of all rules that match a particular ::qof_book_mergeResult.
-	Intended for ::MERGE_NEW and ::MERGE_UPDATE, it can be used for ::MERGE_ABSOLUTE or
-	::MERGE_DUPLICATE if you want to maybe report on what will be ignored in the import.
-	
-	It can \b NOT be used for ::MERGE_UNDEF, ::MERGE_INVALID or ::MERGE_REPORT.
-*/
-void qof_book_mergeCommitForeach (
-				qof_book_mergeRuleForeachCB cb, 
-				qof_book_mergeResult mergeResult,
-				qof_book_mergeData *mergeData );
-
-/** \brief Iterates over the rules and declares the number of rules left to commit
-
-	The second argument is a guint holding the remainder which might be
-	useful for progress feedback in the GUI. 
-
-*/
-void qof_book_mergeCommitForeachCB(gpointer, gpointer);
-
-/** \brief Commit the data from the import to the target QofBook.
-
-	Called by ::qof_book_mergeCommit to commit data from each rule in turn.
-	Uses QofParam->param_getfcn - ::QofAccessFunc to query the import book
-	and param_setfcn - ::QofSetterFunc to update the target book.
-\n	
-	Note: Not all param_getfcn can have a matching param_setfcn.
-	Getting the balance of an account is obviously necessary to other routines
-	but is pointless in a comparison for a merge - the balance is calculated from
-	transactions, it cannot be set by the account. A discrepancy in the calculated
-	figures for an account object should not cause a MERGE_REPORT.
-\n
- 	Limits the comparison routines to only calling param_getfcn if 
-	param_setfcn is not NULL. 
-	
-*/
-
-void qof_book_mergeCommitRuleLoop(qof_book_mergeData *mergeData, 
-									qof_book_mergeRule *rule, 
-									guint remainder);
-
-/** @} */
-
-
-/** @name Comparison and Rule routines
-*/
-/** @{
-*/
-
-/** \brief Set the ::qof_book_mergeResult for each QofIdType parameter, using ::GUID if any.
-
-\n
-GUID's used in comparisons of entities and instances.
-
-If there is no GUID match, \a mergeData->mergeAbsolute will be set to FALSE.
-::qof_book_mergeCompare will receive a GSList of ::QofEntity * targets instead of one
-unique match and will iterate through the parameter comparisons for each member of 
-the GSList *targetList.
-
-Sets function pointers to the parameter_getter and parameter_setter routines from 
-::QofParam *mergeObjectParams and matches the comparison to the incoming data type:\n
-
- at param mergeRule - contains the GUID, the import book reference, ::QofIdType of the object 
-that contains the parameter and mergeResult.
-
-\return -1 in case of error, otherwise 0.
-
-*/
-int 
-qof_book_mergeCompare( qof_book_mergeData* );
-
-/** \brief Makes the decisions about how matches and conflicts are tagged.
-
-Paramater Type Weighting is used via the gint argument. This is used to give
-priority to string matches over boolean or numerical matches. Higher values
-of weight decrease the likelihood of that entity being the best match.
-
-New rules start at:
-	- ::MERGE_ABSOLUTE\n 
-		(GUID's match; first parameter matches) OR
-	- ::MERGE_DUPLICATE\n
-		(GUID's do NOT match; first parameter DOES match) OR
-	- ::MERGE_NEW\n
-	(GUID's do NOT match; first parameters does NOT match).
-	
-If subsequent parameters in the same object FAIL a match:
-	- \a MERGE_ABSOLUTE fallsback to ::MERGE_UPDATE \n
-		(GUID matches but some parameters differ)\n
-		(guidTarget will be updated with mergeEnt)
-	- \a MERGE_DUPLICATE fallsback to ::MERGE_REPORT\n
-		(GUID does not match and some parameters do NOT match)
-	- \a MERGE_NEW fallsback to \a MERGE_REPORT
-		(GUID does not match and some parameters now DO match)
-
-<b>Comparisons without a GUID match.</b>
-	Only sets a failed match if ALL parameters fail to match.
-	When absolute is FALSE, all suitable target objects are compared.
-
-	Identifies the closest match using a difference rank. This avoids 
-	using non-generic tests for object similarities. The
-	value closest to zero is used.
-	
-	qof_book_merge use sa high value of weight to make a good match
-	more important and make it more likely that the chosen target will
-	have matching values for the types with the highest weight.
-
- at param	currentRule - the ::qof_book_mergeRule to update.
- at param	mergeMatch	- whether the two entities match or not
- at param	weight		- Parameter Type Weighting.
-
- at return 	returns the qof_book_mergeRule.
-
-*/
-qof_book_mergeRule*
-qof_book_mergeUpdateRule( qof_book_mergeRule *currentRule, gboolean mergeMatch, gint weight);
-
+#endif // QOFBOOKMERGE_H
 /** @} */
 /** @} */
-#endif // QOFBOOKMERGE_H
Index: policy.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/policy.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/engine/policy.c -Lsrc/engine/policy.c -u -r1.8 -r1.9
--- src/engine/policy.c
+++ src/engine/policy.c
@@ -20,7 +20,7 @@
 \********************************************************************/
 
 /** @file policy.c
- *  @breif Implement FIFO Accounting Policy.
+ *  @brief Implement FIFO Accounting Policy.
  *  @author Created by Linas Vepstas August 2003
  *  @author Copyright (c) 2003,2004 Linas Vepstas <linas at linas.org>
  *
@@ -40,11 +40,10 @@
 #include "gnc-engine.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
-#include "gnc-trace.h"
 #include "policy.h"
 #include "policy-p.h"
 
-/* static short module = MOD_LOT; */
+//static QofLogModule log_module = GNC_MOD_LOT;
 
 static Split * 
 DirectionPolicyGetSplit (GNCPolicy *pcy, GNCLot *lot, short reverse)
Index: qofquery-serialize.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery-serialize.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/qofquery-serialize.c -Lsrc/engine/qofquery-serialize.c -u -r1.2 -r1.3
--- src/engine/qofquery-serialize.c
+++ src/engine/qofquery-serialize.c
@@ -53,7 +53,7 @@
 #define PUT_INT64(TOK,VAL) {                         \
    xmlNodePtr node;                                  \
    char buff[80];                                    \
-   g_snprintf (buff, sizeof(buff), "%lld", (VAL));   \
+   g_snprintf (buff, sizeof(buff), "%" G_GINT64_FORMAT, (VAL));   \
    node = xmlNewNode (NULL, TOK);                    \
    xmlNodeAddContent(node, buff);                    \
    xmlAddChild (topnode, node);                      \
@@ -282,7 +282,7 @@
 		pdata_d = (query_date_t) pd;
 		
 		PUT_MATCH2("qofquery:date-match", pdata_d->options,
-		                 DATE_MATCH, NORMAL, ROUNDED);
+		                 DATE_MATCH, NORMAL, DAY);
 
 		PUT_DATE ("qofquery:date", pdata_d->date);
 		return topnode;
Index: guid.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/guid.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/engine/guid.h -Lsrc/engine/guid.h -u -r1.23 -r1.24
--- src/engine/guid.h
+++ src/engine/guid.h
@@ -118,7 +118,7 @@
  * Note that while guid's are generated randomly, the odds of this 
  * routine returning a non-unique id are astronomically small.
  * (Literally astronomically: If you had Cray's on every solar
- * system in the universe running for the entire age of teh universe,
+ * system in the universe running for the entire age of the universe,
  * you'd still have less than a one-in-a-million chance of coming up 
  * with a duplicate id.  2^128 == 10^38 is a really really big number.)
  */
@@ -127,13 +127,19 @@
 /** Generate a new id. If no initialization function has been called,
  *  guid_init() will be called before the id is created.
  *
- *  @return guid A pointer to a data structure contaiing a new GUID.
+ *  @return guid A pointer to a data structure containing a new GUID.
  *  The memory pointed to is owned by this routine and the guid must
- *  be copied out.
+ *  be copied out. 
+ * 
+ *  CAS: huh? make that: @return guid A data structure containing a newly
+ * allocated GUID.  Caller is responsible for calling guid_free().
  */
 GUID guid_new_return(void);
 
 /** Returns a GUID which is guaranteed to never reference any entity. */
+/* CAS: AFAICT: this isn't really guaranteed, but it's only as likely
+   as any other md5 collision. This could be guaranteed if GUID
+   contained a validity flag. */
 const GUID * guid_null (void);
 
 /** Efficiently allocate & free memory for GUIDs */
Index: gnc-engine.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/engine/gnc-engine.c -Lsrc/engine/gnc-engine.c -u -r1.25 -r1.26
--- src/engine/gnc-engine.c
+++ src/engine/gnc-engine.c
@@ -24,27 +24,31 @@
 #include "config.h"
 
 #include <glib.h>
-
+#include <dlfcn.h>
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-
+#include "qof.h"
+#include "cashobjects.h"
 #include "AccountP.h"
 #include "GroupP.h"
 #include "SX-book-p.h"
+#include "gnc-budget.h"
 #include "TransactionP.h"
 #include "gnc-commodity.h"
 #include "gnc-lot-p.h"
+#include "SchedXactionP.h"
+#include "FreqSpecP.h"
 #include "gnc-pricedb-p.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofid.h"
-#include "qofobject.h"
-#include "qofobject-p.h"
-#include "qofquery.h" 
-#include "qofquery-p.h" 
+
+/** gnc file backend library name */
+#define GNC_LIB_NAME "libgnc-backend-file.la"
+/** init_fcn for gnc file backend library. */
+#define GNC_LIB_INIT "gnc_provider_init"
+/* gnc-backend-file location */
+#include "gncla-dir.h"
 
 static GList * engine_init_hooks = NULL;
 static int engine_is_initialized = 0;
+static QofLogModule log_module = GNC_MOD_ENGINE;
 
 /* GnuCash version functions */
 unsigned int
@@ -77,28 +81,27 @@
   GList                  * cur;
 
   if (1 == engine_is_initialized) return;
-  engine_is_initialized = 1;
 
-  gnc_log_init();
-
-  /* initialize the string cache */
-  gnc_engine_get_string_cache();
-  
-  guid_init ();
-  qof_object_initialize ();
-  qof_query_init ();
-  qof_book_register ();
+  /* initialize logging to our file. */
+  qof_log_init_filename("/tmp/gnucash.trace");
+  /* Only set the core log_modules here
+	the rest can be set locally.  */
+  gnc_set_log_level(GNC_MOD_ENGINE, GNC_LOG_WARNING);
+  gnc_set_log_level(GNC_MOD_IO, GNC_LOG_WARNING);
+  gnc_set_log_level(GNC_MOD_GUI, GNC_LOG_WARNING);
+  qof_log_set_default(GNC_LOG_WARNING);
+  /* initialize QOF */
+  qof_init();
 
   /* Now register our core types */
-  xaccSplitRegister ();
-  xaccTransRegister ();
-  xaccAccountRegister ();
-  xaccGroupRegister ();
-  gnc_sxtt_register ();
-  gnc_pricedb_register ();
-  gnc_commodity_table_register();
-  gnc_lot_register ();
+  cashobjects_register();
+
+  g_return_if_fail((qof_load_backend_library 
+		(QOF_LIB_DIR, "libqof-backend-qsf.la", "qsf_provider_init")));
+  g_return_if_fail((qof_load_backend_library
+		(GNC_LIBDIR, GNC_LIB_NAME, GNC_LIB_INIT)));
 
+  engine_is_initialized = 1;
   /* call any engine hooks */
   for (cur = engine_init_hooks; cur; cur = cur->next)
   {
@@ -121,6 +124,8 @@
   qof_object_shutdown ();
   guid_shutdown();
   gnc_engine_string_cache_destroy ();
+  qof_log_shutdown();
+  engine_is_initialized = 0;
 }
 
 /********************************************************************
@@ -132,3 +137,92 @@
 gnc_engine_add_init_hook(gnc_engine_init_hook_t h) {
   engine_init_hooks = g_list_append(engine_init_hooks, (gpointer)h);
 }
+
+gboolean
+gnc_engine_is_initialized (void)
+{
+/*	if (engine_is_initialized == 1) return TRUE;
+	return FALSE;
+*/	
+	return (engine_is_initialized == 1) ? TRUE : FALSE;
+}
+
+/* ====================================================================== */
+/* XXX This exports the list of accounts to a file.  It does not export
+ * any transactions.  Its a place-holder until full book-closing is implemented.
+ */
+
+gboolean
+qof_session_export (QofSession *tmp_session,
+                    QofSession *real_session,
+                    QofPercentageFunc percentage_func)
+{
+  QofBook *book, *book2;
+  QofBackend *be;
+  int err;
+
+  if ((!tmp_session) || (!real_session)) return FALSE;
+
+  book = qof_session_get_book (real_session);
+  ENTER ("tmp_session=%p real_session=%p book=%p book_id=%s", 
+         tmp_session, real_session, book,
+         qof_session_get_url(tmp_session)
+         ? qof_session_get_url(tmp_session) : "(null)");
+
+  /* There must be a backend or else.  (It should always be the file
+   * backend too.)
+   */
+  book2 = qof_session_get_book(tmp_session);
+  be = qof_book_get_backend(book2);
+  if (!be)
+    return FALSE;
+
+  be->percentage = percentage_func;
+  if (be->export)
+    {
+
+      (be->export)(be, book);
+      err = qof_backend_get_error(be);
+    
+      if (ERR_BACKEND_NO_ERR != err) { return FALSE; }
+    }
+
+  return TRUE;
+}
+
+void
+gnc_run_rpc_server (void)
+{
+  const char * dll_err;
+  void * dll_handle;
+  int (*rpc_run)(short);
+  int ret;
+
+  /* open and resolve all symbols now (we don't want mystery 
+   * failure later) */
+#ifndef RTLD_NOW
+# ifdef RTLD_LAZY
+#  define RTLD_NOW RTLD_LAZY
+# endif
+#endif
+  dll_handle = dlopen ("libgnc_rpc.so", RTLD_NOW);
+  if (! dll_handle) 
+  {
+    dll_err = dlerror();
+    PWARN (" can't load library: %s\n", dll_err ? dll_err : "");
+    return;
+  }
+  
+  rpc_run = dlsym (dll_handle, "rpc_server_run");
+  dll_err = dlerror();
+  if (dll_err) 
+  {
+    dll_err = dlerror();
+    PWARN (" can't find symbol: %s\n", dll_err ? dll_err : "");
+    return;
+  }
+  
+  ret = (*rpc_run)(0);
+
+  /* XXX How do we force an exit? */
+}
Index: gnc-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-commodity.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -Lsrc/engine/gnc-commodity.c -Lsrc/engine/gnc-commodity.c -u -r1.72 -r1.73
--- src/engine/gnc-commodity.c
+++ src/engine/gnc-commodity.c
@@ -35,14 +35,9 @@
 #include <regex.h>
 
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
-#include "gnc-trace.h"
-#include "guid.h"
 #include "messages.h"
-#include "qofbook.h"
-#include "qofobject.h"
 
-static short module = MOD_COMMODITY; 
+static QofLogModule log_module = GNC_MOD_COMMODITY; 
 
 /* Parts per unit is nominal, i.e. number of 'partname' units in
  * a 'unitname' unit.  fraction is transactional, i.e. how many
@@ -51,8 +46,11 @@
 
 struct gnc_commodity_s 
 { 
+  QofInstance inst;
+
+  gnc_commodity_namespace *namespace;
+
   char    * fullname;  
-  char    * namespace;
   char    * mnemonic;
   char    * printname;
   char    * exchange_code;  /* CUSIP or other identifying code */
@@ -67,17 +65,19 @@
 
 struct gnc_commodity_namespace_s 
 {
-  char    * namespace;
-  GHashTable * table;
+  QofInstance inst;
+
+  char       * name;
+  GHashTable * cm_table;
+  GList      * cm_list;
 };
 
 struct gnc_commodity_table_s 
 {
-  GHashTable * table;
+  GHashTable * ns_table;
+  GList      * ns_list;
 };
 
-typedef struct gnc_commodity_namespace_s gnc_commodity_namespace;
-
 struct gnc_new_iso_code
 {
   const char *old_code;
@@ -87,8 +87,9 @@
   {"PLZ", "PLN"}, /* Polish Zloty */
   {"UAG", "UAH"}, /* Ukraine Hryvnia */
   {"ILS", "NIS"}, /* New Israeli Shekel */
-  {"BGL", "BGN"}, /* Bulgarian Lev */
-  {"MGF", "MGA"}, /* Malagasy Ariary */
+
+  /* Only add currencies to this table when the old currency no longer
+   * exists in the file iso-4217-currencies.scm */
 };
 #define GNC_NEW_ISO_CODES \
         (sizeof(gnc_new_iso_codes) / sizeof(struct gnc_new_iso_code))
@@ -446,11 +447,22 @@
  * gnc_commodity_new
  ********************************************************************/
 
+/* TODO: convert these to their more conventional form */
+#undef CACHE_INSERT
+#undef CACHE_REMOVE
 #define CACHE_INSERT(dest,src)       \
-  if(src) { dest = g_cache_insert(str_cache, (gpointer)src); }
+  if(src) { dest = gnc_string_cache_insert((gpointer)src); }
 
 #define CACHE_REMOVE(str)     \
-  if(str) { g_cache_remove(str_cache, str); str = NULL; }
+  if(str) { gnc_string_cache_remove(str); str=NULL; }
+
+static void
+mark_commodity_dirty (gnc_commodity *cm)
+{
+  cm->inst.dirty = TRUE;	/* No-one uses or clears this flag. */
+  qof_collection_mark_dirty (cm->inst.entity.collection);
+  gnc_engine_gen_event (&cm->inst.entity, GNC_EVENT_MODIFY);
+}
 
 static void
 reset_printname(gnc_commodity *com)
@@ -464,23 +476,35 @@
 static void
 reset_unique_name(gnc_commodity *com)
 {
+    gnc_commodity_namespace *ns;
+
     g_free(com->unique_name);
+    ns = com->namespace;
     com->unique_name = g_strdup_printf("%s::%s",
-                                       com->namespace ? com->namespace : "",
+                                       ns ? ns->name : "",
                                        com->mnemonic ? com->mnemonic : "");
 }
 
 gnc_commodity *
-gnc_commodity_new(const char * fullname, 
+gnc_commodity_new(QofBook *book, const char * fullname, 
                   const char * namespace, const char * mnemonic, 
                   const char * exchange_code, 
                   int fraction)
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   gnc_commodity * retval = g_new0(gnc_commodity, 1);
+  gnc_commodity_table *table;
+
+  qof_instance_init (&retval->inst, GNC_ID_COMMODITY, book);
+  table = gnc_commodity_table_get_table(book);
+  if (namespace) {
+    retval->namespace = gnc_commodity_table_find_namespace(table, namespace);
+    if (!retval->namespace)
+      retval->namespace = gnc_commodity_table_add_namespace(table, namespace);
+  } else {
+    retval->namespace = NULL;
+  }
 
   CACHE_INSERT (retval->fullname, fullname);
-  CACHE_INSERT (retval->namespace, namespace);
   CACHE_INSERT (retval->mnemonic, mnemonic);
   CACHE_INSERT (retval->exchange_code, exchange_code);
   retval->fraction = fraction;
@@ -491,6 +515,7 @@
 
   reset_printname(retval);
   reset_unique_name(retval);
+  gnc_engine_gen_event (&retval->inst.entity, GNC_EVENT_CREATE);
 
   return retval;
 }
@@ -503,12 +528,13 @@
 void
 gnc_commodity_destroy(gnc_commodity * cm)
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   if(!cm) return;
 
+  gnc_engine_gen_event (&cm->inst.entity, GNC_EVENT_DESTROY);
+
   /* Set at creation */
   CACHE_REMOVE (cm->fullname);
-  CACHE_REMOVE (cm->namespace);
+  cm->namespace = NULL;
   CACHE_REMOVE (cm->exchange_code);
   CACHE_REMOVE (cm->mnemonic);
   CACHE_REMOVE (cm->quote_tz);
@@ -525,6 +551,7 @@
 
   cm->mark = 0;
 
+  qof_instance_release (&cm->inst);
   g_free(cm);
 }
 
@@ -532,7 +559,7 @@
 gnc_commodity_copy(gnc_commodity * dest, gnc_commodity *src)
 {
   gnc_commodity_set_fullname (dest, src->fullname);
-  gnc_commodity_set_namespace (dest, src->namespace);
+  dest->namespace = src->namespace;
   gnc_commodity_set_fraction (dest, src->fraction);
   gnc_commodity_set_exchange_code (dest, src->exchange_code);
   gnc_commodity_set_quote_flag (dest, src->quote_flag);
@@ -543,11 +570,10 @@
 gnc_commodity *
 gnc_commodity_clone(gnc_commodity *src)
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   gnc_commodity * dest = g_new0(gnc_commodity, 1);
 
   CACHE_INSERT (dest->fullname, src->fullname);
-  CACHE_INSERT (dest->namespace, src->namespace);
+  dest->namespace = src->namespace;
   CACHE_INSERT (dest->mnemonic, src->mnemonic);
   CACHE_INSERT (dest->exchange_code, src->exchange_code);
   CACHE_INSERT (dest->quote_tz, src->quote_tz);
@@ -595,9 +621,15 @@
 gnc_commodity_get_namespace(const gnc_commodity * cm) 
 {
   if(!cm) return NULL;
-  return cm->namespace;
+  return gnc_commodity_namespace_get_name(cm->namespace);
 }
 
+gnc_commodity_namespace *
+gnc_commodity_get_namespace_ds(const gnc_commodity * cm) 
+{
+  if(!cm) return NULL;
+  return cm->namespace;
+}
 
 /********************************************************************
  * gnc_commodity_get_fullname
@@ -707,13 +739,13 @@
 void
 gnc_commodity_set_mnemonic(gnc_commodity * cm, const char * mnemonic) 
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   if(!cm) return;
   if(cm->mnemonic == mnemonic) return;
 
   CACHE_REMOVE (cm->mnemonic);
   CACHE_INSERT (cm->mnemonic, mnemonic);
 
+  mark_commodity_dirty (cm);
   reset_printname(cm);
   reset_unique_name(cm);
 }
@@ -725,13 +757,19 @@
 void
 gnc_commodity_set_namespace(gnc_commodity * cm, const char * namespace) 
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
-  if(!cm) return;
-  if(cm->namespace == namespace) return;
+  QofBook *book;
+  gnc_commodity_table *table;
+  gnc_commodity_namespace *nsp;
 
-  CACHE_REMOVE (cm->namespace);
-  CACHE_INSERT (cm->namespace, namespace);
+  if(!cm) return;
+  book = qof_instance_get_book (&cm->inst);
+  table = gnc_commodity_table_get_table(book);
+  nsp = gnc_commodity_table_add_namespace(table, namespace);
+  if (cm->namespace == nsp)
+    return;
 
+  cm->namespace = nsp;
+  mark_commodity_dirty(cm);
   reset_printname(cm);
   reset_unique_name(cm);
 }
@@ -743,13 +781,13 @@
 void
 gnc_commodity_set_fullname(gnc_commodity * cm, const char * fullname) 
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   if(!cm) return;
   if(cm->fullname == fullname) return;
 
   CACHE_REMOVE (cm->fullname);
   CACHE_INSERT (cm->fullname, fullname);
 
+  mark_commodity_dirty(cm);
   reset_printname(cm);
 }
 
@@ -761,12 +799,12 @@
 gnc_commodity_set_exchange_code(gnc_commodity * cm, 
                                 const char * exchange_code) 
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   if(!cm) return;
   if(cm->exchange_code == exchange_code) return;
 
   CACHE_REMOVE (cm->exchange_code);
   CACHE_INSERT (cm->exchange_code, exchange_code);
+  mark_commodity_dirty(cm);
 }
 
 /********************************************************************
@@ -778,6 +816,7 @@
 {
   if(!cm) return;
   cm->fraction = fraction;
+  mark_commodity_dirty(cm);
 }
 
 /********************************************************************
@@ -802,6 +841,7 @@
 
   if(!cm) return;
   cm->quote_flag = flag;
+  mark_commodity_dirty(cm);
   LEAVE(" ");
 }
 
@@ -816,6 +856,7 @@
 
   if(!cm) return;
   cm->quote_source = src;
+  mark_commodity_dirty(cm);
   LEAVE(" ");
 }
 
@@ -826,14 +867,15 @@
 void
 gnc_commodity_set_quote_tz(gnc_commodity *cm, const char *tz) 
 {
-  GCache *str_cache = gnc_engine_get_string_cache ();
   ENTER ("(cm=%p, tz=%s)", cm, tz);
 
   if(!cm) return;
 
   CACHE_REMOVE (cm->quote_tz);
-  if (tz && *tz) CACHE_INSERT (cm->quote_tz, tz);
+  if (tz && *tz)
+    CACHE_INSERT (cm->quote_tz, tz);
 
+  mark_commodity_dirty(cm);
   LEAVE(" ");
 }
 
@@ -851,7 +893,7 @@
 {
   if(a == b) return TRUE;
   if(!a || !b) return FALSE;
-  if(safe_strcmp(a->namespace, b->namespace) != 0) return FALSE;
+  if(a->namespace != b->namespace) return FALSE;
   if(safe_strcmp(a->mnemonic, b->mnemonic) != 0) return FALSE;
   return TRUE;
 }
@@ -867,9 +909,11 @@
     return FALSE;
   }
 
-  if (safe_strcmp(a->namespace, b->namespace) != 0)
+  if (a->namespace != b->namespace)
   {
-    DEBUG ("namespaces differ: %s vs %s", a->namespace, b->namespace);
+    DEBUG ("namespaces differ: %p(%s) vs %p(%s)",
+	   a->namespace, gnc_commodity_namespace_get_name(a->namespace),
+	   b->namespace, gnc_commodity_namespace_get_name(b->namespace));
     return FALSE;
   }
 
@@ -902,6 +946,32 @@
 }
 
 
+/************************************************************
+ *                   Namespace functions                    *
+ ************************************************************/
+const char *
+gnc_commodity_namespace_get_name (gnc_commodity_namespace *ns)
+{
+  if (ns == NULL)
+    return NULL;
+  return ns->name;
+}
+
+GList * 
+gnc_commodity_namespace_get_commodity_list(const gnc_commodity_namespace *namespace) 
+{
+  if (!namespace)
+    return NULL;
+
+  return namespace->cm_list;
+}
+
+gboolean
+gnc_commodity_namespace_is_iso(const char *namespace)
+{
+  return (safe_strcmp(namespace, GNC_COMMODITY_NS_ISO) == 0);
+}
+
 /********************************************************************
  * gnc_commodity_table_new
  * make a new commodity table 
@@ -911,7 +981,8 @@
 gnc_commodity_table_new(void) 
 {
   gnc_commodity_table * retval = g_new0(gnc_commodity_table, 1);
-  retval->table = g_hash_table_new(&g_str_hash, &g_str_equal);
+  retval->ns_table = g_hash_table_new(&g_str_hash, &g_str_equal);
+  retval->ns_list = NULL;
   return retval;
 }
 
@@ -919,7 +990,6 @@
  * book anchor functons
  ********************************************************************/
 
-#define GNC_COMMODITY_TABLE "gnc_commodity_table"
 gnc_commodity_table *
 gnc_commodity_table_get_table(QofBook *book)
 {
@@ -927,18 +997,6 @@
   return qof_book_get_data (book, GNC_COMMODITY_TABLE);
 }
 
-void
-gnc_commodity_table_set_table(QofBook *book, gnc_commodity_table *ct)
-{
-  gnc_commodity_table *old_ct;
-  if (!book) return;
-
-  old_ct = gnc_commodity_table_get_table (book);
-  if (old_ct == ct) return;
-  qof_book_set_data (book, GNC_COMMODITY_TABLE, ct);
-  gnc_commodity_table_destroy (old_ct);
-}
-
 gnc_commodity *
 gnc_commodity_obtain_twin (gnc_commodity *from, QofBook *book)
 {
@@ -961,7 +1019,7 @@
 }
 
 /********************************************************************
- * gnc_commodity_get_size
+ * gnc_commodity_table_get_size
  * get the size of the commodity table
  ********************************************************************/
 
@@ -969,14 +1027,14 @@
 gnc_commodity_table_get_number_of_namespaces(gnc_commodity_table* tbl)
 {
     g_return_val_if_fail(tbl, 0);
-    g_return_val_if_fail(tbl->table, 0);
-    return g_hash_table_size(tbl->table);
+    g_return_val_if_fail(tbl->ns_table, 0);
+    return g_hash_table_size(tbl->ns_table);
 }
 
 static void
 count_coms(gpointer key, gpointer value, gpointer user_data)
 {
-    GHashTable *tbl = ((gnc_commodity_namespace*)value)->table;
+    GHashTable *tbl = ((gnc_commodity_namespace*)value)->cm_table;
     guint *count = (guint*)user_data;
 
     if(safe_strcmp((char*)key, GNC_COMMODITY_NS_ISO) == 0)
@@ -995,9 +1053,9 @@
 {
     guint count = 0;
     g_return_val_if_fail(tbl, 0);
-    g_return_val_if_fail(tbl->table, 0);
+    g_return_val_if_fail(tbl->ns_table, 0);
 
-    g_hash_table_foreach(tbl->table, count_coms, (gpointer)&count);
+    g_hash_table_foreach(tbl->ns_table, count_coms, (gpointer)&count);
 
     return count;
 }
@@ -1016,7 +1074,7 @@
 
   if (!table || !namespace || !mnemonic) return NULL;
 
-  nsp = g_hash_table_lookup(table->table, (gpointer)namespace);
+  nsp = gnc_commodity_table_find_namespace(table, namespace);
 
   if(nsp) {
     /*
@@ -1029,7 +1087,7 @@
 	break;
       }
     }
-    return g_hash_table_lookup(nsp->table, (gpointer)mnemonic);
+    return g_hash_table_lookup(nsp->cm_table, (gpointer)mnemonic);
   }
   else {
     return NULL;
@@ -1111,15 +1169,16 @@
 gnc_commodity_table_insert(gnc_commodity_table * table, 
                            gnc_commodity * comm) 
 {
-  GCache *str_cache;
   gnc_commodity_namespace * nsp = NULL;
   gnc_commodity *c;
+  const char *ns_name;
 
   if (!table) return NULL;
   if (!comm) return NULL;
 
   ENTER ("(table=%p, comm=%p) %s %s", table, comm, comm->mnemonic, comm->fullname);
-  c = gnc_commodity_table_lookup (table, comm->namespace, comm->mnemonic);
+  ns_name = gnc_commodity_namespace_get_name(comm->namespace);
+  c = gnc_commodity_table_lookup (table, ns_name, comm->mnemonic);
 
   if (c) 
   {
@@ -1132,24 +1191,16 @@
     return c;
   }
 
-  nsp = g_hash_table_lookup(table->table, (gpointer)(comm->namespace));
-  str_cache = gnc_engine_get_string_cache ();
+  nsp = gnc_commodity_table_add_namespace(table, ns_name);
   
-  if(!nsp) 
-  {
-    nsp = g_new0(gnc_commodity_namespace, 1);
-    nsp->table = g_hash_table_new(g_str_hash, g_str_equal);
-    nsp->namespace = g_cache_insert(str_cache, comm->namespace);
-    g_hash_table_insert(table->table, 
-                        nsp->namespace, 
-                        (gpointer)nsp);
-  }
-
-  PINFO ("insert %p %s into nsp=%p %s", comm->mnemonic, comm->mnemonic, nsp->table, nsp->namespace);
-  g_hash_table_insert(nsp->table, 
-                      (gpointer)g_cache_insert(str_cache, comm->mnemonic),
+  PINFO ("insert %p %s into nsp=%p %s", comm->mnemonic, comm->mnemonic,
+         nsp->cm_table, nsp->name);
+  g_hash_table_insert(nsp->cm_table, 
+                      gnc_string_cache_insert(comm->mnemonic),
                       (gpointer)comm);
+  nsp->cm_list = g_list_append(nsp->cm_list, comm);
 
+  gnc_engine_gen_event (&comm->inst.entity, GNC_EVENT_ADD);
   LEAVE ("(table=%p, comm=%p)", table, comm);
   return comm;
 }
@@ -1165,17 +1216,22 @@
 {
   gnc_commodity_namespace * nsp;
   gnc_commodity *c;
+  const char *ns_name;
 
   if (!table) return;
   if (!comm) return;
 
-  c = gnc_commodity_table_lookup (table, comm->namespace, comm->mnemonic);
+  ns_name = gnc_commodity_namespace_get_name(comm->namespace);
+  c = gnc_commodity_table_lookup (table, ns_name, comm->mnemonic);
   if (c != comm) return;
 
-  nsp = g_hash_table_lookup (table->table, comm->namespace);
+  gnc_engine_gen_event (&comm->inst.entity, GNC_EVENT_REMOVE);
+
+  nsp = gnc_commodity_table_find_namespace(table, ns_name);
   if (!nsp) return;
 
-  g_hash_table_remove (nsp->table, comm->mnemonic);
+  nsp->cm_list = g_list_remove(nsp->cm_list, comm);
+  g_hash_table_remove (nsp->cm_table, comm->mnemonic);
   /* XXX minor mem leak, should remove the key as well */
 }
 
@@ -1192,7 +1248,7 @@
   
   if(!table || !namespace) { return 0; }
 
-  nsp = g_hash_table_lookup(table->table, (gpointer)namespace);
+  nsp = gnc_commodity_table_find_namespace(table, namespace);
   if(nsp) {
     return 1;
   }
@@ -1242,20 +1298,26 @@
   if (!table)
     return NULL;
 
-  return g_hash_table_keys(table->table);
+  return g_hash_table_keys(table->ns_table);
 }
 
-gboolean
-gnc_commodity_namespace_is_iso(const char *namespace)
+GList * 
+gnc_commodity_table_get_namespaces_list(const gnc_commodity_table * table) 
 {
-  return (safe_strcmp(namespace, GNC_COMMODITY_NS_ISO) == 0);
+  if (!table)
+    return NULL;
+
+  return table->ns_list;
 }
 
 gboolean
 gnc_commodity_is_iso(const gnc_commodity * cm)
 {
+  const gchar *ns_name;
+
   if (!cm) return FALSE;
-  return (safe_strcmp(cm->namespace, GNC_COMMODITY_NS_ISO) == 0);
+  ns_name = gnc_commodity_namespace_get_name(cm->namespace);
+  return (safe_strcmp(ns_name, GNC_COMMODITY_NS_ISO) == 0);
 }
 
 /********************************************************************
@@ -1272,11 +1334,11 @@
   if (!table)
     return NULL;
 
-  ns = g_hash_table_lookup(table->table, (gpointer)namespace);
+  ns = gnc_commodity_table_find_namespace(table, namespace);
   if (!ns)
     return NULL;
 
-  return g_hash_table_values(ns->table);
+  return g_hash_table_values(ns->cm_table);
 }
 
 /********************************************************************
@@ -1333,9 +1395,9 @@
       namespace = tmp->data;
       if (regexec(&pattern, namespace, 0, NULL, 0) == 0) {
 	DEBUG("Running list of %s commodities", namespace);
-	ns = g_hash_table_lookup(table->table, namespace);
+	ns = gnc_commodity_table_find_namespace(table, namespace);
 	if (ns) {
-	  g_hash_table_foreach(ns->table, &get_quotables_helper1, (gpointer) &l);
+	  g_hash_table_foreach(ns->cm_table, &get_quotables_helper1, (gpointer) &l);
 	}
       }
     }
@@ -1354,28 +1416,63 @@
  * add an empty namespace if it does not exist 
  ********************************************************************/
 
-void 
+gnc_commodity_namespace * 
 gnc_commodity_table_add_namespace(gnc_commodity_table * table,
                                   const char * namespace) 
 {
   gnc_commodity_namespace * ns = NULL; 
   
-  if (!table) return;
+  if (!table) return NULL;
   
-  ns = g_hash_table_lookup(table->table, (gpointer)namespace);
+  ns = gnc_commodity_table_find_namespace(table, namespace);
   if(!ns) 
   {
-    GCache *str_cache = gnc_engine_get_string_cache ();
     ns = g_new0(gnc_commodity_namespace, 1);
-    ns->table = g_hash_table_new(g_str_hash, g_str_equal);
-    ns->namespace = g_cache_insert(str_cache, (gpointer)namespace);
-    g_hash_table_insert(table->table,
-                        (gpointer) ns->namespace, 
-                        (gpointer) ns);
+    ns->cm_table = g_hash_table_new(g_str_hash, g_str_equal);
+    ns->name = gnc_string_cache_insert((gpointer)namespace);
+    gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_CREATE);
+    
+    g_hash_table_insert(table->ns_table,
+			(gpointer) ns->name, 
+			(gpointer) ns);
+    table->ns_list = g_list_append(table->ns_list, ns);
+    gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_ADD);
   }
+  return ns;
 }
 
 
+gnc_commodity_namespace * 
+gnc_commodity_table_find_namespace(const gnc_commodity_table * table,
+				   const char * namespace) 
+{
+  if (!table || !namespace)
+    return NULL;
+
+  return g_hash_table_lookup(table->ns_table, (gpointer)namespace);
+}
+
+
+gnc_commodity *
+gnc_commodity_find_commodity_by_guid(const GUID *guid, QofBook *book)
+{
+  QofCollection *col;
+  if (!guid || !book) return NULL;
+  col = qof_book_get_collection (book, GNC_ID_COMMODITY);
+  return (gnc_commodity *) qof_collection_lookup_entity (col, guid);
+}
+
+gnc_commodity_namespace *
+gnc_commodity_find_namespace_by_guid(const GUID *guid, QofBook *book)
+{
+  QofCollection *col;
+  if (!guid || !book) return NULL;
+  col = qof_book_get_collection (book, GNC_ID_COMMODITY_NAMESPACE);
+  return (gnc_commodity_namespace *) qof_collection_lookup_entity (col, guid);
+}
+
+
+
 /********************************************************************
  * gnc_commodity_table_delete_namespace
  * delete a namespace  
@@ -1384,10 +1481,9 @@
 static int
 ns_helper(gpointer key, gpointer value, gpointer user_data) 
 {
-  GCache *str_cache = user_data;
   gnc_commodity * c = value;
   gnc_commodity_destroy(c);
-  g_cache_remove (str_cache, key);  /* key is commodity mnemonic */
+  gnc_string_cache_remove(key);  /* key is commodity mnemonic */
   return TRUE;
 }
 
@@ -1396,19 +1492,26 @@
                                      const char * namespace) 
 {
   gnc_commodity_namespace * ns;
+
   if (!table) return;
 
-  ns = g_hash_table_lookup(table->table, namespace);
-  if (ns)
-  {
-    GCache *str_cache = gnc_engine_get_string_cache ();
-    g_hash_table_remove(table->table, namespace);
+  ns = gnc_commodity_table_find_namespace(table, namespace);
+  if (!ns)
+    return;
 
-    g_hash_table_foreach_remove(ns->table, ns_helper, str_cache);
-    g_hash_table_destroy(ns->table);
-    g_cache_remove (str_cache, ns->namespace);
-    g_free(ns);
-  }
+  gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_REMOVE);
+  g_hash_table_remove(table->ns_table, namespace);
+  table->ns_list = g_list_remove(table->ns_list, ns);
+
+  g_list_free(ns->cm_list);
+  ns->cm_list = NULL;
+
+  g_hash_table_foreach_remove(ns->cm_table, ns_helper, NULL);
+  g_hash_table_destroy(ns->cm_table);
+  gnc_string_cache_remove(ns->name);
+
+  gnc_engine_gen_event (&ns->inst.entity, GNC_EVENT_DESTROY);
+  g_free(ns);
 }
 
 /********************************************************************
@@ -1438,7 +1541,7 @@
 static void
 iter_namespace (gpointer key, gpointer value, gpointer user_data)
 {
-  GHashTable *namespace_hash = ((gnc_commodity_namespace *) value)->table;
+  GHashTable *namespace_hash = ((gnc_commodity_namespace *) value)->cm_table;
   g_hash_table_foreach (namespace_hash, iter_commodity, user_data);
 }
 
@@ -1455,7 +1558,7 @@
   iter_data.func = f;
   iter_data.user_data = user_data;
 
-  g_hash_table_foreach(tbl->table, iter_namespace, (gpointer)&iter_data);
+  g_hash_table_foreach(tbl->ns_table, iter_namespace, (gpointer)&iter_data);
 
   return iter_data.ok;
 }
@@ -1465,29 +1568,25 @@
  * cleanup and free. 
  ********************************************************************/
 
-static int
-ct_helper(gpointer key, gpointer value, gpointer data) 
-{
-  GCache *str_cache = gnc_engine_get_string_cache ();
-  gnc_commodity_namespace * ns = value;
-
-  g_hash_table_foreach_remove(ns->table, ns_helper, str_cache);
-  g_hash_table_destroy(ns->table);
-  ns->table = NULL;
-  g_cache_remove (str_cache, ns->namespace);
-  g_free(ns);
-  return TRUE;
-}
-
 void
 gnc_commodity_table_destroy(gnc_commodity_table * t) 
 {
+  gnc_commodity_namespace * ns;
+  GList *item, *next;
+
   if (!t) return;
   ENTER ("table=%p", t);
   
-  g_hash_table_foreach_remove(t->table, ct_helper, NULL);
-  g_hash_table_destroy(t->table);
-  t->table = NULL;
+  for (item = t->ns_list; item; item = next) {
+    next = g_list_next(item);
+    ns = item->data;
+    gnc_commodity_table_delete_namespace(t, ns->name);
+  }
+
+  g_list_free(t->ns_list);
+  t->ns_list = NULL;
+  g_hash_table_destroy(t->ns_table);
+  t->ns_table = NULL;
   g_free(t);
   LEAVE ("table=%p", t);
 }
@@ -1552,23 +1651,50 @@
  ********************************************************************/
 
 gboolean
-gnc_commodity_table_add_default_data(gnc_commodity_table *table)
+gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book)
 {
   ENTER ("table=%p", table);
-  #include "iso-4217-currencies.c"
-
   gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_AMEX);
   gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_NYSE);
   gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_NASDAQ);
   gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_EUREX);
   gnc_commodity_table_add_namespace(table, GNC_COMMODITY_NS_MUTUAL);
+
+  #include "iso-4217-currencies.c"
+
   LEAVE ("table=%p", table);
   return TRUE;
 }
 
 /********************************************************************
  ********************************************************************/
-/* gncObject function implementation and registration */
+/* QofObject function implementation and registration */
+
+static QofObject commodity_object_def = 
+{
+  interface_version: QOF_OBJECT_VERSION,
+  e_type:            GNC_ID_COMMODITY,
+  type_label:        "Commodity",
+  book_begin:        NULL,
+  book_end:          NULL,
+  is_dirty:          qof_collection_is_dirty,
+  mark_clean:        qof_collection_mark_clean,
+  foreach:           qof_collection_foreach,
+  printable:         (const char* (*)(gpointer)) gnc_commodity_get_fullname,
+};
+
+static QofObject namespace_object_def = 
+{
+  interface_version: QOF_OBJECT_VERSION,
+  e_type:            GNC_ID_COMMODITY_NAMESPACE,
+  type_label:        "Namespace",
+  book_begin:        NULL,
+  book_end:          NULL,
+  is_dirty:          NULL,
+  mark_clean:        NULL,
+  foreach:           NULL,
+  printable:         NULL,
+};
 
 static void 
 commodity_table_book_begin (QofBook *book)
@@ -1576,25 +1702,30 @@
   gnc_commodity_table *ct;
   ENTER ("book=%p", book);
   
+  if (gnc_commodity_table_get_table(book))
+    return;
+
   ct = gnc_commodity_table_new ();
-  if(!gnc_commodity_table_add_default_data(ct))
+  qof_book_set_data (book, GNC_COMMODITY_TABLE, ct);
+
+  if(!gnc_commodity_table_add_default_data(ct, book))
   {
     PWARN("unable to initialize book's commodity_table");
   }
-  gnc_commodity_table_set_table (book, ct);
+
   LEAVE ("book=%p", book);
 }
 
 static void 
 commodity_table_book_end (QofBook *book)
 {
-  gnc_commodity_table_set_table (book, NULL);
+  gnc_commodity_table *ct;
+
+  ct = gnc_commodity_table_get_table (book);
+  qof_book_set_data (book, GNC_COMMODITY_TABLE, NULL);
+  gnc_commodity_table_destroy (ct);
 }
 
-/* XXX Why is the commodity table never marked dirty/clean?
- * Don't we have to save user-created/modified commodities?
- * I don't get it ... does this need fixing?
- */
 static QofObject commodity_table_object_def = 
 {
   interface_version: QOF_OBJECT_VERSION,
@@ -1614,6 +1745,11 @@
 gnc_commodity_table_register (void)
 {
   gnc_quote_source_init_tables();
+  
+  if (!qof_object_register (&commodity_object_def))
+    return FALSE;
+  if (!qof_object_register (&namespace_object_def))
+    return FALSE;
   return qof_object_register (&commodity_table_object_def);
 }
 
Index: gnc-filepath-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-filepath-utils.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/engine/gnc-filepath-utils.h -Lsrc/engine/gnc-filepath-utils.h -u -r1.1 -r1.2
--- src/engine/gnc-filepath-utils.h
+++ src/engine/gnc-filepath-utils.h
@@ -21,7 +21,7 @@
 
 /**
  * @file gnc-filepath-utils.h
- * @breif file path resolutionutilities
+ * @brief file path resolutionutilities
  * @author Copyright (c) 1998-2004 Linas Vepstas <linas at linas.org>
  * @author Copyright (c) 2000 Dave Peticolas
  *
Index: FreqSpec.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/FreqSpec.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/engine/FreqSpec.h -Lsrc/engine/FreqSpec.h -u -r1.21 -r1.22
--- src/engine/FreqSpec.h
+++ src/engine/FreqSpec.h
@@ -17,65 +17,94 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup QOF
+/** @addtogroup SchedXaction
     @{ */
 /** @addtogroup FreqSpec Specifying Recurring Dates (Periods)
-    @{ */
+
+ Frequency specifications include how to let an event recur on a
+ predictable frequency, from a core of once, daily, weekly, monthly or annually.
+ More complex frequencies like twice weekly, quarterly, bi-annually and
+ custom frequencies consisting of a series of distinct dates are built from
+ the core types.
+ 
+ Although defined, MONTH_RELATIVE is not yet supported.
+
+ Scheduled transactions have a frequency defined by a frequency
+ specifier.  This specifier, given a start date, end date [present
+ in the scheduled transaction] and last occurance date [possibly not
+ present] can be used to determine that a s.transaction should be
+ instantiated on a given date [the given query date].
+
+ There is a split between the UIFreqType and the 'internal' FreqType
+ to reduce the complexity of some of the code involved.
+
+ This still needs to deal with:
+ . exceptions
+ . 13 periods: (4 weeks/period 4x13=52 weeks/year)
+ . yearly 360/365?
+ . re-based frequencies [based around a non-standard [read:
+   not-Jan-1-based/fiscal] year]
+ . "business days" -- m-f sans holidays [per-user list thereof]
+
+ \todo  add month-relative getter 
+
+@{ */
 /** @file FreqSpec.h
     @brief Period / Date Frequency Specification
     @author Copyright (C) 2001 Joshua Sled <jsled at asynchronous.org>
-    @author Copyright (C) 2001 Ben Stanley <bds02 at uow.edu.au>  
+    @author Copyright (C) 2001 Ben Stanley <bds02 at uow.edu.au>
+    @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef XACC_FREQSPEC_H
 #define XACC_FREQSPEC_H
 
 #include "config.h"
-
+#include "gnc-engine.h"
 #include <glib.h>
+#include "qof.h"
 
-#include "qofid.h"
-#include "guid.h"
-#include "qofbook.h"
+#define ENUM_LIST_TYPE(_) \
+        _(INVALID,) \
+        _(ONCE,) \
+        _(DAILY,) \
+        _(WEEKLY,) /**< Hmmm... This is sort of DAILY[7]... */ \
+        _(MONTHLY,) \
+        _(MONTH_RELATIVE,) \
+        _(COMPOSITE,)
+
+DEFINE_ENUM(FreqType, ENUM_LIST_TYPE) /**< \enum Frequency specification.
+
+For BI_WEEKLY, use weekly[2] 
+ SEMI_MONTHLY, use composite 
+ YEARLY, monthly[12] */
+
+AS_STRING_DEC(FreqType, ENUM_LIST_TYPE)
+FROM_STRING_DEC(FreqType, ENUM_LIST_TYPE)
+
+#define ENUM_LIST_UI(_) \
+        _(UIFREQ_NONE,) /**< no frequency */ \
+        _(UIFREQ_ONCE,) /**< Just occurs once */ \
+        _(UIFREQ_DAILY,) /**< Repeat every day. */ \
+        _(UIFREQ_DAILY_MF,) /**< Repeat Monday to Friday, skip weekend. */ \
+        _(UIFREQ_WEEKLY,) /**< Repeat once each week. */ \
+        _(UIFREQ_BI_WEEKLY,) /**< Repeat twice a week. */ \
+        _(UIFREQ_SEMI_MONTHLY,) /**< Repeat twice a month. */ \
+        _(UIFREQ_MONTHLY,) /**< Repeat once a month. */ \
+        _(UIFREQ_QUARTERLY,) /**< Repeat every quarter. */ \
+        _(UIFREQ_TRI_ANUALLY,) /**< Repeat three times a year. */ \
+        _(UIFREQ_SEMI_YEARLY,) /**< Repeat twice a year. */ \
+        _(UIFREQ_YEARLY,) /**< Repeat once a year. */ \
+        _(UIFREQ_NUM_UI_FREQSPECS,) 
 
-/**
- * Frequency specification.
- *
- **/
-typedef enum gncp_FreqType {
-        INVALID,
-        ONCE,
-        DAILY,
-        WEEKLY, /* Hmmm... This is sort of DAILY[7]... */
-        /* BI_WEEKLY: weekly[2] */
-        /* SEMI_MONTHLY: use composite */
-        MONTHLY,
-        MONTH_RELATIVE,
-        /* YEARLY: monthly[12] */
-        COMPOSITE,
-} FreqType;
+DEFINE_ENUM( UIFreqType, ENUM_LIST_UI) /**< \enum UIFreqType
 
-/**
  * The user's conception of the frequency.  It is expected that this
- * list will grow, while the former [FreqType] will not.
- *
- * Ideally this is not here, but what can you do?
- **/
-typedef enum gncp_UIFreqType {
-        UIFREQ_NONE,
-        UIFREQ_ONCE,
-        UIFREQ_DAILY,
-        UIFREQ_DAILY_MF,
-        UIFREQ_WEEKLY,
-        UIFREQ_BI_WEEKLY,
-        UIFREQ_SEMI_MONTHLY,
-        UIFREQ_MONTHLY,
-        UIFREQ_QUARTERLY,
-        UIFREQ_TRI_ANUALLY,
-        UIFREQ_SEMI_YEARLY,
-        UIFREQ_YEARLY,
-        UIFREQ_NUM_UI_FREQSPECS
-} UIFreqType;
+ * list will grow, while the former ::FreqType will not. */
+
+AS_STRING_DEC(UIFreqType, ENUM_LIST_UI) 
+FROM_STRING_DEC(UIFreqType, ENUM_LIST_UI)
+
 
 /**
  * Forward declaration of FreqSpec type for storing
@@ -85,7 +114,6 @@
 struct gncp_freq_spec;
 typedef struct gncp_freq_spec FreqSpec;
 
-
 /** PROTOTYPES ******************************************************/
 
 /**
@@ -233,6 +261,29 @@
  **/
 int gnc_freq_spec_compare( FreqSpec *a, FreqSpec *b );
 
+/** \name QOF handling.
+
+QOF requires parameters to use get and set routines individually -
+one parameter, one set routine, one get routine. QOF also passes
+parameter values directly and expects to receive the parameter value
+directly. These functions provide this mechanism. Note that in each
+case, where the xacc.. function uses a *int, QOF uses the int.
+
+In keeping with the rest of QOF, dates are handled as Timespec.
+@{
+*/
+#define QOF_ID_FREQSPEC       "FreqSpec"
+#define FS_UI_TYPE            "fs-frequency"
+#define FS_REPEAT             "fs-repeat"
+#define FS_BASE_DATE          "fs-initial-date"
+#define FS_MONTH_DAY          "fs-day-of-month"
+#define FS_MONTH_OFFSET       "fs-month-offset"
+
+/** \todo Need support for monthly and weekly extra values and composite. */
+gboolean FreqSpecRegister(void);
+
+/** @} */
+/** @} */
+/** @} */
+
 #endif /* XACC_FREQSPEC_H */
-/**@}*/
-/**@}*/
Index: qofsql.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsql.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/qofsql.h -Lsrc/engine/qofsql.h -u -r1.6 -r1.7
--- src/engine/qofsql.h
+++ src/engine/qofsql.h
@@ -21,7 +21,7 @@
 \********************************************************************/
 
 /** @addtogroup Query
-    @{ */
+@{ */
 /**
     @file qofsql.h
     @brief QOF client-side SQL parser.
@@ -32,11 +32,98 @@
 #define QOF_SQL_QUERY_H
 
 #include <glib.h>
-#include <qof/kvp_frame.h>
-#include <qof/qofbook.h>
-#include <qof/qofquery.h>
+#include <kvp_frame.h>
+#include <qofbook.h>
+#include <qofquery.h>
 
 /** @addtogroup SQL SQL Interface to Query
+
+The types of SQL queries that are allowed at this point are very 
+limited.  In general, only the following types of queries are 
+supported:
+  SELECT * FROM SomeObj WHERE (param_a < 10.0) AND (param_b = "asdf")
+         SORT BY param_c DESC;
+  INSERT INTO SomeObj (param_a, param_b, param_c) VALUES
+        ("value_a", true, "0/1");
+
+For SELECT, the returned list is a list of all of the instances of 'SomeObj' that
+match the query.  The 'SORT' term is optional. The 'WHERE' term is
+optional; but if you don't include 'WHERE', you will get a list of 
+all of the object instances.  The Boolean operations 'AND' and 'OR'
+together with parenthesis can be used to construct arbitrarily 
+nested predicates.
+
+For INSERT, the returned list is a list containing the newly created instance
+of 'SomeObj'.
+
+Joins are not supported directly.
+  SELECT * FROM ObjA,ObjB WHERE (ObjA.param_id = ObjB.param_other_id);
+The problem with the above is that the search requires a nested
+search loop, aka a 'join', which is not currently supported in the
+underlying QofQuery code.
+
+However, by repeating queries and adding the entities to a new session using
+::qof_entity_copy_list, a series of queries can be added to a single
+book. e.g. You can insert multiple entities and save out as a QSF XML
+file or use multiple SELECT queries to build a precise list - this
+can be used to replicate most of the functionality of a SQL join.
+
+SELECT * from ObjA where param_id = value;
+SELECT * from ObjB where param_other_id = value;
+
+Equivalent to:
+SELECT * from ObjA,ObjB where param_id = param_other_id and param_id = value;
+
+When combined with a foreach callback on the value of param_id for each
+entity in the QofBook, you can produce the effect of a join from running
+the two SELECT queries for each value of param_id held in 'value'.
+
+See ::QofEntityForeachCB and ::qof_object_foreach.
+
+Date queries handle full date and time strings, using the format
+exported by the QSF backend. To query dates and times, convert
+user input into UTC time using the ::QOF_UTC_DATE_FORMAT string.
+e.g. set the UTC date format and call ::qof_print_time_buff
+with a time_t obtained via ::timespecToTime_t.
+
+If the param is a KVP frame, then we use a special markup to 
+indicate frame values.  The markup should look like 
+/some/kvp/path:value. Thus, for example,
+  SELECT * FROM SomeObj WHERE (param_a < '/some/kvp:10.0')
+will search for the object where param_a is a KVP frame, and this
+KVP frame contains a path '/some/kvp' and the value stored at that
+path is floating-point and that float value is less than 10.0.
+
+The following are types of queries are NOT supported:
+  SELECT a,b,c FROM ...
+I am thinking of implementing the above as a list of KVP's
+whose keys would be a,b,c and values would be the results of the
+search. (Linas)
+
+XXX (Neil W). Alternatively, I need to use something like this
+when converting QOF objects between applications by using the
+returned parameter values to create a second object. One application
+using QOF could register objects from two applications and convert
+data from one to the other by using SELECT a,b,c FROM ObjA;
+SELECT d,f,k FROM ObjB; qof_object_new_instance(); ObjC_set_a(value_c);
+ObjC_set_b(value_k) etc. What's needed is for the SELECT to return
+a complete object that only contains the parameters selected.
+
+ Also unsupported:  UPDATE. 
+ 
+Certain SQL commands can have no QOF equivalent and will
+generate a runtime parser error:
+ - ALTER
+ - CREATE
+ - DROP
+ - FLUSH
+ - GRANT
+ - KILL
+ - LOCK
+ - OPTIMIZE
+ - REVOKE
+ - USE
+
   @{ */
 typedef struct _QofSqlQuery QofSqlQuery;
 
@@ -51,57 +138,25 @@
  */
 void qof_sql_query_set_book (QofSqlQuery *q, QofBook *book);
 
-/** Perform the query, return the results.
+/** \brief Perform the query, return the results.
+
  *  The book must be set in order to be able to perform a query.
  *
- *  The returned list is a list of ... See below ... 
  *  The returned list will have been sorted using the indicated sort 
- *  order, (by default ascending order) and trimed to the
+ *  order, (by default ascending order) and trimmed to the
  *  max_results length.
  *  Do NOT free the resulting list.  This list is managed internally
  *  by QofSqlQuery.
  *
- * The types of SQL queries that are allowed at this point are very 
- * limited.  In general, only the following types of queries are 
- * supported:
- *   SELECT * FROM SomeObj WHERE (param_a < 10.0) AND (param_b = "asdf")
- *          SORT BY param_c DESC;
- * The returned list is a list of all of the instances of 'SomeObj' that
- * mathc the query.   The 'SORT' term is optional. The 'WHERE' term is
- * optional; but if you don't include 'WHERE', you will get a list of 
- * all of the object instances.  The Boolean operations 'AND' and 'OR'
- * together with parenthesis can be used to construct arbitrarily 
- * nested predicates.
- *
- * If the param is a KVP frame, then we use a special markup to 
- * indicate frame values.  The markup should look like 
- * /some/kvp/path:value. Thus, for example,
- *   SELECT * FROM SomeObj WHERE (param_a < '/some/kvp:10.0')
- * will search for the object where param_a is a KVP frame, and this
- * KVP frame contains a path '/some/kvp' and the value stored at that
- * path is floating-point and that float value is less than 10.0.
- *
- * The following are types of queries are NOT supported:
- *   SELECT a,b,c FROM ...
- * I am thinking of implementing the above as a list of KVP's
- * whose keys would be a,b,c and values would be the results of the
- * search.
- *
- * Also unsupported are joins:
- *   SELECT * FROM ObjA,ObjB WHERE (ObjA.thingy = ObjB.Stuff);
- * The problem with the above is that the search requires a nested
- * search loop, aka a 'join', which is not currently supported in the
- * underlying QofQuery code.
- *
- * Also unsupported:  UPDATE and INSERT. 
  */
 
 GList * qof_sql_query_run (QofSqlQuery *query, const char * str);
 
-/** Same as above, but just parse/pre-process the query; do
- *  not actually run it over the dataset.  The QofBook does not
- *  need to be set before calling this function.
- */
+/** Same ::qof_sql_query_run, but just parse/pre-process the query; do
+  not actually run it over the dataset.  The QofBook does not
+  need to be set before calling this function.
+*/
+
 void qof_sql_query_parse (QofSqlQuery *query, const char * str);
 
 /** Return the QofQuery form of the previously parsed query. */
Index: qofquery.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/qofquery.h -Lsrc/engine/qofquery.h -u -r1.14 -r1.15
--- src/engine/qofquery.h
+++ src/engine/qofquery.h
@@ -85,6 +85,9 @@
 #include "guid.h"
 #include "qofbook.h"
 #include "qofquerycore.h"
+#include "qofchoice.h"
+
+#define QOF_MOD_QUERY "qof-query"
 
 /** A Query */
 typedef struct _QofQuery QofQuery;
@@ -114,8 +117,8 @@
 #define QOF_PARAM_VERSION "version" 
 
 /* --------------------------------------------------------- */
-/** @name Query Subsystem Initialization and Shudown  */
-/* @{ */
+/** \name Query Subsystem Initialization and Shudown  */
+// @{
 /** Subsystem initialization and shutdown. Call init() once 
  *  to initalize the query subsytem; call shutdown() to free
  *  up any resources associated with the query subsystem. 
@@ -124,11 +127,11 @@
 
 void qof_query_init (void);
 void qof_query_shutdown (void);
-/* @} */
+// @}
 
 /* --------------------------------------------------------- */
-/** @name Low-Level API Functions */
-/* @{ */
+/** \name Low-Level API Functions */
+// @{
 
 GSList * qof_query_build_param_list (char const *param, ...);
 
@@ -152,10 +155,12 @@
  */
 void qof_query_search_for (QofQuery *query, QofIdTypeConst obj_type);
 
-/** Set the book to be searched.  Books contain/identify collections 
+/** Set the book to be searched.  Books contain/identify collections
  *  of objects; the search will be performed over those books
- *  specified with this function.  If no books are set, no results 
- *  will be returned (since there is nothing to search over).
+ *  specified with this function.  If no books are set, no results
+ *  will be returned (since there is nothing to search over). (CAS:
+ *  Apparently, if no books are set, you'll actually get a critical
+ *  assertion failure.)
  *
  *  You can search multiple books.  To specify multiple books, call 
  *  this function multiple times with different arguments.  
@@ -251,6 +256,7 @@
 
 /** DOCUMENT ME !! */
 gboolean qof_query_has_term_type (QofQuery *q, GSList *term_param);
+GSList * qof_query_get_term_type (QofQuery *q, GSList *term_param);
 
 /** Make a copy of the indicated query */
 QofQuery * qof_query_copy (QofQuery *q);
@@ -364,6 +370,6 @@
 /** Return the list of books we're using */
 GList * qof_query_get_books (QofQuery *q);
 
+// @}
 /* @} */
 #endif /* QOF_QUERYNEW_H */
-/* @} */
Index: Scrub2.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Scrub2.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/engine/Scrub2.c -Lsrc/engine/Scrub2.c -u -r1.39 -r1.40
--- src/engine/Scrub2.c
+++ src/engine/Scrub2.c
@@ -20,7 +20,7 @@
 \********************************************************************/
 
 /** @file Scrub2.c
- *  @breif Utilities to Convert Stock Accounts to use Lots
+ *  @brief Utilities to Convert Stock Accounts to use Lots
  *  @author Created by Linas Vepstas March 2003
  *  @author Copyright (c) 2003 Linas Vepstas <linas at linas.org>
  *
@@ -44,15 +44,12 @@
 #include "ScrubP.h"
 #include "cap-gains.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
-#include "gnc-trace.h"
-#include "kvp-util-p.h"
 #include "messages.h"
 #include "policy-p.h"
 
-static short module = MOD_LOT;
+static QofLogModule log_module = GNC_MOD_LOT;
 
 /* ============================================================== */
 /** Loop over all splits, and make sure that every split
@@ -324,7 +321,7 @@
    KvpFrame *ksub;
 
    /* Find and remove the matching guid's */
-   ksub = gnc_kvp_bag_find_by_guid (sa->kvp_data, "lot-split",
+   ksub = (KvpFrame*)gnc_kvp_bag_find_by_guid (sa->kvp_data, "lot-split",
                     "peer_guid", &sb->entity.guid);
    if (ksub) 
    {
@@ -333,7 +330,7 @@
    }
 
    /* Now do it in the other direction */
-   ksub = gnc_kvp_bag_find_by_guid (sb->kvp_data, "lot-split",
+   ksub = (KvpFrame*)gnc_kvp_bag_find_by_guid (sb->kvp_data, "lot-split",
                     "peer_guid", &sa->entity.guid);
    if (ksub) 
    {
Index: qofid.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofid.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/qofid.h -Lsrc/engine/qofid.h -u -r1.14 -r1.15
--- src/engine/qofid.h
+++ src/engine/qofid.h
@@ -58,6 +58,9 @@
     a collection that is associated with that type, then you must use
     Books.
 
+	Entities can refer to other entities as well as to the basic
+	QOF types, using the qofclass parameters.
+
  @{ */
 /** @file qofid.h
     @brief QOF entity type identification system 
@@ -65,7 +68,6 @@
     @author Copyright (C) 2003 Linas Vepstas <linas at linas.org>
 */
 
-
 #include <string.h>
 #include "guid.h"
 
@@ -73,12 +75,13 @@
 typedef const char * QofIdType;
 /** QofIdTypeConst declaration */
 typedef const char * QofIdTypeConst;
+/** QofLogModule declaration */
+typedef const gchar* QofLogModule;
 
 #define QOF_ID_NONE           NULL
 #define QOF_ID_NULL           "null"
 
 #define QOF_ID_BOOK           "Book"
-#define QOF_ID_FREQSPEC       "FreqSpec"
 #define QOF_ID_SESSION        "Session"
 
 /** simple,cheesy cast but holds water for now */
@@ -148,14 +151,21 @@
 /** Release the data associated with this entity. Dont actually free
  * the memory associated with the instance. */
 void qof_entity_release (QofEntity *);
- /* @} */
+/** @} */
 
 /** Return the GUID of this entity */
 const GUID * qof_entity_get_guid (QofEntity *);
 
 /** @name Collections of Entities 
  @{ */
+
+/** create a new collection of entities of type */
 QofCollection * qof_collection_new (QofIdType type);
+
+/** return the number of entities in the collection. */
+guint qof_collection_count (QofCollection *col);
+
+/** destroy the collection */
 void qof_collection_destroy (QofCollection *col);
 
 /** return the type that the collection stores */
@@ -182,8 +192,72 @@
 
 /** Return value of 'dirty' flag on collection */
 gboolean qof_collection_is_dirty (QofCollection *col);
-/** @} */
 
+/** @name QOF_TYPE_COLLECT: Linking one entity to many of one type
+
+\note These are \b NOT the same as the main collections in the book.
+
+QOF_TYPE_COLLECT is a secondary collection, used to select entities
+of one object type as references of another entity.
+\sa QOF_TYPE_CHOICE.
+
+@{
+*/
+/** \brief Add an entity to a QOF_TYPE_COLLECT.
+
+\note These are \b NOT the same as the main collections in the book.
+
+Entities can be
+freely added and merged across these secondary collections, they
+will not be removed from the original collection as they would
+by using ::qof_entity_insert_entity or ::qof_entity_remove_entity. 
+
+*/
+gboolean
+qof_collection_add_entity (QofCollection *coll, QofEntity *ent);
+
+/** \brief Merge two QOF_TYPE_COLLECT of the same type.
+
+\note \b NOT the same as the main collections in the book.
+
+QOF_TYPE_COLLECT uses a secondary collection, independent of
+those in the book. Entities will not be removed from the
+original collection as when using ::qof_entity_insert_entity
+or ::qof_entity_remove_entity.
+
+*/
+gboolean
+qof_collection_merge (QofCollection *target, QofCollection *merge);
+
+/** \brief Compare two secondary collections.
+
+Performs a deep comparision of the collections. Each QofEntity in
+each collection is looked up in the other collection, via the GUID.
+
+\return 0 if the collections are identical or both are NULL
+otherwise -1 if target is NULL or either collection contains an entity with an invalid
+GUID or if the types of the two collections do not match,
+or +1 if merge is NULL or if any entity exists in one collection but
+not in the other.
+*/
+gint
+qof_collection_compare (QofCollection *target, QofCollection *merge);
+
+/** \brief Create a secondary collection from a GList
+
+ at param type The QofIdType of the QofCollection \b and of 
+	\b all entities in the GList.
+ at param glist GList of entities of the same QofIdType.
+
+ at return NULL if any of the entities fail to match the
+	QofCollection type, else a pointer to the collection
+	on success.
+*/
+QofCollection*
+qof_collection_from_glist (QofIdType type, GList *glist);
+
+/** @} */
+/** @} */
 
 #endif /* QOF_ID_H */
 /** @} */
Index: SX-ttinfo.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SX-ttinfo.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/engine/SX-ttinfo.h -Lsrc/engine/SX-ttinfo.h -u -r1.4 -r1.5
--- src/engine/SX-ttinfo.h
+++ src/engine/SX-ttinfo.h
@@ -28,10 +28,9 @@
 #include "config.h"
 
 #include <glib.h>
-
+#include "qof.h"
 #include "SchedXaction.h"
 #include "Account.h"
-#include "gnc-numeric.h"
 #include "gnc-commodity.h"
 
 typedef struct TTInfo_s TTInfo;
Index: qofbackend.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbackend.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/qofbackend.c -Lsrc/engine/qofbackend.c -u -r1.5 -r1.6
--- src/engine/qofbackend.c
+++ src/engine/qofbackend.c
@@ -1,6 +1,7 @@
 /********************************************************************\
  * qofbackend.c -- utility routines for dealing with the data backend  *
  * Copyright (C) 2000 Linas Vepstas <linas at linas.org>               *
+ * Copyright (C) 2004-5 Neil Williams <linux at codehelp.co.uk>        *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -21,14 +22,23 @@
  *                                                                  *
 \********************************************************************/
 
+#define _GNU_SOURCE
 #include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
 #include <stdarg.h>
+#include <regex.h>
 #include <glib.h>
-
-#include "qofbackend.h"
+#include <gmodule.h>
+#include <dlfcn.h>
+#include <sys/stat.h>
+#include <errno.h>
 #include "qofbackend-p.h"
 
-/* static short module = MOD_BACKEND; */
+static QofLogModule log_module = QOF_MOD_BACKEND;
+
+#define QOF_CONFIG_DESC    "desc"
+#define QOF_CONFIG_TIP     "tip"
 
 /********************************************************************\
  * error handling                                                   *
@@ -121,6 +131,7 @@
     be->run_query = NULL;
 
     be->sync = NULL;
+	be->load_config = NULL;
 
     be->events_pending = NULL;
     be->process_events = NULL;
@@ -129,6 +140,7 @@
     if (be->error_msg) g_free (be->error_msg);
     be->error_msg = NULL;
     be->percentage = NULL;
+	be->backend_configuration = kvp_frame_new();
 
 #ifdef GNUCASH_MAJOR_VERSION
     /* XXX remove these */
@@ -138,4 +150,278 @@
 #endif
 }
 
+void
+qof_backend_run_begin(QofBackend *be, QofInstance *inst)
+{
+	if(!be || !inst) { return; }
+	if(!be->begin) { return; }
+	(be->begin) (be, inst);
+}
+
+gboolean
+qof_backend_begin_exists(QofBackend *be)
+{
+	if(be->begin) { return TRUE; }
+	else { return FALSE; }
+}
+
+void
+qof_backend_run_commit(QofBackend *be, QofInstance *inst)
+{
+	if(!be || !inst) { return; }
+	if(!be->commit) { return; }
+	(be->commit) (be, inst);
+}
+
+/* =========== Backend Configuration ================ */
+
+void qof_backend_prepare_frame(QofBackend *be)
+{
+	g_return_if_fail(be);
+	if(!kvp_frame_is_empty(be->backend_configuration)) {
+		kvp_frame_delete(be->backend_configuration);
+		be->backend_configuration = kvp_frame_new();
+	}
+	be->config_count = 0;
+}
+
+void qof_backend_prepare_option(QofBackend *be, QofBackendOption *option)
+{
+	KvpValue *value;
+	gchar *temp;
+	gint count;
+
+	g_return_if_fail(be || option);
+	count = be->config_count;
+	count++;
+	value = NULL;
+	ENTER (" %d", count);
+	switch (option->type)
+	{
+		case KVP_TYPE_GINT64   : {
+			value = kvp_value_new_gint64(*(gint64*)option->value);
+			break; 
+		}
+		case KVP_TYPE_DOUBLE   : { 
+			value = kvp_value_new_double(*(double*)option->value);
+			break; 
+		}
+		case KVP_TYPE_NUMERIC  : {
+			value = kvp_value_new_numeric(*(gnc_numeric*)option->value);
+			break; 
+		}
+		case KVP_TYPE_STRING   : {
+			value = kvp_value_new_string((const char*)option->value);
+			break;
+		}
+		case KVP_TYPE_GUID     : { break; } /* unsupported */
+		case KVP_TYPE_TIMESPEC : {
+			value = kvp_value_new_timespec(*(Timespec*)option->value);
+			break;
+		}
+		case KVP_TYPE_BINARY   : { break; } /* unsupported */
+		case KVP_TYPE_GLIST    : { break; } /* unsupported */
+		case KVP_TYPE_FRAME    : { break; } /* unsupported */
+	}
+	if(value) {
+		temp = g_strdup_printf("/%s", option->option_name);
+		kvp_frame_set_value(be->backend_configuration, temp, value);
+		PINFO (" setting value at %s", temp);
+		g_free(temp);
+		temp = g_strdup_printf("/%s/%s", QOF_CONFIG_DESC, option->option_name);
+		PINFO (" setting description %s at %s", option->description, temp);
+		kvp_frame_set_string(be->backend_configuration, temp, option->description);
+		PINFO (" check= %s", kvp_frame_get_string(be->backend_configuration, temp));
+		g_free(temp);
+		temp = g_strdup_printf("/%s/%s", QOF_CONFIG_TIP, option->option_name);
+		PINFO (" setting tooltip %s at %s", option->tooltip, temp);
+		kvp_frame_set_string(be->backend_configuration, temp, option->tooltip);
+		PINFO (" check= %s", kvp_frame_get_string(be->backend_configuration, temp));
+		g_free(temp);
+		/* only increment the counter if successful */
+		be->config_count = count;
+	}
+	LEAVE (" ");
+}
+
+KvpFrame* qof_backend_complete_frame(QofBackend *be)
+{
+	g_return_val_if_fail(be, NULL);
+	be->config_count = 0;
+	return be->backend_configuration;
+}
+
+struct config_iterate {
+	QofBackendOptionCB fcn;
+	gpointer           data;
+	gint               count;
+	KvpFrame          *recursive;
+};
+
+static void
+config_foreach_cb (const char *key, KvpValue *value, gpointer data)
+{
+	QofBackendOption option;
+	gint64 int64;
+	double db;
+	gnc_numeric num;
+	Timespec ts;
+	gchar *parent;
+	struct config_iterate *helper;
+
+	g_return_if_fail(key || value || data);
+	helper = (struct config_iterate*)data;
+	if(!helper->recursive) { PERR (" no parent frame"); return;	}
+	// skip the presets.
+	if(0 == safe_strcmp(key, QOF_CONFIG_DESC)) { return; }
+	if(0 == safe_strcmp(key, QOF_CONFIG_TIP)) { return; }
+	ENTER (" key=%s", key);
+	option.option_name = key;
+	option.type = kvp_value_get_type(value);
+	if(!option.type) { return; }
+	switch (option.type)
+	{
+		case KVP_TYPE_GINT64   : {
+			int64 = kvp_value_get_gint64(value);
+			option.value = (gpointer)&int64;
+			break; 
+		}
+		case KVP_TYPE_DOUBLE   : {
+			db = kvp_value_get_double(value);
+			option.value = (gpointer)&db;
+			break; 
+		}
+		case KVP_TYPE_NUMERIC  : {
+			num = kvp_value_get_numeric(value);
+			option.value = (gpointer)&num;
+			break; 
+		}
+		case KVP_TYPE_STRING   : {
+			option.value = (gpointer)kvp_value_get_string(value);
+			break;
+		}
+		case KVP_TYPE_GUID     : { break; } /* unsupported */
+		case KVP_TYPE_TIMESPEC : {
+			ts = kvp_value_get_timespec(value);
+			option.value = (gpointer)&ts;
+			break;
+		}
+		case KVP_TYPE_BINARY   : { break; } /* unsupported */
+		case KVP_TYPE_GLIST    : { break; } /* unsupported */
+		case KVP_TYPE_FRAME    : { break; } /* unsupported */
+	}
+	parent = g_strdup_printf("/%s/%s", QOF_CONFIG_DESC, key);
+	option.description = kvp_frame_get_string(helper->recursive, parent);
+	g_free(parent);
+	parent = g_strdup_printf("/%s/%s", QOF_CONFIG_TIP, key);
+	option.tooltip = kvp_frame_get_string(helper->recursive, parent);
+	helper->count++;
+	helper->fcn (&option, helper->data);
+	LEAVE (" desc=%s tip=%s", option.description, option.tooltip);
+}
+
+void qof_backend_option_foreach(KvpFrame *config, QofBackendOptionCB cb, gpointer data)
+{
+	struct config_iterate helper;
+
+	if(!config || !cb) { return; }
+	ENTER (" ");
+	helper.fcn = cb;
+	helper.count = 1;
+	helper.data = data;
+	helper.recursive = config;
+	kvp_frame_for_each_slot(config, config_foreach_cb, &helper);
+	LEAVE (" ");
+}
+
+void
+qof_backend_load_config(QofBackend *be, KvpFrame *config)
+{
+	if(!be || !config) { return; }
+	if(!be->load_config) { return; }
+	(be->load_config) (be, config);
+}
+
+KvpFrame*
+qof_backend_get_config(QofBackend *be)
+{
+	if(!be) { return NULL; }
+	if(!be->get_config) { return NULL; }
+	return (be->get_config) (be);
+}
+
+gboolean
+qof_backend_commit_exists(QofBackend *be)
+{
+	if(!be) { return FALSE; }
+	if(be->commit) { return TRUE; }
+	else { return FALSE; }
+}
+
+gboolean
+qof_begin_edit(QofInstance *inst)
+{
+  QofBackend * be;
+
+  if (!inst) { return FALSE; }
+  (inst->editlevel)++;
+  if (1 < inst->editlevel) { return FALSE; }
+  if (0 >= inst->editlevel) { inst->editlevel = 1; }
+  be = qof_book_get_backend (inst->book);
+    if (be && qof_backend_begin_exists(be)) {
+     qof_backend_run_begin(be, inst);
+  } else { inst->dirty = TRUE; }
+  return TRUE;
+}
+
+gboolean qof_commit_edit(QofInstance *inst)
+{
+  QofBackend * be;
+
+  if (!inst) { return FALSE; }
+  (inst->editlevel)--;
+  if (0 < inst->editlevel) { return FALSE; }
+  if ((-1 == inst->editlevel) && inst->dirty)
+  {
+    be = qof_book_get_backend ((inst)->book);
+    if (be && qof_backend_begin_exists(be)) {
+     qof_backend_run_begin(be, inst);
+    }
+    inst->editlevel = 0;
+  }
+  if (0 > inst->editlevel) { inst->editlevel = 0; }
+  return TRUE;
+}
+
+gboolean
+qof_load_backend_library (const char *directory, 
+				const char* filename, const char* init_fcn)
+{
+	struct stat sbuf;
+	gchar *fullpath;
+	typedef void (* backend_init) (void);
+	GModule *backend;
+	backend_init gmod_init;
+	gpointer g;
+
+	g_return_val_if_fail(g_module_supported(), FALSE);
+	fullpath = g_module_build_path(directory, filename);
+	PINFO (" fullpath=%s", fullpath);
+	g_return_val_if_fail((stat(fullpath, &sbuf) == 0), FALSE);
+	backend = g_module_open(fullpath, G_MODULE_BIND_LAZY);
+	if(!backend) { 
+		g_message ("%s: %s\n", PACKAGE, g_module_error ());
+		return FALSE;
+	}
+	g = &gmod_init;
+	if (!g_module_symbol (backend, init_fcn, g))
+	{
+		g_message ("%s: %s\n", PACKAGE, g_module_error ());
+		return FALSE;
+	}
+	g_module_make_resident(backend);
+	gmod_init();
+	return TRUE;
+}
+
 /************************* END OF FILE ********************************/
Index: qofquerycore.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquerycore.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/engine/qofquerycore.h -Lsrc/engine/qofquerycore.h -u -r1.15 -r1.16
--- src/engine/qofquerycore.h
+++ src/engine/qofquerycore.h
@@ -70,22 +70,22 @@
 /** Comparisons for QOF_TYPE_DATE	
  * The QOF_DATE_MATCH_DAY comparison rounds the two time
  *     values to mid-day and then compares these rounded values.
- * The QOF_DATE_MATCH_TIME comparison matches teh time values,
+ * The QOF_DATE_MATCH_NORMAL comparison matches the time values,
  *     down to the second.
  */
 /* XXX remove these deprecated old names .. */
-#define QOF_DATE_MATCH_ROUNDED QOF_DATE_MATCH_DAY
-#define QOF_DATE_MATCH_NORMAL  QOF_DATE_MATCH_TIME
+//#define QOF_DATE_MATCH_ROUNDED QOF_DATE_MATCH_DAY
+//#define QOF_DATE_MATCH_NORMAL  QOF_DATE_MATCH_TIME
 typedef enum {
   QOF_DATE_MATCH_NORMAL = 1,
   QOF_DATE_MATCH_DAY
 } QofDateMatch;
 
-/* Comparisons for QOF_TYPE_NUMERIC, QOF_TYPE_DEBCRED	
+/** Comparisons for QOF_TYPE_NUMERIC, QOF_TYPE_DEBCRED
  *
  * XXX Should be deprecated, or at least wrapped up as a convnience
  * function,  this is based on the old bill gribble code, which assumed 
- * the amount was always positive, and the then specified a funds-flow 
+ * the amount was always positive, and then specified a funds-flow 
  * direction (credit, debit, or either).
  * 
  * The point being that 'match credit' is equivalent to the compound
@@ -160,6 +160,9 @@
 QofQueryPredData *qof_query_boolean_predicate (QofQueryCompare how, gboolean val);
 QofQueryPredData *qof_query_char_predicate (QofCharMatch options,
                                             const char *chars);
+QofQueryPredData *qof_query_collect_predicate (QofGuidMatch options,
+                                            QofCollection *coll);
+QofQueryPredData *qof_query_choice_predicate  (QofGuidMatch options, GList *guids);
 
 /** The qof_query_kvp_predicate() matches the object that has
  *  the value 'value' located at the path 'path'.  In a certain
@@ -181,6 +184,8 @@
 /** Destroy a predicate. */
 void qof_query_core_predicate_free (QofQueryPredData *pdata);
 
+/** Retrieve a predicate. */
+gboolean qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date);
 /** Return a printable string for a core data object.  Caller needs
  *  to g_free() the returned string.
  */
Index: qofquerycore.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquerycore.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/engine/qofquerycore.c -Lsrc/engine/qofquerycore.c -u -r1.17 -r1.18
--- src/engine/qofquerycore.c
+++ src/engine/qofquerycore.c
@@ -25,13 +25,13 @@
 
 #include <glib.h>
 
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
 #include "qofquery.h"
 #include "qofquerycore.h"
 #include "qofquerycore-p.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_QUERY;
 
 /* A function to destroy a query predicate's pdata */
 typedef void (*QueryPredDataFree) (QofQueryPredData *pdata);
@@ -86,6 +86,12 @@
 typedef KvpFrame * (*query_kvp_getter) (gpointer, QofParam *);
 static const char * query_kvp_type = QOF_TYPE_KVP;
 
+typedef QofCollection * (*query_collect_getter) (gpointer, QofParam*);
+static const char * query_collect_type = QOF_TYPE_COLLECT;
+
+typedef const GUID * (*query_choice_getter) (gpointer, QofParam *);
+static const char * query_choice_type = QOF_TYPE_CHOICE;
+
 /* Tables for predicate storage and lookup */
 static gboolean initialized = FALSE;
 static GHashTable *predTable = NULL;
@@ -261,7 +267,8 @@
 static int 
 date_compare (Timespec ta, Timespec tb, QofDateMatch options)
 {
-  if (options == QOF_DATE_MATCH_ROUNDED) {
+
+  if (options == QOF_DATE_MATCH_DAY) {
     ta = timespecCanonicalDayTime (ta);
     tb = timespecCanonicalDayTime (tb);
   }
@@ -368,6 +375,17 @@
   return ((QofQueryPredData*)pdata);
 }
 
+gboolean
+qof_query_date_predicate_get_date (QofQueryPredData *pd, Timespec *date)
+{
+  query_date_t pdata = (query_date_t)pd;
+
+  if (pdata->pd.type_name != query_date_type)
+    return FALSE;
+  *date = pdata->date;
+  return TRUE;
+}
+
 static char * 
 date_to_string (gpointer object, QofParam *getter)
 {
@@ -859,7 +877,7 @@
 {
   gint64 num = ((query_int64_getter)getter->param_getfcn)(object, getter);
 
-  return g_strdup_printf (GNC_SCANF_LLD, (long long int) num);
+  return g_strdup_printf ("%" G_GINT64_FORMAT, num);
 }
 
 /* ================================================================ */
@@ -1260,6 +1278,332 @@
   return pd;
 }
 
+
+/* QOF_TYPE_COLLECT =============================================== */
+
+static int
+collect_match_predicate (gpointer object, QofParam *getter,
+                     QofQueryPredData *pd)
+{
+	query_coll_t pdata;
+	QofCollection *coll;
+	GList *node, *node2, *o_list;
+	const GUID *guid;
+
+	pdata = (query_coll_t)pd;
+	VERIFY_PREDICATE (query_collect_type);
+	coll = ((query_collect_getter)getter->param_getfcn) (object, getter);
+	guid = NULL;
+	switch(pdata->options) {
+		case QOF_GUID_MATCH_ALL : {
+			for (node = pdata->guids; node; node = node->next)
+			{
+				for (o_list = object; o_list; o_list = o_list->next)
+				{
+				guid = ((query_guid_getter)getter->param_getfcn)
+					(o_list->data, getter);
+				if (guid_equal (node->data, guid)) {
+					break;
+					}
+				}
+				if (o_list == NULL) {
+					break;
+				}
+			}
+			break;
+		}
+		case QOF_GUID_MATCH_LIST_ANY : {
+			o_list = ((query_glist_getter)getter->param_getfcn) (object, getter);
+			for (node = o_list; node; node = node->next)
+			{
+				for (node2 = pdata->guids; node2; node2 = node2->next)
+				{
+					if (guid_equal (node->data, node2->data)) {
+						break;
+					}
+				}
+				if (node2 != NULL) {
+					break;
+				}
+			}
+			g_list_free(o_list);
+			break;
+		}
+		default : {
+			guid = ((query_guid_getter)getter->param_getfcn) (object, getter);
+			for (node = pdata->guids; node; node = node->next)
+			{
+				if (guid_equal (node->data, guid)) {
+					break;
+				}
+			}
+		}
+		switch (pdata->options) {
+			case QOF_GUID_MATCH_ANY :
+			case QOF_GUID_MATCH_LIST_ANY : {
+				return (node != NULL);
+				break;
+			}
+			case QOF_GUID_MATCH_NONE :
+			case QOF_GUID_MATCH_ALL : {
+				return (node == NULL);
+				break;
+			}
+			case QOF_GUID_MATCH_NULL : {
+				return (guid == NULL);
+				break;
+			}
+			default : {
+				PWARN ("bad match type");
+				return 0;
+			}
+		}
+	}
+	return 0;
+}
+
+static int
+collect_compare_func (gpointer a, gpointer b, gint options, QofParam *getter)
+{
+	gint result;
+	QofCollection *c1, *c2;
+
+	c1 = ((query_collect_getter)getter->param_getfcn) (a, getter);
+	c2 = ((query_collect_getter)getter->param_getfcn) (b, getter);
+	result = qof_collection_compare(c1, c2);
+	return result;
+}
+
+static void
+collect_free_pdata (QofQueryPredData *pd)
+{
+	query_coll_t pdata;
+	GList *node;
+
+	node = NULL;
+	pdata = (query_coll_t) pd;
+	VERIFY_PDATA (query_collect_type);
+	for (node = pdata->guids; node; node = node->next)
+	{
+		guid_free (node->data);
+	}
+	qof_collection_destroy(pdata->coll);
+	g_list_free (pdata->guids);
+	g_free (pdata);
+}
+
+static QofQueryPredData *
+collect_copy_predicate (QofQueryPredData *pd)
+{
+	query_coll_t pdata = (query_coll_t) pd;
+
+	VERIFY_PDATA_R (query_collect_type);
+	return qof_query_collect_predicate (pdata->options, pdata->coll);
+}
+
+static gboolean
+collect_predicate_equal (QofQueryPredData *p1, QofQueryPredData *p2)
+{
+	query_coll_t pd1;
+	query_coll_t pd2;
+	gint result;
+
+	pd1 = (query_coll_t) p1;
+	pd2 = (query_coll_t) p2;
+	result = qof_collection_compare(pd1->coll, pd2->coll);
+	if(result == 0) { return TRUE; }
+	return FALSE;
+}
+
+static void
+query_collect_cb(QofEntity* ent, gpointer user_data)
+{
+	query_coll_t pdata;
+	GUID *guid;
+
+	guid = guid_malloc();
+	guid = (GUID*)qof_entity_get_guid(ent);
+	pdata = (query_coll_t)user_data;
+	pdata->guids = g_list_append(pdata->guids, guid);
+}
+
+QofQueryPredData *
+qof_query_collect_predicate (QofGuidMatch options, QofCollection *coll)
+{
+	query_coll_t pdata;
+
+	g_return_val_if_fail (coll, NULL);
+	pdata = g_new0 (query_coll_def, 1);
+	pdata->pd.type_name = query_collect_type;
+	pdata->options = options;
+	qof_collection_foreach(coll, query_collect_cb, pdata);
+	if (NULL == pdata->guids) { return NULL; }
+	return ((QofQueryPredData*)pdata);
+}
+
+/* QOF_TYPE_CHOICE */
+
+static int
+choice_match_predicate (gpointer object, QofParam *getter,
+                      QofQueryPredData *pd)
+{
+  query_choice_t pdata = (query_choice_t)pd;
+  GList *node, *o_list;
+  const GUID *guid = NULL;
+
+  VERIFY_PREDICATE (query_choice_type);
+
+  switch (pdata->options) {
+
+  case QOF_GUID_MATCH_ALL:
+    /* object is a GList of objects; param_getfcn must be called on each one.
+     * See if every guid in the predicate is accounted-for in the
+     * object list
+     */
+
+    for (node = pdata->guids; node; node = node->next)
+    {
+      /* See if this GUID matches the object's guid */
+      for (o_list = object; o_list; o_list = o_list->next)
+      {
+        guid = ((query_choice_getter)getter->param_getfcn) (o_list->data, getter);
+        if (guid_equal (node->data, guid))
+          break;
+      }
+
+      /*
+       * If o_list is NULL, we've walked the whole list without finding
+       * a match.  Therefore break out now, the match has failed.
+       */
+      if (o_list == NULL)
+        break;
+    }
+
+    /*
+     * The match is complete.  If node == NULL then we've succesfully
+     * found a match for all the guids in the predicate.  Return
+     * appropriately below.
+     */
+
+    break;
+
+  case QOF_GUID_MATCH_LIST_ANY:
+
+    o_list = ((query_glist_getter)getter->param_getfcn) (object, getter);
+
+    for (node = o_list; node; node = node->next)
+    {
+      GList *node2;
+
+      for (node2 = pdata->guids; node2; node2 = node2->next)
+      {
+        if (guid_equal (node->data, node2->data))
+          break;
+      }
+
+      if (node2 != NULL)
+        break;
+    }
+
+    g_list_free(o_list);
+
+    break;
+
+  default:
+    /* object is a single object, getter returns a GUID*
+     *
+     * See if the guid is in the list
+     */
+
+    guid = ((query_choice_getter)getter->param_getfcn) (object, getter);
+    for (node = pdata->guids; node; node = node->next)
+    {
+      if (guid_equal (node->data, guid))
+        break;
+    }
+  }
+
+  switch (pdata->options) {
+  case QOF_GUID_MATCH_ANY:
+  case QOF_GUID_MATCH_LIST_ANY:
+    return (node != NULL);
+    break;
+  case QOF_GUID_MATCH_NONE:
+  case QOF_GUID_MATCH_ALL:
+    return (node == NULL);
+    break;
+  case QOF_GUID_MATCH_NULL:
+    return (guid == NULL);
+    break;
+  default:
+    PWARN ("bad match type");
+    return 0;
+  }
+}
+
+static void
+choice_free_pdata (QofQueryPredData *pd)
+{
+  query_choice_t pdata = (query_choice_t)pd;
+  GList *node;
+  VERIFY_PDATA (query_choice_type);
+  for (node = pdata->guids; node; node = node->next)
+  {
+    guid_free (node->data);
+  }
+  g_list_free (pdata->guids);
+  g_free (pdata);
+}
+
+static QofQueryPredData *
+choice_copy_predicate (QofQueryPredData *pd)
+{
+  query_choice_t pdata = (query_choice_t)pd;
+  VERIFY_PDATA_R (query_choice_type);
+  return qof_query_choice_predicate (pdata->options, pdata->guids);
+}
+
+static gboolean
+choice_predicate_equal (QofQueryPredData *p1, QofQueryPredData *p2)
+{
+  query_choice_t pd1 = (query_choice_t) p1;
+  query_choice_t pd2 = (query_choice_t) p2;
+  GList *l1 = pd1->guids, *l2 = pd2->guids;
+
+  if (pd1->options != pd2->options) return FALSE;
+  if (g_list_length (l1) != g_list_length (l2)) return FALSE;
+  for ( ; l1 ; l1 = l1->next, l2 = l2->next)
+  {
+    if (!guid_equal (l1->data, l2->data))
+      return FALSE;
+  }
+  return TRUE;
+}
+
+QofQueryPredData *
+qof_query_choice_predicate (QofGuidMatch options, GList *guid_list)
+{
+  query_choice_t pdata;
+  GList *node;
+
+  if (NULL == guid_list) return NULL;
+
+  pdata = g_new0 (query_choice_def, 1);
+  pdata->pd.how = QOF_COMPARE_EQUAL;
+  pdata->pd.type_name = query_choice_type;
+  pdata->options = options;
+
+  pdata->guids = g_list_copy (guid_list);
+  for (node = pdata->guids; node; node = node->next)
+  {
+    GUID *guid = guid_malloc ();
+    *guid = *((GUID *)node->data);
+    node->data = guid;
+  }
+  return ((QofQueryPredData*)pdata);
+}
+
+
 /* initialization ================================================== */
 /** This function registers a new Core Object with the QofQuery
  * subsystem.  It maps the "core_name" object to the given
@@ -1349,6 +1693,11 @@
       char_predicate_equal },
     { QOF_TYPE_KVP, kvp_match_predicate, NULL, kvp_copy_predicate,
       kvp_free_pdata, NULL, kvp_predicate_equal },
+    { QOF_TYPE_COLLECT, collect_match_predicate, collect_compare_func,
+      collect_copy_predicate, collect_free_pdata, NULL,
+      collect_predicate_equal },
+    { QOF_TYPE_CHOICE, choice_match_predicate, NULL,
+      choice_copy_predicate, choice_free_pdata, NULL, choice_predicate_equal },
   };
 
   /* Register the known data types */
Index: qofsql.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofsql.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/qofsql.c -Lsrc/engine/qofsql.c -u -r1.7 -r1.8
--- src/engine/qofsql.c
+++ src/engine/qofsql.c
@@ -26,23 +26,32 @@
     @author Copyright (C) 2004 Linas Vepstas <linas at linas.org>
 
 */
+#define _GNU_SOURCE
 
 #include <stdlib.h>   /* for working atoll */
+#include <errno.h>
+#include "glib.h"
+#include "config.h"
+#ifdef HAVE_GDA
+#include <sql/sql_parser.h>
+#else
+#include "sql_parser.h"
+#endif
+#include <time.h>
+#include "kvp_frame.h"
+#include "gnc-date.h"
+#include "gnc-numeric.h"
+#include "gnc-trace.h"
+#include "guid.h"
+#include "qofbook.h"
+#include "qofquery.h"
+#include "qofquerycore.h"
+#include "qofsql.h"
+#include "gnc-engine-util.h"
+#include "qofinstance-p.h"
+#include "qofobject.h"
 
-#include <glib.h>
-#include <libsql/sql_parser.h>
-#include <qof/kvp_frame.h>
-#include <qof/gnc-date.h>
-#include <qof/gnc-numeric.h>
-#include <qof/gnc-trace.h>
-#include <qof/guid.h>
-#include <qof/qofbook.h>
-#include <qof/qofquery.h>
-#include <qof/qofquerycore.h>
-#include <qof/qofsql.h>
-#include <qof/gnc-engine-util.h>
-
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_QUERY;
 
 /* =================================================================== */
 
@@ -53,6 +62,8 @@
 	QofBook *book;
 	char * single_global_tablename;
 	KvpFrame *kvp_join;
+	GList *param_list;
+	QofEntity *inserted_entity;
 };
 
 /* ========================================================== */
@@ -147,7 +158,7 @@
 	char tmpbuff[128];
 	GSList *param_list;
 	GList *guid_list;
-	QofQueryPredData *pred_data = NULL;
+	QofQueryPredData *pred_data;
 	sql_field_item *sparam, *svalue;
 	char * qparam_name, *qvalue_name, *table_name, *param_name;
 	char *sep, *path,*str,*p;
@@ -161,31 +172,31 @@
 	QofType param_type;
 	QofGuidMatch gm;
 	
+	pred_data = NULL;
 	if (NULL == cond)
 	{
 		PWARN("missing condition");
 		return NULL;
 	}
-			
 	/* -------------------------------- */
 	/* field to match, assumed, for now to be on the left */
 	/* XXX fix this so it can be either left or right */
 	if (NULL == cond->d.pair.left)
 	{
-		PWARN("missing left paramter");
+		PWARN("missing left parameter");
 		return NULL;
 	}
 	sparam = cond->d.pair.left->item;
 	if (SQL_name != sparam->type)
 	{
-		PWARN("we support only paramter names at this time (parsed %d)",
+		PWARN("we support only parameter names at this time (parsed %d)",
           sparam->type);
 		return NULL;
 	}
 	qparam_name = sparam->d.name->data;
 	if (NULL == qparam_name)
 	{
-		PWARN ("missing paramter name");
+		PWARN ("missing parameter name");
 		return NULL;
 	}
 
@@ -194,7 +205,7 @@
 	/* XXX fix this so it can be either left or right */
 	if (NULL == cond->d.pair.right)
 	{
-		PWARN ("missing right paramter");
+		PWARN ("missing right parameter");
 		return NULL;
 	}
 	svalue = cond->d.pair.right->item;
@@ -234,7 +245,7 @@
 			case KVP_TYPE_GINT64:
 			{
 				gint64 ival = kvp_value_get_gint64(kv);
-				sprintf (tmpbuff, "%lld\n", ival);
+				sprintf (tmpbuff, "%" G_GINT64_FORMAT "\n", ival);
 				break;
 			}
 			case KVP_TYPE_DOUBLE:
@@ -261,7 +272,7 @@
 	}
 
 	/* -------------------------------- */
-	/* Now start building the QOF paramter */
+	/* Now start building the QOF parameter */
 	param_list = qof_query_build_param_list (qparam_name, NULL);
 
 	/* Get the where-term comparison operator */
@@ -276,7 +287,7 @@
 		default:
 			/* XXX for string-type queries, we should be able to
 			 * support 'IN' for substring search.  Also regex. */
-			PWARN ("Unsupported compare op (parsed as %s)", cond->op);
+			PWARN ("Unsupported compare op (parsed as %u)", cond->op);
 			return NULL;
 	}
 
@@ -288,7 +299,6 @@
 	{
 		table_name = query->single_global_tablename;
 	}
-		
 	if (NULL == table_name)
 	{
 		PWARN ("Need to specify an object class to query");
@@ -345,20 +355,19 @@
 	}
 	else if (!strcmp (param_type, QOF_TYPE_DATE))
 	{
-		// XXX FIXME: this doesn't handle time strings, only date strings
-		// XXX should also see if we need to do a day-compare or time-compare.
-		/* work around highly bogus locale setting */
-		qof_date_format_set(QOF_DATE_FORMAT_US);
-
-		rc= qof_scan_date_secs (qvalue_name, &exact);
-		if (0 == rc) 
-		{
-			PWARN ("unable to parse date: %s", qvalue_name);
-			return NULL;
+		/* Use a timezone independent setting */
+		qof_date_format_set(QOF_DATE_FORMAT_UTC);
+		rc = 0;
+		if(FALSE == qof_scan_date_secs (qvalue_name, &exact))
+		{
+			char *tail;
+			exact = strtoll(qvalue_name, &tail, 0);
+//			PWARN ("unable to parse date: %s", qvalue_name);
+//			return NULL;
 		}
 		ts.tv_sec = exact;
 		ts.tv_nsec = 0;
-		pred_data = qof_query_date_predicate (qop, QOF_DATE_MATCH_DAY, ts);
+		pred_data = qof_query_date_predicate (qop, QOF_DATE_MATCH_NORMAL, ts);
 	}
 	else if (!strcmp (param_type, QOF_TYPE_NUMERIC))
 	{
@@ -542,7 +551,7 @@
 			/* Set the sort direction */
 			if (SQL_asc == sorder->order_type) direction[i] = TRUE;
 
-			/* Find the paramter name */
+			/* Find the parameter name */
 			qparam_name = NULL;
 			n = sorder->name;
 			if (n)
@@ -552,11 +561,11 @@
 				{
 					qsp[i] = qof_query_build_param_list (qparam_name, NULL);
 				}
-				n = n->next;   /* next paramter */
+				n = n->next;   /* next parameter */
 			}
 			else
 			{
-				/* if no next paramter, then next order-by */
+				/* if no next parameter, then next order-by */
 				sorder_list = sorder_list->next;
 			}
 		}
@@ -568,26 +577,261 @@
 }
 
 /* ========================================================== */
+static void
+qof_queryForeachParam( QofParam* param, gpointer user_data) 
+{
+	QofSqlQuery *q;
+	
+	g_return_if_fail(user_data != NULL);
+	q = (QofSqlQuery*)user_data;
+	g_return_if_fail(param != NULL);
+	if((param->param_getfcn != NULL)&&(param->param_setfcn != NULL)) {
+		q->param_list = g_list_append(q->param_list, param);
+	}
+}
+
+static const char*
+qof_sql_get_value(sql_insert_statement *insert)
+{
+	GList *walk, *cur;
+	const char *insert_string;
+	sql_field *field;
+	sql_field_item * item;
+
+	/* how to cope with multiple results? */
+	if (insert->values == NULL) { return NULL; }
+	insert_string = NULL;
+	for (walk = insert->values; walk != NULL; walk = walk->next) 
+	{
+		field = walk->data;
+		item = field->item;
+		for (cur = item->d.name; cur != NULL; cur = cur->next)
+		{
+			insert_string = g_strdup_printf("%s", (char*)cur->data);
+		}
+	}
+	return insert_string;
+}
+
+static const QofParam*
+qof_sql_get_param(QofIdTypeConst type, sql_insert_statement *insert)
+{
+	GList *walk, *cur;
+	const char *param_name;
+	const QofParam *param;
+	sql_field *field;
+	sql_field_item *item;
+
+	param = NULL;
+	param_name = NULL;
+	if (insert->fields == NULL) { return NULL; }
+	for (walk = insert->fields; walk != NULL; walk = walk->next) 
+	{
+		field = walk->data;
+		item = field->item;
+		for (cur = item->d.name; cur != NULL; cur = cur->next)
+		{
+			param_name = g_strdup_printf("%s", (char*)cur->data);
+		}
+	}
+	param = qof_class_get_parameter(type, param_name);
+	return param;
+}
+
+static void
+qof_sql_insertCB( gpointer value, gpointer data)
+{
+	GList *param_list;
+	QofSqlQuery *q;
+	QofIdTypeConst type;
+	sql_insert_statement *sis;
+	const char *insert_string;
+	gboolean    registered_type;
+	QofEntity   *ent;
+	QofParam    *param;
+	struct tm   query_time;
+	time_t      query_time_t;
+	/* cm_ prefix used for variables that hold the data to commit */
+	gnc_numeric    cm_numeric;
+	double         cm_double;
+	gboolean       cm_boolean;
+	gint32         cm_i32;
+	gint64         cm_i64;
+	Timespec       cm_date;
+	char           cm_char, *tail;
+	GUID           *cm_guid;
+/*	KvpFrame       *cm_kvp;
+	KvpValue       *cm_value;
+	KvpValueType   cm_type;*/
+	const QofParam *cm_param;
+	void (*string_setter)    (QofEntity*, const char*);
+	void (*date_setter)      (QofEntity*, Timespec);
+	void (*numeric_setter)   (QofEntity*, gnc_numeric);
+	void (*double_setter)    (QofEntity*, double);
+	void (*boolean_setter)   (QofEntity*, gboolean);
+	void (*i32_setter)       (QofEntity*, gint32);
+	void (*i64_setter)       (QofEntity*, gint64);
+	void (*char_setter)      (QofEntity*, char);
+/*	void (*kvp_frame_setter) (QofEntity*, KvpFrame*);*/
+
+	q = (QofSqlQuery*)data;
+	ent = q->inserted_entity;
+	param = (QofParam*)value;
+	sis = q->parse_result->statement;
+	type = g_strdup_printf("%s", sis->table->d.simple);
+	insert_string = g_strdup(qof_sql_get_value(sis));
+	cm_param = qof_sql_get_param(type, sis);
+	param_list = g_list_copy(q->param_list);
+	while(param_list != NULL) {
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_STRING) == 0)  { 
+			string_setter = (void(*)(QofEntity*, const char*))cm_param->param_setfcn;
+			if(string_setter != NULL) { string_setter(ent, insert_string); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_DATE) == 0) { 
+			date_setter = (void(*)(QofEntity*, Timespec))cm_param->param_setfcn;
+			strptime(insert_string, QOF_UTC_DATE_FORMAT, &query_time);
+			query_time_t = mktime(&query_time);
+			timespecFromTime_t(&cm_date, query_time_t);
+			if(date_setter != NULL) { date_setter(ent, cm_date); }
+		}
+		if((safe_strcmp(cm_param->param_type, QOF_TYPE_NUMERIC) == 0)  ||
+		(safe_strcmp(cm_param->param_type, QOF_TYPE_DEBCRED) == 0)) { 
+			numeric_setter = (void(*)(QofEntity*, gnc_numeric))cm_param->param_setfcn;
+			string_to_gnc_numeric(insert_string, &cm_numeric);
+			if(numeric_setter != NULL) { numeric_setter(ent, cm_numeric); }
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_GUID) == 0) { 
+			cm_guid = g_new(GUID, 1);
+			if(TRUE != string_to_guid(insert_string, cm_guid))
+			{
+				LEAVE (" string to guid failed for %s", insert_string);
+				return;
+			}
+/*			reference_type = xmlGetProp(node, QSF_OBJECT_TYPE);
+			if(0 == safe_strcmp(QOF_PARAM_GUID, reference_type)) 
+			{
+				qof_entity_set_guid(qsf_ent, cm_guid);
+			}
+			else {
+				reference = qof_entity_get_reference_from(qsf_ent, cm_param);
+				if(reference) {
+					params->referenceList = g_list_append(params->referenceList, reference);
+				}
+			}*/
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_INT32) == 0) { 
+			errno = 0;
+			cm_i32 = (gint32)strtol (insert_string, &tail, 0);
+			if(errno == 0) {
+				i32_setter = (void(*)(QofEntity*, gint32))cm_param->param_setfcn;
+				if(i32_setter != NULL) { i32_setter(ent, cm_i32); }
+			}
+//			else { qof_backend_set_error(params->be, ERR_QSF_OVERFLOW); }
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_INT64) == 0) { 
+			errno = 0;
+			cm_i64 = strtoll(insert_string, &tail, 0);
+			if(errno == 0) {
+				i64_setter = (void(*)(QofEntity*, gint64))cm_param->param_setfcn;
+				if(i64_setter != NULL) { i64_setter(ent, cm_i64); }
+			}
+//			else { qof_backend_set_error(params->be, ERR_QSF_OVERFLOW); }
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_DOUBLE) == 0) { 
+			errno = 0;
+			cm_double = strtod(insert_string, &tail);
+			if(errno == 0) {
+				double_setter = (void(*)(QofEntity*, double))cm_param->param_setfcn;
+				if(double_setter != NULL) { double_setter(ent, cm_double); }
+			}
+		}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_BOOLEAN) == 0){ 
+			if(0 == safe_strcmp(insert_string, "TRUE")) {
+				cm_boolean = TRUE;
+			}
+			else { cm_boolean = FALSE; }
+			boolean_setter = (void(*)(QofEntity*, gboolean))cm_param->param_setfcn;
+			if(boolean_setter != NULL) { boolean_setter(ent, cm_boolean); }
+		}
+			if(safe_strcmp(cm_param->param_type, QOF_TYPE_KVP) == 0) { 
+				
+			}
+		if(safe_strcmp(cm_param->param_type, QOF_TYPE_CHAR) == 0) { 
+			cm_char = *insert_string;
+			char_setter = (void(*)(QofEntity*, char))cm_param->param_setfcn;
+			if(char_setter != NULL) { char_setter(ent, cm_char); }
+		}
+		param_list = param_list->next;
+	}
+}
+
+static QofEntity*
+qof_query_insert(QofSqlQuery *query)
+{
+	QofIdType type;
+	QofInstance *inst;
+	sql_insert_statement *sis;
+	sql_table *sis_t;
+
+	query->param_list = NULL;
+	type = NULL;
+	sis = query->parse_result->statement;
+	switch(sis->table->type) {
+		case SQL_simple: {
+			sis_t = sis->table;
+			query->single_global_tablename = g_strdup_printf("%s", sis_t->d.simple);
+			type = g_strdup(query->single_global_tablename);
+			break;
+		}
+		default: {
+			fprintf(stderr, "default");
+		}
+	}
+	inst = (QofInstance*)qof_object_new_instance(type, query->book);
+	if(inst == NULL) { return NULL; }
+	query->param_list = NULL;
+	query->inserted_entity = &inst->entity;
+	qof_class_param_foreach((QofIdTypeConst)type, qof_queryForeachParam, query);
+	g_list_foreach(query->param_list, qof_sql_insertCB, query);
+	return query->inserted_entity;
+}
+
+static const char*
+sql_type_as_string(sql_statement_type type)
+{
+	switch (type)
+	{
+		case SQL_select : { return "SELECT"; }
+		case SQL_insert : { return "INSERT"; }
+		case SQL_delete : { return "DELETE"; }
+		case SQL_update : { return "UPDATE"; }
+		default : { return "unknown"; }
+	}
+}
 
 void 
 qof_sql_query_parse (QofSqlQuery *query, const char *str)
 {
 	GList *tables;
+	char *buf;
 	sql_select_statement *sss;
 	sql_where *swear;
 	
 	if (!query) return;
 
 	/* Delete old query, if any */
-   /* XXX FIXME we should also delete the parse_result as well */
 	if (query->qof_query)
 	{
 		qof_query_destroy (query->qof_query);
+		sql_destroy(query->parse_result);
 		query->qof_query = NULL;
 	}
 
 	/* Parse the SQL string */
-	query->parse_result = sql_parse (str);
+	buf = g_strdup(str);
+	query->parse_result = sql_parse (buf);
+	g_free(buf);
 
 	if (!query->parse_result) 
 	{
@@ -595,10 +839,10 @@
 		return;
 	}
 
-	if (SQL_select != query->parse_result->type)
+	if ((SQL_select != query->parse_result->type)&&(SQL_insert != query->parse_result->type))
 	{
-		PWARN("currently, only SELECT statements are supported, "
-		                     "got type=%d", query->parse_result);
+		PWARN("currently, only SELECT or INSERT statements are supported, "
+		         "got type=%s", sql_type_as_string(query->parse_result->type));
 		return;
 	}
 
@@ -612,7 +856,11 @@
 	{
 		query->single_global_tablename = tables->data;
 	}
-
+	/* if this is an insert, we're done with the parse. */
+	if(SQL_insert == query->parse_result->type) {
+		query->qof_query = qof_query_create();
+		return;
+	}
 	sss = query->parse_result->statement;
 	swear = sss->where;
 	if (swear)
@@ -625,7 +873,6 @@
 	{
 		query->qof_query = qof_query_create();
 	}
-
 	/* Provide support for different sort orders */
 	handle_sort_order (query, sss->order);
 
@@ -642,7 +889,7 @@
 GList * 
 qof_sql_query_run (QofSqlQuery *query, const char *str)
 {
-	GList *node, *results;
+	GList *results;
 
 	if (!query) return NULL;
 
@@ -650,8 +897,12 @@
 	if (NULL == query->qof_query) return NULL;
 
 	qof_query_set_book (query->qof_query, query->book);
-
-	// qof_query_print (query->qof_query);
+	if(SQL_insert == query->parse_result->type){
+		results = NULL;
+		results = g_list_append(results, qof_query_insert(query));
+		return results;
+	}
+	qof_query_print (query->qof_query);
 	results = qof_query_run (query->qof_query);
 
 	return results;
@@ -660,7 +911,7 @@
 GList * 
 qof_sql_query_rerun (QofSqlQuery *query)
 {
-	GList *node, *results;
+	GList *results;
 
 	if (!query) return NULL;
 
Index: guid.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/guid.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/engine/guid.c -Lsrc/engine/guid.c -u -r1.34 -r1.35
--- src/engine/guid.c
+++ src/engine/guid.c
@@ -41,6 +41,7 @@
 
 #include "guid.h"
 #include "md5.h"
+#include "qofid.h"
 #include "gnc-trace.h"
 
 # ifndef P_tmpdir
@@ -58,15 +59,8 @@
 static struct md5_ctx guid_context;
 static GMemChunk *guid_memchunk = NULL;
 
-#if USING_THREADS
-/* guid_to_string uses a thread local buffer. These are used to set it up */
-#include <pthread.h>
-static pthread_key_t guid_buffer_key;
-static pthread_once_t guid_buffer_key_once = PTHREAD_ONCE_INIT;
-#endif
-
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_ENGINE;
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 /** Memory management routines ***************************************/
 static void
@@ -106,17 +100,19 @@
 const GUID *
 guid_null(void)
 {
-  static int null_inited = (0 == 1);
+  static int null_inited = 0;
   static GUID null_guid;
 
   if (!null_inited)
   {
     int i;
+    char *tmp = "NULLGUID.EMPTY.";
 
+    /* 16th space for '\O' */
     for (i = 0; i < 16; i++)
-      null_guid.data[i] = 0;
+      null_guid.data[i] = tmp[i];
 
-    null_inited = (0 == 0);
+    null_inited = 1;
   }
 
   return &null_guid;
@@ -193,6 +189,7 @@
   size_t file_bytes;
   FILE *fp;
 
+  memset(&stats, 0, sizeof(stats));
   if (stat(filename, &stats) != 0)
     return 0;
 
@@ -251,6 +248,7 @@
     if ((result < 0) || (result >= (int)sizeof(filename)))
       continue;
 
+    memset(&stats, 0, sizeof(stats));
     if (stat(filename, &stats) != 0)
       continue;
     md5_process_bytes(&stats, sizeof(stats), &guid_context);
@@ -294,7 +292,7 @@
 }
 
 static size_t
-init_from_buff(char * buf, size_t buflen)
+init_from_buff(unsigned char * buf, size_t buflen)
 {
   md5_process_bytes(buf, buflen, &guid_context);
   return buflen;
@@ -305,7 +303,8 @@
 {
   size_t bytes = 0;
 
-  guid_memchunk_init();
+  /* Not needed; taken care of on first malloc.
+   * guid_memchunk_init(); */
 
   md5_init_ctx(&guid_context);
 
@@ -395,6 +394,7 @@
   {
     char string[1024];
 
+    memset(string, 0, sizeof(string));
     gethostname(string, sizeof(string));
     md5_process_bytes(string, sizeof(string), &guid_context);
     bytes += sizeof(string);
@@ -474,16 +474,16 @@
   init_from_time();
 
   /* Make it a little extra salty.  I think init_from_time was buggy,
-	* or something, since duplicate id's actually happened. Or something
-	* like that.  I think this is because init_from_time kept returning
-	* the same values too many times in a row.  So we'll do some 'block
-	* chaining', and feed in the old guid as new random data.
-	*
-	* Anyway, I think the whole fact that I saw a bunch of duplicate 
-	* id's at one point, but can't reproduce the bug is rather alarming.
-	* Something must be broken somewhere, and merely adding more salt
-	* is just hiding the problem, not fixing it.
-	*/
+   * or something, since duplicate id's actually happened. Or something
+   * like that.  I think this is because init_from_time kept returning
+   * the same values too many times in a row.  So we'll do some 'block
+   * chaining', and feed in the old guid as new random data.
+   *
+   * Anyway, I think the whole fact that I saw a bunch of duplicate 
+   * id's at one point, but can't reproduce the bug is rather alarming.
+   * Something must be broken somewhere, and merely adding more salt
+   * is just hiding the problem, not fixing it.
+   */
   init_from_int (433781*counter);
   init_from_buff (guid->data, 16);
 
@@ -572,22 +572,19 @@
 }
 
 /* Allocate the key */
-#if USING_THREADS
-static void guid_buffer_key_alloc(void)
-{
-  pthread_key_create(&guid_buffer_key, NULL /* Never freed */);
-  pthread_setspecific(guid_buffer_key, malloc(GUID_ENCODING_LENGTH+1));
-}
-#endif
 
 const char *
 guid_to_string(const GUID * guid)
 {
-#if USING_THREADS
-  char *string;
-
-  pthread_once(&guid_buffer_key_once, guid_buffer_key_alloc);
-  string = pthread_getspecific(guid_buffer_key);
+#ifdef G_THREADS_ENABLED
+  static GStaticPrivate guid_buffer_key = G_STATIC_PRIVATE_INIT;
+  gchar *string;
+
+  string = g_static_private_get (&guid_buffer_key);
+  if (string == NULL) {
+    string = malloc(GUID_ENCODING_LENGTH+1);
+    g_static_private_set (&guid_buffer_key, string, g_free);
+  }
 #else
   static char string[64];
 #endif
Index: qofquery-deserial.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquery-deserial.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/qofquery-deserial.c -Lsrc/engine/qofquery-deserial.c -u -r1.2 -r1.3
--- src/engine/qofquery-deserial.c
+++ src/engine/qofquery-deserial.c
@@ -33,11 +33,6 @@
 #include "qofquerycore-p.h"
 #include "gnc-engine-util.h"
 
-#define CACHE_INSERT(str)  \
-    g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str))
-#define CACHE_REMOVE(str)  \
-    g_cache_remove(gnc_engine_get_string_cache(), (gpointer)(str))
-
 /* =========================================================== */
 
 #define GET_TEXT(node)  ({                                   \
@@ -413,7 +408,7 @@
 	xp = root->xmlChildrenNode;
 
 	how = QOF_COMPARE_EQUAL;
-	sm = QOF_DATE_MATCH_ROUNDED;
+	sm = QOF_DATE_MATCH_DAY;
 	date = (Timespec){0,0};
 
 	for (node=xp; node; node = node->next)
@@ -422,7 +417,7 @@
 
 		GET_HOW (how, "qofquery:compare", LT, LTE, EQUAL, GT, GTE, NEQ);
 		GET_MATCH2 (sm, "qofquery:date-match", 
-		            DATE_MATCH, NORMAL, ROUNDED);
+		            DATE_MATCH, NORMAL, DAY);
 		GET_DATE (0, date=, "qofquery:date");
 		{}
 	}
@@ -483,6 +478,7 @@
 		if (0 == strcmp (node->name, "qofquery:param"))
 		{
 			const char *str = GET_TEXT (node);
+                        /* BUG? I can't find the matching cache removal. */
 			plist = g_slist_append (plist, CACHE_INSERT(str));
 		}
 	}
Index: gnc-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-numeric.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -Lsrc/engine/gnc-numeric.c -Lsrc/engine/gnc-numeric.c -u -r1.61 -r1.62
--- src/engine/gnc-numeric.c
+++ src/engine/gnc-numeric.c
@@ -1183,10 +1183,10 @@
 gnc_numeric_to_string(gnc_numeric n) 
 {
   gchar *result;
-  long long int tmpnum = n.num;
-  long long int tmpdenom = n.denom;
+  gint64 tmpnum = n.num;
+  gint64 tmpdenom = n.denom;
 
-  result = g_strdup_printf("%lld/%lld", tmpnum, tmpdenom);
+  result = g_strdup_printf("%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, tmpnum, tmpdenom);
 
   return result;
 }
@@ -1196,13 +1196,13 @@
 {
   static char buff[1000];
   static char *p = buff;
-  long long int tmpnum = n.num;
-  long long int tmpdenom = n.denom;
+  gint64 tmpnum = n.num;
+  gint64 tmpdenom = n.denom;
 
   p+= 100;
   if (p-buff >= 1000) p = buff;
    
-  sprintf(p, "%lld/%lld", tmpnum, tmpdenom);
+  sprintf(p, "%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, tmpnum, tmpdenom);
 
   return p;
 }
@@ -1211,8 +1211,8 @@
 string_to_gnc_numeric(const gchar* str, gnc_numeric *n) 
 {
   size_t num_read;
-  long long int tmpnum;
-  long long int tmpdenom;
+  gint64 tmpnum;
+  gint64 tmpdenom;
     
   if(!str) return FALSE;
 
@@ -1245,14 +1245,14 @@
 {
   char * retval;
   if(gnc_numeric_check(in)) {
-    retval = g_strdup_printf("<ERROR> [%lld / %lld]",
-                             (long long int) in.num,
-                             (long long int) in.denom); 
+    retval = g_strdup_printf("<ERROR> [%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "]",
+                             in.num,
+                             in.denom); 
   }
   else {
-    retval = g_strdup_printf("[%lld / %lld]",
-                             (long long int) in.num,
-                             (long long int) in.denom); 
+    retval = g_strdup_printf("[%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "]",
+                             in.num,
+                             in.denom); 
   }
   return retval;
 }
Index: Transaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Transaction.h,v
retrieving revision 1.162
retrieving revision 1.163
diff -Lsrc/engine/Transaction.h -Lsrc/engine/Transaction.h -u -r1.162 -r1.163
--- src/engine/Transaction.h
+++ src/engine/Transaction.h
@@ -40,7 +40,7 @@
 are zero.  If there are only two splits, then the value of one must be 
 positive, the other negative: this denotes that one account is debited, 
 and another is credited by an equal amount.  By forcing the value of the
-splits to always 'add up' to zero, we can gaurentee that the balances
+splits to always 'add up' to zero, we can guarantee that the balances
 of the accounts are always correctly balanced.
 
 The engine does not enforce double-entry accounting, but provides an API
@@ -97,30 +97,34 @@
 #include "qofinstance.h"
 
 /** @name Split Reconciled field values
+
     If you change these
     be sure to change gnc-ui-util.c:gnc_get_reconciled_str() and
     associated functions
+
+@{
 */
-/**@{*/
 #define CREC 'c'              /**< The Split has been cleared    */
 #define YREC 'y'              /**< The Split has been reconciled */
 #define FREC 'f'              /**< frozen into accounting period */
 #define NREC 'n'              /**< not reconciled or cleared     */
 #define VREC 'v'              /**< split is void                 */
-/**@}*/
+/** @} */
 
-/** @name Transaction Type field values */
-/**@{*/
+/** @name Transaction Type field values
+@{
+*/
 #define TXN_TYPE_NONE	 '\0' /**< No transaction type       */
 #define TXN_TYPE_INVOICE 'I'  /**< Transaction is an invoice */
 #define TXN_TYPE_PAYMENT 'P'  /**< Transaction is a payment  */
-/**@}*/
+/** @} */
 
 /* --------------------------------------------------------------- */
 /* Transactions */
 
-/** @name Transaction creation and editing */
-/** @{ */
+/** @name Transaction creation and editing
+ @{
+*/
 /** 
  The xaccMallocTransaction() will malloc memory and initialize it.
  Once created, it is usually unsafe to merely "free" this memory;
@@ -215,8 +219,9 @@
 /** @} */
 
 
-/** @name Transaction general getters/setters */
-/** @{ */
+/** @name Transaction general getters/setters
+ @{
+*/
 
 /** Sorts the splits in a transaction, putting the debits first,
  *  followed by the credits.
@@ -229,11 +234,11 @@
 
 /** Set the  Transaction Type
  *
- * See #define TXN_TYPE_NONE, TXN_TYPE_INVOICE and TXN_TYPE_PAYMENT */
+ * See #TXN_TYPE_NONE, #TXN_TYPE_INVOICE and #TXN_TYPE_PAYMENT */
 void	      xaccTransSetTxnType (Transaction *trans, char type);
 /** Returns the  Transaction Type
  *
- * See #define TXN_TYPE_NONE, TXN_TYPE_INVOICE and TXN_TYPE_PAYMENT */
+ * See #TXN_TYPE_NONE, #TXN_TYPE_INVOICE and #TXN_TYPE_PAYMENT */
 char	      xaccTransGetTxnType (const Transaction *trans);
 
 
@@ -353,11 +358,12 @@
  */
 int  xaccTransOrder     (const Transaction *ta, const Transaction *tb);
 
-/**@}*/
+/** @} */
 
 
-/** @name Transaction date setters/getters */
-/**@{*/
+/** @name Transaction date setters/getters
+@{
+*/
    
 /** The xaccTransSetDate() method does the same thing as
     xaccTransSetDate[Posted]Secs(), but takes a convenient
@@ -421,16 +427,16 @@
 Timespec      xaccTransRetDateDueTS (const Transaction *trans);
 /** Dates and txn-type for A/R and A/P "invoice" postings */
 void	      xaccTransGetDateDueTS (const Transaction *trans, Timespec *ts);
-
-/**@}*/
+/** @} */
 
 
 /*-----------------------------------------------------------------------
  * Splits
  *-----------------------------------------------------------------------*/
 
-/** @name Split general getters/setters */
-/*@{*/
+/** @name Split general getters/setters
+@{
+*/
 
 /** Constructor. */
 Split       * xaccMallocSplit (QofBook *book);
@@ -503,10 +509,11 @@
 
 /** Returns the action string. */
 const char *  xaccSplitGetAction (const Split *split);
-/**@}*/
+/** @} */
 
-/** @name Split Date getters/setters */
-/**@{*/
+/** @name Split Date getters/setters
+@{
+*/
 /** Set the reconcile flag. The Reconcile flag is a single char, whose
  * values are typically are 'n', 'y', 'c'.  In Transaction.h, macros
  * are defined for typical values (e.g. CREC, YREC). */
@@ -527,7 +534,7 @@
 /** Returns the date (as Timespec) on which this split was reconciled. */
 Timespec      xaccSplitRetDateReconciledTS (const Split *split);
 
-/**@}*/
+/** @} */
 
 
 /** @name Split amount getters/setters 
@@ -535,8 +542,8 @@
  * 'value' vs. 'amount' of a Split: The 'value' is the amount of the
  * _transaction_ balancing commodity (i.e. currency) involved,
  * 'amount' is the amount of the _account's_ commodity involved.
+@{
 */
-/*@{*/
 
 /** The xaccSplitSetAmount() method sets the amount in the account's 
  * commodity that the split should have.
@@ -645,12 +652,11 @@
  */
 gnc_numeric xaccSplitGetReconciledBalance (const Split *split);
 
-/**@}*/
-
-
+/** @} */
 
-/** @name Split utility functions */
-/**@{*/
+/** @name Split utility functions 
+@{
+*/
 
 /** Equality.
  *
@@ -758,18 +764,19 @@
 /** document me */
 const char * xaccSplitGetCorrAccountCode(const Split *sa);
 
-/*@}*/
+/** @} */
 
 
 
-/** @name Split deprecated functions */
-/*@{*/
+/** @name Split deprecated functions 
+@{
+*/
 
 /** @deprecated The xaccSplitSetSharePrice() method sets the price of the
  * split. DEPRECATED - set the value and amount instead. */
 void         xaccSplitSetSharePrice (Split *split, gnc_numeric price);
 
-/*@}*/
+/** @} */
 
 
 /********************************************************************\
@@ -788,8 +795,9 @@
                                     const char separator);
 
 
-/** @name Transaction voiding */
-/*@{*/
+/** @name Transaction voiding
+@{
+*/
 /** xaccTransVoid voids a transaction.  A void transaction has no
  *  values, is unaffected by reconciliation, and, by default is not
  *  included in any queries.  A voided transaction may not be altered.
@@ -860,22 +868,23 @@
 
 /** Returns the time that a transaction was voided.
  *
- *  @param split The transaction in question.
+ *  @param tr The transaction in question.
  *
  *  @return A Timespec containing the time that this transaction was
  *  voided. Returns a time of zero upon error.
  */
 Timespec xaccTransGetVoidTime(const Transaction *tr);
-/**@}*/
+/** @} */
 
 /** @name Split Parameter names
+
  * Note, if you want to get the equivalent of "ACCT_MATCH_ALL" you
  * need to create a search on the following parameter list:
  * SPLIT->SPLIT_TRANS->TRANS_SPLITLIST->SPLIT_ACCOUNT_GUID.  If you do
  * this, you might want to use the ACCOUNT_MATCH_ALL_TYPE as the
  * override so the gnome-search dialog displays the right type.
- */
-/**@{*/
+ @{
+*/
 #define SPLIT_KVP		"kvp"
 
 #define SPLIT_DATE_RECONCILED	"date-reconciled"
@@ -899,10 +908,11 @@
 #define SPLIT_ACCT_FULLNAME	"acct-fullname"
 #define SPLIT_CORR_ACCT_NAME	"corr-acct-fullname"
 #define SPLIT_CORR_ACCT_CODE	"corr-acct-code"
-/**@}*/
+/** @} */
 
-/** @name Transaction Parameter names */
-/**@{*/
+/** @name Transaction Parameter names
+@{
+*/
 #define TRANS_KVP		"kvp"
 #define TRANS_NUM		"num"
 #define TRANS_DESCRIPTION	"desc"
@@ -921,12 +931,17 @@
 
 #define RECONCILED_MATCH_TYPE	"reconciled-match"
 
-/** deprecated rouitines */
+/** \deprecated */
 #define xaccSplitGetGUID(X)      qof_entity_get_guid(QOF_ENTITY(X))
+/** \deprecated */
 #define xaccSplitReturnGUID(X) (X ? *(qof_entity_get_guid(QOF_ENTITY(X))) : *(guid_null()))
+/** \deprecated */
 #define xaccTransGetBook(X)      qof_instance_get_book (QOF_INSTANCE(X))
+/** \deprecated */
 #define xaccTransGetGUID(X)      qof_entity_get_guid(QOF_ENTITY(X))
+/** \deprecated */
 #define xaccTransReturnGUID(X) (X ? *(qof_entity_get_guid(QOF_ENTITY(X))) : *(guid_null()))
+/** \deprecated */
 #define xaccTransGetSlots(X)     qof_instance_get_slots (QOF_INSTANCE(X))
 
 #endif /* XACC_TRANSACTION_H */
Index: qofinstance.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofinstance.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/qofinstance.h -Lsrc/engine/qofinstance.h -u -r1.14 -r1.15
--- src/engine/qofinstance.h
+++ src/engine/qofinstance.h
@@ -84,6 +84,20 @@
 /** Return value of is_dirty flag */
 gboolean qof_instance_is_dirty (QofInstance *);
 
+/** \brief Set the dirty flag
+
+Sets this instance AND the collection as dirty.
+*/
+void qof_instance_set_dirty(QofInstance* inst);
+
+gboolean qof_instance_check_edit(QofInstance *inst);
+
+gboolean qof_instance_do_free(QofInstance *inst);
+
+void qof_instance_mark_free(QofInstance *inst);
+
+QofInstance* qof_instance_create (QofIdType type, QofBook *book);
+
 /** Pair things up.  This routine inserts a kvp value into each instance
  *  containing the guid of the other.  In this way, if one has one of the
  *  pair, one can always find the other by looking up it's guid.  Typically,
Index: gnc-event-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-event-p.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/gnc-event-p.h -Lsrc/engine/gnc-event-p.h -u -r1.11 -r1.12
--- src/engine/gnc-event-p.h
+++ src/engine/gnc-event-p.h
@@ -27,23 +27,6 @@
 #include "gnc-event.h"
 #include "qofid.h"
 
-/* gnc_engine_generate_event
- *   Invoke all registered event handlers using the given arguments.
- *
- *   GNC_EVENT_CREATE events should be generated after the object
- *     has been created and registered in the engine entity table.
- *   GNC_EVENT_MODIFY events should be generated whenever any data
- *     member or submember (i.e., splits) is changed.
- *   GNC_EVENT_DESTROY events should be called before the object
- *     has been destroyed or removed from the entity table.
- *
- * entity:     the GUID of the entity generating the event
- * event_type: the type of event -- this should be one of the
- *             single-bit GNCEngineEventType values, not a combination.
- */
-void gnc_engine_gen_event (QofEntity *entity, 
-				GNCEngineEventType event_type);
-
 /* XXX deprecated, but still usedion on postgres backend */
 void gnc_engine_generate_event (const GUID *, QofIdType, GNCEngineEventType);
 
Index: qofbook.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbook.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/engine/qofbook.c -Lsrc/engine/qofbook.c -u -r1.24 -r1.25
--- src/engine/qofbook.c
+++ src/engine/qofbook.c
@@ -49,18 +49,29 @@
 #include "qofclass.h"
 #include "qofid-p.h"
 #include "qofobject-p.h"
+#include "gnc-engine-util.h"
 
-static short module = MOD_ENGINE;
+#include "guid.h"
+
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 /* ====================================================================== */
 /* constructor / destructor */
 
+static void coll_destroy(gpointer col)
+{
+  qof_collection_destroy((QofCollection *) col);
+}
+
 static void
 qof_book_init (QofBook *book)
 {
   if (!book) return;
 
-  book->hash_of_collections = g_hash_table_new (g_str_hash, g_str_equal);
+  book->hash_of_collections = g_hash_table_new_full(
+      g_str_hash, g_str_equal,
+      (GDestroyNotify)gnc_string_cache_remove,  /* key_destroy_func   */
+      coll_destroy);                            /* value_destroy_func */
 
   qof_instance_init (&book->inst, QOF_ID_BOOK, book);
 
@@ -87,14 +98,6 @@
   return book;
 }
 
-static gboolean
-coll_destroy(gpointer key, gpointer value, gpointer not_used)
-{
-  QofCollection *col = value;
-  qof_collection_destroy (col);
-  return TRUE;
-}
-
 static void
 book_final (gpointer key, gpointer value, gpointer booq)
 {
@@ -114,7 +117,7 @@
   book->shutting_down = TRUE;
   gnc_engine_force_event (&book->inst.entity, GNC_EVENT_DESTROY);
 
-  /* Call the list of finalizers, let them do thier thing. 
+  /* Call the list of finalizers, let them do their thing.
    * Do this before tearing into the rest of the book.
    */
   g_hash_table_foreach (book->data_table_finalizers, book_final, book);
@@ -122,12 +125,12 @@
   qof_object_book_end (book);
 
   g_hash_table_destroy (book->data_table_finalizers);
+  book->data_table_finalizers = NULL;
   g_hash_table_destroy (book->data_tables);
+  book->data_tables = NULL;
 
   qof_instance_release (&book->inst);
 
-  g_hash_table_foreach_remove (book->hash_of_collections,
-                               coll_destroy, NULL);
   g_hash_table_destroy (book->hash_of_collections);
   book->hash_of_collections = NULL;
 
@@ -191,6 +194,7 @@
   if (!book) return;
   ENTER ("book=%p be=%p", book, be);
   book->backend = be;
+  LEAVE (" ");
 }
 
 void qof_book_kvp_changed (QofBook *book)
@@ -234,21 +238,16 @@
 qof_book_get_collection (QofBook *book, QofIdType entity_type)
 {
   QofCollection *col;
-                                                                                
+
   if (!book || !entity_type) return NULL;
 
   col = g_hash_table_lookup (book->hash_of_collections, entity_type);
-  if (col) return col;
-                                                                                
-  col = qof_collection_new (entity_type);
-                                                                                
-  /* XXX should use string_cache instead of strdup */
-  /* Need strdup because values are sometimes freed */
-  /* this is a memory leak, since malloc'ed value is not freed */
-  /* ??? huh ?? freed where? by whom? */
-  g_hash_table_insert (book->hash_of_collections,
-          (gpointer)g_strdup(entity_type), col);
-                                                                                
+  if (!col) {
+      col = qof_collection_new (entity_type);
+      g_hash_table_insert(
+          book->hash_of_collections,
+          gnc_string_cache_insert((gpointer) entity_type), col);
+  }
   return col;
 }
 
@@ -283,6 +282,42 @@
 
 /* ====================================================================== */
 
+void qof_book_mark_closed (QofBook *book)
+{
+	if(!book) { return; }
+	book->book_open = 'n';
+}
+
+gchar qof_book_get_open_marker(QofBook *book)
+{
+       if(!book) { return 'n'; }
+       return book->book_open;
+}
+
+gint32 qof_book_get_version (QofBook *book)
+{
+       if(!book) { return -1; }
+       return book->version;
+}
+
+guint32 qof_book_get_idata (QofBook *book)
+{
+       if(!book) { return 0; }
+       return book->idata;
+}
+
+void qof_book_set_version (QofBook *book, gint32 version)
+{
+       if(!book && version < 0) { return; }
+       book->version = version;
+}
+
+void qof_book_set_idata(QofBook *book, guint32 idata)
+{
+       if(!book && idata < 0) { return; }
+       book->idata = idata;
+}
+
 gint64
 qof_book_get_counter (QofBook *book, const char *counter_name)
 {
Index: gnc-pricedb.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-pricedb.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -Lsrc/engine/gnc-pricedb.c -Lsrc/engine/gnc-pricedb.c -u -r1.82 -r1.83
--- src/engine/gnc-pricedb.c
+++ src/engine/gnc-pricedb.c
@@ -26,25 +26,10 @@
 
 #include <glib.h>
 #include <string.h>
-
-#include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
 #include "gnc-pricedb-p.h"
-#include "gnc-trace.h"
-#include "guid.h"
-#include "kvp-util.h"
-
-#include "qofbackend-p.h"
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofclass.h"
-#include "qofid-p.h"
-#include "qofobject.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_PRICE;
+static QofLogModule log_module = GNC_MOD_PRICE;
 
 static gboolean add_price(GNCPriceDB *db, GNCPrice *p);
 static gboolean remove_price(GNCPriceDB *db, GNCPrice *p, gboolean cleanup);
@@ -82,12 +67,13 @@
   ENTER(" ");
   gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_DESTROY);
 
-  if(p->type) g_cache_remove(gnc_engine_get_string_cache(), p->type);
-  if(p->source) g_cache_remove(gnc_engine_get_string_cache(), p->source);
+  if(p->type) gnc_string_cache_remove(p->type);
+  if(p->source) gnc_string_cache_remove(p->source);
 
   qof_instance_release (&p->inst);
   memset(p, 0, sizeof(GNCPrice));
   g_free(p);
+  LEAVE (" ");
 }
 
 void
@@ -104,6 +90,7 @@
   ENTER("pr=%p refcount=%d", p, p->refcount);
   if(p->refcount == 0) {
     PERR("refcount == 0 !!!!");
+    LEAVE (" ");
     return;
   }
 
@@ -115,6 +102,7 @@
     }
     gnc_price_destroy (p);
   }
+  LEAVE (" ");
 }
 
 /* ==================================================================== */
@@ -125,14 +113,14 @@
   /* the clone doesn't belong to a PriceDB */
   GNCPrice *new_p;
 
-  ENTER ("pr=%p", p);
-
   g_return_val_if_fail (book, NULL);
 
-  if(!p) return NULL;
+  ENTER ("pr=%p", p);
+
+  if(!p) { LEAVE (" "); return NULL; }
 
   new_p = gnc_price_create(book);
-  if(!new_p) return NULL;
+  if(!new_p) { LEAVE (" "); return NULL; }
 
   new_p->version = p->version;
 
@@ -145,7 +133,7 @@
   gnc_price_set_value(new_p, gnc_price_get_value(p));
   gnc_price_set_currency(new_p, gnc_price_get_currency(p));
   gnc_price_commit_edit(new_p);
-
+  LEAVE (" ");
   return(new_p);
 }
 
@@ -258,13 +246,11 @@
   if(!p) return;
   if(safe_strcmp(p->source, s) != 0)
   {
-    GCache *cache;
     char *tmp;
 
     gnc_price_begin_edit (p);
-    cache = gnc_engine_get_string_cache();
-    tmp = g_cache_insert(cache, (gpointer) s);
-    if(p->source) g_cache_remove(cache, p->source);
+    tmp = gnc_string_cache_insert((gpointer) s);
+    if(p->source) gnc_string_cache_remove(p->source);
     p->source = tmp;
     if(p->db) p->db->inst.dirty = TRUE;
     gnc_price_commit_edit (p);
@@ -277,13 +263,11 @@
   if(!p) return;
   if(safe_strcmp(p->type, type) != 0)
   {
-    GCache *cache;
     gchar *tmp;
 
     gnc_price_begin_edit (p);
-    cache = gnc_engine_get_string_cache();
-    tmp = g_cache_insert(cache, (gpointer) type);
-    if(p->type) g_cache_remove(cache, p->type);
+    tmp = gnc_string_cache_insert((gpointer) type);
+    if(p->type) gnc_string_cache_remove(p->type);
     p->type = tmp;
     if(p->db) p->db->inst.dirty = TRUE;
     gnc_price_commit_edit (p);
@@ -471,7 +455,7 @@
 }
 
 gboolean
-gnc_price_list_insert(GList **prices, GNCPrice *p)
+gnc_price_list_insert(GList **prices, GNCPrice *p, gboolean check_dupl)
 {
   GList *result_list;
   PriceListIsDuplStruct* pStruct;
@@ -480,15 +464,17 @@
   if(!prices || !p) return FALSE;
   gnc_price_ref(p);
 
-  pStruct = g_new0( PriceListIsDuplStruct, 1 );
-  pStruct->pPrice = p;
-  pStruct->isDupl = FALSE;
-  g_list_foreach( *prices, price_list_is_duplicate, pStruct );
-  isDupl = pStruct->isDupl;
-  g_free( pStruct );
+  if (check_dupl) {
+    pStruct = g_new0( PriceListIsDuplStruct, 1 );
+    pStruct->pPrice = p;
+    pStruct->isDupl = FALSE;
+    g_list_foreach( *prices, price_list_is_duplicate, pStruct );
+    isDupl = pStruct->isDupl;
+    g_free( pStruct );
 
-  if( isDupl ) {
-	return TRUE;
+    if( isDupl ) {
+      return TRUE;
+    }
   }
 
   result_list = g_list_insert_sorted(*prices, p, compare_prices_by_date);
@@ -610,6 +596,9 @@
   result = g_new0(GNCPriceDB, 1);
   qof_instance_init (&result->inst, GNC_ID_PRICEDB, book);
 
+  /** \todo This leaks result when the collection is destroyed.  When
+     qofcollection is fixed to allow a destroy notifier, we'll need to
+     provide one here. */
   qof_collection_set_data (col, result);
 
   result->commodity_hash = g_hash_table_new(commodity_hash, commodity_equal);
@@ -653,20 +642,35 @@
 gnc_pricedb_destroy(GNCPriceDB *db)
 {
   if(!db) return;
+  if(db->commodity_hash) {
   g_hash_table_foreach (db->commodity_hash,
                         destroy_pricedb_commodity_hash_data,
                         NULL);
+  }
   g_hash_table_destroy (db->commodity_hash);
   db->commodity_hash = NULL;
   qof_instance_release (&db->inst);
   g_free(db);
 }
 
+void
+gnc_pricedb_set_bulk_update(GNCPriceDB *db, gboolean bulk_update)
+{
+  db->bulk_update = bulk_update;
+}
+
 /* ==================================================================== */
 /* This is kind of weird, the way its done.  Each collection of prices
  * for a given commodity should get its own guid, be its own entity, etc.
  * We really shouldn't be using the collection data.  But, hey I guess its OK,
- * yeah?
+ * yeah? Umm, possibly not. (NW). See TODO below.
+*/
+/** \todo Collections of prices are not destroyed fully.
+
+gnc_pricedb_destroy does not clean up properly because
+gnc_pricedb_create reports an existing PriceDB after
+running gnc_pricedb_destroy. To change the pricedb, we need to
+destroy and recreate the book. Yuk.
  */
 
 GNCPriceDB *
@@ -795,20 +799,23 @@
   if (db->inst.book != p->inst.book)
   {
      PERR ("attempted to mix up prices across different books");
+	 LEAVE (" ");
      return FALSE;
   }
 
   commodity = gnc_price_get_commodity(p);
   if(!commodity) {
     PWARN("no commodity");
+	LEAVE (" ");
     return FALSE;
   }
   currency = gnc_price_get_currency(p);
   if(!currency) {
     PWARN("no currency");
+	LEAVE (" ");
     return FALSE;
   }
-  if(!db->commodity_hash) return FALSE;
+  if(!db->commodity_hash) { LEAVE ("no commodity hash found "); return FALSE; }
 
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
   if(!currency_hash) {
@@ -817,10 +824,19 @@
   }
 
   price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!gnc_price_list_insert(&price_list, p)) return FALSE;
-  if(!price_list) return FALSE;
+  if(!gnc_price_list_insert(&price_list, p, !db->bulk_update)) 
+  {
+	  LEAVE ("gnc_price_list_insert failed");
+	  return FALSE;
+  }
+  if(!price_list) 
+  {
+	LEAVE (" no price list");
+	return FALSE;
+  }
   g_hash_table_insert(currency_hash, currency, price_list);
   p->db = db;
+  gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_ADD);
 
   LEAVE ("db=%p, pr=%p dirty=%d do-free=%d commodity=%s/%s currency_hash=%p",
          db, p, p->inst.dirty, p->inst.do_free,
@@ -840,7 +856,11 @@
   ENTER ("db=%p, pr=%p dirty=%d do-free=%d",
          db, p, p->inst.dirty, p->inst.do_free);
 
-  if (FALSE == add_price(db, p)) return FALSE;
+  if (FALSE == add_price(db, p)) 
+  {
+	  LEAVE (" failed to add price");
+	  return FALSE;
+  }
 
   /* If we haven't been able to call the backend before, call it now */
   if (TRUE == p->inst.dirty)
@@ -873,18 +893,24 @@
          db, p, p->inst.dirty, p->inst.do_free);
 
   commodity = gnc_price_get_commodity(p);
-  if(!commodity) return FALSE;
+  if(!commodity) { LEAVE (" no commodity"); return FALSE; }
   currency = gnc_price_get_currency(p);
-  if(!currency) return FALSE;
-  if(!db->commodity_hash) return FALSE;
+  if(!currency) { LEAVE (" no currency"); return FALSE;}
+  if(!db->commodity_hash) 
+  {
+	  LEAVE (" no commodity hash");
+	  return FALSE;
+  }
 
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
-  if(!currency_hash) return FALSE;
+  if(!currency_hash) { LEAVE (" no currency hash"); return FALSE; }
 
+  gnc_engine_gen_event (&p->inst.entity, GNC_EVENT_REMOVE);
   price_list = g_hash_table_lookup(currency_hash, currency);
   gnc_price_ref(p);
   if(!gnc_price_list_remove(&price_list, p)) {
     gnc_price_unref(p);
+	LEAVE (" cannot remove price list");
     return FALSE;
   }
 
@@ -935,6 +961,50 @@
   return rc;
 }
 
+typedef struct {
+  GNCPriceDB *db;
+  Timespec cutoff;
+  GSList *list;
+} remove_info;
+
+static gboolean
+check_one_price_date (GNCPrice *price, gpointer user_data)
+{
+  remove_info *data = user_data;
+  Timespec pt;
+
+  pt = gnc_price_get_time (price);
+  if (timespec_cmp (&pt, &data->cutoff) < 0)
+    data->list = g_slist_prepend(data->list, price);
+  return TRUE;
+}
+
+gboolean
+gnc_pricedb_remove_old_prices(GNCPriceDB *db, Timespec cutoff)
+{
+  remove_info data;
+  GSList *item;
+
+  data.db = db;
+  data.cutoff = cutoff;
+  data.list = NULL;
+
+  /* Traverse the database once building up an external list of prices
+   * to be deleted */
+  gnc_pricedb_foreach_price(db, check_one_price_date, &data, FALSE);
+
+  if (data.list == NULL)
+    return FALSE;
+
+  /* Now run this external list deleting prices */
+  for (item = data.list; item; item = g_slist_next(item)) {
+    gnc_pricedb_remove_price(db, item->data);
+  }
+
+  g_slist_free(data.list);
+  return TRUE;
+}
+
 /* ==================================================================== */
 /* lookup/query functions */
 
@@ -946,25 +1016,30 @@
   GList *price_list;
   GNCPrice *result;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
   if(!db || !commodity || !currency) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_LATEST;
      pl.prdb = db;
      pl.commodity = commodity;
      pl.currency = currency;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
+#endif
 
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!price_list) return NULL;
+  if(!price_list) { LEAVE (" no price list"); return NULL; }
 
   /* This works magically because prices are inserted in date-sorted
    * order, and the latest date always comes first. So return the
@@ -986,7 +1061,7 @@
   if(!price_list) return;
 
   /* the latest price is the first in list */
-  gnc_price_list_insert(return_list, price_list->data);
+  gnc_price_list_insert(return_list, price_list->data, FALSE);
 }
 
 GList *
@@ -995,28 +1070,32 @@
 {
   GList *result;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
   result = NULL;
 
-  ENTER ("db=%p commodity=%p", db, commodity);
   if(!db || !commodity) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p", db, commodity);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_LATEST;
      pl.prdb = db;
      pl.commodity = commodity;
      pl.currency = NULL;  /* can the backend handle this??? */
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+		(be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   g_hash_table_foreach(currency_hash, lookup_latest, &result);
 
-  if(!result) return NULL;
+  if(!result) { LEAVE (" "); return NULL; }
 
   result = g_list_sort(result, compare_prices_by_date);
 
@@ -1032,6 +1111,54 @@
   *l = g_list_concat(*l, g_list_copy (value));
 }
 
+gboolean
+gnc_pricedb_has_prices(GNCPriceDB *db,
+                       gnc_commodity *commodity,
+                       gnc_commodity *currency)
+{
+  GList *price_list;
+  GHashTable *currency_hash;
+  gint size;
+  QofBook *book;
+  QofBackend *be;
+
+  if(!db || !commodity) return FALSE;
+  ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (book && be && be->price_lookup)
+  {
+     GNCPriceLookup pl;
+     pl.type = LOOKUP_ALL;
+     pl.prdb = db;
+     pl.commodity = commodity;
+     pl.currency = currency;
+     (be->price_lookup) (be, &pl);
+  }
+#endif
+  currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
+  if(!currency_hash) {
+    LEAVE("no, no currency_hash table");
+    return FALSE;
+  }
+
+  if (currency) {
+    price_list = g_hash_table_lookup(currency_hash, currency);
+    if (price_list) {
+      LEAVE("yes");
+      return TRUE;
+    }
+    LEAVE("no, no price list");
+    return FALSE;
+  }
+
+  size = g_hash_table_size (currency_hash);
+  LEAVE("%s", size > 0 ? "yes" : "no");
+  return size > 0;
+}
+
+
 GList *
 gnc_pricedb_get_prices(GNCPriceDB *db,
                        gnc_commodity *commodity,
@@ -1041,26 +1168,30 @@
   GList *result;
   GList *node;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
   if(!db || !commodity) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p currency=%p", db, commodity, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_ALL;
      pl.prdb = db;
      pl.commodity = commodity;
      pl.currency = currency;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   if (currency) {
     price_list = g_hash_table_lookup(currency_hash, currency);
-    if(!price_list) return NULL;
+    if(!price_list) { LEAVE (" no price list"); return NULL; }
     result = g_list_copy (price_list);
   } else {
     result = NULL;
@@ -1084,14 +1215,17 @@
   GList *result = NULL;
   GList *item = NULL;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
   if(!db || !c || !currency) return NULL;
-
+  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
   /* Convert to noon local time. */
   t = timespecCanonicalDayTime(t);
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_AT_TIME;
@@ -1099,14 +1233,14 @@
      pl.commodity = c;
      pl.currency = currency;
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!price_list) return NULL;
+  if(!price_list) { LEAVE (" no price list"); return NULL; }
 
   item = price_list;
   while(item) {
@@ -1138,7 +1272,7 @@
     GNCPrice *p = item->data;
     Timespec price_time = timespecCanonicalDayTime(gnc_price_get_time(p));
     if(timespec_equal(&price_time, &t)) {
-      gnc_price_list_insert(return_list, item->data);
+      gnc_price_list_insert(return_list, item->data, FALSE);
     }
     item = item->next;
   }
@@ -1152,14 +1286,17 @@
   GList *result = NULL;
   GHashTable *currency_hash;
   GNCPriceLookupHelper lookup_helper;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p", db, c);
   if(!db || !c) return NULL;
-
+  ENTER ("db=%p commodity=%p", db, c);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
   /* Convert to noon local time. */
   t = timespecCanonicalDayTime(t);
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_AT_TIME;
@@ -1167,17 +1304,17 @@
      pl.commodity = c;
      pl.currency = NULL;  /* can the backend handle this??? */
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE ("no currency hash"); return NULL; }
 
   lookup_helper.return_list = &result;
   lookup_helper.time = t;
   g_hash_table_foreach(currency_hash, lookup_day, &lookup_helper);
 
-  if(!result) return NULL;
+  if(!result) { LEAVE (" "); return NULL; }
 
   result = g_list_sort(result, compare_prices_by_date);
 
@@ -1196,11 +1333,15 @@
   GList *result = NULL;
   GList *item = NULL;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
   if(!db || !c || !currency) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_AT_TIME;
@@ -1208,14 +1349,14 @@
      pl.commodity = c;
      pl.currency = currency;
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!price_list) return NULL;
+  if(!price_list) { LEAVE (" no price list"); return NULL; }
 
   item = price_list;
   while(item) {
@@ -1246,7 +1387,7 @@
     GNCPrice *p = item->data;
     Timespec price_time = gnc_price_get_time(p);
     if(timespec_equal(&price_time, &t)) {
-      gnc_price_list_insert(return_list, item->data);
+      gnc_price_list_insert(return_list, item->data, FALSE);
     }
     item = item->next;
   }
@@ -1260,11 +1401,15 @@
   GList *result = NULL;
   GHashTable *currency_hash;
   GNCPriceLookupHelper lookup_helper;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p", db, c);
   if(!db || !c) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p", db, c);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_AT_TIME;
@@ -1272,17 +1417,17 @@
      pl.commodity = c;
      pl.currency = NULL;  /* can the backend handle this??? */
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   lookup_helper.return_list = &result;
   lookup_helper.time = t;
   g_hash_table_foreach(currency_hash, lookup_time, &lookup_helper);
 
-  if(!result) return NULL;
+  if(!result) { LEAVE (" "); return NULL; }
 
   result = g_list_sort(result, compare_prices_by_date);
 
@@ -1303,11 +1448,15 @@
   GNCPrice *result = NULL;
   GList *item = NULL;
   GHashTable *currency_hash;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
   if(!db || !c || !currency) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p currency=%p", db, c, currency);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_NEAREST_IN_TIME;
@@ -1315,14 +1464,14 @@
      pl.commodity = c;
      pl.currency = currency;
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE ("no currency hash"); return NULL; }
 
   price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!price_list) return NULL;
+  if(!price_list) { LEAVE ("no price list"); return NULL; }
 
   item = price_list;
 
@@ -1416,7 +1565,7 @@
     }
   }
 
-  gnc_price_list_insert(return_list, result);
+  gnc_price_list_insert(return_list, result, FALSE);
 }
 
 GList *
@@ -1427,11 +1576,15 @@
   GList *result = NULL;
   GHashTable *currency_hash;
   GNCPriceLookupHelper lookup_helper;
+  QofBook *book;
+  QofBackend *be;
 
-  ENTER ("db=%p commodity=%p", db, c);
   if(!db || !c) return NULL;
-
-  if (db->inst.book->backend && db->inst.book->backend->price_lookup)
+  ENTER ("db=%p commodity=%p", db, c);
+  book = qof_instance_get_book(&db->inst);
+  be = qof_book_get_backend(book);
+#ifdef GNUCASH_MAJOR_VERSION
+  if (be && be->price_lookup)
   {
      GNCPriceLookup pl;
      pl.type = LOOKUP_NEAREST_IN_TIME;
@@ -1439,17 +1592,17 @@
      pl.commodity = c;
      pl.currency = NULL;  /* can the backend handle this??? */
      pl.date = t;
-     (db->inst.book->backend->price_lookup) (db->inst.book->backend, &pl);
+     (be->price_lookup) (be, &pl);
   }
-
+#endif
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
+  if(!currency_hash) { LEAVE (" no currency hash"); return NULL; }
 
   lookup_helper.return_list = &result;
   lookup_helper.time = t;
   g_hash_table_foreach(currency_hash, lookup_nearest, &lookup_helper);
 
-  if(!result) return NULL;
+  if(!result) { LEAVE (" "); return NULL; }
 
   result = g_list_sort(result, compare_prices_by_date);
 
@@ -1656,7 +1809,7 @@
   foreach_data.ok = TRUE;
   foreach_data.func = f;
   foreach_data.user_data = user_data;
-
+  if(db->commodity_hash == NULL) { return FALSE; }
   g_hash_table_foreach(db->commodity_hash,
                        pricedb_foreach_currencies_hash,
                        &foreach_data);
@@ -1746,9 +1899,12 @@
                           gboolean stable_order)
 {
   ENTER ("db=%p f=%p", db, f);
-  if(stable_order) return stable_price_traversal(db, f, user_data);
+  if(stable_order) {
+	  LEAVE (" stable order found");
+	  return stable_price_traversal(db, f, user_data);
+  }
+  LEAVE (" use unstable order");
   return unstable_price_traversal(db, f, user_data);
-  LEAVE (" ");
 }
 
 /* ==================================================================== */
Index: glib-helpers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/glib-helpers.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/glib-helpers.c -Lsrc/engine/glib-helpers.c -u -r1.5 -r1.6
--- src/engine/glib-helpers.c
+++ src/engine/glib-helpers.c
@@ -155,13 +155,9 @@
 
   while (!SCM_NULLP (list))
   {
-    /* glist = g_list_prepend (glist, gh_scm2newstr(SCM_CAR(list), NULL)); */
-    char * str = SCM_STRING_CHARS (SCM_CAR(list));
+    const gchar * str = SCM_STRING_CHARS (SCM_CAR(list));
     if (str)
-    {
-      str = g_strdup (str);
-      glist = g_list_prepend (glist, str);
-    }
+      glist = g_list_prepend (glist, g_strdup (str));
     list = SCM_CDR (list);
   }
 
Index: policy-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/policy-p.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/policy-p.h -Lsrc/engine/policy-p.h -u -r1.3 -r1.4
--- src/engine/policy-p.h
+++ src/engine/policy-p.h
@@ -20,7 +20,7 @@
 \********************************************************************/
 
 /** @file policy-p.h
- *  @breif Implement Accounting Policy Private header File.
+ *  @brief Implement Accounting Policy Private header File.
  *  @author Created by Linas Vepstas August 2003
  *  @author Copyright (c) 2003 Linas Vepstas <linas at linas.org>
  *
Index: cap-gains.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/cap-gains.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/engine/cap-gains.c -Lsrc/engine/cap-gains.c -u -r1.31 -r1.32
--- src/engine/cap-gains.c
+++ src/engine/cap-gains.c
@@ -20,7 +20,7 @@
 \********************************************************************/
 
 /** @file cap-gains.c
- *  @breif Utilities to Automatically Compute Capital Gains/Losses.
+ *  @brief Utilities to Automatically Compute Capital Gains/Losses.
  *  @author Created by Linas Vepstas August 2003
  *  @author Copyright (c) 2003,2004 Linas Vepstas <linas at linas.org>
  *
@@ -67,17 +67,13 @@
 #include "TransactionP.h"
 #include "cap-gains.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
-#include "gnc-trace.h"
-#include "kvp-util-p.h"
 #include "messages.h"
 #include "policy.h"
 #include "policy-p.h"
-#include "qofid-p.h"
 
-static short module = MOD_LOT;
+static QofLogModule log_module = GNC_MOD_LOT;
 
 
 /* ============================================================== */
@@ -162,7 +158,7 @@
 static inline GNCLot *
 xaccAccountFindOpenLot (Account *acc, gnc_numeric sign, 
    gnc_commodity *currency,
-   long long guess,
+   gint64 guess,
    gboolean (*date_pred)(Timespec, Timespec))
 {
    struct find_lot_s es;
@@ -185,10 +181,10 @@
                                 gnc_commodity *currency)
 {
    GNCLot *lot;
-   ENTER (" sign=%lld/%lld", sign.num, sign.denom);
+   ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, sign.num, sign.denom);
       
    lot = xaccAccountFindOpenLot (acc, sign, currency,
-                   10000000LL * ((long long) LONG_MAX), earliest_pred);
+                   G_GINT64_CONSTANT(2^31) * G_GINT64_CONSTANT(2^31), earliest_pred);
    LEAVE ("found lot=%p %s baln=%s", lot, gnc_lot_get_title (lot),
                gnc_num_dbg_to_string(gnc_lot_get_balance(lot)));
    return lot;
@@ -199,10 +195,12 @@
                               gnc_commodity *currency)
 {
    GNCLot *lot;
-   ENTER (" sign=%lld/%lld", sign.num, sign.denom);
+   ENTER (" sign=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
+	  sign.num, sign.denom);
       
    lot = xaccAccountFindOpenLot (acc, sign, currency,
-                   -10000000LL * ((long long) LONG_MAX), latest_pred);
+                   G_GINT64_CONSTANT(-2^31) * G_GINT64_CONSTANT(2^31),
+		   latest_pred);
    LEAVE ("found lot=%p %s", lot, gnc_lot_get_title (lot));
    return lot;
 }
@@ -569,7 +567,7 @@
 
    /* Provide a reasonable title for the new lot */
    id = kvp_frame_get_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id");
-   snprintf (buff, 200, _("Lot %lld"), id);
+   snprintf (buff, 200, ("%s %" G_GINT64_FORMAT), _("Lot"), id);
    kvp_frame_set_str (gnc_lot_get_slots (lot), "/title", buff);
    id ++;
    kvp_frame_set_gint64 (xaccAccountGetSlots (acc), "/lot-mgmt/next-id", id);
Index: glib-helpers.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/glib-helpers.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/glib-helpers.h -Lsrc/engine/glib-helpers.h -u -r1.2 -r1.3
--- src/engine/glib-helpers.h
+++ src/engine/glib-helpers.h
@@ -26,7 +26,6 @@
 
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 SCM gnc_glist_to_scm_list(GList *glist, SCM wct);
 GList* gnc_scm_list_to_glist(SCM wcp_list);
Index: qofbackend-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofbackend-p.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/qofbackend-p.h -Lsrc/engine/qofbackend-p.h -u -r1.7 -r1.8
--- src/engine/qofbackend-p.h
+++ src/engine/qofbackend-p.h
@@ -27,8 +27,7 @@
 /** @name  Backend_Private
    Pseudo-object defining how the engine can interact with different
    back-ends (which may be SQL databases, or network interfaces to 
-   remote GnuCash servers.  In theory, file-io should be a type of 
-   backend).
+   remote GnuCash servers. File-io is just one type of backend).
    
    The callbacks will be called at the appropriate times during 
    a book session to allow the backend to store the data as needed.
@@ -36,16 +35,17 @@
    @file qofbackend-p.h
    @brief private api for data storage backend
    @author Copyright (c) 2000,2001,2004 Linas Vepstas <linas at linas.org> 
+   @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 @{ */
 
 #ifndef QOF_BACKEND_P_H
 #define QOF_BACKEND_P_H
 
 #include "config.h"
-
+#include "qof-be-utils.h"
 #include "qofbackend.h"
 #include "qofbook.h"
-#include "qofinstance.h"
+#include "qofinstance-p.h"
 #include "qofquery.h"
 #include "qofsession.h"
 
@@ -231,6 +231,16 @@
  *    a mass transfer of transactions between books without having
  *    to actually move much (or any) data to the engine.
  *
+ *
+ * To support configuration options from the frontend, the backend
+ *    can be passed a GHashTable - according to the allowed options
+ *    for that backend, using load_config(). Configuration can be
+ *    updated at any point - it is up to the frontend to load the
+ *    data in time for whatever the backend needs to do. e.g. an
+ *    option to save a new book in a compressed format need not be
+ *    loaded until the backend is about to save. If the configuration
+ *    is updated by the user, the frontend should call load_config
+ *    again to update the backend.
  */
 
 struct QofBackendProvider_s
@@ -243,9 +253,33 @@
    */
   const char * access_method;
 
+  /** \brief Partial QofBook handler
+	
+	TRUE if the backend handles external references
+	to entities outside this book and can save a QofBook that
+	does not contain any specific QOF objects.
+	*/
+  gboolean partial_book_supported;
+	
   /** Return a new, initialized backend backend. */
   QofBackend * (*backend_new) (void);
 
+/** \brief Distinguish two providers with same access method.
+  
+  More than 1 backend can be registered under the same access_method,
+  so each one is passed the path to the data (e.g. a file) and
+  should return TRUE only:
+-# if the backend recognises the type as one that it can load and write or 
+-# if the path contains no data but can be used (e.g. a new session).
+  
+  \note If the backend can cope with more than one type, the backend
+  should not try to store or cache the sub-type for this data.
+  It is sufficient only to return TRUE if any ONE of the supported
+  types match the incoming data. The backend should not assume that
+  returning TRUE will mean that the data will naturally follow.
+  */
+  gboolean (*check_data_type) (const char*);
+  
   /** Free this structure, unregister this backend handler. */
   void (*provider_free) (QofBackendProvider *);
 };
@@ -271,7 +305,8 @@
   void (*run_query) (QofBackend *, gpointer);
 
   void (*sync) (QofBackend *, QofBook *);
-
+  void (*load_config) (QofBackend *, KvpFrame *);
+  KvpFrame* (*get_config) (QofBackend *);
   gint64 (*counter) (QofBackend *, const char *counter_name);
 
   gboolean (*events_pending) (QofBackend *);
@@ -279,15 +314,18 @@
 
   QofBePercentageFunc percentage;
 
+  QofBackendProvider *provider;
+
   /** Document Me !!! what is this supposed to do ?? */
   gboolean (*save_may_clobber_data) (QofBackend *);
 
   QofBackendError last_err;
   char * error_msg;
 
-  /** XXX the file backend resolves the if to a fully-qualified file
-   *  path.  This holds the filepath and communicates it to the GUI.
-   *  This is temprary scaffolding and should be removed.  Deprecated.
+  KvpFrame* backend_configuration;
+  gint config_count;
+  /** Each backend resolves a fully-qualified file path.
+   * This holds the filepath and communicates it to the frontends.
    */
   char * fullpath;
 
@@ -341,6 +379,31 @@
 
 void qof_backend_init(QofBackend *be);
 
+/** Allow backends to see if the book is open 
+
+ at return 'y' if book is open, otherwise 'n'.
+*/
+gchar qof_book_get_open_marker(QofBook *book);
+
+/** get the book version
+
+used for tracking multiuser updates in backends.
+
+ at return -1 if no book exists, 0 if the book is
+new, otherwise the book version number.
+*/
+gint32 qof_book_get_version (QofBook *book);
+
+/** get the book tag number
+
+used for kvp management in sql backends.
+*/
+guint32 qof_book_get_idata (QofBook *book);
+
+void qof_book_set_version (QofBook *book, gint32 version);
+
+void qof_book_set_idata(QofBook *book, guint32 idata);
+
 /* @} */
 /* @} */
 /* @} */
Index: gnc-filepath-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-filepath-utils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/gnc-filepath-utils.c -Lsrc/engine/gnc-filepath-utils.c -u -r1.2 -r1.3
--- src/engine/gnc-filepath-utils.c
+++ src/engine/gnc-filepath-utils.c
@@ -21,7 +21,7 @@
 
 /*
  * @file gnc-filepath-utils.c
- * @brief file path resolutionutilities
+ * @brief file path resolution utilities
  * @author Copyright (c) 1998-2004 Linas Vepstas <linas at linas.org>
  * @author Copyright (c) 2000 Dave Peticolas
  *
@@ -39,11 +39,10 @@
 #include <unistd.h>
 
 #include <glib.h>
-
+#include "gnc-engine.h"
 #include "gnc-filepath-utils.h"
-#include "gnc-trace.h"
 
-static short module = MOD_BACKEND;
+static QofLogModule log_module = GNC_MOD_BACKEND;
 
 
 /* ====================================================================== */
Index: Query.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Query.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -Lsrc/engine/Query.h -Lsrc/engine/Query.h -u -r1.77 -r1.78
--- src/engine/Query.h
+++ src/engine/Query.h
@@ -27,14 +27,8 @@
 #include <sys/types.h>
 #include <time.h>
 #include <glib.h>
-
-#include "gnc-date.h" 
-#include "gnc-engine.h" 
-#include "guid.h" 
-#include "kvp_frame.h" 
-
-#include "qofquery.h"
-#include "qofquerycore.h"
+#include "qof.h"
+#include "Account.h"
 
 /*
  * This function defines a compatibility API from the old Query API to
@@ -76,7 +70,7 @@
 
 /* After the query has been set up, call one of these to run the query. 
  *    XXX The routines below should be replaced by a query
- *    that explicitly asks for a list of the desied item.
+ *    that explicitly asks for a list of the desired item.
  *
  * The xaccQueryGetSplits() routine returns all splits matching the 
  *    query.  Any given split will appear at most once in the result;
@@ -188,6 +182,13 @@
                              int use_start, time_t stt, 
                              int use_end, time_t ett,
                              QofQueryOp op);
+void xaccQueryGetDateMatchTS (Query * q, 
+			      Timespec * sts,
+			      Timespec * ets);
+void xaccQueryGetDateMatchTT (Query * q, 
+			      time_t * stt,
+			      time_t * ett);
+
 typedef enum {
   CLEARED_NONE       = 0x0000,
   CLEARED_NO         = 0x0001,
Index: SchedXactionP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SchedXactionP.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/engine/SchedXactionP.h -Lsrc/engine/SchedXactionP.h -u -r1.8 -r1.9
--- src/engine/SchedXactionP.h
+++ src/engine/SchedXactionP.h
@@ -25,9 +25,6 @@
 #define XACC_SCHEDXACTION_P_H
 
 #include "SchedXaction.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofinstance-p.h"
 
 /**
  * A single scheduled transaction.
Index: TransactionP.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/TransactionP.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -Lsrc/engine/TransactionP.h -Lsrc/engine/TransactionP.h -u -r1.69 -r1.70
--- src/engine/TransactionP.h
+++ src/engine/TransactionP.h
@@ -76,7 +76,7 @@
  * accounts.  Thus, a single credit-card transaction might be split
  * between "dining", "tips" and "taxes" categories.
  *
- * A "split" is more commonly refered to as a "entry" in a "transaction".
+ * A "split" is more commonly referred to as an "entry" in a "transaction".
  */
 
 /* Flags for handling cap-gains status */
@@ -110,7 +110,7 @@
   char  * memo;
 
   /* The action field is an arbitrary user-assigned value.
-   * It is meant to be a very short (one to ten cahracter) string that
+   * It is meant to be a very short (one to ten character) string that
    * signifies the "type" of this split, such as e.g. Buy, Sell, Div,
    * Withdraw, Deposit, ATM, Check, etc. The idea is that this field
    * can be used to create custom reports or graphs of data.
Index: qofgobj.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofgobj.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/engine/qofgobj.h -Lsrc/engine/qofgobj.h -u -r1.3 -r1.4
--- src/engine/qofgobj.h
+++ src/engine/qofgobj.h
@@ -43,8 +43,8 @@
 
 
 #include <glib-object.h>
-#include <qof/qofbook.h>
-#include <qof/qofclass.h>
+#include "qofbook.h"
+#include "qofclass.h"
 
 /** Initalize and shut down this subsystem. */
 void qof_gobject_init(void);
Index: qof_book_merge.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qof_book_merge.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/qof_book_merge.c -Lsrc/engine/qof_book_merge.c -u -r1.5 -r1.6
--- src/engine/qof_book_merge.c
+++ src/engine/qof_book_merge.c
@@ -21,9 +21,13 @@
  *                                                                   *
  ********************************************************************/
 
+#include "gnc-trace.h"
 #include "qof_book_merge.h"
+#include "qofinstance-p.h"
+#include "qofchoice.h"
 #include "qofid-p.h"
-static short module = MOD_IMPORT; 
+
+static QofLogModule log_module = QOF_MOD_MERGE;
 
 /* private rule iteration struct */
 struct qof_book_mergeRuleIterate {
@@ -40,291 +44,11 @@
 	a string match will still provide a better target
 	than when other types match and the string does not.
 */
-#define DEFAULT_MERGE_WEIGHT	1
-#define QOF_STRING_WEIGHT		3
-#define QOF_DATE_STRING_LENGTH	31
-#define QOF_UTC_DATE_FORMAT		"%Y-%m-%dT%H:%M:%SZ"
-
-/* ================================================================ */
-/* API functions. */
-
-qof_book_mergeData*
-qof_book_mergeInit( QofBook *importBook, QofBook *targetBook) 
-{
-	qof_book_mergeData *mergeData;
-	qof_book_mergeRule *currentRule;
-	GList *check;
-
-	g_return_val_if_fail((importBook != NULL)&&(targetBook != NULL), NULL);
-	mergeData = g_new(qof_book_mergeData, 1);
-	mergeData->abort = FALSE;
-	mergeData->mergeList = NULL;
-	mergeData->targetList = NULL;
-	mergeData->mergeBook = importBook;
-	mergeData->targetBook = targetBook;
-	mergeData->mergeObjectParams = NULL;
-	mergeData->orphan_list = NULL;
-	mergeData->target_table = g_hash_table_new( g_direct_hash, qof_book_merge_rule_cmp);
-	currentRule = g_new(qof_book_mergeRule, 1);
-	mergeData->currentRule = currentRule;
-	qof_object_foreach_type(qof_book_mergeForeachType, mergeData);
-	g_return_val_if_fail(mergeData->mergeObjectParams, NULL);
-	if(mergeData->orphan_list != NULL) {
-		qof_book_merge_match_orphans(mergeData);
-	}
-	
-	check = g_list_copy(mergeData->mergeList);
-	while(check != NULL) {
-		currentRule = check->data;
-		if(currentRule->mergeResult == MERGE_INVALID) {
-			mergeData->abort = TRUE;
-			return(NULL);
-		}
-		check = g_list_next(check);
-	}
-	g_list_free(check);
-	return mergeData;
-}
-
-void
-qof_book_merge_abort (qof_book_mergeData *mergeData)
-{
-	qof_book_mergeRule *currentRule;
-	
-	g_return_if_fail(mergeData != NULL);
-	while(mergeData->mergeList != NULL) {
-		currentRule = mergeData->mergeList->data;
-		g_slist_free(currentRule->linkedEntList);
-		g_slist_free(currentRule->mergeParam);
-		g_free(mergeData->mergeList->data);
-	if(currentRule) {
-		g_slist_free(currentRule->linkedEntList);
-		g_slist_free(currentRule->mergeParam);
-		g_free(currentRule);
-	}
-		mergeData->mergeList = g_list_next(mergeData->mergeList);
-	}
-	g_list_free(mergeData->mergeList);
-	g_slist_free(mergeData->mergeObjectParams);
-	g_slist_free(mergeData->targetList);
-	if(mergeData->orphan_list != NULL) { g_slist_free(mergeData->orphan_list); }
-	g_hash_table_destroy(mergeData->target_table);
-	g_free(mergeData);
-}
-
-/*  Q: This could be a general usage function:
-	qof_param_as_string(QofParam*, QofEntity*);
-	Useful? Worth transferring to qofclass.c?
-	Need to fix the KVP->string. How?
-
-	The QOF_TYPE_DATE output format from
-	qof_book_merge_param_as_string has been changed to QSF_XSD_TIME,
-	a UTC formatted timestring: 2005-01-01T10:55:23Z
-	If you change QOF_UTC_DATE_FORMAT, change 
-	backend/file/qsf-xml.c : qsf_entity_foreach to
-	reformat to QSF_XSD_TIME or the QSF XML will
-	FAIL the schema validation and QSF exports will become invalid.
-
-	The QOF_TYPE_BOOLEAN is lowercase for the same reason.
-*/
-char*
-qof_book_merge_param_as_string(QofParam *qtparam, QofEntity *qtEnt)
-{
-	gchar 		*param_string, param_date[QOF_DATE_STRING_LENGTH];
-	char 		param_sa[GUID_ENCODING_LENGTH + 1];
-	KvpFrame 	*param_kvp;
-	QofType 	paramType;
-	const GUID *param_guid;
-	time_t 		param_t;
-	gnc_numeric param_numeric, 	(*numeric_getter)	(QofEntity*, QofParam*);
-	Timespec 	param_ts, 		(*date_getter)		(QofEntity*, QofParam*);
-	double 		param_double, 	(*double_getter)	(QofEntity*, QofParam*);
-	gboolean 	param_boolean, 	(*boolean_getter)	(QofEntity*, QofParam*);
-	gint32 		param_i32, 		(*int32_getter)		(QofEntity*, QofParam*);
-	gint64 		param_i64, 		(*int64_getter)		(QofEntity*, QofParam*);
-	
-	param_string = NULL;
-	paramType = qtparam->param_type;
-	if(safe_strcmp(paramType, QOF_TYPE_STRING) == 0)  { 
-			param_string = g_strdup(qtparam->param_getfcn(qtEnt,qtparam));
-			if(param_string == NULL) { param_string = ""; }
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_DATE) == 0) { 
-			date_getter = (Timespec (*)(QofEntity*, QofParam*))qtparam->param_getfcn;
-			param_ts = date_getter(qtEnt, qtparam);
-			param_t = timespecToTime_t(param_ts);
-			strftime(param_date, QOF_DATE_STRING_LENGTH, QOF_UTC_DATE_FORMAT, gmtime(&param_t));
-			param_string = g_strdup(param_date);
-			return param_string;
-		}
-		if((safe_strcmp(paramType, QOF_TYPE_NUMERIC) == 0)  ||
-		(safe_strcmp(paramType, QOF_TYPE_DEBCRED) == 0)) { 
-			numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
-			param_numeric = numeric_getter(qtEnt,qtparam);
-			param_string = g_strdup(gnc_numeric_to_string(param_numeric));
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_GUID) == 0) { 
-			param_guid = qtparam->param_getfcn(qtEnt,qtparam);
-			guid_to_string_buff(param_guid, param_sa);
-			param_string = g_strdup(param_sa);
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_INT32) == 0) { 
-			int32_getter = (gint32 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
-			param_i32 = int32_getter(qtEnt, qtparam);
-			param_string = g_strdup_printf("%u", param_i32);
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_INT64) == 0) { 
-			int64_getter = (gint64 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
-			param_i64 = int64_getter(qtEnt, qtparam);
-			param_string = g_strdup_printf("%llu", param_i64);
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_DOUBLE) == 0) { 
-			double_getter = (double (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
-			param_double = double_getter(qtEnt, qtparam);
-			param_string = g_strdup_printf("%f", param_double);
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_BOOLEAN) == 0){ 
-			boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
-			param_boolean = boolean_getter(qtEnt, qtparam);
-			/* Boolean values need to be lowercase for QSF validation. */
-			if(param_boolean == TRUE) { param_string = g_strdup("true"); }
-			else { param_string = g_strdup("false"); }
-			return param_string;
-		}
-		/* "kvp" */
-		/* FIXME: how can this be a string??? */
-		if(safe_strcmp(paramType, QOF_TYPE_KVP) == 0) { 
-			param_kvp = kvp_frame_copy(qtparam->param_getfcn(qtEnt,qtparam));
-
-			return param_string;
-		}
-		if(safe_strcmp(paramType, QOF_TYPE_CHAR) == 0) { 
-			param_string = g_strdup(qtparam->param_getfcn(qtEnt,qtparam));
-			return param_string;
-		}
-	return NULL;
-}
-
-qof_book_mergeData*
-qof_book_mergeUpdateResult(qof_book_mergeData *mergeData,
-						qof_book_mergeResult tag)
-{
-	qof_book_mergeRule *resolved;
-	
-	g_return_val_if_fail((mergeData != NULL), NULL);
-	g_return_val_if_fail((tag > 0), NULL);
-	g_return_val_if_fail((tag != MERGE_REPORT), NULL);
-	resolved = mergeData->currentRule;
-	g_return_val_if_fail((resolved != NULL), NULL);
-	if((resolved->mergeAbsolute == TRUE)&&(tag == MERGE_DUPLICATE)) 	
-	{ 
-		tag = MERGE_ABSOLUTE; 
-	}
-	if((resolved->mergeAbsolute == TRUE)&&(tag == MERGE_NEW))
-	{
-		tag = MERGE_UPDATE; 
-	}
-	if((resolved->mergeAbsolute == FALSE)&&	(tag == MERGE_ABSOLUTE)) 	
-	{ 
-		tag = MERGE_DUPLICATE; 
-	}
-	if((resolved->mergeResult == MERGE_NEW)&&(tag == MERGE_UPDATE)) 
-	{ 
-		tag = MERGE_NEW; 
-	}
-	if(resolved->updated == FALSE) { resolved->mergeResult = tag;	}
-	resolved->updated = TRUE;
-	if(tag >= MERGE_INVALID) { 
-		mergeData->abort = TRUE;
-		mergeData->currentRule = resolved;
-		return NULL; 
-	}
-	mergeData->currentRule = resolved;
-	return mergeData;
-}
-
-int
-qof_book_mergeCommit( qof_book_mergeData *mergeData )
-{
-	qof_book_mergeRule *currentRule;
-	GList *check;
-	
-	g_return_val_if_fail(mergeData != NULL, -1);
-	g_return_val_if_fail(mergeData->mergeList != NULL, -1);
-	g_return_val_if_fail(mergeData->targetBook != NULL, -1);
-	if(mergeData->abort == TRUE) return -1;
-	check = g_list_copy(mergeData->mergeList);
-	g_return_val_if_fail(check != NULL, -1);
-	while(check != NULL) {
-		currentRule = check->data;
-		if(currentRule->mergeResult == MERGE_INVALID) {
-			qof_book_merge_abort(mergeData);
-			return(-2);
-		}
-		if(currentRule->mergeResult == MERGE_REPORT) {
-			g_list_free(check);
-			return 1;
-		}
-		check = g_list_next(check);
-	}
-	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_NEW, mergeData);
-	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_UPDATE, mergeData);
-	/* Placeholder for QofObject merge_helper_cb - all objects and all parameters set */
-	while(mergeData->mergeList != NULL) {
-		currentRule = mergeData->mergeList->data;
-		g_slist_free(currentRule->mergeParam);
-		g_slist_free(currentRule->linkedEntList);
-		mergeData->mergeList = g_list_next(mergeData->mergeList);
-	}
-	g_list_free(mergeData->mergeList);
-	g_slist_free(mergeData->mergeObjectParams);
-	g_slist_free(mergeData->targetList);
-	if(mergeData->orphan_list != NULL) { g_slist_free(mergeData->orphan_list); }
-	g_hash_table_destroy(mergeData->target_table);
-	g_free(mergeData);
-	return 0;
-}
-
-/* End of API functions. Internal code follows. */
-/* ==================================================================== */
-
-void qof_book_mergeRuleForeach( qof_book_mergeData *mergeData, 
-								qof_book_mergeRuleForeachCB cb, 
-								qof_book_mergeResult mergeResult )
-{
-	struct qof_book_mergeRuleIterate iter;
-	qof_book_mergeRule *currentRule;
-	GList *matching_rules;
-
-	g_return_if_fail(cb != NULL);
-	g_return_if_fail(mergeData != NULL);
-	currentRule = mergeData->currentRule;
-	g_return_if_fail(mergeResult > 0);
-	g_return_if_fail(mergeResult != MERGE_INVALID);
-	g_return_if_fail(mergeData->abort == FALSE);
-	iter.fcn = cb;
-	iter.data = mergeData;
-	matching_rules = NULL;
-	iter.ruleList = g_list_copy(mergeData->mergeList);
-	while(iter.ruleList!=NULL) {
-		currentRule = iter.ruleList->data;
-		if(currentRule->mergeResult == mergeResult) {
-			matching_rules = g_list_prepend(matching_rules, currentRule);
-		}
-		iter.ruleList = g_list_next(iter.ruleList);
-	}
-	iter.remainder = g_list_length(matching_rules);
-	g_list_foreach (matching_rules, qof_book_mergeRuleCB, &iter);
-	g_list_free(matching_rules);
-}
+#define DEFAULT_MERGE_WEIGHT    1
+#define QOF_STRING_WEIGHT       3
+#define QOF_DATE_STRING_LENGTH  MAX_DATE_LENGTH
 
-qof_book_mergeRule*
+static qof_book_mergeRule*
 qof_book_mergeUpdateRule(qof_book_mergeRule *currentRule, gboolean match, gint weight)
 {
 	gboolean absolute;
@@ -346,25 +70,41 @@
 	return currentRule;
 }
 
-int 
+struct collect_list_s
+{
+	GSList *linkedEntList;
+};
+
+static void
+collect_reference_cb (QofEntity *ent, gpointer user_data)
+{
+	struct collect_list_s *s;
+
+	s = (struct collect_list_s*)user_data;
+	if(!ent || !s) { return; }
+	s->linkedEntList = g_slist_prepend(s->linkedEntList, ent);
+}
+
+static int 
 qof_book_mergeCompare( qof_book_mergeData *mergeData ) 
 {
 	qof_book_mergeRule *currentRule;
-	gchar 			*stringImport, *stringTarget, *charImport, *charTarget;
-	QofEntity	 	*mergeEnt, *targetEnt, *referenceEnt;
-	const GUID 		*guidImport, *guidTarget;
-	QofParam 		*qtparam;
-	KvpFrame 		*kvpImport, *kvpTarget;
-	QofIdType 		mergeParamName;
-	QofType 		mergeType;
-	GSList 			*paramList;
-	gboolean	 	absolute, mergeError, knowntype, mergeMatch, booleanImport, booleanTarget,
-													(*boolean_getter)	(QofEntity*, QofParam*);
-	Timespec 		tsImport, tsTarget, 			(*date_getter)		(QofEntity*, QofParam*);
-	gnc_numeric 	numericImport, numericTarget, 	(*numeric_getter)	(QofEntity*, QofParam*);
-	double 			doubleImport, doubleTarget, 	(*double_getter)	(QofEntity*, QofParam*);
-	gint32 			i32Import, i32Target, 			(*int32_getter)		(QofEntity*, QofParam*);
-	gint64 			i64Import, i64Target, 			(*int64_getter)		(QofEntity*, QofParam*);
+	QofCollection *mergeColl, *targetColl;
+	gchar      *stringImport, *stringTarget, *charImport, *charTarget;
+	QofEntity  *mergeEnt, *targetEnt, *referenceEnt;
+	const GUID *guidImport, *guidTarget;
+	QofParam   *qtparam;
+	KvpFrame   *kvpImport, *kvpTarget;
+	QofIdType  mergeParamName;
+	QofType    mergeType;
+	GSList    *paramList;
+	gboolean  absolute, mergeError, knowntype, mergeMatch, booleanImport, booleanTarget,
+                                                 (*boolean_getter) (QofEntity*, QofParam*);
+	Timespec      tsImport, tsTarget,            (*date_getter)    (QofEntity*, QofParam*);
+	gnc_numeric   numericImport, numericTarget,  (*numeric_getter) (QofEntity*, QofParam*);
+	double        doubleImport, doubleTarget,    (*double_getter)  (QofEntity*, QofParam*);
+	gint32        i32Import, i32Target,          (*int32_getter)   (QofEntity*, QofParam*);
+	gint64        i64Import, i64Target,          (*int64_getter)   (QofEntity*, QofParam*);
 
 	g_return_val_if_fail((mergeData != NULL), -1);
 	currentRule = mergeData->currentRule;
@@ -377,7 +117,6 @@
 	currentRule->mergeResult = MERGE_UNDEF;
 	currentRule->linkedEntList = NULL;
 	g_return_val_if_fail((targetEnt)||(mergeEnt)||(paramList), -1);
-	
 	kvpImport = kvp_frame_new();
 	kvpTarget = kvp_frame_new();
 	mergeError = FALSE;
@@ -386,7 +125,6 @@
 		knowntype = FALSE;
 		qtparam = paramList->data;
 		mergeParamName = qtparam->param_name;
-
 		g_return_val_if_fail(mergeParamName != NULL, -1);
 		mergeType = qtparam->param_type;
 		if(safe_strcmp(mergeType, QOF_TYPE_STRING) == 0)  { 
@@ -456,7 +194,7 @@
 			if(booleanImport != FALSE && booleanImport != TRUE) { booleanImport = FALSE; }
 			if(booleanTarget != FALSE && booleanTarget != TRUE) { booleanTarget = FALSE; }
 			if(booleanImport == booleanTarget) { mergeMatch = TRUE; }
-			currentRule	= qof_book_mergeUpdateRule(currentRule, mergeMatch, DEFAULT_MERGE_WEIGHT);
+			currentRule = qof_book_mergeUpdateRule(currentRule, mergeMatch, DEFAULT_MERGE_WEIGHT);
 			knowntype= TRUE;
 		}
 		if(safe_strcmp(mergeType, QOF_TYPE_KVP) == 0) { 
@@ -474,20 +212,35 @@
 			knowntype= TRUE;
 		}
 		/* No object should have QofSetterFunc defined for the book, but just to be safe, do nothing. */
-		if(safe_strcmp(mergeType, QOF_ID_BOOK) == 0) { knowntype= TRUE;	}
-		/* deal with custom type parameters : 
-		 using references to other registered QOF objects. */
-		if(knowntype == FALSE) {
-			referenceEnt = qtparam->param_getfcn(mergeEnt, qtparam);
+		if(safe_strcmp(mergeType, QOF_ID_BOOK) == 0) { knowntype= TRUE; }
+		if(safe_strcmp(mergeType, QOF_TYPE_COLLECT) == 0) {
+			struct collect_list_s s;
+			s.linkedEntList = NULL;
+			mergeColl = qtparam->param_getfcn(mergeEnt, qtparam);
+			targetColl = qtparam->param_getfcn(targetEnt, qtparam);
+			s.linkedEntList = g_slist_copy(currentRule->linkedEntList);
+			qof_collection_foreach(mergeColl, collect_reference_cb, &s);
+			currentRule->linkedEntList = g_slist_copy(s.linkedEntList);
+			if(0 == qof_collection_compare(mergeColl, targetColl)) { mergeMatch = TRUE; }
+			currentRule = qof_book_mergeUpdateRule(currentRule, mergeMatch, DEFAULT_MERGE_WEIGHT);
+			knowntype = TRUE;
+		}
+		if(safe_strcmp(mergeType, QOF_TYPE_CHOICE) ==0) {
+			referenceEnt = qtparam->param_getfcn(mergeEnt, qtparam);
+			currentRule->linkedEntList = g_slist_prepend(currentRule->linkedEntList, referenceEnt);
+			if(referenceEnt == qtparam->param_getfcn(targetEnt, qtparam)) { mergeMatch = TRUE; }
+			knowntype = TRUE;
+		}
+		if(knowntype == FALSE) {
+			referenceEnt = qtparam->param_getfcn(mergeEnt, qtparam);
 			if((referenceEnt != NULL)
 				&&(safe_strcmp(referenceEnt->e_type, mergeType) == 0)) {
-				currentRule->linkedEntList = g_slist_prepend(currentRule->linkedEntList, referenceEnt);
-					/* Compare the mergeEnt reference with targetEnt reference */
+					currentRule->linkedEntList = g_slist_prepend(currentRule->linkedEntList, referenceEnt);
 					if(referenceEnt == qtparam->param_getfcn(targetEnt, qtparam)) { mergeMatch = TRUE; }
 					currentRule = qof_book_mergeUpdateRule(currentRule, mergeMatch, DEFAULT_MERGE_WEIGHT);
 			}
 		}
-	paramList = g_slist_next(paramList);
+		paramList = g_slist_next(paramList);
 	}
 	mergeData->currentRule = currentRule;
 	g_free(kvpImport);
@@ -495,7 +248,19 @@
 	return 0;
 }
 
-void
+static void 
+qof_book_mergeCommitForeachCB(gpointer rule, gpointer arg)
+{
+	struct qof_book_mergeRuleIterate *iter;
+
+	g_return_if_fail(arg != NULL);
+	iter = (struct qof_book_mergeRuleIterate*)arg;
+	g_return_if_fail(iter->data != NULL);
+	iter->fcn (iter->data, (qof_book_mergeRule*)rule, iter->remainder);
+	iter->remainder--;
+}
+
+static void
 qof_book_mergeCommitForeach (
 			qof_book_mergeRuleForeachCB cb, 
 			qof_book_mergeResult mergeResult,
@@ -527,23 +292,37 @@
 	g_list_foreach (subList, qof_book_mergeCommitForeachCB, &iter);
 }
 
-void qof_book_mergeCommitForeachCB(gpointer rule, gpointer arg)
-{
-	struct qof_book_mergeRuleIterate *iter;
-	
-	g_return_if_fail(arg != NULL);
-	iter = (struct qof_book_mergeRuleIterate*)arg;
-	g_return_if_fail(iter->data != NULL);
-	iter->fcn (iter->data, (qof_book_mergeRule*)rule, iter->remainder);
-	iter->remainder--;
-}
+/* build the table of target comparisons
+
+This can get confusing, so bear with me. (!)
+
+Whilst iterating through the entities in the mergeBook, qof_book_mergeForeach assigns
+a targetEnt to each mergeEnt (until it runs out of targetEnt or mergeEnt). Each match
+is made against the one targetEnt that best matches the mergeEnt. Fine so far.
+
+Any mergeEnt is only ever assigned a targetEnt if the calculated difference between
+the two is less than the difference between that targetEnt and any previous mergeEnt
+match.
+
+The next mergeEnt may be a much better match for that targetEnt and the target_table
+is designed to solve the issues that result from this conflict. The previous match
+must be re-assigned because if two mergeEnt's are matched with only one targetEnt,
+data loss \b WILL follow. Equally, the current mergeEnt must replace the previous
+one as it is a better match. qof_entity_rating holds the details required to identify
+the correct mergeEnt to be re-assigned and these mergeEnt entities are therefore
+orphaned - to be re-matched later.
 
-gboolean
+Meanwhile, the current mergeEnt is entered into target_table with it's difference and
+rule data, in case an even better match is found later in the mergeBook.
+
+Finally, each mergeEnt in the orphan_list is now put through the comparison again.
+
+*/
+static gboolean
 qof_book_merge_rule_cmp(gconstpointer a, gconstpointer b)
 {
 	qof_book_mergeRule *ra = (qof_book_mergeRule *) a;
 	qof_book_mergeRule *rb = (qof_book_mergeRule *) b;
-	
 	if (ra->difference == rb->difference) { return TRUE; }
 	else return FALSE;
 }
@@ -555,7 +334,7 @@
 		Lookup target to find previous match
 		and re-assign mergeEnt to orphan_list */
 	qof_book_mergeRule *rule;
-	
+
 	g_return_if_fail(mergeRule != NULL);
 	g_return_if_fail(mergeData != NULL);
 	if(g_hash_table_size(mergeData->target_table) == 0) { return; }
@@ -569,7 +348,7 @@
 	mergeData->orphan_list = g_slist_append(mergeData->orphan_list, rule);
 }
 
-void
+static void
 qof_book_merge_match_orphans(qof_book_mergeData *mergeData)
 {
 	GSList *orphans, *targets;
@@ -596,21 +375,49 @@
 			continue;
 		}
 		mergeData->currentRule = rule;
-			g_return_if_fail(qof_book_mergeCompare(mergeData) != -1);
-			if(difference > mergeData->currentRule->difference) {
-				best_matchEnt = currentRule->targetEnt;
-				difference = currentRule->difference;
-				rule = currentRule;
-				mergeData->mergeList = g_list_prepend(mergeData->mergeList,rule);
-				qof_book_merge_orphan_check(difference, rule, mergeData);
-			}
+		g_return_if_fail(qof_book_mergeCompare(mergeData) != -1);
+		if(difference > mergeData->currentRule->difference) {
+			best_matchEnt = currentRule->targetEnt;
+			difference = currentRule->difference;
+			rule = currentRule;
+			mergeData->mergeList = g_list_prepend(mergeData->mergeList,rule);
+			qof_book_merge_orphan_check(difference, rule, mergeData);
+		}
 		orphans = g_slist_next(orphans);
 	}
 	g_slist_free(mergeData->orphan_list);
 	g_slist_free(targets);
 }
 
-void 
+static void 
+qof_book_mergeForeachTarget (QofEntity* targetEnt, gpointer user_data)
+{
+	qof_book_mergeData *mergeData;
+
+	g_return_if_fail(user_data != NULL);
+	mergeData = (qof_book_mergeData*)user_data;
+	g_return_if_fail(targetEnt != NULL);
+	mergeData->targetList = g_slist_prepend(mergeData->targetList,targetEnt);
+}
+
+static void 
+qof_book_mergeForeachTypeTarget ( QofObject* merge_obj, gpointer user_data) 
+{
+	qof_book_mergeData *mergeData;
+	qof_book_mergeRule *currentRule;
+
+	g_return_if_fail(user_data != NULL);
+	mergeData = (qof_book_mergeData*)user_data;
+	currentRule = mergeData->currentRule;
+	g_return_if_fail(currentRule != NULL);
+	g_return_if_fail(merge_obj != NULL);
+	if(safe_strcmp(merge_obj->e_type, currentRule->importEnt->e_type) == 0) {
+		qof_object_foreach(currentRule->importEnt->e_type, mergeData->targetBook, 
+			qof_book_mergeForeachTarget, user_data);
+	}
+}
+
+static void 
 qof_book_mergeForeach ( QofEntity* mergeEnt, gpointer user_data) 
 {
 	qof_book_mergeRule *mergeRule, *currentRule;
@@ -619,7 +426,7 @@
 	GUID *g;
 	double difference;
 	GSList *c;
-	
+
 	g_return_if_fail(user_data != NULL);
 	mergeData = (qof_book_mergeData*)user_data;
 	g_return_if_fail(mergeEnt != NULL);
@@ -709,38 +516,24 @@
 	/* return to qof_book_mergeInit */
 }
 
-void qof_book_mergeForeachTarget (QofEntity* targetEnt, gpointer user_data)
+static void 
+qof_book_mergeForeachParam( QofParam* param, gpointer user_data) 
 {
 	qof_book_mergeData *mergeData;
-	
-	g_return_if_fail(user_data != NULL);
-	mergeData = (qof_book_mergeData*)user_data;
-	g_return_if_fail(targetEnt != NULL);
-		mergeData->targetList = g_slist_prepend(mergeData->targetList,targetEnt);
-}
 
-void 
-qof_book_mergeForeachTypeTarget ( QofObject* merge_obj, gpointer user_data) 
-{
-	qof_book_mergeData *mergeData;
-	qof_book_mergeRule *currentRule;
-	
 	g_return_if_fail(user_data != NULL);
 	mergeData = (qof_book_mergeData*)user_data;
-	currentRule = mergeData->currentRule;
-	g_return_if_fail(currentRule != NULL);
-	g_return_if_fail(merge_obj != NULL);
-	if(safe_strcmp(merge_obj->e_type, currentRule->importEnt->e_type) == 0) {
-		qof_object_foreach(currentRule->importEnt->e_type, mergeData->targetBook, 
-			qof_book_mergeForeachTarget, user_data);
+	g_return_if_fail(param != NULL);
+	if((param->param_getfcn != NULL)&&(param->param_setfcn != NULL)) {
+		mergeData->mergeObjectParams = g_slist_append(mergeData->mergeObjectParams, param);
 	}
 }
 
-void 
+static void 
 qof_book_mergeForeachType ( QofObject* merge_obj, gpointer user_data) 
 {
 	qof_book_mergeData *mergeData;
-	
+
 	g_return_if_fail(user_data != NULL);
 	mergeData = (qof_book_mergeData*)user_data;
 	g_return_if_fail((merge_obj != NULL));
@@ -749,27 +542,13 @@
 		DEBUG (" merge_obj QOF support failed %s", merge_obj->e_type);
 		return;
 	}
-
 	if(mergeData->mergeObjectParams != NULL) g_slist_free(mergeData->mergeObjectParams);
 	mergeData->mergeObjectParams = NULL;
 	qof_class_param_foreach(merge_obj->e_type, qof_book_mergeForeachParam , mergeData);
 	qof_object_foreach(merge_obj->e_type, mergeData->mergeBook, qof_book_mergeForeach, mergeData);
 }
 
-void 
-qof_book_mergeForeachParam( QofParam* param, gpointer user_data) 
-{
-	qof_book_mergeData *mergeData;
-	
-	g_return_if_fail(user_data != NULL);
-	mergeData = (qof_book_mergeData*)user_data;
-	g_return_if_fail(param != NULL);
-	if((param->param_getfcn != NULL)&&(param->param_setfcn != NULL)) {
-		mergeData->mergeObjectParams = g_slist_append(mergeData->mergeObjectParams, param);
-	}
-}
-
-void
+static void
 qof_book_mergeRuleCB(gpointer rule, gpointer arg)
 {
 	struct qof_book_mergeRuleIterate *iter;
@@ -785,60 +564,42 @@
 	iter->remainder--;
 }
 
-static QofEntity*
-qof_book_mergeLocateReference( QofEntity *ent, qof_book_mergeData *mergeData)
-{
-	GList *all_rules;
-	qof_book_mergeRule *rule;
-	QofEntity *referenceEnt;
-
-	/* locates the rule referring to this import entity */
-	if(!ent) { return NULL; }
-	g_return_val_if_fail((mergeData != NULL), NULL);
-	all_rules = NULL;
-	referenceEnt = NULL;
-	all_rules = g_list_copy(mergeData->mergeList);
-	while(all_rules != NULL) {
-		rule = all_rules->data;
-		if(rule->importEnt == ent) { referenceEnt = rule->targetEnt; }
-		all_rules = g_list_next(all_rules);
-	}
-	return referenceEnt;
-}
-
-void qof_book_mergeCommitRuleLoop(
+static void 
+qof_book_mergeCommitRuleLoop(
 						qof_book_mergeData *mergeData,
 						qof_book_mergeRule *rule, 
 						guint remainder) 
 { 
-	QofInstance 	*inst;
-	gboolean		registered_type;
-	QofEntity 		*referenceEnt;
-	GSList 			*linkage;
+	QofInstance *inst;
+	gboolean    registered_type;
+	QofEntity   *referenceEnt;
 	/* cm_ prefix used for variables that hold the data to commit */
-	QofParam 		*cm_param;
-	gchar 			*cm_string, *cm_char;
-	const GUID 		*cm_guid;
-	KvpFrame 		*cm_kvp;
+	QofCollection *cm_coll;
+	QofParam    *cm_param;
+	gchar       *cm_string;
+	const GUID  *cm_guid;
+	KvpFrame    *cm_kvp;
 	/* function pointers and variables for parameter getters that don't use pointers normally */
-	gnc_numeric 	cm_numeric, (*numeric_getter)	(QofEntity*, QofParam*);
-	double 			cm_double, 	(*double_getter)	(QofEntity*, QofParam*);
-	gboolean 		cm_boolean, (*boolean_getter)	(QofEntity*, QofParam*);
-	gint32 			cm_i32, 	(*int32_getter)		(QofEntity*, QofParam*);
-	gint64 			cm_i64, 	(*int64_getter)		(QofEntity*, QofParam*);
-	Timespec 		cm_date, 	(*date_getter)		(QofEntity*, QofParam*);
+	gnc_numeric  cm_numeric, (*numeric_getter)  (QofEntity*, QofParam*);
+	double       cm_double,  (*double_getter)   (QofEntity*, QofParam*);
+	gboolean     cm_boolean, (*boolean_getter)  (QofEntity*, QofParam*);
+	gint32       cm_i32,     (*int32_getter)    (QofEntity*, QofParam*);
+	gint64       cm_i64,     (*int64_getter)    (QofEntity*, QofParam*);
+	Timespec     cm_date,    (*date_getter)     (QofEntity*, QofParam*);
+	char         cm_char,    (*char_getter)     (QofEntity*, QofParam*);
 	/* function pointers to the parameter setters */
-	void	(*string_setter)	(QofEntity*, const char*);
-	void	(*date_setter)		(QofEntity*, Timespec);
-	void	(*numeric_setter)	(QofEntity*, gnc_numeric);
-	void	(*guid_setter)		(QofEntity*, const GUID*);
-	void	(*double_setter)	(QofEntity*, double);
-	void	(*boolean_setter)	(QofEntity*, gboolean);
-	void	(*i32_setter)		(QofEntity*, gint32);
-	void	(*i64_setter)		(QofEntity*, gint64);
-	void	(*char_setter)		(QofEntity*, char*);
-	void	(*kvp_frame_setter)	(QofEntity*, KvpFrame*);
-	void	(*reference_setter)	(QofEntity*, QofEntity*);
+	void (*string_setter)    (QofEntity*, const char*);
+	void (*date_setter)      (QofEntity*, Timespec);
+	void (*numeric_setter)   (QofEntity*, gnc_numeric);
+	void (*guid_setter)      (QofEntity*, const GUID*);
+	void (*double_setter)    (QofEntity*, double);
+	void (*boolean_setter)   (QofEntity*, gboolean);
+	void (*i32_setter)       (QofEntity*, gint32);
+	void (*i64_setter)       (QofEntity*, gint64);
+	void (*char_setter)      (QofEntity*, char);
+	void (*kvp_frame_setter) (QofEntity*, KvpFrame*);
+	void (*reference_setter) (QofEntity*, QofEntity*);
+	void (*collection_setter)(QofEntity*, QofCollection*);
 
 	g_return_if_fail(rule != NULL);
 	g_return_if_fail(mergeData != NULL);
@@ -859,13 +620,13 @@
 	*/
 	while(rule->mergeParam != NULL) {
 		registered_type = FALSE;
-		g_return_if_fail(rule->mergeParam->data);		
+		g_return_if_fail(rule->mergeParam->data);
 		cm_param = rule->mergeParam->data;
 		rule->mergeType = cm_param->param_type;
 		if(safe_strcmp(rule->mergeType, QOF_TYPE_STRING) == 0)  { 
 			cm_string = cm_param->param_getfcn(rule->importEnt, cm_param);
 			string_setter = (void(*)(QofEntity*, const char*))cm_param->param_setfcn;
-			if(string_setter != NULL) {	string_setter(rule->targetEnt, cm_string); }
+			if(string_setter != NULL) { string_setter(rule->targetEnt, cm_string); }
 			registered_type = TRUE;
 		}
 		if(safe_strcmp(rule->mergeType, QOF_TYPE_DATE) == 0) { 
@@ -924,31 +685,308 @@
 			registered_type = TRUE;
 		}
 		if(safe_strcmp(rule->mergeType, QOF_TYPE_CHAR) == 0) { 
-			cm_char = cm_param->param_getfcn(rule->importEnt,cm_param);
-			char_setter = (void(*)(QofEntity*, char*))cm_param->param_setfcn;
+			char_getter = (char (*)(QofEntity*, QofParam*)) cm_param->param_getfcn;
+			cm_char = char_getter(rule->importEnt,cm_param);
+			char_setter = (void(*)(QofEntity*, char))cm_param->param_setfcn;
 			if(char_setter != NULL) { char_setter(rule->targetEnt, cm_char); }
 			registered_type = TRUE;
 		}
-		if(registered_type == FALSE) {
-			linkage = g_slist_copy(rule->linkedEntList);
-			referenceEnt = NULL;
-//			currentRule = NULL;
-			reference_setter = (void(*)(QofEntity*, QofEntity*))cm_param->param_setfcn;
-			if((linkage == NULL)&&(rule->mergeResult == MERGE_NEW)) {
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_COLLECT) == 0) {
+			cm_coll = cm_param->param_getfcn(rule->importEnt, cm_param);
+			collection_setter = (void(*)(QofEntity*, QofCollection*))cm_param->param_setfcn;
+			if(collection_setter != NULL) { collection_setter(rule->targetEnt, cm_coll); }
+			registered_type = TRUE;
+		}
+		if(safe_strcmp(rule->mergeType, QOF_TYPE_CHOICE) == 0) {
 				referenceEnt = cm_param->param_getfcn(rule->importEnt, cm_param);
-				reference_setter(rule->targetEnt, qof_book_mergeLocateReference(referenceEnt, mergeData));
+			reference_setter = (void(*)(QofEntity*, QofEntity*))cm_param->param_setfcn;
+			if(reference_setter != NULL) 
+			{ 
+				reference_setter(rule->targetEnt, referenceEnt); 
 			}
-			while(linkage != NULL) {
-				referenceEnt = linkage->data;
-				if((referenceEnt)
-					&&(referenceEnt->e_type)
-					&&(safe_strcmp(referenceEnt->e_type, rule->mergeType) == 0)) {
-					/* The function behind reference_setter must create objects for any non-QOF references */
-					reference_setter(rule->targetEnt, qof_book_mergeLocateReference(referenceEnt, mergeData));
+			registered_type = TRUE;
+		}
+		if(registered_type == FALSE) {
+			referenceEnt = cm_param->param_getfcn(rule->importEnt, cm_param);
+			if(referenceEnt) {
+				reference_setter = (void(*)(QofEntity*, QofEntity*))cm_param->param_setfcn;
+				if(reference_setter != NULL) 
+				{ 
+					reference_setter(rule->targetEnt, referenceEnt); 
 				}
-				linkage = g_slist_next(linkage);
 			}
 		}
 		rule->mergeParam = g_slist_next(rule->mergeParam);
 	}
 }
+/* ================================================================ */
+/* API functions. */
+
+qof_book_mergeData*
+qof_book_mergeInit( QofBook *importBook, QofBook *targetBook) 
+{
+	qof_book_mergeData *mergeData;
+	qof_book_mergeRule *currentRule;
+	GList *check;
+
+	g_return_val_if_fail((importBook != NULL)&&(targetBook != NULL), NULL);
+	mergeData = g_new(qof_book_mergeData, 1);
+	mergeData->abort = FALSE;
+	mergeData->mergeList = NULL;
+	mergeData->targetList = NULL;
+	mergeData->mergeBook = importBook;
+	mergeData->targetBook = targetBook;
+	mergeData->mergeObjectParams = NULL;
+	mergeData->orphan_list = NULL;
+	mergeData->target_table = g_hash_table_new( g_direct_hash, qof_book_merge_rule_cmp);
+	currentRule = g_new(qof_book_mergeRule, 1);
+	mergeData->currentRule = currentRule;
+	qof_object_foreach_type(qof_book_mergeForeachType, mergeData);
+	g_return_val_if_fail(mergeData->mergeObjectParams, NULL);
+	if(mergeData->orphan_list != NULL) {
+		qof_book_merge_match_orphans(mergeData);
+	}
+	
+	check = g_list_copy(mergeData->mergeList);
+	while(check != NULL) {
+		currentRule = check->data;
+		if(currentRule->mergeResult == MERGE_INVALID) {
+			mergeData->abort = TRUE;
+			return(NULL);
+		}
+		check = g_list_next(check);
+	}
+	g_list_free(check);
+	return mergeData;
+}
+
+void
+qof_book_merge_abort (qof_book_mergeData *mergeData)
+{
+	qof_book_mergeRule *currentRule;
+
+	g_return_if_fail(mergeData != NULL);
+	while(mergeData->mergeList != NULL) {
+		currentRule = mergeData->mergeList->data;
+		g_slist_free(currentRule->linkedEntList);
+		g_slist_free(currentRule->mergeParam);
+		g_free(mergeData->mergeList->data);
+		if(currentRule) {
+			g_slist_free(currentRule->linkedEntList);
+			g_slist_free(currentRule->mergeParam);
+			g_free(currentRule);
+		}
+		mergeData->mergeList = g_list_next(mergeData->mergeList);
+	}
+	g_list_free(mergeData->mergeList);
+	g_slist_free(mergeData->mergeObjectParams);
+	g_slist_free(mergeData->targetList);
+	if(mergeData->orphan_list != NULL) { g_slist_free(mergeData->orphan_list); }
+	g_hash_table_destroy(mergeData->target_table);
+	g_free(mergeData);
+}
+
+/* The QOF_TYPE_DATE output format from
+qof_book_merge_param_as_string has been changed to QSF_XSD_TIME,
+a UTC formatted timestring: 2005-01-01T10:55:23Z
+If you change QOF_UTC_DATE_FORMAT, change 
+backend/file/qsf-xml.c : qsf_entity_foreach to
+reformat to QSF_XSD_TIME or the QSF XML will
+FAIL the schema validation and QSF exports will become invalid.
+
+The QOF_TYPE_BOOLEAN is lowercase for the same reason.
+*/
+char*
+qof_book_merge_param_as_string(QofParam *qtparam, QofEntity *qtEnt)
+{
+	gchar       *param_string, param_date[QOF_DATE_STRING_LENGTH];
+	char        param_sa[GUID_ENCODING_LENGTH + 1];
+	QofType     paramType;
+	const GUID *param_guid;
+	time_t      param_t;
+	gnc_numeric param_numeric,  (*numeric_getter) (QofEntity*, QofParam*);
+	Timespec    param_ts,       (*date_getter)    (QofEntity*, QofParam*);
+	double      param_double,   (*double_getter)  (QofEntity*, QofParam*);
+	gboolean    param_boolean,  (*boolean_getter) (QofEntity*, QofParam*);
+	gint32      param_i32,      (*int32_getter)   (QofEntity*, QofParam*);
+	gint64      param_i64,      (*int64_getter)   (QofEntity*, QofParam*);
+	char        param_char,     (*char_getter)    (QofEntity*, QofParam*);
+
+	param_string = NULL;
+	paramType = qtparam->param_type;
+	if(safe_strcmp(paramType, QOF_TYPE_STRING) == 0)  { 
+			param_string = g_strdup(qtparam->param_getfcn(qtEnt,qtparam));
+			if(param_string == NULL) { param_string = ""; }
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_DATE) == 0) { 
+			date_getter = (Timespec (*)(QofEntity*, QofParam*))qtparam->param_getfcn;
+			param_ts = date_getter(qtEnt, qtparam);
+			param_t = timespecToTime_t(param_ts);
+			strftime(param_date, QOF_DATE_STRING_LENGTH, QOF_UTC_DATE_FORMAT, gmtime(&param_t));
+			param_string = g_strdup(param_date);
+			return param_string;
+		}
+		if((safe_strcmp(paramType, QOF_TYPE_NUMERIC) == 0)  ||
+		(safe_strcmp(paramType, QOF_TYPE_DEBCRED) == 0)) { 
+			numeric_getter = (gnc_numeric (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_numeric = numeric_getter(qtEnt,qtparam);
+			param_string = g_strdup(gnc_numeric_to_string(param_numeric));
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_GUID) == 0) { 
+			param_guid = qtparam->param_getfcn(qtEnt,qtparam);
+			guid_to_string_buff(param_guid, param_sa);
+			param_string = g_strdup(param_sa);
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_INT32) == 0) { 
+			int32_getter = (gint32 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_i32 = int32_getter(qtEnt, qtparam);
+			param_string = g_strdup_printf("%d", param_i32);
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_INT64) == 0) { 
+			int64_getter = (gint64 (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_i64 = int64_getter(qtEnt, qtparam);
+			param_string = g_strdup_printf("%" G_GINT64_FORMAT, param_i64);
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_DOUBLE) == 0) { 
+			double_getter = (double (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_double = double_getter(qtEnt, qtparam);
+			param_string = g_strdup_printf("%f", param_double);
+			return param_string;
+		}
+		if(safe_strcmp(paramType, QOF_TYPE_BOOLEAN) == 0){ 
+			boolean_getter = (gboolean (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_boolean = boolean_getter(qtEnt, qtparam);
+			/* Boolean values need to be lowercase for QSF validation. */
+			if(param_boolean == TRUE) { param_string = g_strdup("true"); }
+			else { param_string = g_strdup("false"); }
+			return param_string;
+		}
+		/* "kvp" contains repeating values, cannot be a single string for the frame. */
+		if(safe_strcmp(paramType, QOF_TYPE_KVP) == 0) { return param_string; }
+		if(safe_strcmp(paramType, QOF_TYPE_CHAR) == 0) { 
+			char_getter = (char (*)(QofEntity*, QofParam*)) qtparam->param_getfcn;
+			param_char = char_getter(qtEnt, qtparam);
+			param_string = g_strdup_printf("%c", param_char);
+			return param_string;
+		}
+	return NULL;
+}
+
+qof_book_mergeData*
+qof_book_mergeUpdateResult(qof_book_mergeData *mergeData,
+						qof_book_mergeResult tag)
+{
+	qof_book_mergeRule *resolved;
+
+	g_return_val_if_fail((mergeData != NULL), NULL);
+	g_return_val_if_fail((tag > 0), NULL);
+	g_return_val_if_fail((tag != MERGE_REPORT), NULL);
+	resolved = mergeData->currentRule;
+	g_return_val_if_fail((resolved != NULL), NULL);
+	if((resolved->mergeAbsolute == TRUE)&&(tag == MERGE_DUPLICATE))
+	{ 
+		tag = MERGE_ABSOLUTE; 
+	}
+	if((resolved->mergeAbsolute == TRUE)&&(tag == MERGE_NEW))
+	{
+		tag = MERGE_UPDATE; 
+	}
+	if((resolved->mergeAbsolute == FALSE)&&	(tag == MERGE_ABSOLUTE))
+	{ 
+		tag = MERGE_DUPLICATE; 
+	}
+	if((resolved->mergeResult == MERGE_NEW)&&(tag == MERGE_UPDATE)) 
+	{ 
+		tag = MERGE_NEW; 
+	}
+	if(resolved->updated == FALSE) { resolved->mergeResult = tag; }
+	resolved->updated = TRUE;
+	if(tag >= MERGE_INVALID) { 
+		mergeData->abort = TRUE;
+		mergeData->currentRule = resolved;
+		return NULL; 
+	}
+	mergeData->currentRule = resolved;
+	return mergeData;
+}
+
+int
+qof_book_mergeCommit( qof_book_mergeData *mergeData )
+{
+	qof_book_mergeRule *currentRule;
+	GList *check;
+
+	g_return_val_if_fail(mergeData != NULL, -1);
+	g_return_val_if_fail(mergeData->mergeList != NULL, -1);
+	g_return_val_if_fail(mergeData->targetBook != NULL, -1);
+	if(mergeData->abort == TRUE) return -1;
+	check = g_list_copy(mergeData->mergeList);
+	g_return_val_if_fail(check != NULL, -1);
+	while(check != NULL) {
+		currentRule = check->data;
+		if(currentRule->mergeResult == MERGE_INVALID) {
+			qof_book_merge_abort(mergeData);
+			return(-2);
+		}
+		if(currentRule->mergeResult == MERGE_REPORT) {
+			g_list_free(check);
+			return 1;
+		}
+		check = g_list_next(check);
+	}
+	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_NEW, mergeData);
+	qof_book_mergeCommitForeach( qof_book_mergeCommitRuleLoop, MERGE_UPDATE, mergeData);
+	/* Placeholder for QofObject merge_helper_cb - all objects and all parameters set */
+	while(mergeData->mergeList != NULL) {
+		currentRule = mergeData->mergeList->data;
+		g_slist_free(currentRule->mergeParam);
+		g_slist_free(currentRule->linkedEntList);
+		mergeData->mergeList = g_list_next(mergeData->mergeList);
+	}
+	g_list_free(mergeData->mergeList);
+	g_slist_free(mergeData->mergeObjectParams);
+	g_slist_free(mergeData->targetList);
+	if(mergeData->orphan_list != NULL) { g_slist_free(mergeData->orphan_list); }
+	g_hash_table_destroy(mergeData->target_table);
+	g_free(mergeData);
+	return 0;
+}
+
+void 
+qof_book_mergeRuleForeach( qof_book_mergeData *mergeData, 
+								qof_book_mergeRuleForeachCB cb, 
+								qof_book_mergeResult mergeResult )
+{
+	struct qof_book_mergeRuleIterate iter;
+	qof_book_mergeRule *currentRule;
+	GList *matching_rules;
+
+	g_return_if_fail(cb != NULL);
+	g_return_if_fail(mergeData != NULL);
+	currentRule = mergeData->currentRule;
+	g_return_if_fail(mergeResult > 0);
+	g_return_if_fail(mergeResult != MERGE_INVALID);
+	g_return_if_fail(mergeData->abort == FALSE);
+	iter.fcn = cb;
+	iter.data = mergeData;
+	matching_rules = NULL;
+	iter.ruleList = g_list_copy(mergeData->mergeList);
+	while(iter.ruleList!=NULL) {
+		currentRule = iter.ruleList->data;
+		if(currentRule->mergeResult == mergeResult) {
+			matching_rules = g_list_prepend(matching_rules, currentRule);
+		}
+		iter.ruleList = g_list_next(iter.ruleList);
+	}
+	iter.remainder = g_list_length(matching_rules);
+	g_list_foreach (matching_rules, qof_book_mergeRuleCB, &iter);
+	g_list_free(matching_rules);
+}
+
+/* End of file. */
+/* ==================================================================== */
Index: kvp_frame.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp_frame.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lsrc/engine/kvp_frame.c -Lsrc/engine/kvp_frame.c -u -r1.44 -r1.45
--- src/engine/kvp_frame.c
+++ src/engine/kvp_frame.c
@@ -32,9 +32,9 @@
 #include <math.h>
 
 #include "gnc-date.h"
+#include "gnc-trace.h"
 #include "gnc-engine-util.h"
 #include "gnc-numeric.h"
-#include "gnc-trace.h"
 #include "guid.h"
 #include "kvp_frame.h"
 
@@ -43,6 +43,8 @@
   * (gnc_string_cache), as it is very likely we will see the 
   * same keys over and over again  */
 
+/* TODO: set the cache handling functions with hash_table_new_full */
+
 struct _KvpFrame 
 {
   GHashTable  * hash;
@@ -72,7 +74,7 @@
 };
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_KVP;
+static QofLogModule log_module = QOF_MOD_KVP;
 
 /********************************************************************
  * KvpFrame functions
@@ -113,7 +115,7 @@
 static void
 kvp_frame_delete_worker(gpointer key, gpointer value, gpointer user_data) 
 {
-  g_cache_remove(gnc_engine_get_string_cache(), key);
+  gnc_string_cache_remove(key);
   kvp_value_delete((KvpValue *)value);  
 }
 
@@ -148,7 +150,7 @@
 {
   KvpFrame * dest = (KvpFrame *)user_data;
   g_hash_table_insert(dest->hash,
-                      (gpointer)g_cache_insert(gnc_engine_get_string_cache(), key), 
+                      gnc_string_cache_insert(key),
                       (gpointer)kvp_value_copy(value));
 }
 
@@ -189,7 +191,7 @@
   if(key_exists) 
   {
     g_hash_table_remove(frame->hash, slot);
-    g_cache_remove(gnc_engine_get_string_cache(), orig_key);
+    gnc_string_cache_remove(orig_key);
   }
   else
   {
@@ -199,8 +201,7 @@
   if(new_value) 
   {
     g_hash_table_insert(frame->hash,
-                        g_cache_insert(gnc_engine_get_string_cache(),
-                                       (gpointer) slot),
+                        gnc_string_cache_insert((gpointer) slot),
                         new_value);
   }
 
@@ -409,7 +410,7 @@
 }
 
 void
-kvp_frame_set_gnc_numeric(KvpFrame * frame, const char * path, gnc_numeric nval) 
+kvp_frame_set_numeric(KvpFrame * frame, const char * path, gnc_numeric nval) 
 {
   KvpValue *value;
   value = kvp_value_new_gnc_numeric (nval);
@@ -418,7 +419,7 @@
 }
 
 void
-kvp_frame_set_str(KvpFrame * frame, const char * path, const char* str) 
+kvp_frame_set_string(KvpFrame * frame, const char * path, const char* str) 
 {
   KvpValue *value;
   value = kvp_value_new_string (str);
@@ -585,7 +586,7 @@
 }
 
 void
-kvp_frame_add_gnc_numeric(KvpFrame * frame, const char * path, gnc_numeric nval) 
+kvp_frame_add_numeric(KvpFrame * frame, const char * path, gnc_numeric nval) 
 {
   KvpValue *value;
   value = kvp_value_new_gnc_numeric (nval);
@@ -594,7 +595,7 @@
 }
 
 void
-kvp_frame_add_str(KvpFrame * frame, const char * path, const char* str) 
+kvp_frame_add_string(KvpFrame * frame, const char * path, const char* str) 
 {
   KvpValue *value;
   value = kvp_value_new_string (str);
@@ -1131,7 +1132,7 @@
 }
 
 KvpValue *
-kvp_value_new_gnc_numeric(gnc_numeric value) 
+kvp_value_new_numeric(gnc_numeric value) 
 {
   KvpValue * retval    = g_new0(KvpValue, 1);
   retval->type          = KVP_TYPE_NUMERIC;
@@ -1604,7 +1605,7 @@
     
     for(i = 0; i < size; i++)
     {
-        g_string_sprintfa(output, "%02x", (unsigned int) (data_str[i]));
+        g_string_append_printf(output, "%02x", (unsigned int) (data_str[i]));
     }
 
     return output->str;
@@ -1648,7 +1649,7 @@
     switch(kvp_value_get_type(val))
     {
     case KVP_TYPE_GINT64:
-        return g_strdup_printf("%lld",(long long int) kvp_value_get_gint64(val));
+        return g_strdup_printf("%" G_GINT64_FORMAT, kvp_value_get_gint64(val));
         break;
 
     case KVP_TYPE_DOUBLE:
@@ -1723,8 +1724,8 @@
     switch(kvp_value_get_type(val))
     {
     case KVP_TYPE_GINT64:
-        return g_strdup_printf("KVP_VALUE_GINT64(%lld)",
-                               (long long int) kvp_value_get_gint64(val));
+        return g_strdup_printf("KVP_VALUE_GINT64(%" G_GINT64_FORMAT ")",
+                               kvp_value_get_gint64(val));
         break;
 
     case KVP_TYPE_DOUBLE:
@@ -1745,6 +1746,7 @@
         break;
 
     case KVP_TYPE_GUID:
+        /* THREAD-UNSAFE */
         ctmp = guid_to_string(kvp_value_get_guid(val));
         tmp2 = g_strdup_printf("KVP_VALUE_GUID(%s)", ctmp ? ctmp : "");
         return tmp2;
Index: SchedXaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SchedXaction.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -Lsrc/engine/SchedXaction.c -Lsrc/engine/SchedXaction.c -u -r1.53 -r1.54
--- src/engine/SchedXaction.c
+++ src/engine/SchedXaction.c
@@ -33,20 +33,12 @@
 #include "SX-ttinfo.h"
 #include "SchedXactionP.h"
 #include "Transaction.h"
-#include "gnc-date.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-event-p.h"
-#include "gnc-trace.h"
-#include "guid.h"
 #include "messages.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofid-p.h"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
-/** Local Prototypes *****/
+/* Local Prototypes *****/
 
 void sxprivtransactionListMapDelete( gpointer data, gpointer user_data );
 
@@ -73,10 +65,13 @@
 
    /* create a new template account for our splits */
    sx->template_acct = xaccMallocAccount(book);
-   xaccAccountSetName( sx->template_acct, guid_to_string( &sx->inst.entity.guid ));
+   /* THREAD-UNSAFE */
+   xaccAccountSetName( sx->template_acct,
+                       guid_to_string( &sx->inst.entity.guid ));
    xaccAccountSetCommodity
      (sx->template_acct,
-      gnc_commodity_new( "template", "template",
+      gnc_commodity_new( book,
+			 "template", "template",
                          "template", "template", 1 ) );
    xaccAccountSetType( sx->template_acct, BANK );
    ag = gnc_book_get_template_group( book );
@@ -730,3 +725,40 @@
    return sx->deferredList;
 }
 
+static QofObject SXDesc = 
+{
+	interface_version : QOF_OBJECT_VERSION,
+	e_type            : GNC_SX_ID,
+	type_label        : "Scheduled Transaction",
+	create            : (gpointer)xaccSchedXactionMalloc,
+	book_begin        : NULL,
+	book_end          : NULL,
+	is_dirty          : NULL,
+	mark_clean        : NULL,
+	foreach           : qof_collection_foreach,
+	printable         : NULL,
+	version_cmp       : (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
+};
+
+gboolean SXRegister (void)
+{
+	static QofParam params[] = {
+	 { GNC_SX_FREQ_SPEC, QOF_ID_FREQSPEC, (QofAccessFunc)xaccSchedXactionGetFreqSpec,
+		 (QofSetterFunc)xaccSchedXactionSetFreqSpec },
+	 { GNC_SX_NAME, QOF_TYPE_STRING, (QofAccessFunc)xaccSchedXactionGetName,
+		 (QofSetterFunc)xaccSchedXactionSetName },
+	 { GNC_SX_START_DATE, QOF_TYPE_DATE, (QofAccessFunc)xaccSchedXactionGetStartDate,
+		 (QofSetterFunc)xaccSchedXactionSetStartDate },
+	 { GNC_SX_LAST_DATE, QOF_TYPE_DATE, (QofAccessFunc)xaccSchedXactionGetLastOccurDate,
+		 (QofSetterFunc)xaccSchedXactionSetLastOccurDate },
+	 { GNC_SX_NUM_OCCUR, QOF_TYPE_INT64, (QofAccessFunc)xaccSchedXactionGetNumOccur,
+		 (QofSetterFunc)xaccSchedXactionSetNumOccur },
+	 { GNC_SX_REM_OCCUR, QOF_TYPE_INT64, (QofAccessFunc)xaccSchedXactionGetRemOccur,
+		 (QofSetterFunc)xaccSchedXactionSetRemOccur },
+	 { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book, NULL },
+	 { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_instance_get_guid, NULL },
+	 { NULL },
+	};
+	qof_class_register(GNC_SX_ID, NULL, params);
+	return qof_object_register(&SXDesc);
+}
Index: gnc-lot.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-lot.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lsrc/engine/gnc-lot.c -Lsrc/engine/gnc-lot.c -u -r1.41 -r1.42
--- src/engine/gnc-lot.c
+++ src/engine/gnc-lot.c
@@ -39,22 +39,13 @@
  */
 
 #include "Account.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
-#include "gnc-event-p.h"
 #include "gnc-lot.h"
 #include "gnc-lot-p.h"
-#include "gnc-trace.h"
 #include "Transaction.h"
 #include "TransactionP.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofclass.h"
-#include "qofid-p.h"
-#include "qofquery.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_LOT;
+static QofLogModule log_module = GNC_MOD_LOT;
 
 /* ============================================================= */
 
@@ -361,9 +352,7 @@
 
 /* ============================================================= */
 
-/* change prototype of gnc_lot_register to return a gboolean
-and set a foreach 
-before enabling the object description. */
+/* Should the object description be enabled?. */
 /*
 static QofObject gncLotDesc =
 {
@@ -375,17 +364,17 @@
 book_end:           NULL,
 is_dirty:           NULL,
 mark_clean:         NULL,
-foreach:            NULL,
+foreach:            qof_collection_foreach,
 printable:          NULL,
-version_cmp:        NULL,
+version_cmp:        (int (*)(gpointer,gpointer))qof_instance_version_cmp,
 };
 */
 
-void gnc_lot_register (void)
+gboolean gnc_lot_register (void)
 {
   static const QofParam params[] = {
-	{ LOT_TITLE, 		QOF_TYPE_STRING,	(QofAccessFunc)gnc_lot_get_title, 		(QofSetterFunc)gnc_lot_set_title },
-	{ LOT_NOTES,		QOF_TYPE_STRING,	(QofAccessFunc)gnc_lot_get_notes,		(QofSetterFunc)gnc_lot_set_notes },
+   { LOT_TITLE, QOF_TYPE_STRING, (QofAccessFunc)gnc_lot_get_title, (QofSetterFunc)gnc_lot_set_title },
+   { LOT_NOTES,	QOF_TYPE_STRING, (QofAccessFunc)gnc_lot_get_notes, (QofSetterFunc)gnc_lot_set_notes },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_entity_get_guid, NULL },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)gnc_lot_get_book, NULL },
     { LOT_IS_CLOSED, QOF_TYPE_BOOLEAN, (QofAccessFunc)gnc_lot_is_closed, NULL },
@@ -394,7 +383,7 @@
   };
 
   qof_class_register (GNC_ID_LOT, NULL, params);
-  
+  return TRUE;
 //  return qof_object_register(&gncLotDesc);
 
 }
Index: qofid.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofid.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/engine/qofid.c -Lsrc/engine/qofid.c -u -r1.12 -r1.13
--- src/engine/qofid.c
+++ src/engine/qofid.c
@@ -29,13 +29,10 @@
 
 #include "qofid.h"
 #include "qofid-p.h"
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
 
-#define CACHE_INSERT(str) g_cache_insert(gnc_engine_get_string_cache(), (gpointer)(str));
-#define CACHE_REMOVE(str) g_cache_remove(gnc_engine_get_string_cache(), (gpointer)(str));
-
-static short module = MOD_ENGINE;
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 struct QofCollection_s
 {
@@ -43,7 +40,7 @@
   gboolean     is_dirty;
   
   GHashTable * hash_of_entities;
-  gpointer     data;       /* place where object class can hang arbitrari data */
+  gpointer     data;       /* place where object class can hang arbitrary data */
 };
 
 /* =============================================================== */
@@ -201,6 +198,91 @@
   ent->collection = col;
 }
 
+gboolean
+qof_collection_add_entity (QofCollection *coll, QofEntity *ent)
+{
+	QofEntity *e;
+
+	e = NULL;
+	if (!coll || !ent) { return FALSE; }
+	if (guid_equal(&ent->guid, guid_null())) { return FALSE; }
+	g_return_val_if_fail (coll->e_type == ent->e_type, FALSE);
+	e = qof_collection_lookup_entity(coll, &ent->guid);
+	if ( e != NULL ) { return FALSE; }
+	g_hash_table_insert (coll->hash_of_entities, &ent->guid, ent);
+	return TRUE;
+}
+
+static void
+collection_merge_cb (QofEntity *ent, gpointer data)
+{
+	QofCollection *target;
+
+	target = (QofCollection*)data;
+	qof_collection_add_entity(target, ent);	
+}
+
+gboolean
+qof_collection_merge (QofCollection *target, QofCollection *merge)
+{
+	if(!target || !merge) { return FALSE; }
+	g_return_val_if_fail (target->e_type == merge->e_type, FALSE);
+	qof_collection_foreach(merge, collection_merge_cb, target);
+	return TRUE;
+}
+
+static void
+collection_compare_cb (QofEntity *ent, gpointer user_data)
+{
+	QofCollection *target;
+	QofEntity *e;
+	gint value;
+
+	e = NULL;
+	target = (QofCollection*)user_data;
+	if (!target || !ent) { return; }
+	value = *(gint*)qof_collection_get_data(target);
+	if (value != 0) { return; }
+	if (guid_equal(&ent->guid, guid_null())) 
+	{
+		value = -1;
+		qof_collection_set_data(target, &value);
+		return; 
+	}
+	g_return_if_fail (target->e_type == ent->e_type);
+	e = qof_collection_lookup_entity(target, &ent->guid);
+	if ( e == NULL )
+	{
+		value = 1;
+		qof_collection_set_data(target, &value);
+		return;
+	}
+	value = 0;
+	qof_collection_set_data(target, &value);
+}
+
+gint
+qof_collection_compare (QofCollection *target, QofCollection *merge)
+{
+	gint value;
+
+	value = 0;
+	if (!target && !merge) { return 0; }
+	if (target == merge) { return 0; }
+	if (!target && merge) { return -1; }
+	if (target && !merge) { return 1; }
+	if(target->e_type != merge->e_type) { return -1; }
+	qof_collection_set_data(target, &value);
+	qof_collection_foreach(merge, collection_compare_cb, target);
+	value = *(gint*)qof_collection_get_data(target);
+	if(value == 0) {
+		qof_collection_set_data(merge, &value);
+		qof_collection_foreach(target, collection_compare_cb, merge);
+		value = *(gint*)qof_collection_get_data(merge);
+	}
+	return value;
+}
+
 QofEntity *
 qof_collection_lookup_entity (QofCollection *col, const GUID * guid)
 {
@@ -211,6 +293,34 @@
   return ent;
 }
 
+QofCollection *
+qof_collection_from_glist (QofIdType type, GList *glist)
+{
+	QofCollection *coll;
+	QofEntity *ent;
+	GList *list;
+
+	coll = qof_collection_new(type);
+	for(list = glist; list != NULL; list = list->next)
+	{
+		ent = (QofEntity*)list->data;
+		if(FALSE == qof_collection_add_entity(coll, ent))
+		{
+			return NULL;
+		}
+	}
+	return coll;
+}
+
+guint
+qof_collection_count (QofCollection *col)
+{
+	guint c;
+
+	c = g_hash_table_size(col->hash_of_entities);
+	return c;
+}
+
 /* =============================================================== */
 
 gboolean 
Index: SX-book.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SX-book.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/SX-book.c -Lsrc/engine/SX-book.c -u -r1.11 -r1.12
--- src/engine/SX-book.c
+++ src/engine/SX-book.c
@@ -39,20 +39,13 @@
 #include <glib.h>
 
 #include "gnc-engine.h"
-#include "gnc-trace.h"
 #include "Group.h"
 #include "GroupP.h"
 #include "SchedXaction.h"
 #include "SX-book.h"
 #include "SX-book-p.h"
 
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofinstance.h"
-#include "qofinstance-p.h"
-#include "qofobject.h"
-
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /* XXX this whole file is crufty, it doesn't really use entities
  * in the most efficient/best way */
@@ -75,7 +68,8 @@
 }
 
 void
-gnc_collection_set_template_group (QofCollection *col, AccountGroup *templateGroup)
+gnc_collection_set_template_group (QofCollection *col,
+                                   AccountGroup *templateGroup)
 {
   AccountGroup *old_grp;
   if (!col) return;
Index: gnc-date.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-date.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/gnc-date.h -Lsrc/engine/gnc-date.h -u -r1.10 -r1.11
--- src/engine/gnc-date.h
+++ src/engine/gnc-date.h
@@ -62,28 +62,19 @@
 #include <time.h>
 
 /** The maximum length of a string created by the date printers */
-#define MAX_DATE_LENGTH 11
-
-		/* Deprecated, backwards-compat defines; remove after gnome2 port */
-		#define getDateFormatString qof_date_format_get_string
-		#define getDateTextFormatString qof_date_format_get_format
-		#define getDateFormat qof_date_format_get
-		#define setDateFormat qof_date_format_set
-		#define DateFormat QofDateFormat
-		#define printDateSecs(B,S) qof_print_date_buff(B,MAX_DATE_LENGTH,S)
-		#define printDate(B,D,M,Y) qof_print_date_dmy_buff(B,MAX_DATE_LENGTH,D,M,Y)
-		#define printGDate(B,D) qof_print_gdate(B,MAX_DATE_LENGTH,D)
-		#define xaccPrintDateSecs qof_print_date
-		#define scanDate qof_scan_date
-
-		#define DATE_FORMAT_US QOF_DATE_FORMAT_US
-  		#define DATE_FORMAT_UK QOF_DATE_FORMAT_UK
-  		#define DATE_FORMAT_CE QOF_DATE_FORMAT_CE
-  		#define DATE_FORMAT_ISO QOF_DATE_FORMAT_ISO
-  		#define DATE_FORMAT_LOCALE QOF_DATE_FORMAT_LOCALE
-  		#define DATE_FORMAT_CUSTOM QOF_DATE_FORMAT_CUSTOM
+#define MAX_DATE_LENGTH 31
 
 /** Constants *******************************************************/
+/** \brief UTC date format string.
+
+Timezone independent, date and time inclusive, as used in the QSF backend.
+The T and Z characters are from xsd:dateTime format in coordinated universal time, UTC.
+You can reproduce the string from the GNU/Linux command line using the date utility:
+date -u +%Y-%m-%dT%H:M:SZ = 2004-12-12T23:39:11Z The datestring must be timezone independent 
+and include all specified fields. Remember to use gmtime() NOT localtime()! 
+*/
+
+#define QOF_UTC_DATE_FORMAT     "%Y-%m-%dT%H:%M:%SZ"
 
 /** Enum for determining a date format */
 typedef enum
@@ -92,6 +83,7 @@
   QOF_DATE_FORMAT_UK,       /**< Britain: dd/mm/yyyy */
   QOF_DATE_FORMAT_CE,       /**< Continental Europe: dd.mm.yyyy */
   QOF_DATE_FORMAT_ISO,      /**< ISO: yyyy-mm-dd */
+  QOF_DATE_FORMAT_UTC,      /**< UTC: 2004-12-12T23:39:11Z */
   QOF_DATE_FORMAT_LOCALE,   /**< Take from locale information */
   QOF_DATE_FORMAT_CUSTOM    /**< Used by the check printing code */
 } QofDateFormat;
@@ -111,20 +103,36 @@
 } GNCDateMonthFormat;
 
 
-/* The string->value versions return 0 on success and 1 on failure */
+/** \name String / DateFormat conversion. */
+//@{ 
+
+/** \brief The string->value versions return FALSE on success and TRUE on failure */
 const char* gnc_date_dateformat_to_string(QofDateFormat format);
+
+/** \brief Converts the date format to a printable string.
+
+Note the reversed return values!
+ at return FALSE on success, TRUE on failure.
+*/
 gboolean gnc_date_string_to_dateformat(const char* format_string,
 				       QofDateFormat *format);
 
-
 const char* gnc_date_monthformat_to_string(GNCDateMonthFormat format);
+
+/** \brief Converts the month format to a printable string.
+
+Note the reversed return values!
+ at return FALSE on success, TRUE on failure.
+*/
 gboolean gnc_date_string_to_monthformat(const char *format_string,
 					GNCDateMonthFormat *format);
+// @}
 
+/* Datatypes *******************************************************/
 
-/** Datatypes *******************************************************/
-
-/** struct timespec64 is just like the unix 'struct timespec' except 
+/** \brief Use a 64-bit signed int timespec
+ *
+ * struct timespec64 is just like the unix 'struct timespec' except 
  * that we use a 64-bit
  * signed int to store the seconds.  This should adequately cover
  * dates in the distant future as well as the distant past, as long as
@@ -155,10 +163,10 @@
 typedef struct timespec64 Timespec;
 
 
-/** Prototypes ******************************************************/
+/* Prototypes ******************************************************/
 
-/** @name Timespec functions */
-/*@{*/
+/** \name Timespec functions */
+// @{ 
 /** strict equality */
 gboolean timespec_equal(const Timespec *ta, const Timespec *tb);
 
@@ -228,8 +236,6 @@
 /** DOCUMENT ME! FIXME: Probably similar to xaccDMYToSec() this date
  * routine might return incorrect values for dates before 1970.  */
 void gnc_timespec2dmy (Timespec ts, int *day, int *month, int *year);
-/*@}*/
-
 
 /** Add a number of months to a time value and normalize.  Optionally
  * also track the last day of the month, i.e. 1/31 -> 2/28 -> 3/30. */
@@ -258,11 +264,11 @@
  * standardized and is a big mess.
  */
 long int gnc_timezone (struct tm *tm);
-
+// @}
 
 /* ------------------------------------------------------------------------ */
-/** @name QofDateFormat functions */
-/*@{*/
+/** \name QofDateFormat functions */
+// @{
 /** The qof_date_format_get routine returns the date format that
  *  the date printing will use when printing a date, and the scaning 
  *  routines will assume when parsing a date.
@@ -277,11 +283,26 @@
  */
 void qof_date_format_set(QofDateFormat df);
 
-/** DOCUMENT ME! */
+/** This function returns a strftime formatting string for printing an
+ *  all numeric date (e.g. 2005-09-14).  The string returned is based
+ *  upon the location specified.
+ *
+ *  @param df The date style (us, uk, iso, etc) that should be provided.
+ *
+ *  @return A formatting string that will print a date in the
+ *  requested style  */
 const gchar *qof_date_format_get_string(QofDateFormat df);
-/** DOCUMENT ME! */
-const gchar *qof_date_format_get_format(QofDateFormat df);
-/*@}*/
+
+/** This function returns a strftime formatting string for printing a
+ *  date using words and numbers (e.g. 2005-September-14).  The string
+ *  returned is based upon the location specified.
+ *
+ *  @param df The date style (us, uk, iso, etc) that should be provided.
+ *
+ *  @return A formatting string that will print a date in the
+ *  requested style  */
+const gchar *qof_date_text_format_get_string(QofDateFormat df);
+// @}
 
 /** dateSeparator
  *    Return the field separator for the current date format
@@ -294,15 +315,17 @@
  */
 char dateSeparator(void);
 
-/** @name Date Printing/Scanning functions 
- *
+/** \name Date Printing/Scanning functions 
+ */
+// @{
+/**
  * \warning HACK ALERT -- the scan and print routines should probably
  * be moved to somewhere else. The engine really isn't involved with
  * things like printing formats. This is needed mostly by the GUI and
  * so on.  If a file-io thing needs date handling, it should do it
  * itself, instead of depending on the routines here.
  */
-/*@{*/
+
 /** qof_print_date_dmy_buff
  *    Convert a date as day / month / year integers into a localized string
  *    representation
@@ -390,11 +413,11 @@
 /** as above, but returns seconds */
 gboolean qof_scan_date_secs (const char *buff, time_t *secs);
 
-
-/** @name Date Start/End Adjustment routines
+// @}
+/** \name Date Start/End Adjustment routines
  * Given a time value, adjust it to be the beginning or end of that day.
  */
-/** @{ */
+// @{
 
 /** The gnc_tm_set_day_start() inline routine will set the appropriate
  *  fields in the struct tm to indicate the first second of that day.
@@ -456,13 +479,21 @@
  *  seconds and adjust it to the last second of that day. */
 time_t gnc_timet_get_day_end(time_t time_val);
 
+#ifndef GNUCASH_MAJOR_VERSION
 /** The gnc_timet_get_day_start() routine will take the given time in
- *  GLib GDate format and adjust it to the last second of that day. */
+ *  GLib GDate format and adjust it to the last second of that day.
+ *
+ *  @deprecated
+ */
 time_t gnc_timet_get_day_start_gdate (GDate *date);
 
 /** The gnc_timet_get_day_end() routine will take the given time in
- *  GLib GDate format and adjust it to the last second of that day. */
+ *  GLib GDate format and adjust it to the last second of that day.
+ *
+ *  @deprecated
+ */
 time_t gnc_timet_get_day_end_gdate (GDate *date);
+#endif /* GNUCASH_MAJOR_VERSION */
 
 /** Get the numerical last date of the month. (28, 29, 30, 31) */
 int date_get_last_mday(struct tm *tm);
@@ -474,12 +505,12 @@
 int gnc_date_my_last_mday (int month, int year);
 /** DOCUMENT ME! Probably the same as date_get_last_mday() */
 int gnc_timespec_last_mday (Timespec ts);
-/*@}*/
+// @}
 
 /* ======================================================== */
 
-/** @name Today's Date */
-/*@{*/
+/** \name Today's Date */
+// @{
 /** The gnc_tm_get_today_start() routine takes a pointer to a struct
  *  tm and fills it in with the first second of the today. */
 void   gnc_tm_get_today_start(struct tm *tm);
@@ -502,7 +533,7 @@
  *  @note The caller owns this buffer and must free it when done. */
 char * xaccDateUtilGetStampNow (void);
 
-/*@}*/
-
+//@}
+//@}
 #endif /* GNC_DATE_H */
-/** @} */
+
Index: qofobject.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofobject.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/qofobject.c -Lsrc/engine/qofobject.c -u -r1.13 -r1.14
--- src/engine/qofobject.c
+++ src/engine/qofobject.c
@@ -28,13 +28,13 @@
 
 #include <glib.h>
 
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
 #include "qofobject.h"
 #include "qofobject-p.h"
 #include "qofbook.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_OBJECT;
 
 static gboolean object_is_initialized = FALSE;
 static GList *object_modules = NULL;
Index: qofmath128.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofmath128.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/qofmath128.c -Lsrc/engine/qofmath128.c -u -r1.7 -r1.8
--- src/engine/qofmath128.c
+++ src/engine/qofmath128.c
@@ -334,7 +334,7 @@
 static void pr (gint64 a, gint64 b)
 {
    qofint128 prod = mult128 (a,b);
-   printf ("%lld * %lld = %lld %llu (0x%llx %llx) %hd\n",
+   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (0x%llx %llx) %hd\n",
 	   a, b, prod.hi, prod.lo, prod.hi, prod.lo, prod.isbig);
 }
 
@@ -343,7 +343,7 @@
    qofint128 prod = mult128 (a,b);
    qofint128 quot = div128 (prod, c);
    gint64 rem = rem128 (prod, c);
-   printf ("%lld * %lld / %lld = %lld %llu + %lld (0x%llx %llx) %hd\n",
+   printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " + %" G_GINT64_FORMAT " (0x%llx %llx) %hd\n",
 	   a, b, c, quot.hi, quot.lo, rem, quot.hi, quot.lo, quot.isbig);
 }
 
Index: Scrub.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Scrub.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -Lsrc/engine/Scrub.c -Lsrc/engine/Scrub.c -u -r1.67 -r1.68
--- src/engine/Scrub.c
+++ src/engine/Scrub.c
@@ -49,12 +49,10 @@
 #include "ScrubP.h"
 #include "Transaction.h"
 #include "TransactionP.h"
-#include "gnc-engine-util.h"
 #include "messages.h"
 #include "gnc-commodity.h"
-#include "gnc-trace.h"
 
-static short module = MOD_SCRUB;
+static QofLogModule log_module = GNC_MOD_SCRUB;
 
 /* ================================================================ */
 
@@ -825,7 +823,7 @@
   ENTER(" ");
 
   if (!group || !table) {
-    LEAVE("Oops")
+    LEAVE("Oops");
     return;
   }
 
Index: gnc-trace.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-trace.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/gnc-trace.h -Lsrc/engine/gnc-trace.h -u -r1.13 -r1.14
--- src/engine/gnc-trace.h
+++ src/engine/gnc-trace.h
@@ -1,6 +1,7 @@
 /********************************************************************\
- * gnc-trace.h -- GnuCash error logging and tracing fcility         *
+ * gnc-trace.h -- QOF error logging and tracing facility            *
  * Copyright (C) 1998-2003 Linas Vepstas <linas at linas.org>          *
+ * Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>          *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -26,7 +27,9 @@
     @{ */
 
 /** @file gnc-trace.h 
- *  @brief GnuCash error loging and tracing facility */
+ *  @brief QOF error logging and tracing facility
+ *  @author Neil Williams <linux at codehelp.co.uk>
+ */
 
 #ifndef GNC_TRACE_H
 #define GNC_TRACE_H
@@ -34,69 +37,76 @@
 #include <glib.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include "qof.h"
+#include "gnc-engine-util.h"
 
-/** DEBUGGING MACROS ************************************************/
-/* The debuging macros enable the setting of trace messages */
-
-/** If you modify this, modify the loglevel table in the .c file. */
-typedef enum
-{
-  MOD_DUMMY     =  0,
-  MOD_ENGINE    =  1,
-  MOD_IO        =  2,
-  MOD_REGISTER  =  3,
-  MOD_LEDGER    =  4,
-  MOD_HTML      =  5,
-  MOD_GUI       =  6,
-  MOD_SCRUB     =  7,
-  MOD_GTK_REG   =  8,
-  MOD_GUILE     =  9,
-  MOD_BACKEND   = 10,
-  MOD_QUERY     = 11,
-  MOD_PRICE     = 12,
-  MOD_EVENT     = 13,
-  MOD_TXN       = 14,
-  MOD_KVP       = 15,
-  MOD_SX        = 16,
-  MOD_BOOK      = 17,
-  MOD_TEST      = 18,
-  MOD_LOT       = 19,
-  MOD_ACCOUNT   = 20,
-  MOD_IMPORT    = 21,
-  MOD_BUSINESS  = 22,
-  MOD_DRUID     = 23,
-  MOD_COMMODITY = 24,
-  MOD_LAST      = 24
-} gncModuleType;
-
-typedef enum
-{
-  GNC_LOG_FATAL   = 0,
-  GNC_LOG_ERROR   = 1,
-  GNC_LOG_WARNING = 2,
-  GNC_LOG_INFO    = 3,
-  GNC_LOG_DEBUG   = 4,
-  GNC_LOG_DETAIL  = 5,
-  GNC_LOG_TRACE   = 6,
-} gncLogLevel;
+#define QOF_MOD_ENGINE "qof-engine"
 
-//extern gncLogLevel gnc_log_modules[MOD_LAST + 1];
+#define LOG_LEVEL_LIST(_) \
+  _(GNC_LOG_FATAL, = 0)   \
+  _(GNC_LOG_ERROR, = 1)   \
+  _(GNC_LOG_WARNING, = 2) \
+  _(GNC_LOG_INFO, = 3)    \
+  _(GNC_LOG_DEBUG, = 4)   \
+  _(GNC_LOG_DETAIL, = 5)  \
+  _(GNC_LOG_TRACE, = 6)
+
+DEFINE_ENUM (gncLogLevel, LOG_LEVEL_LIST)
+
+/** Convert gncLogLevel to a string.
+
+The macro correlates the enum value and an
+exact copy as a string, removing the need to
+keep two separate lists in sync.
+*/
+AS_STRING_DEC(gncLogLevel, LOG_LEVEL_LIST)
+
+/** Convert the log_string to a gncLogLevel
+
+Only for use as a partner to ::gncLogLevelasString
+*/
+FROM_STRING_DEC(gncLogLevel, LOG_LEVEL_LIST)
 
 #define GNC_TRACE_INDENT_WIDTH 4
 
-/** Initialize the error logging subsystem */
+/** Initialize the error logging subsystem
+
+\note Applications should call gnc_set_logfile
+to set the output, otherwise the
+default of \a /tmp/qof.trace will be used.
+
+As an alternative, use qof_log_init_filename
+which sets the filename and initialises the
+logging subsystem in one operation.
+*/
 void gnc_log_init (void);
 
-/** Set the logging level of the given module. */
-void gnc_set_log_level(gncModuleType module, gncLogLevel level);
+/** Set the logging level of the given log_module. */
+void gnc_set_log_level(QofLogModule module, gncLogLevel level);
+
+/** Set the logging level for all known log_modules.
 
-/** Set the logging level for all modules. */
+\note Unless a log_module has been registered using
+gnc_set_log_level, it will be unaffected by this change.
+
+*/
 void gnc_set_log_level_global(gncLogLevel level);
 
 /** Specify an alternate log output, to pipe or file.  By default,
- *  all logging goes to STDERR. */
+ *  all logging goes to /tmp/qof.trace 
+ 
+ Needs to be called \b before gnc_log_init()
+*/
 void gnc_set_logfile (FILE *outfile);
 
+/** Specify a filename for log output.
+
+Calls gnc_log_init() for you.
+*/
+void qof_log_init_filename (const gchar* logfilename);
+
+/** Be nice, close the logfile is possible. */
+void qof_log_shutdown (void);
 
 /** gnc_log_prettify() cleans up subroutine names. AIX/xlC has the habit
  * of printing signatures not names; clean this up. On other operating
@@ -105,21 +115,29 @@
  * reasonable. Hope thread safety doesn't poke us in eye. */
 const char * gnc_log_prettify (const char *name);
 
-/* We want logging decisions to be made inline, rather than through
- * a CPU-sucking subroutine call. Thus, this is a #define, not a
- * subroutine call.  The prototype would have been:
- * gboolean gnc_should_log (gncModuleType module, gncLogLevel log_level); 
- *
- * Unfortunately this doesn't work due to circular dependencies and
- * undefined symbols, so let's return it to a function call.  The real
- * problem appears to be that gnc_log_modules isn't being exported
- * so engine-helpers.c has an undefined symbol when linked into libgw-engine
- *  -- Derek Atkins  <derek at ihtfp.com>   2004-01-06
- *
- * #define gnc_should_log(module,log_level) \
- *             (log_level <= gnc_log_modules[module]) 
- */
-gboolean gnc_should_log(gncModuleType module, gncLogLevel log_level);
+/** Do not log log_modules that have not been enabled.
+
+ Whether to log cannot be decided inline because a hashtable is
+ now used. This is the price of extending logging to non-Gnucash
+ log_modules.
+
+*/
+gboolean gnc_should_log(QofLogModule log_module, gncLogLevel log_level);
+
+/** Set the default QOF log_modules to the log level. */
+void qof_log_set_default(gncLogLevel log_level);
+
+typedef void (*QofLogCB) (QofLogModule log_module, gncLogLevel* log_level, gpointer user_data);
+
+/** Iterate over each known log_module
+
+Only log_modules with log_levels set will 
+be available.
+*/
+void qof_log_module_foreach(QofLogCB cb, gpointer data);
+
+/** Number of log_modules registered*/
+gint qof_log_module_count(void);
 
 #define FUNK gnc_log_prettify(__FUNCTION__)
 
@@ -136,117 +154,121 @@
  */
 
 /** Log an fatal error */
-#define FATAL(format, args...) {                     \
+#define FATAL(format, args...) do {                  \
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR,          \
       "Fatal Error: %s(): " format, FUNK , ## args); \
-}
+} while (0)
 
 /** Log an serious error */
-#define PERR(format, args...) {                    \
-  if (gnc_should_log (module, GNC_LOG_ERROR)) {    \
+#define PERR(format, args...) do {                 \
+  if (gnc_should_log (log_module, GNC_LOG_ERROR)) {\
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,     \
       "Error: %s(): " format, FUNK , ## args);     \
   }                                                \
-}
+} while (0)
 
 /** Log an warning */
-#define PWARN(format, args...) {                   \
-  if (gnc_should_log (module, GNC_LOG_WARNING)) {  \
-    g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,      \
-      "Warning: %s(): " format, FUNK , ## args);   \
-  }                                                \
-}
+#define PWARN(format, args...) do {                    \
+  if (gnc_should_log (log_module, GNC_LOG_WARNING)) {  \
+    g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,          \
+      "Warning: %s(): " format, FUNK , ## args);       \
+  }                                                    \
+} while (0)
 
 /** Print an informational note */
-#define PINFO(format, args...) {                   \
-  if (gnc_should_log (module, GNC_LOG_INFO)) {     \
+#define PINFO(format, args...) do {                \
+  if (gnc_should_log (log_module, GNC_LOG_INFO)) { \
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO,         \
       "Info: %s(): " format,                       \
       FUNK , ## args);                             \
   }                                                \
-}
+} while (0)
 
 /** Print an debugging message */
-#define DEBUG(format, args...) {                   \
-  if (gnc_should_log (module, GNC_LOG_DEBUG)) {    \
+#define DEBUG(format, args...) do {                \
+  if (gnc_should_log (log_module, GNC_LOG_DEBUG)) {\
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,        \
       "Debug: %s(): " format,                      \
       FUNK , ## args);                             \
   }                                                \
-}
+} while (0)
 
 /** Print an function entry debugging message */
-#define ENTER(format, args...) {                   \
+#define ENTER(format, args...) do {                \
   extern gint gnc_trace_num_spaces;                \
-  if (gnc_should_log (module, GNC_LOG_DEBUG)) {    \
+  if (gnc_should_log (log_module, GNC_LOG_DEBUG)) {\
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,        \
       "Enter in %s: %s()" format, __FILE__,        \
       FUNK , ## args);                             \
     gnc_trace_num_spaces += GNC_TRACE_INDENT_WIDTH;\
   }                                                \
-}
+} while (0)
 
 /** Print an function exit debugging message */
-#define LEAVE(format, args...) {                   \
+#define LEAVE(format, args...) do {                \
   extern gint gnc_trace_num_spaces;                \
-  if (gnc_should_log (module, GNC_LOG_DEBUG)) {    \
+  if (gnc_should_log (log_module, GNC_LOG_DEBUG)) {\
     gnc_trace_num_spaces -= GNC_TRACE_INDENT_WIDTH;\
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,        \
       "Leave: %s()" format,                        \
       FUNK , ## args);                             \
   }                                                \
-}
+} while (0)
 
 /** Print an function trace debugging message */
-#define TRACE(format, args...) {                   \
-  if (gnc_should_log (module, GNC_LOG_TRACE)) {    \
+#define TRACE(format, args...) do {                \
+  if (gnc_should_log (log_module, GNC_LOG_TRACE)) {\
     g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,        \
       "Trace: %s(): " format, FUNK , ## args);     \
   }                                                \
-}
+} while (0)
 
-#define DEBUGCMD(x) { if (gnc_should_log (module, GNC_LOG_DEBUG)) { (x); }}
+#define DEBUGCMD(x) do {                            \
+  if (gnc_should_log (log_module, GNC_LOG_DEBUG)) { \
+      (x);                                          \
+  }                                                 \
+} while (0)
 
 /* -------------------------------------------------------- */
 /** Infrastructure to make timing measurements for critical peices 
  * of code. Used for only for performance tuning & debugging. 
  */
 
-void gnc_start_clock (int clockno, gncModuleType module, gncLogLevel log_level,
+void gnc_start_clock (int clockno, QofLogModule log_module, gncLogLevel log_level,
                       const char *function_name, const char *format, ...);
 
 void gnc_report_clock (int clockno,
-                       gncModuleType module,
+                       QofLogModule log_module,
                        gncLogLevel log_level,
                        const char *function_name,
                        const char *format, ...);
 
 void gnc_report_clock_total (int clockno,
-                             gncModuleType module,
+                             QofLogModule log_module,
                              gncLogLevel log_level,
                              const char *function_name,
                              const char *format, ...);
 
 /** start a particular timer */
-#define START_CLOCK(clockno,format, args...) {              \
-  if (gnc_should_log (module, GNC_LOG_INFO))                \
-    gnc_start_clock (clockno, module, GNC_LOG_INFO,         \
+#define START_CLOCK(clockno,format, args...) do {               \
+  if (gnc_should_log (log_module, GNC_LOG_INFO))                \
+    gnc_start_clock (clockno, log_module, GNC_LOG_INFO,         \
              __FUNCTION__, format , ## args);               \
-}
+} while (0)
 
 /** report elapsed time since last report on a particular timer */
-#define REPORT_CLOCK(clockno,format, args...) {             \
-  if (gnc_should_log (module, GNC_LOG_INFO))                \
-    gnc_report_clock (clockno, module, GNC_LOG_INFO,        \
+#define REPORT_CLOCK(clockno,format, args...) do {              \
+  if (gnc_should_log (log_module, GNC_LOG_INFO))                \
+    gnc_report_clock (clockno, log_module, GNC_LOG_INFO,        \
              __FUNCTION__, format , ## args);               \
-}
+} while (0)
 
 /** report total elapsed time since timer started */
-#define REPORT_CLOCK_TOTAL(clockno,format, args...) {       \
-  if (gnc_should_log (module, GNC_LOG_INFO))                \
-    gnc_report_clock_total (clockno, module, GNC_LOG_INFO,  \
+#define REPORT_CLOCK_TOTAL(clockno,format, args...) do {        \
+  if (gnc_should_log (log_module, GNC_LOG_INFO))                \
+    gnc_report_clock_total (clockno, log_module, GNC_LOG_INFO,  \
              __FUNCTION__, format , ## args);               \
-}
+} while (0)
 
 #endif /* GNC_TRACE_H */
 /* @} */
Index: qofinstance.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofinstance.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/qofinstance.c -Lsrc/engine/qofinstance.c -u -r1.14 -r1.15
--- src/engine/qofinstance.c
+++ src/engine/qofinstance.c
@@ -37,10 +37,20 @@
 #include "qofinstance.h"
 #include "qofinstance-p.h"
 
-static short module = MOD_ENGINE;
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 /* ========================================================== */
 
+QofInstance*
+qof_instance_create (QofIdType type, QofBook *book)
+{
+	QofInstance *inst;
+
+	inst = g_new0(QofInstance, 1);
+	qof_instance_init(inst, type, book);
+	return inst;
+}
+
 void 
 qof_instance_init (QofInstance *inst, QofIdType type, QofBook *book)
 {
@@ -116,8 +126,42 @@
 gboolean
 qof_instance_is_dirty (QofInstance *inst)
 {
-	if (!inst) return FALSE;
-	return inst->dirty;
+	QofCollection *coll;
+
+	if (!inst) { return FALSE; }
+	coll = inst->entity.collection;
+	if(qof_collection_is_dirty(coll)) { return inst->dirty; }
+	inst->dirty = FALSE;
+	return FALSE;
+}
+
+void
+qof_instance_set_dirty(QofInstance* inst)
+{
+	QofCollection *coll;
+
+	inst->dirty = TRUE;
+	coll = inst->entity.collection;
+	qof_collection_mark_dirty(coll);
+}
+
+gboolean
+qof_instance_check_edit(QofInstance *inst)
+{
+	if(inst->editlevel > 0) { return TRUE; }
+	return FALSE;
+}
+
+gboolean
+qof_instance_do_free(QofInstance *inst)
+{
+	return inst->do_free;
+}
+
+void
+qof_instance_mark_free(QofInstance *inst)
+{
+	inst->do_free = TRUE;
 }
 
 /* ========================================================== */
Index: TransLog.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/TransLog.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/engine/TransLog.h -Lsrc/engine/TransLog.h -u -r1.12 -r1.13
--- src/engine/TransLog.h
+++ src/engine/TransLog.h
@@ -51,7 +51,8 @@
 void    xaccOpenLog (void);
 void    xaccCloseLog (void);
 /**
- \param char The engine currently uses the log mechanism with flag char set as
+ * @param trans The transaction to write out to the log
+ * @param flag The engine currently uses the log mechanism with flag char set as
  * follows:
  * 'B' for 'begin edit' (followed by the transaction as it looks
  *     before any changes, i.e. the 'old value')
@@ -62,7 +63,7 @@
  * 'R' for rollback (i.e. revert to previous B; data that follows should
  *     be identical to old B)
  */
-void    xaccTransWriteLog (Transaction *, char);
+void    xaccTransWriteLog (Transaction *trans, char flag);
 
 /** document me */
 void    xaccLogEnable (void);
Index: Query.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Query.c,v
retrieving revision 1.129
retrieving revision 1.130
diff -Lsrc/engine/Query.c -Lsrc/engine/Query.c -u -r1.129 -r1.130
--- src/engine/Query.c
+++ src/engine/Query.c
@@ -33,16 +33,13 @@
 #include <sys/time.h>
 #include <unistd.h>
 
-#include "gnc-engine-util.h"
-#include "gnc-numeric.h"
 #include "gnc-lot.h"
-#include "gnc-trace.h"
 #include "Account.h"
 #include "Query.h"
 #include "Transaction.h"
 #include "TransactionP.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = GNC_MOD_QUERY;
 
 static GSList *
 build_param_list_internal (const char *first, va_list rest)
@@ -395,6 +392,32 @@
   qof_query_destroy (tmp_q);
 }
 
+void
+xaccQueryGetDateMatchTS (Query * q, 
+			 Timespec * sts,
+			 Timespec * ets)
+{
+  QofQueryPredData *term_data;
+  GSList *param_list;
+  GSList *terms, *tmp;
+
+  sts->tv_sec = sts->tv_nsec = 0;
+  ets->tv_sec = ets->tv_nsec = 0;
+
+  param_list = qof_query_build_param_list (SPLIT_TRANS, TRANS_DATE_POSTED, NULL);
+  terms = qof_query_get_term_type (q, param_list);
+  g_slist_free(param_list);
+
+  for (tmp = terms; tmp; tmp = g_slist_next(tmp)) {
+    term_data = tmp->data;
+    if (term_data->how == QOF_COMPARE_GTE)
+      qof_query_date_predicate_get_date(term_data, sts);
+    if (term_data->how == QOF_COMPARE_LTE)
+      qof_query_date_predicate_get_date(term_data, ets);
+  }
+  g_slist_free(terms);
+}
+
 /********************************************************************
  * xaccQueryAddDateMatch
  * Add a date filter to an existing query. 
@@ -443,6 +466,20 @@
 }
 
 void
+xaccQueryGetDateMatchTT (Query * q, 
+                        time_t * stt,
+                        time_t * ett)
+{
+  Timespec   sts;
+  Timespec   ets;
+
+  xaccQueryGetDateMatchTS (q, &sts, &ets);
+
+  *stt = sts.tv_sec;
+  *ett = ets.tv_sec;
+}
+
+void
 xaccQueryAddClearedMatch(Query * q, cleared_match_t how, QofQueryOp op)
 {
   QofQueryPredData *pred_data;
Index: gnc-event.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-event.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/engine/gnc-event.h -Lsrc/engine/gnc-event.h -u -r1.9 -r1.10
--- src/engine/gnc-event.h
+++ src/engine/gnc-event.h
@@ -21,6 +21,14 @@
  *                                                                  *
  ********************************************************************/
 
+/** @addtogroup Event
+@{
+*/
+/** @file gnc-event.h
+    @brief engine event handling interface
+	@author Copyright 2000 Dave Peticolas <dave at krondo.com>
+*/
+
 #ifndef GNC_EVENT_H
 #define GNC_EVENT_H
 
@@ -35,41 +43,64 @@
   GNC_EVENT_CREATE  = 1 << 0,
   GNC_EVENT_MODIFY  = 1 << 1,
   GNC_EVENT_DESTROY = 1 << 2,
+  GNC_EVENT_ADD     = 1 << 3,
+  GNC_EVENT_REMOVE  = 1 << 4,
   GNC_EVENT_ALL     = 0xff
 } GNCEngineEventType;
 
 
-/* GNCEngineEventHandler
+/** GNCEngineEventHandler
+
  *   Handler invoked when an engine event occurs.
  *
- * entity:      GUID of entity generating event
- * type:	QofIdType of the entity generating the event
- * event_type:  one of the single-bit GNCEngineEventTypes, not a combination
- * user_data:   user_data supplied when handler was registered.
+ * @param entity:      GUID of entity generating event
+ * @param type:	QofIdType of the entity generating the event
+ * @param event_type:  one of the single-bit GNCEngineEventTypes, not a combination
+ * @param user_data:   user_data supplied when handler was registered.
  */
 typedef void (*GNCEngineEventHandler) (GUID *entity, QofIdType type,
                                        GNCEngineEventType event_type,
                                        gpointer user_data);
 
-/* gnc_engine_register_event_handler
+/** gnc_engine_register_event_handler
+
  *   Register a handler for engine events.
  *
- * handler:   handler to register
- * user_data: data provided when handler is invoked
+ * @param handler:   handler to register
+ * @param user_data: data provided when handler is invoked
  *
- * Returns: id identifying handler
+ * @return id identifying handler
  */
 gint gnc_engine_register_event_handler (GNCEngineEventHandler handler,
                                         gpointer user_data);
 
-/* gnc_engine_unregister_event_handler
+/** gnc_engine_unregister_event_handler
+
  *   Unregister an engine event handler.
  *
- * handler_id: the id of the handler to unregister
+ * @param handler_id: the id of the handler to unregister
  */
 void gnc_engine_unregister_event_handler (gint handler_id);
 
-/* gnc_engine_suspend_events
+/** gnc_engine_generate_event
+
+ *   Invoke all registered event handlers using the given arguments.
+ *
+ *   GNC_EVENT_CREATE events should be generated after the object
+ *     has been created and registered in the engine entity table.
+ *   GNC_EVENT_MODIFY events should be generated whenever any data
+ *     member or submember (i.e., splits) is changed.
+ *   GNC_EVENT_DESTROY events should be called before the object
+ *     has been destroyed or removed from the entity table.
+ *
+ * @param entity:     the GUID of the entity generating the event
+ * @param event_type: the type of event -- this should be one of the
+ *             single-bit GNCEngineEventType values, not a combination.
+ */
+void gnc_engine_gen_event (QofEntity *entity,
+                                GNCEngineEventType event_type);
+/** gnc_engine_suspend_events
+
  *   Suspend all engine events. This function may be
  *   called multiple times. To resume event generation,
  *   an equal number of calls to gnc_engine_resume_events
@@ -77,9 +108,11 @@
  */
 void gnc_engine_suspend_events (void);
 
-/* gnc_engine_resume_events
+/** gnc_engine_resume_events
+
  *   Resume engine event generation.
  */
 void gnc_engine_resume_events (void);
 
 #endif
+/** @} */
Index: qofquerycore-p.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofquerycore-p.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/qofquerycore-p.h -Lsrc/engine/qofquerycore-p.h -u -r1.7 -r1.8
--- src/engine/qofquerycore-p.h
+++ src/engine/qofquerycore-p.h
@@ -129,4 +129,18 @@
   KvpValue *	value;
 } query_kvp_def, *query_kvp_t;
 
+typedef struct {
+	QofQueryPredData pd;
+	QofGuidMatch  options;
+	QofCollection *coll;
+	GList *guids;
+} query_coll_def, *query_coll_t;
+
+typedef struct {
+	QofQueryPredData pd;
+	QofGuidMatch options;
+	const GUID *guid;
+	GList * guids;
+} query_choice_def, *query_choice_t;
+
 #endif /* QOF_QUERYCOREP_H */
Index: gnc-event.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-event.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/gnc-event.c -Lsrc/engine/gnc-event.c -u -r1.14 -r1.15
--- src/engine/gnc-event.c
+++ src/engine/gnc-event.c
@@ -23,7 +23,6 @@
 
 #include "config.h"
 
-#include "gnc-engine-util.h"
 #include "gnc-event-p.h"
 #include "gnc-trace.h"
 
@@ -41,11 +40,11 @@
 
 /** Static Variables ************************************************/
 static guint  suspend_counter = 0;
-static gint   next_handler_id = 0;
+static gint   next_handler_id = 1;
 static GList *handlers = NULL;
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_ENGINE;
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 
 /** Implementations *************************************************/
@@ -157,6 +156,7 @@
 				    GNCEngineEventType event_type)
 {
   GList *node;
+  GList *next_node = NULL;
 
   g_return_if_fail(entity);
 
@@ -168,6 +168,8 @@
     case GNC_EVENT_CREATE:
     case GNC_EVENT_MODIFY:
     case GNC_EVENT_DESTROY:
+    case GNC_EVENT_ADD:
+    case GNC_EVENT_REMOVE:
       break;
 
     default:
@@ -175,10 +177,11 @@
       return;
   }
 
-  for (node = handlers; node; node = node->next)
+  for (node = handlers; node; node = next_node)
   {
     HandlerInfo *hi = node->data;
 
+    next_node = node->next;
     PINFO ("id=%d hi=%p han=%p", hi->handler_id, hi, hi->handler);
     if (hi->handler)
       hi->handler ((GUID *)&entity->guid, entity->e_type, event_type, hi->user_data);
Index: kvp-scm.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp-scm.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/kvp-scm.c -Lsrc/engine/kvp-scm.c -u -r1.14 -r1.15
--- src/engine/kvp-scm.c
+++ src/engine/kvp-scm.c
@@ -47,9 +47,8 @@
     }
     else if(SCM_STRINGP(val))
     {
-        char *newstr;
+        const gchar *newstr;
         KvpValue *ret;
-        /* newstr = gh_scm2newstr(val, NULL); */
         newstr = SCM_STRING_CHARS (val);
         ret = kvp_value_new_string(newstr);
         return ret;
Index: gnc-engine-util.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-engine-util.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -Lsrc/engine/gnc-engine-util.h -Lsrc/engine/gnc-engine-util.h -u -r1.43 -r1.44
--- src/engine/gnc-engine-util.h
+++ src/engine/gnc-engine-util.h
@@ -1,5 +1,5 @@
 /********************************************************************\
- * gnc-engine-util.h -- GnuCash engine utility functions            *
+ * gnc-engine-util.h -- QOF utility functions                       *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -22,7 +22,7 @@
 /** @addtogroup Utilities
     @{ */
 /** @file gnc-engine-util.h 
-    @brief GnuCash engine utility functions 
+    @brief QOF utility functions
     @author Copyright (C) 1997 Robin D. Clark <rclark at cs.hmc.edu>
     @author Copyright (C) 2000 Bill Gribble <grib at billgribble.com>
     @author Copyright (C) 1997-2002,2004 Linas Vepstas <linas at linas.org>
@@ -33,11 +33,17 @@
 
 #include <glib.h>
 #include <stddef.h>
-
-#include "gnc-trace.h"  // XXX eliminate me eventually
+#include "config.h"
+#include "qof.h"
 
 /** Macros *****************************************************/
 
+/* CAS: Notice that this macro does nothing if pointer args are equal.
+   Otherwise, it returns an integer.  Actually, perhaps these macro
+   should be private.  They are NOT good substitutes for the function
+   versions like safe_strcmp().  Maybe external users of these 3
+   macros should be converted to use safe_strcmp().  Actually, THESE
+   MACROS AFFECT CONTROL FLOW.  YUCK!  */
 #define SAFE_STRCMP_REAL(fcn,da,db) {    \
   if ((da) && (db)) {                    \
     if ((da) != (db)) {                  \
@@ -57,6 +63,82 @@
 #define SAFE_STRCMP(da,db) SAFE_STRCMP_REAL(strcmp,(da),(db))
 #define SAFE_STRCASECMP(da,db) SAFE_STRCMP_REAL(strcasecmp,(da),(db))
 
+/** \name typedef enum as string macros
+@{
+*/
+#define ENUM_BODY(name, value)           \
+    name value,
+
+#define AS_STRING_CASE(name, value)      \
+    case name: { return #name; }
+
+#define FROM_STRING_CASE(name, value)    \
+    if (strcmp(str, #name) == 0) {       \
+        return name;  }
+
+#define DEFINE_ENUM(name, list)          \
+    typedef enum {                       \
+        list(ENUM_BODY)                  \
+    }name;
+
+#define AS_STRING_DEC(name, list)        \
+    const char* name##asString(name n);
+
+#define AS_STRING_FUNC(name, list)       \
+    const char* name##asString(name n) {       \
+        switch (n) {                     \
+            list(AS_STRING_CASE)         \
+            default: return "";  } }
+
+#define FROM_STRING_DEC(name, list)      \
+    name name##fromString                \
+    (const char* str);
+
+#define FROM_STRING_FUNC(name, list)     \
+    name name##fromString                \
+    (const char* str) {                  \
+    if(str == NULL) { return 0; }        \
+        list(FROM_STRING_CASE)           \
+        return 0;  }
+
+/** @} */
+
+/** \name enum as string with no typedef
+@{
+
+  Similar but used when the enum is NOT a typedef
+ note the LACK of a define_enum macro - don't use one!
+
+ ENUM_BODY is used in both types.
+ */
+
+#define FROM_STRING_DEC_NON_TYPEDEF(name, list)   \
+   void name##fromString                          \
+   (const char* str, enum name *type);
+
+#define FROM_STRING_CASE_NON_TYPEDEF(name, value) \
+   if (strcmp(str, #name) == 0) { *type = name; }
+
+#define FROM_STRING_FUNC_NON_TYPEDEF(name, list)  \
+   void name##fromString                          \
+   (const char* str, enum name *type) {           \
+   if(str == NULL) { return; }                    \
+    list(FROM_STRING_CASE_NON_TYPEDEF) }
+
+#define AS_STRING_DEC_NON_TYPEDEF(name, list)     \
+   const char* name##asString(enum name n);
+
+#define AS_STRING_FUNC_NON_TYPEDEF(name, list)    \
+   const char* name##asString(enum name n) {     \
+       switch (n) {                              \
+           list(AS_STRING_CASE_NON_TYPEDEF)      \
+           default: return ""; } }
+
+#define AS_STRING_CASE_NON_TYPEDEF(name, value)   \
+   case name: { return #name; }
+
+/** @} */
+
 /* Define the long long int conversion for scanf */
 #if HAVE_SCANF_LLD
 # define GNC_SCANF_LLD "%lld"
@@ -64,6 +146,23 @@
 # define GNC_SCANF_LLD "%qd"
 #endif
 
+/** @name Convenience wrappers
+   @{
+*/
+   
+/** \brief Initialise the Query Object Framework 
+
+Used for non-Guile applications or test routines.
+*/
+void qof_init (void);
+
+/** \brief Safely close down the Query Object Framework 
+
+Used for non-Guile applications or test routines.
+*/
+void qof_close (void);
+
+/** @} */
 
 /** Prototypes *************************************************/
 
@@ -112,28 +211,54 @@
  *  return that number. (Leading whitespace is ignored). */
 int qof_util_bool_to_int (const char * val);
 
-/** Many strings used throughout the engine are likely to be duplicated.
+
+/** Gnucash's String Cache:
+ *
+ * Many strings used throughout the engine are likely to be duplicated.
  * So we provide a reference counted cache system for the strings, which
  * shares strings whenever possible.
  *
- * Use g_cache_insert to insert a string into the cache (it will return a
- * pointer to the cached string).
- * Basically you should use this instead of g_strdup.
- *
- * Use g_cache_remove (giving it a pointer to a cached string) if the string
- * is unused.  If this is the last reference to the string it will be
- * removed from the cache, otherwise it will just decrement the
- * reference count.
- * Basically you should use this instead of g_free.
+ * Use gnc_string_cache_insert to insert a string into the cache (it
+ * will return a pointer to the cached string).  Basically you should
+ * use this instead of g_strdup.
+ *
+ * Use gnc_string_cache_remove (giving it a pointer to a cached
+ * string) if the string is unused.  If this is the last reference to
+ * the string it will be removed from the cache, otherwise it will
+ * just decrement the reference count.  Basically you should use this
+ * instead of g_free.
+ *
+ * Just in case it's not clear: The remove function must NOT be called
+ * for the string you passed INTO the insert function.  It must be
+ * called for the _cached_ string that is _returned_ by the insert
+ * function.
  *
  * Note that all the work is done when inserting or removing.  Once
  * cached the strings are just plain C strings.
- */
+ *
+ * The string cache is demand-created on first use.
+ *
+ **/
 
-/** Get the gnc_string_cache.  Create it if it doesn't exist already */
+/** \deprecated use qof_init instead.
+
+Get the gnc_string_cache.  Create it if it doesn't exist already
+*/
 GCache* gnc_engine_get_string_cache(void);
 
+/** Destroy the gnc_string_cache */
 void gnc_engine_string_cache_destroy (void);
 
+/* You can use this function as a destroy notifier for a GHashTable
+   that uses common strings as keys (or values, for that matter.) */
+void gnc_string_cache_remove(gconstpointer key);
+
+/* You can use this function with g_hash_table_insert(), or the key
+   (or value), as long as you use the destroy notifier above. */
+gpointer gnc_string_cache_insert(gpointer key);
+
+#define CACHE_INSERT(str) gnc_string_cache_insert((gpointer)(str));
+#define CACHE_REMOVE(str) gnc_string_cache_remove((str));
+
 #endif /* QOF_UTIL_H */
 /** @} */
Index: gnc-commodity.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-commodity.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/engine/gnc-commodity.h -Lsrc/engine/gnc-commodity.h -u -r1.31 -r1.32
--- src/engine/gnc-commodity.h
+++ src/engine/gnc-commodity.h
@@ -50,6 +50,8 @@
 #include "gnc-engine.h"
 #include "qofbook.h"
 
+#define GNC_COMMODITY_TABLE "gnc_commodity_table"
+
 /** The commodity namespace definitions are used to tag a commodity by
  *  its type, or a stocks by the exchange where it is traded.
  *  
@@ -71,8 +73,9 @@
 #define GNC_COMMODITY_NS_ASX    "ASX"
 
 
-/** @name Commodity Quote Source functions */
-/** @{ */
+/** @name Commodity Quote Source functions 
+ @{
+*/
 
 /** The quote source type enum account types are used to determine how
  *  the transaction data in the account is displayed.  These values
@@ -155,7 +158,7 @@
  *  @return A pointer to the price quote source that has the specified
  *  type/index.
  */
-gnc_quote_source *gnc_quote_source_lookup_by_ti(QuoteSourceType type, gint i);
+gnc_quote_source *gnc_quote_source_lookup_by_ti(QuoteSourceType type, gint index);
 
 /** Given a gnc_quote_source data structure, return the flag that
  *  indicates whether this particular quote source is supported by
@@ -221,8 +224,9 @@
 /** @} */
 
 
-/** @name Commodity Creation */
-/** @{ */
+/** @name Commodity Creation 
+ @{ 
+*/
 
 /** Create a new commodity. This function allocates a new commodity
  *  data structure, populates it with the data provided, and then
@@ -231,6 +235,8 @@
  *  @note This function does not check to see if the commodity exists
  *  before adding a new commodity.
  *
+ *  @param book The book that the new commodity will belong to.
+ *
  *  @param fullname The complete name of this commodity. E.G. "Acme
  *  Systems, Inc."
  *
@@ -254,7 +260,8 @@
  *
  *  @return A pointer to the new commodity.
  */
-gnc_commodity * gnc_commodity_new(const char * fullname, 
+gnc_commodity * gnc_commodity_new(QofBook *book,
+				  const char * fullname, 
                                   const char * namespace,
                                   const char * mnemonic,
                                   const char * exchange_code,
@@ -276,8 +283,9 @@
 
 
 
-/** @name Commodity Accessor Routines - Get */
-/** @{ */
+/** @name Commodity Accessor Routines - Get
+@{
+*/
 
 /** Retrieve the mnemonic for the specified commodity.  This will be a
  *  pointer to a null terminated string of the form "ACME", "QWER",
@@ -301,6 +309,16 @@
  */
 const char * gnc_commodity_get_namespace(const gnc_commodity * cm);
 
+/** Retrieve the namespace data strucure for the specified commodity.
+ *  This will be a pointer to another data structure.
+ *
+ *  @param cm A pointer to a commodity data structure.
+ *
+ *  @return A pointer to the namespace data structure for this
+ *  commodity.
+ */
+gnc_commodity_namespace *gnc_commodity_get_namespace_ds(const gnc_commodity * cm);
+
 /** Retrieve the full name for the specified commodity.  This will be
  *  a pointer to a null terminated string of the form "Acme Systems,
  *  Inc.", etc.
@@ -394,8 +412,6 @@
  *  @param cm A pointer to a commodity data structure.
  *
  *  @return A pointer to the price quote source for this commodity.
- *  This string is owned by the engine and should not be freed by the
- *  caller.
  */
 gnc_quote_source* gnc_commodity_get_quote_source(const gnc_commodity *cm);
 gnc_quote_source* gnc_commodity_get_default_quote_source(const gnc_commodity *cm);
@@ -415,8 +431,9 @@
 
 
 
-/** @name Commodity Accessor Routines - Set */
-/** @{ */
+/** @name Commodity Accessor Routines - Set
+@{
+*/
 
 /** Set the mnemonic for the specified commodity.  This should be a
  *  pointer to a null terminated string of the form "ACME", "QWER",
@@ -500,9 +517,7 @@
  *
  *  @param cm A pointer to a commodity data structure.
  *
- *  @return A pointer to the price quote source for this commodity.
- *  This string belongs to the caller and will be duplicated by the
- *  engine.
+ *  @param src A pointer to the price quote source for this commodity.
  */
 void  gnc_commodity_set_quote_source(gnc_commodity *cm, gnc_quote_source *src);
 
@@ -513,7 +528,7 @@
  *
  *  @param cm A pointer to a commodity data structure.
  *
- *  @return A pointer to the price quote timezone for this commodity.
+ *  @param tz A pointer to the price quote timezone for this commodity.
  *  This string belongs to the caller and will be duplicated by the
  *  engine.
  */
@@ -522,8 +537,9 @@
 
 
 
-/** @name Commodity Comparison */
-/** @{ */
+/** @name Commodity Comparison 
+ @{
+*/
 
 /** This routine returns TRUE if the two commodities are equivalent.
  *  Commodities are equivalent if they have the same namespace and
@@ -541,13 +557,14 @@
 /** @} */
 
 
-/** @name Currency Checks */
-/** @{ */
+/** @name Currency Checks 
+ @{
+*/
 
 /** Checks to see if the specified commodity namespace is the
  *  namespace for ISO 4217 currencies.
  *
- *  @param cm The string to check.
+ *  @param namespace The string to check.
  *
  *  @return TRUE if the string indicates an ISO currency, FALSE otherwise. */
 gboolean gnc_commodity_namespace_is_iso(const char *namespace);
@@ -562,8 +579,9 @@
 
 
 /* =============================================================== */
-/** @name Commodity Table */
-/** @{ */
+/** @name Commodity Table 
+@{
+*/
 
 /** Returns the commodity table assoicated with a book.
  */
@@ -581,8 +599,9 @@
                               gnc_commodity_table *src);
 /** @} */
 /* ---------------------------------------------------------- */
-/** @name Commodity Table Lookup functions */
-/** @{ */
+/** @name Commodity Table Lookup functions
+@{
+*/
 gnc_commodity * gnc_commodity_table_lookup(const gnc_commodity_table * table, 
                                            const char * namespace, 
                                            const char * mnemonic);
@@ -592,11 +611,16 @@
 gnc_commodity * gnc_commodity_table_find_full(const gnc_commodity_table * t,
                                               const char * namespace,
                                               const char * fullname);
+
+gnc_commodity * gnc_commodity_find_commodity_by_guid(const GUID *guid, QofBook *book);
+gnc_commodity_namespace * gnc_commodity_find_namespace_by_guid(const GUID *guid, QofBook *book);
+
 /** @} */
 /* ---------------------------------------------------------- */
 
-/** @name Commodity Table Maintenance functions */
-/** @{ */
+/** @name Commodity Table Maintenance functions
+ @{
+*/
 
 /** Add a new commodity to the commodity table.  This routine handles
  *  the cases where the commodity already exists in the database (does
@@ -629,13 +653,34 @@
  *  etc.  It also adds all of the ISO 4217 currencies to the commodity
  *  table.
  *
- *  @param table A pointer to the commodity table */
-gboolean gnc_commodity_table_add_default_data(gnc_commodity_table *table);
+ *  @param table A pointer to the commodity table.
+ *
+ *  @param book Unused. */
+gboolean gnc_commodity_table_add_default_data(gnc_commodity_table *table, QofBook *book);
 
 /** @} */
 /* ---------------------------------------------------------- */
-/** @name Commodity Table Namespace functions */
-/** @{ */
+/** @name Commodity Table Namespace functions
+ @{
+*/
+
+/** Return the textual name of a namespace data strucure.
+ *
+ *  @param ns A pointer to the namespace data strucure.
+ *
+ *  @return A pointer to the name of the namespace.  This string is
+ *  owned by the engine and should not be freed by the caller. */
+const char * gnc_commodity_namespace_get_name (gnc_commodity_namespace *ns) ;
+
+
+/** Return a list of all commodity data structures in the specified namespace.
+ *
+ *  @return A pointer to the list of structures.  NULL if an invalid
+ *  argument was supplied.
+ *
+ *  @note This list is owned by the engine.  The caller must not free the list. */
+GList * gnc_commodity_namespace_get_commodity_list(const gnc_commodity_namespace * ns);
+
 
 /** Return a count of the number of namespaces in the commodity table.
  *  This count includes both system and user defined namespaces.
@@ -652,7 +697,7 @@
  *
  *  @return 1 if the namespace exists. 0 if it doesn't exist, or the
  *  routine was passed a bad argument. */
-int gnc_commodity_table_has_namespace(const gnc_commodity_table * t,
+int gnc_commodity_table_has_namespace(const gnc_commodity_table * table,
 				      const char * namespace);
 
 /** Return a list of all namespaces in the commodity table.  This
@@ -664,14 +709,36 @@
  *  @note It is the callers responsibility to free the list. */
 GList * gnc_commodity_table_get_namespaces(const gnc_commodity_table * t);
 
+/** Return a list of all namespace data structures in the commodity table.  This
+ *  returns both system and user defined namespace structures.
+ *
+ *  @return A pointer to the list of structures.  NULL if an invalid
+ *  argument was supplied.
+ *
+ *  @note This list is owned by the engine.  The caller must not free the list. */
+GList * gnc_commodity_table_get_namespaces_list(const gnc_commodity_table * t);
+
 /** This function adds a new string to the list of commodity namespaces.
  *  If the new namespace already exists, nothing happens.
  *
  *  @param table A pointer to the commodity table 
  *
- *  @param namespace The new namespace to be added.*/
-void      gnc_commodity_table_add_namespace(gnc_commodity_table * table,
-                                            const char * namespace);
+ *  @param namespace The new namespace to be added.
+ *
+ *  @return A pointer to the newly created namespace. */
+gnc_commodity_namespace * gnc_commodity_table_add_namespace(gnc_commodity_table * table,
+							    const char * namespace);
+
+/** This function finds a commodity namespace in the set of existing commodity namespaces.
+ *
+ *  @param table A pointer to the commodity table 
+ *
+ *  @param namespace The new namespace to be added.
+ *
+ *  @return The a pointer to the namespace found, or NULL if the
+ *  namespace doesn't exist. */
+gnc_commodity_namespace * gnc_commodity_table_find_namespace(const gnc_commodity_table * table,
+							     const char * namespace);
 
 /** This function deletes a string from the list of commodity namespaces.
  *  If the namespace does not exist, nothing happens.
@@ -682,16 +749,17 @@
  *
  *  @note This routine will destroy any commodities that exist as part
  *  of this namespace.  Use it carefully. */
-void      gnc_commodity_table_delete_namespace(gnc_commodity_table * t,
+void      gnc_commodity_table_delete_namespace(gnc_commodity_table * table,
                                                const char * namespace);
 /** @} */
 /* ---------------------------------------------------------- */
-/** @name Commodity Table Accessor functions */
-/** @{ */
+/** @name Commodity Table Accessor functions
+ @{
+*/
 
 /** Returns the number of commodities in the commodity table.
  *
- *  @param table A pointer to the commodity table 
+ *  @param tbl A pointer to the commodity table 
  *
  *  @return The number of commodities in the table. 0 if there are no
  *  commodities, or the routine was passed a bad argument. */
@@ -700,6 +768,8 @@
 /** Return a list of all commodities in the commodity table that are
  *  in the given namespace.
  *
+ *  @param table A pointer to the commodity table 
+ *
  *  @param namespace A string indicating which commodities should be
  *  returned. It is a required argument.
  *
@@ -707,7 +777,7 @@
  *  argument was supplied, or the namespace could not be found.
  *
  *  @note It is the callers responsibility to free the list. */
-GList * gnc_commodity_table_get_commodities(const gnc_commodity_table * t,
+GList * gnc_commodity_table_get_commodities(const gnc_commodity_table * table,
 					    const char * namespace);
 
 /** This function returns a list of commodities for which price quotes
@@ -747,9 +817,11 @@
                                        gpointer user_data);
 /** @} */
 
+
 /* ---------------------------------------------------------- */
-/** @name Commodity Table Private/Internal-Use Only Routines */
-/** @{ */
+/** @name Commodity Table Private/Internal-Use Only Routines
+ @{
+*/
 
 /** Set the 'mark' field for the specified commodity.
  *
@@ -768,11 +840,6 @@
 gnc_commodity_table * gnc_commodity_table_new(void);
 void          gnc_commodity_table_destroy(gnc_commodity_table * table);
 
-/** You should probably not be using gnc_commodity_table_set_table()
- * directly.  Its for internal use only.
- */
-void gnc_commodity_table_set_table(QofBook *book, gnc_commodity_table *ct);
-
 /** Given the commodity 'from', this routine will find and return the
  *   equivalent commodity (commodity with the same 'unique name') in 
  *   the indicated book.  This routine is primarily useful for setting
Index: qofgobj.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofgobj.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/engine/qofgobj.c -Lsrc/engine/qofgobj.c -u -r1.4 -r1.5
--- src/engine/qofgobj.c
+++ src/engine/qofgobj.c
@@ -20,11 +20,10 @@
  *                                                                  *
 \********************************************************************/
 
-#include <qof/gnc-trace.h>
-#include <qof/qof.h>
-#include <qof/qofgobj.h>
+#include "qof.h"
+#include "qofgobj.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_QUERY;
 
 static gboolean initialized = FALSE;
 static GSList *paramList = NULL;
@@ -57,10 +56,12 @@
 void 
 qof_gobject_shutdown (void)
 {
+  GSList *n;
+  
   if (!initialized) return;
   initialized = FALSE;
                                                                                 
-  GSList *n;
+//  GSList *n;
   for (n=paramList; n; n=n->next) g_free(n->data);
   g_slist_free (paramList);
 
@@ -83,11 +84,14 @@
 void 
 qof_gobject_register_instance (QofBook *book, QofType type, GObject *gob)
 {
+  QofCollection *coll;
+  GSList *instance_list;
+  
   if (!book || !type) return;
 
-  QofCollection *coll = qof_book_get_collection (book, type);
+  coll = qof_book_get_collection (book, type);
 
-  GSList * instance_list = qof_collection_get_data (coll);
+  instance_list = qof_collection_get_data (coll);
   instance_list = g_slist_prepend (instance_list, gob);
   qof_collection_set_data (coll, instance_list);
 }
@@ -98,6 +102,7 @@
 qof_gobject_getter (gpointer data, QofParam *getter)
 {
   GObject *gob = data;
+  const char *str;
 
   GParamSpec *gps = getter->param_userdata;
 
@@ -110,37 +115,42 @@
     g_value_init (&gval, G_TYPE_STRING);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    const char * str = g_value_get_string (&gval);
+    str = g_value_get_string (&gval);
     return (gpointer) str;
   }
   else
   if (G_IS_PARAM_SPEC_INT(gps))
   {
+    int ival;
+    
     GValue gval = {G_TYPE_INVALID};
     g_value_init (&gval, G_TYPE_INT);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    int ival = g_value_get_int (&gval);
+    ival = g_value_get_int (&gval);
     return (gpointer) ival;
   }
   else
   if (G_IS_PARAM_SPEC_UINT(gps))
   {
+    int ival;
     GValue gval = {G_TYPE_INVALID};
     g_value_init (&gval, G_TYPE_UINT);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    int ival = g_value_get_uint (&gval);
+    ival = g_value_get_uint (&gval);
     return (gpointer) ival;
   }
   else
   if (G_IS_PARAM_SPEC_BOOLEAN(gps))
   {
+    int ival;
+    
     GValue gval = {G_TYPE_INVALID};
     g_value_init (&gval, G_TYPE_BOOLEAN);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    int ival = g_value_get_boolean (&gval);
+    ival = g_value_get_boolean (&gval);
     return (gpointer) ival;
   }
 
@@ -153,6 +163,7 @@
 qof_gobject_double_getter (gpointer data, QofParam *getter)
 {
   GObject *gob = data;
+   double fval;
 
   GParamSpec *gps = getter->param_userdata;
 
@@ -165,7 +176,7 @@
     g_value_init (&gval, G_TYPE_FLOAT);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    double fval = g_value_get_float (&gval);
+    fval = g_value_get_float (&gval);
     return fval;
   }
   else
@@ -175,7 +186,7 @@
     g_value_init (&gval, G_TYPE_DOUBLE);
     g_object_get_property (gob, getter->param_name, &gval);
 
-    double fval = g_value_get_double (&gval);
+    fval = g_value_get_double (&gval);
     return fval;
   } 
 
@@ -204,27 +215,31 @@
 void
 qof_gobject_register (QofType e_type, GObjectClass *obclass)
 {
+  int i;
+  int j;
+  QofParam *qof_param_list, *qpar;
+  QofObject *class_def;
+  GParamSpec **prop_list, *gparam;
+  guint n_props;
 
   /* Get the GObject properties, convert to QOF properties */
-  GParamSpec **prop_list;
-  int n_props;
   prop_list = g_object_class_list_properties (obclass, &n_props);
 
-  QofParam * qof_param_list = g_new0 (QofParam, n_props);
+  qof_param_list = g_new0 (QofParam, n_props);
   paramList = g_slist_prepend (paramList, qof_param_list);
 
   PINFO ("object %s has %d props", e_type, n_props);
-  int i, j=0;
+  j=0;
   for (i=0; i<n_props; i++)
   {
-    GParamSpec *gparam = prop_list[i];
-    QofParam *qpar = &qof_param_list[j];
+    gparam = prop_list[i];
+    qpar = &qof_param_list[j];
 
     PINFO ("param %d %s is type %s", 
           i, gparam->name, G_PARAM_SPEC_TYPE_NAME(gparam));
 
     qpar->param_name = g_param_spec_get_name (gparam);
-    qpar->param_getfcn = qof_gobject_getter;
+    qpar->param_getfcn = (QofAccessFunc)qof_gobject_getter;
     qpar->param_setfcn = NULL;
     qpar->param_userdata = gparam;
     if ((G_IS_PARAM_SPEC_INT(gparam))  ||
@@ -288,7 +303,7 @@
 
   /* ------------------------------------------------------ */
    /* Now do the class itself */
-  QofObject *class_def = g_new0 (QofObject, 1);
+  class_def = g_new0 (QofObject, 1);
   classList = g_slist_prepend (classList, class_def);
 
   class_def->interface_version = QOF_OBJECT_VERSION;
Index: qofclass.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofclass.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/qofclass.c -Lsrc/engine/qofclass.c -u -r1.5 -r1.6
--- src/engine/qofclass.c
+++ src/engine/qofclass.c
@@ -25,13 +25,13 @@
 
 #include <glib.h>
 
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
+#include "gnc-engine-util.h"
 #include "qofclass.h"
 #include "qofclass-p.h"
 #include "qofquery.h"
 
-static short module = MOD_QUERY;
+static QofLogModule log_module = QOF_MOD_CLASS;
 
 static GHashTable *classTable = NULL;
 static GHashTable *sortTable = NULL;
@@ -70,7 +70,7 @@
     g_hash_table_insert (classTable, (char *)obj_name, ht);
   }
 
-  /* At least right now, we allow dummy, paramterless objects, 
+  /* At least right now, we allow dummy, parameterless objects,
    * for testing purposes.  Although I suppose that should be 
    * an error..  */
   /* Now insert all the parameters */
@@ -126,7 +126,7 @@
   ht = g_hash_table_lookup (classTable, obj_name);
   if (!ht)
   {
-    PERR ("no object of type %s", obj_name);
+    PWARN ("no object of type %s", obj_name);
     return NULL;
   }
 
@@ -250,4 +250,45 @@
   g_hash_table_foreach (param_ht, param_foreach_cb, &iter);
 }
 
+struct param_ref_list
+{
+	GList *list;
+};
+
+static void
+find_reference_param_cb(QofParam *param, gpointer user_data)
+{
+	struct param_ref_list *b;
+
+	b = (struct param_ref_list*)user_data;
+	if((param->param_getfcn == NULL)||(param->param_setfcn == NULL)) { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_STRING))   { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_NUMERIC))  { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_DATE))     { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_CHAR))     { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_DEBCRED))  { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_GUID))     { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_INT32))    { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_INT64))    { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_DOUBLE))   { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_KVP))      { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_TYPE_BOOLEAN))  { return; }
+	if(0 == safe_strcmp(param->param_type, QOF_ID_BOOK))       { return; }
+	b->list = g_list_append(b->list, param);
+}
+
+GList*
+qof_class_get_referenceList(QofIdTypeConst type)
+{
+	GList *ref_list;
+	struct param_ref_list b;
+
+	ref_list = NULL;
+	b.list = NULL;
+	qof_class_param_foreach(type, find_reference_param_cb, &b);
+	ref_list = g_list_copy(b.list);
+	return ref_list;
+}
+
+
 /* ============================= END OF FILE ======================== */
Index: kvp_frame.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/kvp_frame.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -Lsrc/engine/kvp_frame.h -Lsrc/engine/kvp_frame.h -u -r1.37 -r1.38
--- src/engine/kvp_frame.h
+++ src/engine/kvp_frame.h
@@ -25,7 +25,7 @@
  * possible types enumerated in the KvpValueType enum, and includes, 
  * among other things, ints, doubles, strings, guid's, lists, time
  * and numeric values.  KvpValues may also be other frames, so
- * KVP is inherently heirarchical.
+ * KVP is inherently hierarchical.
  * 
  * Values are stored in a 'slot' associated with a key.
  * Pointers passed as arguments into set_slot and get_slot are the
@@ -50,7 +50,8 @@
  * kvp_frame_set_xxx() routines.  Most of the other routines provide
  * only low-level access that you probably shouldn't use.
  
-@{ */
+@{
+*/
 /** @file kvp_frame.h
     @brief A key-value frame system
     @author Copyright (C) 2000 Bill Gribble
@@ -66,52 +67,55 @@
 #include "gnc-numeric.h"
 #include "guid.h"
 
+#define QOF_MOD_KVP "qof-kvp"
+
 /** Opaque frame structure */
 typedef struct _KvpFrame KvpFrame;
 
 /** A KvpValue is a union with possible types enumerated in the
  * KvpValueType enum. */
 typedef struct _KvpValue KvpValue;
- 
-/** Enum to enumerate possible types in the union KvpValue 
- *  XXX FIXME TODO: People have asked for boolean values, 
+
+/** \brief possible types in the union KvpValue 
+ * \todo : People have asked for boolean values, 
  *  e.g. in xaccAccountSetAutoInterestXfer
  *
- * XXX In the long run, this should be synchronized with the 
+ * \todo In the long run, this should be synchronized with the 
  * core QOF types, which in turn should be synced to the g_types
- * in GLib.  Unfortuantely, this requies writing a pile of code
+ * in GLib.  Unfortunately, this requires writing a pile of code
  * to handle all of the different cases.
  * An alternative might be to make kvp values inherit from the 
  * core g_types (i.e. add new core g_types) ??
  */
 typedef enum {
-  KVP_TYPE_GINT64=1,
-  KVP_TYPE_DOUBLE,
-  KVP_TYPE_NUMERIC,
-  KVP_TYPE_STRING,
-  KVP_TYPE_GUID,
-  KVP_TYPE_TIMESPEC,
-  KVP_TYPE_BINARY, 
-  KVP_TYPE_GLIST,
-  KVP_TYPE_FRAME
+  KVP_TYPE_GINT64=1,   /**< QOF_TYPE_INT64  gint64 */
+  KVP_TYPE_DOUBLE,     /**< QOF_TYPE_DOUBLE  gdouble */
+  KVP_TYPE_NUMERIC,    /**< QOF_TYPE_NUMERIC */
+  KVP_TYPE_STRING,     /**< QOF_TYPE_STRING gchar* */
+  KVP_TYPE_GUID,       /**< QOF_TYPE_GUID */
+  KVP_TYPE_TIMESPEC,   /**< QOF_TYPE_DATE */
+  KVP_TYPE_BINARY,     /**< no QOF equivalent. */
+  KVP_TYPE_GLIST,      /**< no QOF equivalent. */
+  KVP_TYPE_FRAME       /**< no QOF equivalent. */
 } KvpValueType;
 
+/** \deprecated Deprecated backwards compat tokens
 
-/* Deprecated backwards compat tokens; do not use these in new code. */
+do \b not use these in new code.
+*/
 #define kvp_frame KvpFrame
 #define kvp_value KvpValue
 #define kvp_value_t KvpValueType
   
-
-/* -------------------------------------------------------- */
-/** @name KvpFrame Constructors */
-/*@{*/
+/** @name KvpFrame Constructors
+ @{
+*/
 
 /** Return a new empty instance of KvpFrame */
 KvpFrame   * kvp_frame_new(void);
 
-/** Perform a deep (recursive) delete of the frame and any subframes. */
-/*
+/** Perform a deep (recursive) delete of the frame and any subframes. 
+
  * kvp_frame_delete and kvp_value_delete are deep (recursive) deletes.
  * kvp_frame_copy and kvp_value_copy are deep value copies. 
  */
@@ -124,27 +128,52 @@
 /** Return TRUE if the KvpFrame is empty */
 gboolean     kvp_frame_is_empty(KvpFrame * frame);
 
-/*@}*/
+/** @} */
 
-/* -------------------------------------------------------- */
-/** @name KvpFrame Basic Value Storing */
-/*@{*/
+/** @name KvpFrame Basic Value Storing
+@{
+*/
 
-/** The kvp_frame_set_gint64() routine will store the value of the 
+/**    store the value of the 
  *     gint64 at the indicated path. If not all frame components of 
  *     the path exist, they are created.
  *
- *     Similarly, the set_double, set_numeric, and set_timespec 
- *     routines perform the same function, for each of the respective 
- *     types.
  */
 void kvp_frame_set_gint64(KvpFrame * frame, const char * path, gint64 ival);
+/**
+ *     store the value of the 
+ *     double at the indicated path. If not all frame components of 
+ *     the path exist, they are created.
+*/
 void kvp_frame_set_double(KvpFrame * frame, const char * path, double dval);
-void kvp_frame_set_gnc_numeric(KvpFrame * frame, const char * path, gnc_numeric nval);
+
+/** \deprecated
+
+Use kvp_frame_set_numeric instead of kvp_frame_set_gnc_numeric
+*/
+#define kvp_frame_set_gnc_numeric kvp_frame_set_numeric
+/**    store the value of the 
+ *     gnc_numeric at the indicated path.
+ *     If not all frame components of 
+ *     the path exist, they are created.
+ */
+void kvp_frame_set_numeric(KvpFrame * frame, const char * path, gnc_numeric nval);
+/**    store the value of the 
+ *     Timespec at the indicated path.
+ *     If not all frame components of 
+ *     the path exist, they are created.
+ */
 void kvp_frame_set_timespec(KvpFrame * frame, const char * path, Timespec ts);
 
-/** The kvp_frame_set_str() routine will store a copy of the string 
- *    at the indicated path. If not all frame components of the path 
+/** \deprecated
+
+Use kvp_frame_set_string instead of kvp_frame_set_str
+*/
+#define kvp_frame_set_str kvp_frame_set_string
+
+/** \brief Store a copy of the string at the indicated path.
+
+ *    If not all frame components of the path 
  *    exist, they are created.  If there was another string previously
  *    stored at that path, the old copy is deleted.
  *
@@ -154,7 +183,7 @@
  * The kvp_frame_set_frame_nc() routine works as above, but does 
  *    *NOT* copy the frame. 
  */
-void kvp_frame_set_str(KvpFrame * frame, const char * path, const char* str);
+void kvp_frame_set_string(KvpFrame * frame, const char * path, const char* str);
 void kvp_frame_set_guid(KvpFrame * frame, const char * path, const GUID *guid);
 
 void kvp_frame_set_frame(KvpFrame *frame, const char *path, KvpFrame *chld);
@@ -198,12 +227,10 @@
  */
 KvpValue * kvp_frame_replace_value_nc (KvpFrame * frame, const char * slot,
                                        KvpValue * new_value);
-
-
-/*@}*/
-
-/** @name KvpFrame URL handling */
-/*@{*/
+/** @} */
+/** @name KvpFrame URL handling
+ @{
+*/
 /** The kvp_frame_add_url_encoding() routine will parse the
  *  value string, assuming it to be URL-encoded in the standard way,
  *  turning it into a set of key-value pairs, and adding those to the
@@ -214,13 +241,14 @@
  *  'November', respectively.  This routine also handles % encoding.
  *
  *  This routine treats all values as strings; it does *not* attempt
- *  to perform any type-conversion.
+ *    to perform any type-conversion.
  * */
 void     kvp_frame_add_url_encoding (KvpFrame *frame, const char *enc);
-/*@}*/
+/** @} */
 
-/** @name KvpFrame Glist Bag Storing */
-/*@{*/
+/** @name KvpFrame Glist Bag Storing 
+ @{
+*/
 
 /** The kvp_frame_add_gint64() routine will add the value of the 
  *     gint64 to the glist bag of values at the indicated path. 
@@ -235,11 +263,24 @@
  */
 void kvp_frame_add_gint64(KvpFrame * frame, const char * path, gint64 ival);
 void kvp_frame_add_double(KvpFrame * frame, const char * path, double dval);
-void kvp_frame_add_gnc_numeric(KvpFrame * frame, const char * path, gnc_numeric nval);
+/** \deprecated
+
+Use kvp_frame_add_numeric instead of kvp_frame_add_gnc_numeric
+*/
+#define kvp_frame_add_gnc_numeric kvp_frame_add_numeric
+
+void kvp_frame_add_numeric(KvpFrame * frame, const char * path, gnc_numeric nval);
 void kvp_frame_add_timespec(KvpFrame * frame, const char * path, Timespec ts);
 
-/** The kvp_frame_add_str() routine will add a copy of the string 
- *    to the glist bag at the indicated path. If not all frame components 
+/** \deprecated
+
+Use kvp_frame_add_string instead of kvp_frame_add_str
+*/
+#define kvp_frame_add_str kvp_frame_add_string
+
+/** \brief Copy of the string to the glist bag at the indicated path.
+
+ *    If not all frame components 
  *    of the path exist, they are created.  If there was another 
  *    item previously stored at that path, then the path is converted
  *    to a bag, and the old value, along with the new value, is added
@@ -251,7 +292,7 @@
  * The kvp_frame_add_frame_nc() routine works as above, but does 
  *    *NOT* copy the frame. 
  */
-void kvp_frame_add_str(KvpFrame * frame, const char * path, const char* str);
+void kvp_frame_add_string(KvpFrame * frame, const char * path, const char* str);
 void kvp_frame_add_guid(KvpFrame * frame, const char * path, const GUID *guid);
 
 void kvp_frame_add_frame(KvpFrame *frame, const char *path, KvpFrame *chld);
@@ -273,13 +314,11 @@
 KvpFrame * kvp_frame_add_value_nc(KvpFrame * frame, const char * path, KvpValue *value);
 
 
-/*@}*/
+/** @} */
 
-/* -------------------------------------------------------- */
-/** @name KvpFrame Value Fetching */
-/*@{*/
+/** @name KvpFrame Value Fetching
 
-/** Value accessors.  These all take a unix-style slash-separated 
+  Value accessors.  These all take a unix-style slash-separated 
   path as an argument, and return the value stored at that location.
   If the object at the end of that path is not of the type that was
   asked for, then a NULL or a zero is returned.  So, for example,
@@ -303,6 +342,7 @@
   and then store something else at that path, the string that you've
   gotten will be freed during the store (internally, by the set_*()
   routines), and you will be left hanging onto an invalid pointer.
+@{
 */
 
 gint64      kvp_frame_get_gint64(const KvpFrame *frame, const char *path);
@@ -314,6 +354,7 @@
                                    guint64 * size_return); 
 Timespec    kvp_frame_get_timespec(const KvpFrame *frame, const char *path);
 KvpValue  * kvp_frame_get_value(const KvpFrame *frame, const char *path);
+
 /** Value accessor.  Takes a unix-style slash-separated path as an
  *  argument, and return the KvpFrame stored at that location.  If the
  *  KvpFrame does not exist, then a NULL is returned.
@@ -351,14 +392,14 @@
 
 /** This routine returns the last frame of the path.
  *  If the frame path doesn't exist, it is created.  
- *  Note that this is *VERY DIFFERENT FROM* like kvp_frame_get_frame()
+ *  Note that this is *VERY DIFFERENT FROM* kvp_frame_get_frame()
  */
 KvpFrame    * kvp_frame_get_frame_gslist (KvpFrame *frame,
                                            GSList *key_path);
 
 /** This routine returns the last frame of the path.
  *  If the frame path doesn't exist, it is created.  
- *  Note that this is *VERY DIFFERENT FROM* like kvp_frame_get_frame()
+ *  Note that this is *VERY DIFFERENT FROM* kvp_frame_get_frame()
  *
  * The kvp_frame_get_frame_slash() routine takes a single string
  *    where the keys are separated by slashes; thus, for example:
@@ -370,21 +411,20 @@
 KvpFrame    * kvp_frame_get_frame_slash (KvpFrame *frame,
                                           const char *path);
 
-/*@}*/
-/* -------------------------------------------------------- */
-/** @name KvpFrame KvpValue low-level storing routines. */
-/*@{*/
-
-/** You probably shouldn't be using these low-level routines */
-
-/** All of the kvp_frame_set_slot_*() routines set the slot values
- *    "destructively", in that if there was an old value there, that
- *    old value is destroyed (and the memory freed).  Thus, one 
- *    should not hang on to value pointers, as these will get 
- *    trashed if set_slot is called on the corresponding key.
- *
- *    If you want the old value, use kvp_frame_replace_slot().
- */
+/** @} */
+/** @name KvpFrame KvpValue low-level storing routines.
+
+You probably shouldn't be using these low-level routines
+
+ All of the kvp_frame_set_slot_*() routines set the slot values
+    "destructively", in that if there was an old value there, that
+    old value is destroyed (and the memory freed).  Thus, one 
+    should not hang on to value pointers, as these will get 
+    trashed if set_slot is called on the corresponding key.
+
+    If you want the old value, use kvp_frame_replace_slot().
+ @{
+*/
 
 /** The kvp_frame_replace_slot_nc() routine places the new value into
  *    the indicated frame, for the given key.  It returns the old
@@ -434,22 +474,22 @@
                                               const KvpValue *value,
                                               GSList *key_path);
 
-/*@}*/
+/** @} */
 
+/** @name KvpFrame KvpValue Low-Level Retrieval Routines
 
-/** @name KvpFrame KvpValue Low-Level Retrieval Routines */
-/*@{*/
-/** You probably shouldn't be using these low-level routines */
+  You probably shouldn't be using these low-level routines
 
-/** Returns the KvpValue in the given KvpFrame 'frame' that is 
- *  associated with 'key'.  If there is no key in the frame, NULL
- *  is returned.  If the value associated with the key is NULL, 
- *  NULL is returned.
- *
- *  Pointers passed as arguments into get_slot are the responsibility
- *  of the caller.  Pointers returned by get_slot are owned by the
- *  kvp_frame.  Make copies as needed.
- */
+  Returns the KvpValue in the given KvpFrame 'frame' that is 
+  associated with 'key'.  If there is no key in the frame, NULL
+  is returned.  If the value associated with the key is NULL, 
+  NULL is returned.
+
+  Pointers passed as arguments into get_slot are the responsibility
+  of the caller.  Pointers returned by get_slot are owned by the
+  kvp_frame.  Make copies as needed.
+ @{
+*/
 KvpValue   * kvp_frame_get_slot(const KvpFrame * frame, const char * key);
 
 /** This routine return the value at the end of the
@@ -466,21 +506,20 @@
 
 /**
  * Similar returns as strcmp.
- **/
+ */
 gint          kvp_frame_compare(const KvpFrame *fa, const KvpFrame *fb);
-/*@}*/
-
 
 gint          double_compare(double v1, double v2);
+/** @} */
+/** @name KvpValue List Convenience Functions
 
-/** @name KvpValue List Convenience Functions */
-/*@{*/
-/** You probably shouldn't be using these low-level routines */
-
-/** kvp_glist_compare() compares <b>GLists of kvp_values</b> (not to
- *     be confused with GLists of something else):  it iterates over
- *     the list elements, performing a kvp_value_compare on each.
- */
+  You probably shouldn't be using these low-level routines 
+
+ kvp_glist_compare() compares <b>GLists of kvp_values</b> (not to
+ be confused with GLists of something else):  it iterates over
+ the list elements, performing a kvp_value_compare on each.
+ @{
+*/
 gint        kvp_glist_compare(const GList * list1, const GList * list2);
 
 /** kvp_glist_copy() performs a deep copy of a <b>GList of 
@@ -496,21 +535,28 @@
  *     and then deleting the GList.
  */
 void        kvp_glist_delete(GList * list);
-/*@}*/
+/** @} */
+
 
+/** @name KvpValue Constructors
 
-/** @name KvpValue Constructors */
-/*@{*/
-/** You probably shouldn't be using these low-level routines */
+ You probably shouldn't be using these low-level routines
 
-/** The following routines are constructors for kvp_value.
- *    Those with pointer arguments copy in the value.
- *    The *_nc() versions do *not* copy in thier values, 
- *    but use them directly.
+ The following routines are constructors for kvp_value.
+ Those with pointer arguments copy in the value.
+ The *_nc() versions do *not* copy in thier values, 
+ but use them directly.
+ @{
  */
 KvpValue   * kvp_value_new_gint64(gint64 value);
 KvpValue   * kvp_value_new_double(double value);
-KvpValue   * kvp_value_new_gnc_numeric(gnc_numeric value);
+
+/** \deprecated
+
+Use kvp_value_new_numeric instead of kvp_value_new_gnc_numeric
+*/
+#define kvp_value_new_gnc_numeric kvp_value_new_numeric
+KvpValue   * kvp_value_new_numeric(gnc_numeric value);
 KvpValue   * kvp_value_new_string(const char * value);
 KvpValue   * kvp_value_new_guid(const GUID * guid);
 KvpValue   * kvp_value_new_timespec(Timespec timespec);
@@ -549,12 +595,14 @@
 /** Replace old glist value with new, return old glist */
 GList * kvp_value_replace_glist_nc(KvpValue *value, GList *newlist);
 
-/*@}*/
+/** @} */
 
 
-/** @name KvpValue Value access */
-/*@{*/
-/** You probably shouldn't be using these low-level routines */
+/** @name KvpValue Value access
+
+ You probably shouldn't be using these low-level routines 
+ @{
+*/
 
 KvpValueType kvp_value_get_type(const KvpValue * value);
 
@@ -566,7 +614,7 @@
  *   that this value came from, then this value will be 
  *   uncermoniously deleted, and you will be left pointing to 
  *   garbage.  So don't store values at the same time you are
- *   examining thier contents.
+ *   examining their contents.
  */
 
 gint64      kvp_value_get_gint64(const KvpValue * value);
@@ -601,7 +649,7 @@
  **/
 gint          kvp_value_compare(const KvpValue *va, const KvpValue *vb);
 
-/*@}*/
+/** @} */
 
 /** \brief General purpose function to convert any KvpValue to a string.
 
@@ -621,8 +669,9 @@
  * copying - but more efficient than creating a new KvpValue manually. */
 gboolean kvp_value_binary_append(KvpValue *v, void *data, guint64 size);
 
-/** @name  Iterators */
-/*@{*/
+/** @name  Iterators
+@{
+*/
 /** Traverse all of the slots in the given kvp_frame.  This function
    does not descend recursively to traverse any kvp_frames stored as
    slot values.  You must handle that in proc, with a suitable
@@ -633,7 +682,7 @@
                                           gpointer data),
                              gpointer data);
 
-/*@}*/
+/** @} */
 
 /** Internal helper routines, you probably shouldn't be using these. */
 gchar* kvp_frame_to_string(const KvpFrame *frame);
@@ -641,5 +690,5 @@
 gchar* kvp_value_glist_to_string(const GList *list);
 GHashTable* kvp_frame_get_hash(const KvpFrame *frame);
 
-#endif
 /** @} */
+#endif
Index: Account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Account.h,v
retrieving revision 1.139
retrieving revision 1.140
diff -Lsrc/engine/Account.h -Lsrc/engine/Account.h -u -r1.139 -r1.140
--- src/engine/Account.h
+++ src/engine/Account.h
@@ -45,19 +45,17 @@
 
 #ifndef XACC_ACCOUNT_H
 #define XACC_ACCOUNT_H
-
+#include "qof.h"
 #include "gnc-engine.h"
-#include "guid.h"
-#include "kvp_frame.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofinstance.h"
-
 
 typedef gnc_numeric (*xaccGetBalanceFn)( Account *account );
-typedef gnc_numeric (*xaccGetBalanceInCurrencyFn) (Account *account,
-						   gnc_commodity *report_commodity,
-						   gboolean include_children);
+
+typedef gnc_numeric (*xaccGetBalanceInCurrencyFn) (
+    Account *account, gnc_commodity *report_commodity,
+    gboolean include_children);
+
+typedef gnc_numeric (*xaccGetBalanceAsOfDateFn) (
+    Account *account, time_t date);
 
 #define GNC_IS_ACCOUNT(obj)  (QOF_CHECK_TYPE((obj), GNC_ID_ACCOUNT))
 #define GNC_ACCOUNT(obj)     (QOF_CHECK_CAST((obj), GNC_ID_ACCOUNT, Account))
@@ -122,8 +120,8 @@
 
 
 
-/** @name Account Constructors, Edit/Commit, Comparison */
-/** @{ */
+/** @name Account Constructors, Edit/Commit, Comparison 
+ @{ */
 
 /** Constructor */
 Account    * xaccMallocAccount (QofBook *book);
@@ -178,8 +176,8 @@
 
 /* ------------------ */
 
-/** @name Account lookup and GUID routines */
-/** @{ */
+/** @name Account lookup and GUID routines 
+ @{ */
 
 /** @deprecated */
 #define xaccAccountGetBook(X)     qof_instance_get_book(QOF_INSTANCE(X))
@@ -196,9 +194,8 @@
 
 /* ------------------ */
 
-/** @name Account general setters/getters */
-/** @{ */
-
+/** @name Account general setters/getters 
+ @{ */
 
 /** Set the account's type */
 void xaccAccountSetType (Account *account, GNCAccountType);
@@ -269,6 +266,7 @@
 /** @} */
 
 /** @name Account Commodity setters/getters
+
  *   Accounts are used to store an amount of 'something', that 'something'
  *   is called the 'commodity'.  An account can only hold one kind of
  *   commodity.  The following are used to get and set the commodity,
@@ -277,7 +275,7 @@
  * Note that when we say that a 'split' holds an 'amount', that amount
  *   is denominated in the account commodity.  Do not confuse 'amount'
  *   and 'value'.  The 'value' of a split is the value of the amount
- *   expressed in the currency fo the transaction.  Thus, for example,
+ *   expressed in the currency of the transaction.  Thus, for example,
  *   the 'amount' may be 12 apples, where the account commodity is
  *   'apples'.  The value of these 12 apples may be 12 dollars, where 
  *   the transaction currency is 'dollars'.
@@ -295,8 +293,8 @@
  *   However, this default SCU can be over-ridden and set to an
  *   account-specific value.  This is account-specific value is 
  *   called the 'non-standard' value in the documentation below.
- */
-/** @{ */
+ @{
+*/
 
 /** Set the account's commodity */
 void xaccAccountSetCommodity (Account *account, gnc_commodity *comm);
@@ -305,20 +303,20 @@
 #define DxaccAccountSetSecurity xaccAccountSetCommodity
 
 /** Get the account's commodity  */
-gnc_commodity * xaccAccountGetCommodity (Account *account);
+gnc_commodity * xaccAccountGetCommodity (const Account *account);
 
 /** @deprecated do not use */
 #define DxaccAccountGetSecurity xaccAccountGetCommodity
 
 /** Return the SCU for the account.  If a non-standard SCU has been
- *   set for the account, that s returned; else the default SCU for 
+ *   set for the account, that is returned; else the default SCU for
  *   the account commodity is returned.
  */
-int  xaccAccountGetCommoditySCU (Account *account);
+int  xaccAccountGetCommoditySCU (const Account *account);
 
 /** Return the 'internal' SCU setting.  This returns the over-ride
  *   SCU for the account (which might not be set, and might be zero).  */
-int  xaccAccountGetCommoditySCUi (Account *account);
+int  xaccAccountGetCommoditySCUi (const Account *account);
 
 /** Set the SCU for the account. Normally, this routine is not
  *   required, as the default SCU for an account is given by its
@@ -334,13 +332,14 @@
 
 /** Return boolean, indicating whether this account uses a 
  *   non-standard SCU. */ 
-gboolean  xaccAccountGetNonStdSCU (Account *account);
+gboolean  xaccAccountGetNonStdSCU (const Account *account);
 /**@}*/
 
 
-/** @name Account Balance */
-/*@{*/
-/** Get the current balance of the account */
+/** @name Account Balance
+ @{
+*/
+/** Get the current balance of the account, which may include future splits */
 gnc_numeric     xaccAccountGetBalance (Account *account);
 /** Get the current balance of the account, only including cleared transactions */
 gnc_numeric     xaccAccountGetClearedBalance (Account *account);
@@ -351,6 +350,15 @@
 /** Get the balance of the account as of the date specified */
 gnc_numeric     xaccAccountGetBalanceAsOfDate (Account *account, time_t date);
 
+/* These two functions convert a given balance from one commodity to
+   another.  The account argument is only used to get the Book, and
+   may have nothing to do with the supplied balance.  Likewise, the
+   date argument is only used for commodity conversion and may have
+   nothing to do with supplied balance.
+
+   Since they really have nothing to do with Accounts, there's
+   probably some better place for them, but where?  gnc-commodity.h?
+*/
 gnc_numeric xaccAccountConvertBalanceToCurrency(Account *account, /* for book */
 						gnc_numeric balance,
 						gnc_commodity *balance_currency,
@@ -361,6 +369,8 @@
 							gnc_commodity *new_currency,
 							time_t date);
 
+/* These functions get some type of balance in the desired commodity.
+   'report_commodity' may be NULL to use the account's commodity. */
 gnc_numeric xaccAccountGetBalanceInCurrency (Account *account,
 					     gnc_commodity *report_commodity,
 					     gboolean include_children);
@@ -376,10 +386,16 @@
 gnc_numeric xaccAccountGetProjectedMinimumBalanceInCurrency (Account *account,
 							     gnc_commodity *report_commodity,
 							     gboolean include_children);
-/*@}*/
 
+/* This function gets the balance as of the given date in the desired
+   commodity. */
+gnc_numeric xaccAccountGetBalanceAsOfDateInCurrency(
+    Account *account, time_t date, gnc_commodity *report_commodity,
+    gboolean include_children);
+/** @} */
 
 /** @name Account Children and Parents. 
+
  * The set of accounts is represented as a doubly-linked tree, so that given 
  * any account, both its parent and its children can be easily found.  
  * To make the management of sets of accounts easier, an account does not
@@ -389,8 +405,8 @@
  * 
  * The account tree heirarchy is unique, in that a given account can 
  * have only one parent account. 
- */
-/** @{ */
+ @{
+*/
 
 /** This routine returns the group holding the set of subaccounts 
  * for this account.  */
@@ -410,7 +426,7 @@
 
 /** This routine returns a flat list of all of the accounts
  * that are descendents of this account.  This includes not
- * only the the children, but the cheldren of the children, etc.
+ * only the the children, but the children of the children, etc.
  * This routine is equivalent to the nested calls
  * xaccGroupGetSubAccounts (xaccAccountGetChildren())
  *
@@ -440,8 +456,8 @@
 /* ------------------ */
 
 /** @name GNCAccountType conversion/checking
- */
-/* @{ */
+ @{
+*/
 /**
  * Conversion routines for the account types to/from strings
  * that are used in persistant storage, communications.  These
@@ -474,12 +490,13 @@
  * of type child_type as children. */
 gboolean xaccAccountTypesCompatible (GNCAccountType parent_type,
                                      GNCAccountType child_type);
-/* @} */
+/** @} */
 
 /* ------------------ */
 
-/** @name Account split/transaction list management */
-/*@{*/
+/** @name Account split/transaction list management 
+@{
+*/
 /** The xaccAccountInsertSplit() method will insert the indicated
  *    split into the indicated account.  If the split already 
  *    belongs to another account, it will be removed from that
@@ -548,8 +565,9 @@
 
 /* ------------------ */
 
-/** @name Account lots */
-/*@{*/
+/** @name Account lots 
+@{
+*/
 /** The xaccAccountInsertLot() method will register the indicated lot 
  *    with this account.   Any splits later inserted into this lot must 
  *    belong to this account.  If the lot is already in another account,
@@ -588,11 +606,12 @@
 							  gpointer user_data),
 				   gpointer user_data, GCompareFunc sort_func);
 
-/*@}*/
+/** @} */
 /* ------------------ */
 
-/** @name Account Reconciliation information getters/setters */
-/** @{ */
+/** @name Account Reconciliation information getters/setters 
+@{
+*/
 /** DOCUMENT ME! */
 gboolean       xaccAccountGetReconcileLastDate (Account *account,
                                                 time_t *last_date);
@@ -634,20 +653,27 @@
   PLACEHOLDER_CHILD,
   } GNCPlaceholderType;
 
-/** @name Account Placeholder flag */
-/** @{ */
+/** @name Account Placeholder flag 
+ @{
+*/
 /** DOCUMENT ME! */
 gboolean        xaccAccountGetPlaceholder (Account *account);
 /** DOCUMENT ME! */
 void            xaccAccountSetPlaceholder (Account *account,
                                            gboolean option);
-/** DOCUMENT ME! */
+
+/** Returns PLACEHOLDER_NONE if account is NULL or neither account nor
+ *  any descendent of account is a placeholder.  If account is a
+ *  placeholder, returns PLACEHOLDER_THIS.  Otherwise, if any
+ *  descendant of account is a placeholder, return PLACEHOLDER_CHILD.
+ */
 GNCPlaceholderType xaccAccountGetDescendantPlaceholder (Account *account);
 /** @} */
 
 
-/** @name Account Tax related getters/setters */
-/** @{ */
+/** @name Account Tax related getters/setters
+ @{
+*/
 
 /** DOCUMENT ME! */
 gboolean        xaccAccountGetTaxRelated (Account *account);
@@ -667,8 +693,9 @@
 /** @} */
 
 
-/** @name Account marking */
-/*@{*/
+/** @name Account marking 
+@{
+*/
 /** Set a mark on the account.  The meaning of this mark is
  * completely undefined. Its presented here as a utility for the
  * programmer, to use as desired.  Handy for performing customer traversals
@@ -689,11 +716,12 @@
 void           xaccClearMarkDown (Account *account, short val);
 /** Will clear the mark for all the accounts of the AccountGroup .*/
 void           xaccClearMarkDownGr (AccountGroup *group, short val);
-/*@}*/
+/** @} */
 
 
-/** @name Deprecated Routines. */
-/** @{ */
+/** @name Deprecated Routines. 
+ @{ 
+*/
 
 /** @deprecated The current API associates only one thing with an
  * account: the 'commodity'. Use xaccAccountGetCommodity() to fetch
@@ -705,7 +733,7 @@
 /** @deprecated The current API associates only one thing with an
  * account: the 'commodity'. Use xaccAccountGetCommodity() to fetch
  * it. */
-gnc_commodity * DxaccAccountGetCurrency (Account *account);
+gnc_commodity * DxaccAccountGetCurrency (const Account *account);
 
 /** Set the timezone to be used when interpreting the results from a
  *  given Finance::Quote backend.  Unfortunately, the upstream sources
@@ -722,11 +750,12 @@
  *  @deprecated Price quote information is now stored on the
  *  commodity, not the account. */
 const char * dxaccAccountGetQuoteTZ (Account *account);
-/**@}*/
+/** @} */
 
 
-/** @name Account parameter names */
-/** @{ */
+/** @name Account parameter names 
+ @{
+*/
 #define ACCOUNT_KVP			"kvp"
 #define ACCOUNT_NAME_		"name"
 #define ACCOUNT_CODE_		"code"
Index: design.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/design.txt,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/engine/design.txt -Lsrc/engine/design.txt -u -r1.24 -r1.25
--- src/engine/design.txt
+++ src/engine/design.txt
@@ -1,11 +1,26 @@
+/** \page backendold Engine Architecture (old)
+
+API: Backend
+
+\section oldintro Introduction
+
 This document is becoming obsolete. Please refer to the design
 documentation in src/doc/design for a complete description of the
 Engine architecture.
+http://code.neil.williamsleesmill.me.uk/texi/gnucash-design_4.html#SEC30
+
+The only remaining architecture flaw is related to the GnuCash XML v2
+backend modularisation. QofSession includes a dynamic method of loading
+a QofBackend that supercedes the use of gnc_module_load that currently
+loads the module using guile/scheme. When the old XML backend is replaced
+by Sqlite, this will be resolved.
+
+Note that this flaw <b>does not appear in QOF</b> itself. The C code 
+enabling the entire guile/scheme load mechanism is GnuCash only.
+
+\subsection oldflaw Architecture Flaw
 
-Architecture Flaw
------------------
-A few areas in the engine are marked 'FIXME: architecture flaw'.
-What does this really mean?  There is a Soviet joke from the 1960's:
+What does Architecture Flaw really mean?  There is a Soviet joke from the 1960's:
 
 A westerner in Moscow stops a man to ask him the time. The man puts
 down his breifcase, and flicks his wrist to look at his watch.  "The
@@ -14,21 +29,20 @@
 interest, "Why, that's a mighty fine watch you have there! We don't
 have anything like that in the America!" The Soviet responds, "Why 
 yes, this demonstrates the superiority of Soviet engineering over
-decadent captalist design."  Stooping to pick up his breifcase, 
+decadent captalist design."  Stooping to pick up his briefcase, 
 he mumbles half to himself, "If only these batteries weren't so heavy."
 
-There are a few places where the engine requires the use of guile.
-These should be eliminated.
+There is only one place where the engine requires the use of guile.
+This is the remaining architecture flaw, see above.
 
+\section oldreview Accounting Engine
 
-Accounting Engine
------------------
 This document reviews the operation of, and various design points 
 pertinent to the GnuCash accounting engine.  The latest version
 of this document can be found in the engine source-code directory.
 
-Stocks, non-Currency-Denominated Assets
----------------------------------------
+\section enginestock Stocks, non-Currency-Denominated Assets
+
 The engine includes support for non-currency-denominated assets, 
 such as stocks, bonds, mutual funds, inventory.  This is done with
 two values in the Split structure:
@@ -60,10 +74,10 @@
 
 Thus, for example, the purchase of shares can be represented as:
 
-   source:
+   source:\n
    debit ABC Bank for $1045  (1045 dollars * dollar "price" of 1.00)
    
-   destination:
+   destination:\n
    credit PQR Stock for $1000 (100 shares at $10 per share)
    credit StockBroker category $45 in fees
 
@@ -71,10 +85,10 @@
 be at least one common currency/security between all of them.  Thus, 
 for example:
 
-   source:
+   source:\n
    debit ABC Bank for $1045  (1045 dollars * dollar "price" of 1.00)
    
-   destination:
+   destination:\n
    credit VolkTrader for 2000 DM (1000 dollars at 2.0 mark per dollar)
    credit Fees category $45 in fees
 
@@ -86,8 +100,8 @@
 
 Note that we ignored the price when adding the second split.
 
-Recoding a Stock Price
-----------------------
+\subsection enginestock Recoding a Stock Price
+
 A stock price may be recorded in a brokerage account with a single
 split that has zero value:
 (share price) * (zero shares) == (zero dollars)
@@ -97,19 +111,20 @@
 requires at least two splits to balance. (at least when double-entry
 is enabled).
 
-Recording a Stock Split
------------------------
+\subsection engineplit Recording a Stock Split
+
 Stock splits (i.e. when a company issues x shares of new stock for every
 share already owned) may be recorded with a pair of journal entries as
 follows:
 
 (-old num shrs) * (old price) + (new num shrs) * (new price) == 0.0
+
 where each journal entry credits/debits the same account.
 Of course  (new num shrs) == (1+x) * (old num shrs)
 and the price goes inversely.
 
-Stock Options
--------------
+\section enginestock Stock Options
+
 Stock options are not currently supported.  To support them, the
 following needs to be added:
 
@@ -133,38 +148,37 @@
 the ability to purchase (with a call option) or sell (with a put option) 
 100 shares of the underlying stock.  
 
+\seection engineerror Error Reporting
 
-Error Reporting
----------------
 The error reporting architecture (partially implemented), uses a globally
 visible subroutine to return an error.  In the naivest possible implementation,
 the error reporting mechanism would look like this:
-
-    int error_num;   /* global error number */
+\verbatim
+    int error_num;   // global error number
 
     int xaccGetError (void) { return error_num; }
 
     void xaccSomeFunction (Args *various_args) {
         if (bad_thing_happened) error_num = 42;
     }  
-
+\endverbatim
 Many programmers are used to a different interface, e.g.
-
+\verbatim
     int xaccSomeFunction (Args *various_args) {
         if (bad_thing_happened) return (42);
     }  
-
+\endverbatim
 Because of this, it is important to explain why the former design was 
 choosen over the latter.  Let us begin by listing how the choosen design 
 is as good as, and in many ways can be better to the later design.
 
- (1) Allows programmer to check for errors asynchronously, e.g. outside
+-# Allows programmer to check for errors asynchronously, e.g. outside
      of a performance critical loop, or far away, after the return of
      several subroutines.
- (2) (with the right implementation) Allows reporting of multiple, complex
+-# (with the right implementation) Allows reporting of multiple, complex
      errors.  For example, it can be used to implement a trace mechanism.
- (3) (with the right implementation) Can be thread safe.
- (4) Allows errors that occurred deep in the implementation to be reported
+-# (with the right implementation) Can be thread safe.
+-# Allows errors that occurred deep in the implementation to be reported
      up to much higher levels without requiring baggage in the middle.
 
 The right implementation for (2) is to implement not a single
@@ -173,54 +187,51 @@
 implementation for (3) is the use pthread_getspecific() to define a
 per-thread global and/or ring/queue.
 
+\section engineisolation Engine Isolation
 
-Engine Isolation
-----------------
 Goals of engine isolation:
-  o Hide the engine behind an API so that multiple, pluggable engines
+- Hide the engine behind an API so that multiple, pluggable engines
     could be created, e.g. SQL or CORBA.
-  o Engine users are blocked from being able to put engine internal
+- Engine users are blocked from being able to put engine internal
     structures in an inconsistent state.  Updates are "atomic".
 
 Some half-finished thoughts about the engine API:
 
--- The engine structures should not be accessible to any code outside 
+- The engine structures should not be accessible to any code outside 
    of the engine.  Thus, the engine structures have been moved to 
    AccountP.h, TransactionP.h, etc.
    The *P.h files should not be included by code outside of the engine.
-
--- The down-side of hiding is that it can hurt performance.  Even trivial data 
+- The down-side of hiding is that it can hurt performance.  Even trivial data 
    accesses require a subroutine call.  Maybe a smarter idea would be to leave
    the structures exposed, allow direct manipulation, and then "copy-in" and
    "copy-out" the structures into parallel structures when a hidden back end
    needs to be invoked.
-
--- the upside of hiding behind an API is that the engine can be 
+- the upside of hiding behind an API is that the engine can be 
    instrumented with extension language (perl, scheme, tcl, python) hooks 
    for pre/post processing of the data.  To further enable such hooks, we 
    should probably surround all operations on structures with "begin-edit" 
    and "end-edit" calls.
-
--- begin/end braces could potentially be useful for two-phase commit schemes.
+- begin/end braces could potentially be useful for two-phase commit schemes.
    where "end-edit" is replaced by "commit-edit" or "reject-edit".
 
+\section enginereconcile Reconciliation
 
-Reconciliation
---------------
 The 'reconcile' state of a transaction can have one of the following values:
 
-/* Values for the reconciled field in Transaction: */
-#define NREC 'n'              /* not reconciled or cleared */
-#define CREC 'c'              /* The transaction has been cleared */
-#define YREC 'y'              /* The transaction has been reconciled */
-#define FREC 'f'              /* frozen into accounting period */
+\verbatim
+// Values for the reconciled field in Transaction:
+#define NREC 'n'              // not reconciled or cleared
+#define CREC 'c'              // The transaction has been cleared
+#define YREC 'y'              // The transaction has been reconciled
+#define FREC 'f'              // frozen into accounting period
+\endverbatim
 
 (Note that FREC is not yet used/implemented ...)
 
 The process of reconciliation works as follows:
-1) User enters new transaction.  All splits are marked 'n' for 'new'
+-# User enters new transaction.  All splits are marked 'n' for 'new'
    or 'no, not yet reconciled'.
-2) User beleives that the transaction has cleared the bank, 
+-# User beleives that the transaction has cleared the bank, 
    e.g. that a cheque written out has been deposited/cashed.
    User clicks in the 'R' column in the register gui,
    marking the split 'c' for 'cleared'.   User can freely 
@@ -228,7 +239,7 @@
    no complaints.  This is a 'safe' operation.  Note that the
    register shows the 'cleared' subtotal, which is, essentially, 
    a guess of the banks view of the account balance. 
-3) When user gets the bank statement, user launches the 
+-# When user gets the bank statement, user launches the 
    reconcile dialogue.  This dialogue is used to match transactions
    on the bank statement with which is recorded locally.  
    Reconciled transactions are marked with a 'y'.  
@@ -238,7 +249,7 @@
    the ordinary register dialogue.  It should be sort-of
    'set in stone'.  (The engine does NOT enforce this,
    only the gui enforces this.)
-4) When the books are closed, all splits should be marked 
+-# When the books are closed, all splits should be marked 
    'frozen', and become truly un-editable.  The engine should
    enforce 'frozen', and just plain not allow editing of closed
    books, period.  The only wat to change this would have been
@@ -246,6 +257,7 @@
    change all 'f' to 'y'.)
    
 About storing dates associated with reconcile:
+\verbatim
 > I think that there should be a date stamp attached to the reconciliation
 > field so that as well as knowing that it has been reconciled, you also 
 > know *when* it was reconciled.
@@ -264,14 +276,14 @@
 > 
 > It's not terribly important for cheques that get cashed right away; it *is* 
 > for things that hang around uncashed for a while.
+\endverbatim
 
 If the above is implemented, what date should be stored if the user
 toggles the recn flag a few time?  The date of the last toggle?
 The very first date that it was recn'ed?
 
+\section enginebackup Automatic Backup
 
-Automatic Backup
-----------------
 The following has been implemented:
 
 Have (by default) xacc create a backup file
@@ -288,9 +300,8 @@
 To a limited degree, it provides atomicity/consistency/etc at the
 course-grained account-group level.
 
+\section enginetransaction Transaction Processing
 
-Transaction Processing
-----------------------
 There is a rudimentary level of "TP" build in, via the routines
 xaccTransBeginEdit(), xaccTransRollbackEdit(), and xaccTransCommitEdit(),
 which allow changes to be made to a transaction, and then commited,
@@ -311,6 +322,7 @@
 The SQL back-end should implement posting entirely in the 
 'Commit()' routine.  The pseudo-algorithms should look as follows:
 
+\verbatim
 	BeginEdit () {
 		// save a copy of what it was before we start editing
 		old_transaction = this;
@@ -343,6 +355,7 @@
 		this = old_transaction;
 		old_transaction = NULL;
 	}
+\endverbatim
 
 The GUI should check to make sure that the Commit() routine didn't fail.
 If it did fail, then the GUI should pop up a notice to the user stating
@@ -351,10 +364,8 @@
 other human user might have changed the data so that they could
 coordinate as needed.)
 
+\section enginelogs Journal Logs
 
-
-Journal Logs
-------------
 The following has been implemented; see TransLog.c for details.
 
 Transaction logs.  The idea was that every time a transaction 
@@ -369,16 +380,18 @@
 
 In effect, you'd have things like
 
+\verbatim
 === 97/01/01 04:32:00 === Add Transaction ==== [whatever was added] ====
 === 97/01/01 04:32:02 === Delete Transaction ==== [whatever was deleted] ====
+\endverbatim
 
 It also is a useful debugging tool, as if you make sure that the 
 "log_transaction()" call starts by opening the log file, writes, and
 then closes and syncs, you know what is going on with the data even if
 horrible things happen to the "master" database file.
 
-Session Mgmt
-------------
+\section enginemanagement Session Management
+
 To allow the user of the engine some guarantee of atomic updates, 
 serialized file I/O, related miscellany, the concept of a session
 is supported.  No file IO can be performed until a session has 
@@ -393,24 +406,27 @@
 stock-quote update daemon running under a different pid doesn't trash 
 data being currently edited by the user.
 
+\section enginetodo Remaining Work Items
 
-Remaining Work Items
---------------------
 To find other remaining work items in the code, grep for the string 
 "hack alert".
 
+See also the \ref todo.
 
-Ideas for engine enhancements:
------------------------------
-  1) Have (by default) gnucash immediately re-read a file after every
-     write, and compare the two resulting AccountGroups for equality.
+\section engineenhance Ideas for engine enhancements:
 
+-# Have (by default) gnucash immediately re-read a file after every
+     write, and compare the two resulting AccountGroups for equality.\n
      During development, this is a good idea, as it will help uncover
      thinko's more quickly, instead of letting them hide for weeks or months
      (as the last one did).  Its not a bad self-consistency check when
-     monkeying with the internals, damn the performance.
-
+     monkeying with the internals, damn the performance.\n
      It can be removed/disabled for product versions.
 
+\section olddate Needs updating.
 
 This document is dated May 2000
+
+Updated the architecture flaw section, June 2005.
+
+*/
Index: Transaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Transaction.c,v
retrieving revision 1.318
retrieving revision 1.319
diff -Lsrc/engine/Transaction.c -Lsrc/engine/Transaction.c -u -r1.318 -r1.319
--- src/engine/Transaction.c
+++ src/engine/Transaction.c
@@ -39,23 +39,11 @@
 #include "TransLog.h"
 #include "cap-gains.h"
 #include "gnc-commodity.h"
-#include "gnc-date.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
-#include "gnc-event-p.h"
 #include "gnc-lot-p.h"
 #include "gnc-lot.h"
-#include "gnc-trace.h"
 #include "messages.h"
 
-#include "qofbackend-p.h"
-#include "qof-be-utils.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-#include "qofclass.h"
-#include "qofid-p.h"
-#include "qofobject.h"
-
 /*
  * Design notes on event-generation: transaction-modified-events 
  * should not be generated until transacation commit or rollback 
@@ -87,11 +75,10 @@
 #define ISO_DATELENGTH 32 /* length of an iso 8601 date string. */
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_ENGINE;
+static QofLogModule log_module = GNC_MOD_ENGINE;
 
 G_INLINE_FUNC void check_open (Transaction *trans);
-G_INLINE_FUNC void
-check_open (Transaction *trans)
+void check_open (Transaction *trans)
 {
   if (trans && 0 >= trans->inst.editlevel)
   {
@@ -114,8 +101,8 @@
   split->parent      = NULL;
   split->lot         = NULL;
 
-  split->action      = g_cache_insert(gnc_engine_get_string_cache(), "");
-  split->memo        = g_cache_insert(gnc_engine_get_string_cache(), "");
+  split->action      = gnc_string_cache_insert("");
+  split->memo        = gnc_string_cache_insert("");
   split->reconciled  = NREC;
   split->amount      = gnc_numeric_zero();
   split->value       = gnc_numeric_zero();
@@ -181,8 +168,8 @@
   split->acc = s->acc;
   split->lot = s->lot;
 
-  split->memo = g_cache_insert (gnc_engine_get_string_cache(), s->memo);
-  split->action = g_cache_insert (gnc_engine_get_string_cache(), s->action);
+  split->memo = gnc_string_cache_insert(s->memo);
+  split->action = gnc_string_cache_insert(s->action);
 
   split->kvp_data = kvp_frame_copy (s->kvp_data);
 
@@ -209,8 +196,8 @@
 
   split->book                = s->book;
   split->parent              = NULL;
-  split->memo                = g_cache_insert(gnc_engine_get_string_cache(), s->memo);
-  split->action              = g_cache_insert(gnc_engine_get_string_cache(), s->action);
+  split->memo                = gnc_string_cache_insert(s->memo);
+  split->action              = gnc_string_cache_insert(s->action);
   split->kvp_data            = kvp_frame_copy(s->kvp_data);
   split->reconciled          = s->reconciled;
   split->date_reconciled     = s->date_reconciled;
@@ -273,8 +260,8 @@
     PERR ("double-free %p", split);
     return;
   }
-  g_cache_remove(gnc_engine_get_string_cache(), split->memo);
-  g_cache_remove(gnc_engine_get_string_cache(), split->action);
+  gnc_string_cache_remove(split->memo);
+  gnc_string_cache_remove(split->action);
 
   kvp_frame_delete (split->kvp_data);
   split->kvp_data    = NULL;
@@ -524,7 +511,7 @@
 #define SET_GAINS_VDIRTY(s)  SET_GAINS_DIRTY(s,GAINS_STATUS_VDIRTY);
 
 G_INLINE_FUNC void mark_split (Split *s);
-G_INLINE_FUNC void mark_split (Split *s)
+void mark_split (Split *s)
 {
   Account *account = s->acc;
 
@@ -540,7 +527,7 @@
 
 
 G_INLINE_FUNC void mark_trans (Transaction *trans);
-G_INLINE_FUNC void mark_trans (Transaction *trans)
+void mark_trans (Transaction *trans)
 {
   GList *node;
 
@@ -551,7 +538,7 @@
 }
 
 G_INLINE_FUNC void gen_event (Split *split);
-G_INLINE_FUNC void gen_event (Split *split)
+void gen_event (Split *split)
 {
   Account *account = split->acc;
   Transaction *trans = split->parent;
@@ -576,7 +563,7 @@
 }
 
 G_INLINE_FUNC void gen_event_trans (Transaction *trans);
-G_INLINE_FUNC void gen_event_trans (Transaction *trans)
+void gen_event_trans (Transaction *trans)
 {
   GList *node;
 
@@ -661,6 +648,7 @@
   }
 
   s->kvp_data = frm;
+  qof_commit_edit(&s->parent->inst);
 }
 
 /********************************************************************\
@@ -698,6 +686,16 @@
   mark_split (s);
 }
 
+static void
+qofSplitSetSharePrice (Split *split, gnc_numeric price)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	g_return_if_fail(qof_begin_edit(&split->parent->inst));
+	xaccSplitSetSharePrice (split, price);
+	qof_commit_edit(&split->parent->inst);
+}
+
 void 
 xaccSplitSetSharePrice (Split *s, gnc_numeric price) 
 {
@@ -744,13 +742,23 @@
   mark_split (s);
 }
 
+static void
+qofSplitSetAmount (Split *split, gnc_numeric amt)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	g_return_if_fail(qof_begin_edit(&split->parent->inst));
+	xaccSplitSetAmount (split, amt);
+	qof_commit_edit(&split->parent->inst);
+}
 
 void 
 xaccSplitSetAmount (Split *s, gnc_numeric amt) 
 {
   if(!s) return;
-  ENTER ("(split=%p) old amt=%lld/%lld new amt=%lld/%lld", s,
-        s->amount.num, s->amount.denom, amt.num, amt.denom);
+  ENTER ("(split=%p) old amt=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT
+	 " new amt=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, s,
+	 s->amount.num, s->amount.denom, amt.num, amt.denom);
 
   check_open (s->parent);
   s->amount = gnc_numeric_convert(amt, get_commodity_denom(s), GNC_HOW_RND_ROUND);
@@ -759,13 +767,23 @@
   mark_split (s);
 }
 
+static void
+qofSplitSetValue (Split *split, gnc_numeric amt)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	g_return_if_fail(qof_begin_edit(&split->parent->inst));
+	xaccSplitSetValue (split, amt);
+	qof_commit_edit(&split->parent->inst);
+}
 
 void 
 xaccSplitSetValue (Split *s, gnc_numeric amt) 
 {
   if(!s) return;
-  ENTER ("(split=%p) old val=%lld/%lld new val=%lld/%lld", s,
-        s->value.num, s->value.denom, amt.num, amt.denom);
+  ENTER ("(split=%p) old val=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT
+	 " new val=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT, s,
+	 s->value.num, s->value.denom, amt.num, amt.denom);
 
   check_open (s->parent);
   s->value = gnc_numeric_convert(amt, get_currency_denom(s), GNC_HOW_RND_ROUND);
@@ -808,8 +826,8 @@
 {
   ENTER ("trans=%p", trans);
   /* Fill in some sane defaults */
-  trans->num         = g_cache_insert(gnc_engine_get_string_cache(), "");
-  trans->description = g_cache_insert(gnc_engine_get_string_cache(), "");
+  trans->num         = gnc_string_cache_insert("");
+  trans->description = gnc_string_cache_insert("");
 
   trans->common_currency = NULL;
   trans->splits = NULL;
@@ -921,8 +939,8 @@
 
   trans = g_new0 (Transaction, 1);
 
-  trans->num         = g_cache_insert (gnc_engine_get_string_cache(), t->num);
-  trans->description = g_cache_insert (gnc_engine_get_string_cache(), t->description);
+  trans->num         = gnc_string_cache_insert (t->num);
+  trans->description = gnc_string_cache_insert (t->description);
 
   trans->splits = g_list_copy (t->splits);
   for (node = trans->splits; node; node = node->next)
@@ -969,8 +987,8 @@
 
   trans->date_entered    = t->date_entered;
   trans->date_posted     = t->date_posted;
-  trans->num             = g_cache_insert (gnc_engine_get_string_cache(), t->num);
-  trans->description     = g_cache_insert (gnc_engine_get_string_cache(), t->description);
+  trans->num             = gnc_string_cache_insert (t->num);
+  trans->description     = gnc_string_cache_insert (t->description);
   trans->common_currency = t->common_currency;
   trans->version         = t->version;
   trans->version_check   = t->version_check;
@@ -1020,8 +1038,8 @@
   trans->splits = NULL;
 
   /* free up transaction strings */
-  g_cache_remove(gnc_engine_get_string_cache(), trans->num);
-  g_cache_remove(gnc_engine_get_string_cache(), trans->description);
+  gnc_string_cache_remove(trans->num);
+  gnc_string_cache_remove(trans->description);
 
   /* Just in case someone looks up freed memory ... */
   trans->num         = (char *) 1;
@@ -1372,7 +1390,8 @@
                                 gnc_commodity_get_fraction (base_currency),
                                 GNC_HOW_RND_ROUND);
 
-  LEAVE (" total=%lld/%lld", value.num, value.denom);
+  LEAVE (" total=%" G_GINT64_FORMAT "/%" G_GINT64_FORMAT,
+	 value.num, value.denom);
   return value;
 }
 
@@ -1462,7 +1481,8 @@
 void
 xaccTransBeginEdit (Transaction *trans)
 {
-   QOF_BEGIN_EDIT(&trans->inst)
+   if(!trans) { return; }
+   if(!qof_begin_edit(&trans->inst)) { return; }
 
    if (qof_book_shutting_down(trans->inst.book))
      return;
@@ -1617,7 +1637,7 @@
         errcode = qof_backend_get_error (be);
       } while (ERR_BACKEND_NO_ERR != errcode);
 
-      (be->commit) (be, &(trans->inst));
+      qof_backend_run_commit(be, &(trans->inst));
 
       errcode = qof_backend_get_error (be);
       if (ERR_BACKEND_NO_ERR != errcode)
@@ -1698,13 +1718,13 @@
 
    trans->common_currency = orig->common_currency;
 
-   g_cache_remove (gnc_engine_get_string_cache(), trans->num);
+   gnc_string_cache_remove (trans->num);
    trans->num = orig->num;
-   orig->num = g_cache_insert(gnc_engine_get_string_cache(), "");
+   orig->num = gnc_string_cache_insert("");
 
-   g_cache_remove (gnc_engine_get_string_cache(), trans->description);
+   gnc_string_cache_remove (trans->description);
    trans->description = orig->description;
-   orig->description = g_cache_insert(gnc_engine_get_string_cache(), "");
+   orig->description = gnc_string_cache_insert("");
 
    kvp_frame_delete (trans->inst.kvp_data);
    trans->inst.kvp_data = orig->inst.kvp_data;
@@ -1750,13 +1770,13 @@
            break;
          }
 
-         g_cache_remove (gnc_engine_get_string_cache(), s->action);
+         gnc_string_cache_remove (s->action);
          s->action = so->action;
-         so->action = g_cache_insert(gnc_engine_get_string_cache(), "");
+         so->action = gnc_string_cache_insert("");
 
-         g_cache_remove (gnc_engine_get_string_cache(), s->memo);
+         gnc_string_cache_remove (s->memo);
          s->memo = so->memo;
-         so->memo = g_cache_insert(gnc_engine_get_string_cache(), "");
+         so->memo = gnc_string_cache_insert("");
 
          kvp_frame_delete (s->kvp_data);
          s->kvp_data = so->kvp_data;
@@ -1847,6 +1867,8 @@
    /* Now that the engine copy is back to its original version,
     * get the backend to fix it in the database */
    be = qof_book_get_backend (trans->inst.book);
+   /** \todo Fix transrollbackedit in QOF so that rollback
+   is exposed via the API. */
    if (be && be->rollback) 
    {
       QofBackendError errcode;
@@ -2384,6 +2406,17 @@
    xaccTransSetDateInternal(trans, &trans->date_entered, ts);
 }
 
+static void
+qofTransSetDatePosted (Transaction *trans, Timespec ts)
+{
+	if (!trans) { return; }
+	if((ts.tv_nsec == 0)&&(ts.tv_sec == 0)) { return; }
+	if(!qof_begin_edit(&trans->inst)) { return; }
+	xaccTransSetDateInternal(trans, &trans->date_posted, ts);
+	set_gains_date_dirty(trans);
+	qof_commit_edit(&trans->inst);
+}
+
 void
 xaccTransSetDatePostedTS (Transaction *trans, const Timespec *ts)
 {
@@ -2392,6 +2425,16 @@
    set_gains_date_dirty (trans);
 }
 
+static void
+qofTransSetDateEntered (Transaction *trans, Timespec ts)
+{
+	if (!trans) { return; }
+	if((ts.tv_nsec == 0)&&(ts.tv_sec == 0)) { return; }
+	if(!qof_begin_edit(&trans->inst)) { return; }
+	xaccTransSetDateInternal(trans, &trans->date_entered, ts);
+	qof_commit_edit(&trans->inst);
+}
+
 void
 xaccTransSetDateEnteredTS (Transaction *trans, const Timespec *ts)
 {
@@ -2420,8 +2463,10 @@
 xaccTransSetTxnType (Transaction *trans, char type)
 {
   char s[2] = {type, '\0'};
-  if (!trans) return;
+  g_return_if_fail(trans);
+  if(!qof_begin_edit(&trans->inst)) { return; }
   kvp_frame_set_str (trans->inst.kvp_data, TRANS_TXN_TYPE_KVP, s);
+  qof_commit_edit(&trans->inst);
 }
 
 void xaccTransClearReadOnly (Transaction *trans)
@@ -2440,6 +2485,16 @@
 /********************************************************************\
 \********************************************************************/
 
+/* QOF does not open the trans before setting a parameter,
+but the call uses check_open so we cannot use the call directly. */
+static void
+qofTransSetNum (Transaction *trans, const char *xnum)
+{
+	if(!qof_begin_edit(&trans->inst)) { return; }
+	xaccTransSetNum(trans, xnum);
+	qof_commit_edit(&trans->inst);
+}
+
 void
 xaccTransSetNum (Transaction *trans, const char *xnum)
 {
@@ -2447,11 +2502,19 @@
    if (!trans || !xnum) return;
    check_open (trans);
 
-   tmp = g_cache_insert(gnc_engine_get_string_cache(), (gpointer) xnum);
-   g_cache_remove(gnc_engine_get_string_cache(), trans->num);
+   tmp = gnc_string_cache_insert((gpointer) xnum);
+   gnc_string_cache_remove(trans->num);
    trans->num = tmp;
 }
 
+static void
+qofTransSetDescription (Transaction *trans, const char *desc)
+{
+	if(!qof_begin_edit(&trans->inst)) { return; }
+	xaccTransSetDescription(trans, desc);
+	qof_commit_edit(&trans->inst);
+}
+
 void
 xaccTransSetDescription (Transaction *trans, const char *desc)
 {
@@ -2459,11 +2522,19 @@
    if (!trans || !desc) return;
    check_open (trans);
 
-   tmp = g_cache_insert(gnc_engine_get_string_cache(), (gpointer) desc);
-   g_cache_remove(gnc_engine_get_string_cache(), trans->description);
+   tmp = gnc_string_cache_insert((gpointer) desc);
+   gnc_string_cache_remove(trans->description);
    trans->description = tmp;
 }
 
+static void
+qofTransSetNotes (Transaction *trans, const char *notes)
+{
+	if(!qof_begin_edit(&trans->inst)) { return; }
+	xaccTransSetNotes(trans, notes);
+	qof_commit_edit(&trans->inst);
+}
+
 void
 xaccTransSetNotes (Transaction *trans, const char *notes)
 {
@@ -2671,6 +2742,16 @@
 /********************************************************************\
 \********************************************************************/
 
+static void
+qofSplitSetMemo (Split *split, const char* memo)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	if(!qof_begin_edit(&split->parent->inst)) { return; }
+	xaccSplitSetMemo(split, memo);
+	qof_commit_edit(&split->parent->inst);
+}
+
 void
 xaccSplitSetMemo (Split *split, const char *memo)
 {
@@ -2678,11 +2759,21 @@
    if (!split || !memo) return;
    check_open (split->parent);
 
-   tmp = g_cache_insert(gnc_engine_get_string_cache(), (gpointer) memo);
-   g_cache_remove(gnc_engine_get_string_cache(), split->memo);
+   tmp = gnc_string_cache_insert((gpointer) memo);
+   gnc_string_cache_remove(split->memo);
    split->memo = tmp;
 }
 
+static void
+qofSplitSetAction (Split *split, const char *actn)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	if(!qof_begin_edit(&split->parent->inst)) { return; }
+	xaccSplitSetAction (split, actn);
+	qof_commit_edit(&split->parent->inst);
+}
+
 void
 xaccSplitSetAction (Split *split, const char *actn)
 {
@@ -2690,11 +2781,21 @@
    if (!split || !actn) return;
    check_open (split->parent);
 
-   tmp = g_cache_insert(gnc_engine_get_string_cache(), (gpointer) actn);
-   g_cache_remove(gnc_engine_get_string_cache(), split->action);
+   tmp = gnc_string_cache_insert((gpointer) actn);
+   gnc_string_cache_remove(split->action);
    split->action = tmp;
 }
 
+static void
+qofSplitSetReconcile (Split *split, char recn)
+{
+	g_return_if_fail(split);
+	g_return_if_fail(split->parent);
+	if(!qof_begin_edit(&split->parent->inst)) { return; }
+	xaccSplitSetReconcile(split, recn);
+	qof_commit_edit(&split->parent->inst);
+}
+
 void
 xaccSplitSetReconcile (Split *split, char recn)
 {
@@ -2849,7 +2950,8 @@
    */
   if (gnc_numeric_check(price)) 
   {
-    PERR("Computing share price failed (%d): [ %lld / %lld ] / [ %lld / %lld ]",
+    PERR("Computing share price failed (%d): [ %" G_GINT64_FORMAT " / %"
+	 G_GINT64_FORMAT " ] / [ %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT " ]",
 	 gnc_numeric_check(price), val.num, val.denom, amt.num, amt.denom);
     return gnc_numeric_create(0,1);
   }
@@ -3221,7 +3323,7 @@
   mark_clean:              NULL,
   foreach:                 qof_collection_foreach,
   printable:               (const char* (*)(gpointer)) xaccSplitGetMemo,
-  version_cmp:             NULL,
+  version_cmp:             (int (*)(gpointer, gpointer)) qof_instance_version_cmp,
 };
 
 static gpointer 
@@ -3249,6 +3351,26 @@
   return obj;
 }
 
+static void
+qofSplitSetParentTrans(Split *s, QofEntity *ent)
+{
+	Transaction *trans;
+
+	trans = (Transaction*)ent;
+	g_return_if_fail(trans != NULL);
+	xaccTransAppendSplit(trans, s);
+}
+
+static void
+qofSplitSetAccount(Split *s, QofEntity *ent)
+{
+	Account *acc;
+
+	acc = (Account*)ent;
+	g_return_if_fail(acc != NULL);
+	xaccAccountInsertSplit(acc, s);
+}
+
 gboolean xaccSplitRegister (void)
 {
   static const QofParam params[] = {
@@ -3257,36 +3379,30 @@
 
     /* d-* are depricated query params, should not be used in new
      * queries, should be removed from old queries. */
-    { "d-share-amount", QOF_TYPE_DOUBLE,
-      (QofAccessFunc)DxaccSplitGetShareAmount, NULL },
+    { "d-share-amount", QOF_TYPE_DOUBLE,  (QofAccessFunc)DxaccSplitGetShareAmount, NULL },
     { "d-share-int64", QOF_TYPE_INT64, (QofAccessFunc)qof_entity_get_guid, NULL },
     { SPLIT_BALANCE, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitGetBalance, NULL },
-    { SPLIT_CLEARED_BALANCE, QOF_TYPE_NUMERIC,
-      (QofAccessFunc)xaccSplitGetClearedBalance, NULL },
-    { SPLIT_RECONCILED_BALANCE, QOF_TYPE_NUMERIC,
-      (QofAccessFunc)xaccSplitGetReconciledBalance, NULL },
-    { SPLIT_MEMO, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetMemo, (QofSetterFunc)xaccSplitSetMemo },
-    { SPLIT_ACTION, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetAction, (QofSetterFunc)xaccSplitSetAction },
-    { SPLIT_RECONCILE, QOF_TYPE_CHAR, (QofAccessFunc)xaccSplitGetReconcile, (QofSetterFunc)xaccSplitSetReconcile },
-    { SPLIT_AMOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitGetAmount, (QofSetterFunc)xaccSplitSetAmount },
-    { SPLIT_SHARE_PRICE, QOF_TYPE_NUMERIC,
-      (QofAccessFunc)xaccSplitGetSharePrice, (QofSetterFunc)xaccSplitSetSharePrice },
-    { SPLIT_VALUE, QOF_TYPE_DEBCRED, (QofAccessFunc)xaccSplitGetValue, (QofSetterFunc)xaccSplitSetValue },
+    { SPLIT_CLEARED_BALANCE, QOF_TYPE_NUMERIC,(QofAccessFunc)xaccSplitGetClearedBalance, NULL },
+    { SPLIT_RECONCILED_BALANCE, QOF_TYPE_NUMERIC,(QofAccessFunc)xaccSplitGetReconciledBalance, NULL },
+    { SPLIT_MEMO, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetMemo, (QofSetterFunc)qofSplitSetMemo },
+    { SPLIT_ACTION, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetAction, (QofSetterFunc)qofSplitSetAction },
+    { SPLIT_RECONCILE, QOF_TYPE_CHAR, (QofAccessFunc)xaccSplitGetReconcile, (QofSetterFunc)qofSplitSetReconcile },
+    { SPLIT_AMOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitGetAmount, (QofSetterFunc)qofSplitSetAmount },
+    { SPLIT_SHARE_PRICE, QOF_TYPE_NUMERIC,(QofAccessFunc)xaccSplitGetSharePrice, (QofSetterFunc)qofSplitSetSharePrice },
+    { SPLIT_VALUE, QOF_TYPE_DEBCRED, (QofAccessFunc)xaccSplitGetValue, (QofSetterFunc)qofSplitSetValue },
     { SPLIT_TYPE, QOF_TYPE_STRING, (QofAccessFunc)xaccSplitGetType, NULL },
-    { SPLIT_VOIDED_AMOUNT, QOF_TYPE_NUMERIC,
-      (QofAccessFunc)xaccSplitVoidFormerAmount, NULL },
-    { SPLIT_VOIDED_VALUE, QOF_TYPE_NUMERIC,
-      (QofAccessFunc)xaccSplitVoidFormerValue, NULL },
+    { SPLIT_VOIDED_AMOUNT, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccSplitVoidFormerAmount, NULL },
+    { SPLIT_VOIDED_VALUE, QOF_TYPE_NUMERIC,  (QofAccessFunc)xaccSplitVoidFormerValue, NULL },
     { SPLIT_LOT, GNC_ID_LOT, (QofAccessFunc)xaccSplitGetLot, NULL },
-    { SPLIT_TRANS, GNC_ID_TRANS, (QofAccessFunc)xaccSplitGetParent, NULL },
-    { SPLIT_ACCOUNT, GNC_ID_ACCOUNT, (QofAccessFunc)xaccSplitGetAccount, NULL },
+    { SPLIT_TRANS,     GNC_ID_TRANS,     (QofAccessFunc)xaccSplitGetParent,    (QofSetterFunc)qofSplitSetParentTrans },
+    { SPLIT_ACCOUNT,   GNC_ID_ACCOUNT,   (QofAccessFunc)xaccSplitGetAccount,   (QofSetterFunc)qofSplitSetAccount },
     { SPLIT_ACCOUNT_GUID, QOF_TYPE_GUID, split_account_guid_getter, NULL },
 /*  these are no-ops to register the parameter names (for sorting) but
     they return an allocated object which getters cannot do.  */
     { SPLIT_ACCT_FULLNAME, SPLIT_ACCT_FULLNAME, no_op, NULL },
     { SPLIT_CORR_ACCT_NAME, SPLIT_CORR_ACCT_NAME, no_op, NULL },
     { SPLIT_CORR_ACCT_CODE, SPLIT_CORR_ACCT_CODE, no_op, NULL },
-    { SPLIT_KVP, QOF_TYPE_KVP, (QofAccessFunc)xaccSplitGetSlots, (QofSetterFunc)xaccSplitSetSlots_nc },
+    { SPLIT_KVP, QOF_TYPE_KVP, (QofAccessFunc)xaccSplitGetSlots, NULL },
     { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)xaccSplitGetBook, NULL },
     { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_entity_get_guid, NULL },
     { NULL },
@@ -3331,22 +3447,22 @@
 gboolean xaccTransRegister (void)
 {
   static QofParam params[] = {
-    { TRANS_NUM, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetNum, (QofSetterFunc)xaccTransSetNum },
-    { TRANS_DESCRIPTION, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetDescription, (QofSetterFunc)xaccTransSetDescription },
-    { TRANS_DATE_ENTERED, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDateEnteredTS, (QofSetterFunc)xaccTransSetDateEnteredTS },
-    { TRANS_DATE_POSTED, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDatePostedTS, (QofSetterFunc)xaccTransSetDatePostedTS },
-    { TRANS_DATE_DUE, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDateDueTS, (QofSetterFunc)xaccTransSetDateDueTS },
+    { TRANS_NUM, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetNum, (QofSetterFunc)qofTransSetNum },
+    { TRANS_DESCRIPTION, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetDescription, (QofSetterFunc)qofTransSetDescription },
+    { TRANS_DATE_ENTERED, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDateEnteredTS, (QofSetterFunc)qofTransSetDateEntered },
+    { TRANS_DATE_POSTED, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDatePostedTS, (QofSetterFunc)qofTransSetDatePosted },
+    { TRANS_DATE_DUE, QOF_TYPE_DATE, (QofAccessFunc)xaccTransRetDateDueTS, NULL },
     { TRANS_IMBALANCE, QOF_TYPE_NUMERIC, (QofAccessFunc)xaccTransGetImbalance,NULL },
-    { TRANS_NOTES, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetNotes, (QofSetterFunc)xaccTransSetNotes },
-    { TRANS_IS_BALANCED, QOF_TYPE_BOOLEAN, (QofAccessFunc)trans_is_balanced_p,NULL },
+    { TRANS_NOTES, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetNotes, (QofSetterFunc)qofTransSetNotes },
+    { TRANS_IS_BALANCED, QOF_TYPE_BOOLEAN, (QofAccessFunc)trans_is_balanced_p, NULL },
     { TRANS_TYPE, QOF_TYPE_CHAR, (QofAccessFunc)xaccTransGetTxnType, (QofSetterFunc)xaccTransSetTxnType },
     { TRANS_VOID_STATUS, QOF_TYPE_BOOLEAN, (QofAccessFunc)xaccTransGetVoidStatus,NULL },
     { TRANS_VOID_REASON, QOF_TYPE_STRING, (QofAccessFunc)xaccTransGetVoidReason,NULL },
-    { TRANS_VOID_TIME, QOF_TYPE_DATE, (QofAccessFunc)xaccTransGetVoidTime,NULL },
-    { TRANS_SPLITLIST, GNC_ID_SPLIT, (QofAccessFunc)xaccTransGetSplitList,NULL },
-    { TRANS_KVP, QOF_TYPE_KVP, (QofAccessFunc)qof_instance_get_slots,NULL },
-    { QOF_PARAM_BOOK, QOF_ID_BOOK, (QofAccessFunc)qof_instance_get_book,NULL },
-    { QOF_PARAM_GUID, QOF_TYPE_GUID, (QofAccessFunc)qof_entity_get_guid,NULL },
+    { TRANS_VOID_TIME, QOF_TYPE_DATE,    (QofAccessFunc)xaccTransGetVoidTime,   NULL },
+    { TRANS_SPLITLIST, GNC_ID_SPLIT,     (QofAccessFunc)xaccTransGetSplitList,  NULL },
+    { TRANS_KVP,       QOF_TYPE_KVP,     (QofAccessFunc)qof_instance_get_slots, NULL },
+    { QOF_PARAM_BOOK,  QOF_ID_BOOK,      (QofAccessFunc)qof_instance_get_book,  NULL },
+    { QOF_PARAM_GUID,  QOF_TYPE_GUID,    (QofAccessFunc)qof_entity_get_guid,    NULL },
     { NULL },
   };
 
Index: SX-book.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/SX-book.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/SX-book.h -Lsrc/engine/SX-book.h -u -r1.6 -r1.7
--- src/engine/SX-book.h
+++ src/engine/SX-book.h
@@ -41,10 +41,7 @@
 #include "config.h"
 
 #include <glib.h>
-
-#include "gnc-engine.h"
-#include "qofbook.h"
-#include "qofid.h"
+#include "qof.h"
 
 typedef struct xaccSchedXactionsDef SchedXactions;
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/.cvsignore,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/.cvsignore -Lsrc/engine/.cvsignore -u -r1.10 -r1.11
--- src/engine/.cvsignore
+++ src/engine/.cvsignore
@@ -18,3 +18,8 @@
 gw-kvp.h
 gw-kvp.html
 iso-4217-currencies.c
+test-link
+.DS_Store
+qofla-dir.h
+gncla-dir.h
+
Index: gncmod-engine.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gncmod-engine.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/engine/gncmod-engine.c -Lsrc/engine/gncmod-engine.c -u -r1.8 -r1.9
--- src/engine/gncmod-engine.c
+++ src/engine/gncmod-engine.c
@@ -9,7 +9,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-engine.h"
 #include "gnc-module-api.h"
Index: gnc-date.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/gnc-date.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/gnc-date.c -Lsrc/engine/gnc-date.c -u -r1.10 -r1.11
--- src/engine/gnc-date.c
+++ src/engine/gnc-date.c
@@ -42,7 +42,6 @@
 #include <glib.h>
 
 #include "gnc-date.h"
-#include "gnc-engine-util.h"
 #include "gnc-trace.h"
 
 #ifndef HAVE_STRPTIME
@@ -70,7 +69,7 @@
 static QofDateFormat prevQofDateFormat = QOF_DATE_FORMAT_LOCALE;
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_ENGINE;
+static QofLogModule log_module = QOF_MOD_ENGINE;
 
 /********************************************************************\
 \********************************************************************/
@@ -87,6 +86,8 @@
     return "ce";
   case QOF_DATE_FORMAT_ISO:
     return "iso";
+  case QOF_DATE_FORMAT_UTC:
+   return "utc";
   case QOF_DATE_FORMAT_LOCALE:
     return "locale";
   case QOF_DATE_FORMAT_CUSTOM:
@@ -108,6 +109,8 @@
     *format = QOF_DATE_FORMAT_UK;
   else if (!strcmp(fmt_str, "ce"))
     *format = QOF_DATE_FORMAT_CE;
+  else if (!strcmp(fmt_str, "utc"))
+    *format = QOF_DATE_FORMAT_UTC;
   else if (!strcmp(fmt_str, "iso"))
     *format = QOF_DATE_FORMAT_ISO;
   else if (!strcmp(fmt_str, "locale"))
@@ -232,8 +235,8 @@
   return retval;
 }
 
-/**
- * timespecCanonicalDayTime
+/** \brief Converts any time on a day to midday that day.
+
  * given a timepair contains any time on a certain day (local time)
  * converts it to be midday that day.  
  */
@@ -270,39 +273,42 @@
   return days_in_month[is_leap][month-1];
 }
 
-/**
- * date_get_last_mday
- * Retrieve the last nomerical day for the month specified in the
- * tm_year and tm_mon fields.
- * Args:  tm: the time value in question
- * returns: T/F
- **/
+/* Retrieve the last numerical day of the month
+
+ Retrieve the last numerical day for the month specified in the
+ tm_year and tm_mon fields.
+
+param  tm: the time value in question
+return the last day of the month, integer.
+*/
 int date_get_last_mday(struct tm *tm)
 {
   return gnc_date_my_last_mday (tm->tm_mon+1, tm->tm_year+1900);
 }
 
-/**
- * date_is_last_mday
- * Determines whether the tm_mday field contains the last day of the
- * month as specified in the tm_year and tm_mon fields.
- * Args:  tm: the time value in question
- * returns: T/F
- **/
+/* Determines if tm_mday is the last day of the month.
+
+ Determines whether the tm_mday field contains the last day of the
+ month as specified in the tm_year and tm_mon fields.
+param  tm: the time value in question
+return TRUE if tm_mday matches the last day of the month, else FALSE.
+*/
 gboolean date_is_last_mday(struct tm *tm)
 {
   return(tm->tm_mday == date_get_last_mday(tm));
 }
 
-/**
- * date_add_months
- * Add a number of months to a time value, and normalize.  Optionally
- * also track the last day of hte month, i.e. 1/31 -> 2/28 -> 3/30.
- * Args:  tm: base time value
- *        months: The number of months to add to this time
- *        track_last_day: Coerce the date value if necessary.
- * returns: nothing
- **/
+/* Add a number of months to a time value
+
+ Add a number of months to a time value, and normalize.  Optionally
+ also track the last day of the month, i.e. 1/31 -> 2/28 -> 3/30.
+
+param  tm: base time value
+param  months: The number of months to add to this time
+param  track_last_day: Coerce the date value if necessary.
+
+return void
+*/
 void date_add_months (struct tm *tm, int months, gboolean track_last_day)
 {
   gboolean was_last_day;
@@ -327,27 +333,28 @@
     tm->tm_mday = new_last_mday;
 }
 
-/**
- * qof_date_format_get
- * Args: nothing
- * returns: QofDateFormat: enumeration indicating preferred format
- *
- * Globals: dateFormat
- **/
+/* Return the set dateFormat.
+
+return QofDateFormat: enumeration indicating preferred format
+
+Global: dateFormat
+*/
 QofDateFormat qof_date_format_get (void)
 {
   return dateFormat;
 }
 
-/**
- * qof_date_format_set
- * set date format to one of US, UK, CE, OR ISO
- * checks to make sure it's a legal value
- * Args: QofDateFormat: enumeration indicating preferred format
- * returns: nothing
- *
- * Globals: dateFormat
- **/
+/* set date format
+
+set date format to one of US, UK, CE, ISO OR UTC
+checks to make sure it's a legal value
+
+param QofDateFormat: enumeration indicating preferred format
+
+return void
+
+Globals: dateFormat
+*/
 void qof_date_format_set(QofDateFormat df)
 {
   if(df >= DATE_FORMAT_FIRST && df <= DATE_FORMAT_LAST)
@@ -356,20 +363,22 @@
     dateFormat = df;
   }
   else
-  {    /* hack alert - is this what we should be doing here? */
-    PERR("non-existent date format set");
+  {    /* hack alert - Use a neutral default. */
+    PERR("non-existent date format set attempted. Setting ISO default");
+    prevQofDateFormat = dateFormat;
+    dateFormat = QOF_DATE_FORMAT_ISO;
   }
 
   return;
 }
 
-/**
- * qof_date_format_get_string
- * get the date format string for the current format
- * returns: string
- *
- * Globals: dateFormat
- **/
+/*
+ qof_date_format_get_string
+ get the date format string for the current format
+ returns: string
+
+ Globals: dateFormat
+*/
 const gchar *qof_date_format_get_string(QofDateFormat df)
 {
   switch(df) {
@@ -379,6 +388,8 @@
     return "%d/%m/%y";
    case QOF_DATE_FORMAT_CE:
     return "%d.%m.%y";
+   case QOF_DATE_FORMAT_UTC:
+    return "%Y-%m-%dT%H:%M:%SZ";
    case QOF_DATE_FORMAT_ISO:
     return "%y-%m-%d";
    case QOF_DATE_FORMAT_LOCALE:
@@ -387,14 +398,16 @@
   };
 }
 
-/**
- * qof_date_format_get_format
- * get the date format string for the current format
- * returns: string
- *
- * Globals: dateFormat
- **/
-const gchar *qof_date_format_get_format(QofDateFormat df)
+/* get the date format string for the current format
+
+get the date format string for the current format
+
+param df Required date format.
+return string
+
+Globals: dateFormat
+*/
+const gchar *qof_date_text_format_get_string(QofDateFormat df)
 {
   switch(df) {
    case QOF_DATE_FORMAT_US:
@@ -402,6 +415,8 @@
    case QOF_DATE_FORMAT_UK:
    case QOF_DATE_FORMAT_CE:
     return "%d %b, %y";
+   case QOF_DATE_FORMAT_UTC:
+    return "%Y-%m-%dT%H:%M:%SZ";
    case QOF_DATE_FORMAT_ISO:
     return "%y-%b-%d";
    case QOF_DATE_FORMAT_LOCALE:
@@ -410,21 +425,21 @@
   };
 }
 
-/**
- * qof_print_date_dmy_buff
- *    Convert a date as day / month / year integers into a localized string
- *    representation
- *
- * Args:   buff - pointer to previously allocated character array; its size
- *                must be at lease MAX_DATE_LENTH bytes.
- *         day - day of the month as 1 ... 31
- *         month - month of the year as 1 ... 12
- *         year - year (4-digit)
- *
- * Return: nothing
- *
- * Globals: global dateFormat value
- */
+/* Convert day, month and year values to a date string
+
+  Convert a date as day / month / year integers into a localized string
+  representation
+
+param   buff - pointer to previously allocated character array; its size
+         must be at lease MAX_DATE_LENTH bytes.
+param   day - value to be set with the day of the month as 1 ... 31
+param   month - value to be set with the month of the year as 1 ... 12
+param   year - value to be set with the year (4-digit)
+
+return void
+
+Globals: global dateFormat value
+*/
 size_t
 qof_print_date_dmy_buff (char * buff, size_t len, int day, int month, int year)
 {
@@ -447,12 +462,10 @@
     case QOF_DATE_FORMAT_CE:
       flen = g_snprintf (buff, len, "%2d.%2d.%-4d", day, month, year);
       break;
-    case QOF_DATE_FORMAT_ISO:
-      flen = g_snprintf (buff, len, "%04d-%02d-%02d", year, month, day);
-      break;
     case QOF_DATE_FORMAT_LOCALE:
       {
         struct tm tm_str;
+	time_t t;
 
         tm_str.tm_mday = day;
         tm_str.tm_mon = month - 1;    /* tm_mon = 0 through 11 */
@@ -460,10 +473,17 @@
                                        * says, it's not a Y2K thing */
 
         gnc_tm_set_day_start (&tm_str);
+	t = mktime (&tm_str);
+	localtime_r (&t, &tm_str);
         flen = strftime (buff, len, GNC_D_FMT, &tm_str);
+	if (flen != 0)
+	  break;
       }
+      /* FALLTHROUGH */
+    case QOF_DATE_FORMAT_ISO:
+    case QOF_DATE_FORMAT_UTC:
+      flen = g_snprintf (buff, len, "%04d-%02d-%02d", year, month, day);
       break;
-
     case QOF_DATE_FORMAT_US:
     default:
       flen = g_snprintf (buff, len, "%2d/%2d/%-4d", month, day, year);
@@ -600,7 +620,7 @@
 {
   int flen;
   int day, month, year, hour, min, sec;
-  struct tm ltm;
+  struct tm ltm, gtm;
   
   if (!buff) return 0;
 
@@ -622,22 +642,28 @@
   
   switch(dateFormat)
   {
-    case DATE_FORMAT_UK:
+    case QOF_DATE_FORMAT_UK:
       flen = g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", day, month, year, hour, min);
       break;
-    case DATE_FORMAT_CE:
+    case QOF_DATE_FORMAT_CE:
       flen = g_snprintf (buff, len, "%2d.%2d.%-4d %2d:%02d", day, month, year, hour, min);
       break;
-    case DATE_FORMAT_ISO:
+    case QOF_DATE_FORMAT_ISO:
       flen = g_snprintf (buff, len, "%04d-%02d-%02d %02d:%02d", year, month, day, hour, min);
       break;
-    case DATE_FORMAT_LOCALE:
+	case QOF_DATE_FORMAT_UTC:
+	{
+		gtm = *gmtime (&secs);
+		flen = strftime (buff, len, QOF_UTC_DATE_FORMAT, &gtm);
+		break;
+	}
+    case QOF_DATE_FORMAT_LOCALE:
       {
         flen = strftime (buff, len, GNC_D_T_FMT, &ltm);
       }
       break;
 
-    case DATE_FORMAT_US:
+    case QOF_DATE_FORMAT_US:
     default:
       flen = g_snprintf (buff, len, "%2d/%2d/%-4d %2d:%02d", month, day, year, hour, min);
       break;
@@ -649,9 +675,15 @@
 qof_print_time_buff (char * buff, size_t len, time_t secs)
 {
   int flen;
-  struct tm ltm;
+	struct tm ltm, gtm;
   
   if (!buff) return 0;
+	if(dateFormat == QOF_DATE_FORMAT_UTC)
+	{
+		gtm = *gmtime (&secs);
+		flen = strftime(buff, len, QOF_UTC_DATE_FORMAT, &gtm);
+		return flen;
+	}
   ltm = *localtime (&secs);
   flen = strftime (buff, len, GNC_T_FMT, &ltm);
 
@@ -675,37 +707,49 @@
 
 /* ============================================================== */
 
-/**
- * qof_scan_date
- *    Convert a string into  day / month / year integers according to
- *    the current dateFormat value.
- *
- *    This function will always parse a single number as the day of
- *    the month, regardless of the ordering of the dateFormat value.
- *    Two numbers will always be parsed as the day and the month, in
- *    the same order that they appear in the dateFormat value.  Three
- *    numbers are parsed exactly as specified in the dateFormat field.
- *
- * Args:   buff - pointer to date string
- *         day -  will store day of the month as 1 ... 31
- *         month - will store month of the year as 1 ... 12
- *         year - will store the year (4-digit)
- *
- * Return: TRUE if date appeared to be valid.
- *
- * Globals: global dateFormat value
- */
+/* Convert a string into  day, month and year integers
+
+    Convert a string into  day / month / year integers according to
+    the current dateFormat value.
+
+    This function will always parse a single number as the day of
+    the month, regardless of the ordering of the dateFormat value.
+    Two numbers will always be parsed as the day and the month, in
+    the same order that they appear in the dateFormat value.  Three
+    numbers are parsed exactly as specified in the dateFormat field.
+
+    Fully formatted UTC timestamp strings are converted separately.
+
+param   buff - pointer to date string
+param     day -  will store day of the month as 1 ... 31
+param     month - will store month of the year as 1 ... 12
+param     year - will store the year (4-digit)
+
+return TRUE if date appeared to be valid.
+
+ Globals: global dateFormat value
+*/
 static gboolean
 qof_scan_date_internal (const char *buff, int *day, int *month, int *year,
                   QofDateFormat which_format)
 {
    char *dupe, *tmp, *first_field, *second_field, *third_field;
    int iday, imonth, iyear;
-   struct tm *now;
+   struct tm *now, utc;
    time_t secs;
 
    if (!buff) return(FALSE);
 
+	if(which_format == QOF_DATE_FORMAT_UTC)
+	{
+		if(strptime(buff, QOF_UTC_DATE_FORMAT, &utc)) {
+			*day = utc.tm_mday;
+			*month = utc.tm_mon + 1;
+			*year = utc.tm_year + 1900;
+			return TRUE;
+		}
+		else { return FALSE; }
+	}
    dupe = g_strdup (buff);
 
    tmp = dupe;
@@ -818,7 +862,7 @@
       * Ack! Thppfft!  Someone just fed this routine a string in the
       * wrong date format.  This is known to happen if a register
       * window is open when changing the date format.  Try the
-      * previous date format.  If that doesn't work, se if we can
+      * previous date format.  If that doesn't work, see if we can
       * exchange month and day. If that still doesn't work,
       * bail and give the caller what they asked for (garbage) 
       * parsed in the new format.
@@ -871,16 +915,9 @@
   return rc;
 }
 
-/**
- * dateSeparator
- *    Return the field separator for the current date format
- *
- * Args:   none
- *
- * Return: date character
- *
- * Globals: global dateFormat value
- */
+/* Return the field separator for the current date format
+return date character
+*/
 char dateSeparator (void)
 {
   static char locale_separator = '\0';
@@ -890,6 +927,7 @@
     case QOF_DATE_FORMAT_CE:
       return '.';
     case QOF_DATE_FORMAT_ISO:
+    case QOF_DATE_FORMAT_UTC:
       return '-';
     case QOF_DATE_FORMAT_US:
     case QOF_DATE_FORMAT_UK:
@@ -921,11 +959,15 @@
 /********************************************************************\
 \********************************************************************/
                                                                                 
-/** The xaccDateUtilGetStamp() routine will take the given time in
- *  seconds and return a buffer containing a textual for the date.
- *  @param thyme The time in seconds to convert.
- *  @return A pointer to the generated string.
- *  @note The caller owns this buffer and must free it when done. */
+/* Convert time in seconds to a textual.
+
+The xaccDateUtilGetStamp() routine will take the given time in
+seconds and return a buffer containing a textual for the date.
+
+param thyme The time in seconds to convert.
+return A pointer to the generated string.
+The caller owns this buffer and must free it when done.
+*/
 char *
 xaccDateUtilGetStamp (time_t thyme)
 {
@@ -944,10 +986,15 @@
 }
                                                                                 
                                                                                 
-/** The xaccDateUtilGetStampNow() routine returns the current time in
- *  seconds in textual format.
- *  @return A pointer to the generated string.
- *  @note The caller owns this buffer and must free it when done. */
+/* Convert textual to time in seconds.
+
+The xaccDateUtilGetStampNow() routine returns the current time in
+seconds in textual format.
+
+return A pointer to the generated string.
+
+note The caller owns this buffer and must free it when done.
+*/
 char *
 xaccDateUtilGetStampNow (void)
 {
@@ -1273,6 +1320,8 @@
   return mktime(&tm);
 }
 
+
+#ifndef GNUCASH_MAJOR_VERSION
 time_t
 gnc_timet_get_day_start_gdate (GDate *date)
 {
@@ -1304,6 +1353,7 @@
   secs = mktime (&stm);
   return secs;
 }
+#endif /* GNUCASH_MAJOR_VERSION */
 
 /* ======================================================== */
 
Index: qofclass.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/qofclass.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/qofclass.h -Lsrc/engine/qofclass.h -u -r1.11 -r1.12
--- src/engine/qofclass.h
+++ src/engine/qofclass.h
@@ -1,5 +1,5 @@
 /********************************************************************\
- * qofclass.h -- API for registering paramters on objects           *
+ * qofclass.h -- API for registering parameters on objects          *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -42,8 +42,8 @@
   declaring a new QOF Class.
 
   Because a QOF Class associates getters and setters with
-  a type, one can then ask, at run time, what paramters
-  are associated with a given type, even if those paramters
+  a type, one can then ask, at run time, what parameters
+  are associated with a given type, even if those parameters
   were not known at compile time.  Thus, a QOF Class is 
   sort-of like a DynAny implementation.  QOF classes can
   be used to provide "object introspection", i.e. asking 
@@ -52,12 +52,18 @@
   The QOF Query subsystem depends on QOF classes having been
   declared; the Query uses the getters to get values associated
   with particular instances.
+  
+  A QofAccessFunc or QofSetterFunc do not need to be public 
+  functions, if you need to add functions to an object with an
+  established API, define the additional QOF routines as static.
+  Only the register routine needs to be public.
 @{ */
 
 /** @file qofclass.h
     @brief API for registering paramters on objects 
     @author Copyright (C) 2002 Derek Atkins <warlord at MIT.EDU>
     @author Copyright (C) 2003 Linas Vepstas <linas at linas.org>
+    @author Copyright (c) 2005 Neil Williams <linux at codehelp.co.uk>
 */
 
 #ifndef QOF_CLASS_H
@@ -65,8 +71,16 @@
 
 #include "qofid.h"
 
-/** Core types of objects that can be used in parameters.
- *  Note that QofIdTypes may also be used.  */
+#define QOF_MOD_CLASS "qof-class"
+
+/** \name Core types
+
+Core data types for objects that can be used in parameters.
+Note that QofIdTypes may also be used and will create a 
+single reference between two known objects.
+
+ @{
+ */
 
 #define QOF_TYPE_STRING    "string"
 #define QOF_TYPE_DATE      "date"
@@ -79,10 +93,38 @@
 #define QOF_TYPE_BOOLEAN   "boolean"
 #define QOF_TYPE_KVP       "kvp"
 #define QOF_TYPE_CHAR      "character"
+#define QOF_TYPE_COLLECT   "collection" /**< secondary collections
+are used for one-to-many references between entities and are
+implemented using ::QofCollection.
+These are \b NOT the same as the main collections in the QofBook.
+
+-# Each ::QofCollection contains one or many entities - *all* of a single type.
+-# The entity type within the collection can be determined at run time.
+-# Easy conversions to GList or whatever in the param_setfcn handler.
+-# Each parameter can have it's own collection.
+-# Each entity can have a different *type* of collection to it's siblings, 
+provided that it is acceptable to the set function.
+-# Each object decides which types are acceptable for which parameter in the 
+set functions. This is then part of the API for that object.
+
+QOF_TYPE_COLLECT has two functions, both related to one-to-many 
+links:
+- Represent a reference between 2 entities with a list of acceptable types.
+        (one object linked to many types of single entities)
+- Represent a reference between one entity and many entities of another type.
+        (one object linked to many entities of a single type.)
+
+If the set function can handle it, it could also be used for true one-to-many 
+links: one object linked to many entities of many types.
+
+n.b. Always subject to each collection holding only one type at runtime.
+(otherwise use books).
 
+*/
+/** @} */
 /** Type of Paramters (String, Date, Numeric, GUID, etc.) */
 typedef const char * QofType;
-/** Type of QofParam */
+
 typedef struct _QofParam QofParam;
 
 /** The QofAccessFunc defines an arbitrary function pointer
@@ -143,8 +185,8 @@
  *  controlling the object.   The getters are typically used by the
  *  query subsystem to query type specific data.   Note that there
  *  is no particular requirement for there to be a setter for every
- *  getter or even vice-versa, nor is there any requeirement for these
- *  to map 'cleanly' or orthogonaly to the underlying object.  The
+ *  getter or even vice-versa, nor is there any requirement for these
+ *  to map 'cleanly' or orthogonally to the underlying object.  The
  *  parameters are really just a set of value setting and getting 
  *  routines.
  *
@@ -212,7 +254,15 @@
 void qof_class_param_foreach (QofIdTypeConst obj_name,
                               QofParamForeachCB, gpointer user_data);
 
+/** \brief List of the parameters that could be references.
+
+Simple check to return a GList of all parameters
+of this object type that are not known QOF data types.
+Used for partial QofBook support, see ::QofEntityReference
+*/
+GList* qof_class_get_referenceList(QofIdTypeConst type);
+
 
 #endif /* QOF_CLASS_H */
-/* @} */
-/* @} */
+/** @} */
+/** @} */
Index: engine-helpers.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/engine-helpers.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lsrc/engine/engine-helpers.c -Lsrc/engine/engine-helpers.c -u -r1.41 -r1.42
--- src/engine/engine-helpers.c
+++ src/engine/engine-helpers.c
@@ -33,18 +33,17 @@
 #include "engine-helpers.h"
 #include "glib-helpers.h"
 #include "gnc-date.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
-#include "gnc-numeric.h"
-#include "gnc-trace.h"
 #include "guile-mappings.h"
-#include "qofbook.h"
-#include "qofquery.h"
+#include "qof.h"
+/** \todo Code dependent on the private query headers 
+qofquery-p.h and qofquerycore-p.h may need to be modified.
+These files are temporarily exported for QOF 0.6.0 but
+cannot be considered "standard" or public parts of QOF. */
 #include "qofquery-p.h"
-#include "qofquerycore.h"
 #include "qofquerycore-p.h"
 
-static short module = MOD_ENGINE;
+static QofLogModule log_module = GNC_MOD_ENGINE;
 
 Timespec
 gnc_transaction_get_date_posted(Transaction *t) 
@@ -134,11 +133,7 @@
 gnc_scm2guid(SCM guid_scm) 
 {
   GUID guid;
-  char * str;
-
-  /* char string[GUID_ENCODING_LENGTH + 1]; */
-  /* gh_get_substr(guid_scm, string, 0, GUID_ENCODING_LENGTH); */
-  /* string[GUID_ENCODING_LENGTH] = '\0'; */
+  const gchar * str;
 
   if (GUID_ENCODING_LENGTH != SCM_STRING_LENGTH (guid_scm))
   {
@@ -153,15 +148,11 @@
 gnc_guid_p(SCM guid_scm) 
 {
   GUID guid;
-  char * str;
+  const gchar * str;
 
   if (!SCM_STRINGP(guid_scm))
     return FALSE;
 
-  /* char string[GUID_ENCODING_LENGTH + 1]; */
-  /* gh_get_substr(guid_scm, string, 0, GUID_ENCODING_LENGTH); */
-  /* string[GUID_ENCODING_LENGTH] = '\0'; */
-
   if (GUID_ENCODING_LENGTH != SCM_STRING_LENGTH (guid_scm))
   {
     return FALSE;
@@ -329,8 +320,7 @@
 gnc_scm2acct_match_how (SCM how_scm)
 {
   QofGuidMatch res;
-  /* char *how = gh_symbol2newstr (how_scm, NULL); */
-  char *how = SCM_SYMBOL_CHARS (how_scm);
+  const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
   if (!safe_strcmp (how, "acct-match-all"))
     res = QOF_GUID_MATCH_ALL;
@@ -349,8 +339,7 @@
 gnc_scm2amt_match_how (SCM how_scm)
 {
   QofQueryCompare res;
-  /* char *how = gh_symbol2newstr (how_scm, NULL); */
-  char *how = SCM_SYMBOL_CHARS (how_scm);
+  const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
   if (!safe_strcmp (how, "amt-match-atleast"))
     res = QOF_COMPARE_GTE;
@@ -370,8 +359,7 @@
 gnc_scm2kvp_match_how (SCM how_scm)
 {
   QofQueryCompare res;
-  /* char *how = gh_symbol2newstr (how_scm, NULL); */
-  char *how = SCM_SYMBOL_CHARS (how_scm);
+  const gchar *how = SCM_SYMBOL_CHARS (how_scm);
 
   if (!safe_strcmp (how, "kvp-match-lt"))
     res = QOF_COMPARE_LT;
@@ -422,7 +410,7 @@
 static gboolean
 gnc_scm2balance_match_how (SCM how_scm, gboolean *resp)
 {
-  char *how;
+  const gchar *how;
 
   if (!SCM_LISTP (how_scm))
     return FALSE;
@@ -434,7 +422,6 @@
   if (!SCM_NULLP (SCM_CDR (how_scm)))
     return FALSE;
 
-  /* how = gh_symbol2newstr (SCM_CAR (how_scm), NULL); */
   how = SCM_SYMBOL_CHARS (SCM_CAR(how_scm));
 
   if (!safe_strcmp (how, "balance-match-balanced"))
@@ -449,12 +436,11 @@
 gnc_scm2kvp_match_where (SCM where_scm)
 {
   QofIdType res;
-  char *where;
+  const gchar *where;
 
   if (!SCM_LISTP (where_scm))
     return NULL;
 
-  /* where = gh_symbol2newstr (SCM_CAR (where_scm), NULL); */
   where = SCM_SYMBOL_CHARS (SCM_CAR(where_scm));
 
   if (!safe_strcmp (where, "kvp-match-split"))
@@ -576,14 +562,12 @@
   while (!SCM_NULLP (path_scm))
   {
     SCM key_scm = SCM_CAR (path_scm);
-    char *key, *tmp;
+    char *key;
 
     if (!SCM_STRINGP (key_scm))
       break;
 
-    /* tmp = gh_scm2newstr (key_scm, NULL); */
-    tmp = SCM_STRING_CHARS  (key_scm);
-    key = g_strdup (tmp);
+    key = g_strdup (SCM_STRING_CHARS (key_scm));
 
     path = g_slist_prepend (path, key);
 
@@ -754,8 +738,7 @@
       break;
 
     case KVP_TYPE_STRING: {
-      /* char *str = gh_scm2newstr (val_scm, NULL); */
-      char * str = SCM_STRING_CHARS  (val_scm);
+      const gchar * str = SCM_STRING_CHARS (val_scm);
       value = kvp_value_new_string (str);
       break;
     }
@@ -843,7 +826,7 @@
     KvpValue *value;
     SCM key_scm;
     SCM val_scm;
-    char *key;
+    const gchar *key;
 
     if (!SCM_CONSP (pair))
       continue;
@@ -854,8 +837,7 @@
     if (!SCM_STRINGP (key_scm))
       continue;
 
-    /* key = gh_scm2newstr (key_scm, NULL); */
-    key = SCM_STRING_CHARS  (key_scm);
+    key = SCM_STRING_CHARS (key_scm);
     if (!key)
       continue;
 
@@ -948,7 +930,7 @@
   QofQuery *q = NULL;
   QofQueryPredData *pd = NULL;
   SCM scm;
-  char *type = NULL;
+  const gchar *type = NULL;
   GSList *path = NULL;
   gboolean inverted = FALSE;
   QofQueryCompare compare_how;
@@ -976,7 +958,6 @@
     qt_scm = SCM_CDR (qt_scm);
     if (!SCM_SYMBOLP (scm))
       break;
-    /* type = gh_symbol2newstr (scm, NULL); */
     type = SCM_SYMBOL_CHARS (scm);
 
     /* QofCompareFunc */
@@ -992,7 +973,7 @@
     {
       QofStringMatch options;
       gboolean is_regex;
-      char *matchstring;
+      const gchar *matchstring;
 
       scm = SCM_CAR (qt_scm);
       qt_scm = SCM_CDR (qt_scm);
@@ -1008,8 +989,7 @@
       qt_scm = SCM_CDR (qt_scm);
       if (!SCM_STRINGP (scm)) break;
 
-      /* matchstring = gh_scm2newstr (scm, NULL); */
-      matchstring = SCM_STRING_CHARS  (scm);
+      matchstring = SCM_STRING_CHARS (scm);
 
       pd = qof_query_string_predicate (compare_how, matchstring,
                                     options, is_regex);
@@ -1106,7 +1086,7 @@
 
     } else if (!safe_strcmp (type, QOF_TYPE_CHAR)) {
       QofCharMatch options;
-      char *char_list;
+      const gchar *char_list;
 
       scm = SCM_CAR (qt_scm);
       qt_scm = SCM_CDR (qt_scm);
@@ -1118,8 +1098,7 @@
       qt_scm = SCM_CDR (qt_scm);
       if (!SCM_STRINGP (scm))
         break;
-      /* char_list = gh_scm2newstr (scm, NULL); */
-      char_list = SCM_STRING_CHARS  (scm);
+      char_list = SCM_STRING_CHARS (scm);
 
       pd = qof_query_char_predicate (options, char_list);
     } 
@@ -1172,8 +1151,8 @@
 gnc_scm2query_term_query_v1 (SCM query_term_scm)
 {
   gboolean ok = FALSE;
-  char * pd_type = NULL;
-  char * pr_type = NULL;
+  const gchar * pd_type = NULL;
+  const gchar * pr_type = NULL;
   gboolean sense = FALSE;
   QofQuery *q = NULL;
   SCM scm;
@@ -1188,7 +1167,6 @@
     /* pd_type */
     scm = SCM_CAR (query_term_scm);
     query_term_scm = SCM_CDR (query_term_scm);
-    /* pd_type = gh_symbol2newstr (scm, NULL); */
     pd_type = SCM_SYMBOL_CHARS (scm);
 
     /* pr_type */
@@ -1198,7 +1176,6 @@
     }
     scm = SCM_CAR (query_term_scm);
     query_term_scm = SCM_CDR (query_term_scm);
-    /* pr_type = gh_symbol2newstr (scm, NULL); */
     pr_type = SCM_SYMBOL_CHARS (scm);
 
     /* sense */
@@ -1340,7 +1317,7 @@
     } else if (!safe_strcmp (pd_type, "pd-string")) {
       gboolean case_sens;
       gboolean use_regexp;
-      char *matchstring;
+      const gchar *matchstring;
 
       /* case_sens */
       if (SCM_NULLP (query_term_scm))
@@ -1364,8 +1341,7 @@
 
       scm = SCM_CAR (query_term_scm);
       query_term_scm = SCM_CDR (query_term_scm);
-      /* matchstring = gh_scm2newstr (scm, NULL); */
-      matchstring = SCM_STRING_CHARS  (scm);
+      matchstring = SCM_STRING_CHARS (scm);
 
       if (!safe_strcmp (pr_type, "pr-action")) {
         xaccQueryAddActionMatch (q, matchstring, case_sens, use_regexp,
@@ -1423,7 +1399,6 @@
     } else if (!safe_strcmp (pd_type, "pd-guid")) {
       GUID guid;
       QofIdType id_type;
-      char *tmp;
 
       /* guid */
       if (SCM_NULLP (query_term_scm))
@@ -1436,9 +1411,7 @@
       /* id type */
       scm = SCM_CAR (query_term_scm);
       query_term_scm = SCM_CDR (query_term_scm);
-      /* tmp = gh_scm2newstr (scm, NULL); */
-      tmp = SCM_STRING_CHARS  (scm);
-      id_type = g_strdup (tmp);
+      id_type = g_strdup (SCM_STRING_CHARS (scm));
 
       xaccQueryAddGUIDMatch (q, &guid, id_type, QOF_QUERY_OR);
       ok = TRUE;
@@ -1755,7 +1728,7 @@
 }
 
 static GSList *
-gnc_query_sort_to_list (char * symbol)
+gnc_query_sort_to_list (const gchar * symbol)
 {
   GSList *path = NULL;
 
@@ -1823,9 +1796,9 @@
 {
   Query *q = NULL;
   gboolean ok = TRUE;
-  char * primary_sort = NULL;
-  char * secondary_sort = NULL;
-  char * tertiary_sort = NULL;
+  const gchar * primary_sort = NULL;
+  const gchar * secondary_sort = NULL;
+  const gchar * tertiary_sort = NULL;
   gboolean primary_increasing = TRUE;
   gboolean secondary_increasing = TRUE;
   gboolean tertiary_increasing = TRUE;
@@ -1833,7 +1806,7 @@
 
   while (!SCM_NULLP (query_scm))
   {
-    char *symbol;
+    const gchar *symbol;
     SCM sym_scm;
     SCM value;
     SCM pair;
@@ -1856,7 +1829,6 @@
       break;
     }
 
-    /* symbol = gh_symbol2newstr (sym_scm, NULL); */
     symbol = SCM_SYMBOL_CHARS (sym_scm);
     if (!symbol) {
       PERR ("No string found");
@@ -1882,7 +1854,6 @@
         break;
       }
 
-      /* primary_sort = gh_symbol2newstr (value, NULL); */
       primary_sort = SCM_SYMBOL_CHARS (value);
 
     } else if (safe_strcmp ("secondary-sort", symbol) == 0) {
@@ -1892,7 +1863,6 @@
         break;
       }
 
-      /* secondary_sort = gh_symbol2newstr (value, NULL); */
       secondary_sort = SCM_SYMBOL_CHARS (value);
 
     } else if (safe_strcmp ("tertiary-sort", symbol) == 0) {
@@ -1902,7 +1872,6 @@
         break;
       }
 
-      /* tertiary_sort = gh_symbol2newstr (value, NULL); */
       tertiary_sort = SCM_SYMBOL_CHARS (value);
 
     } else if (safe_strcmp ("primary-increasing", symbol) == 0) {
@@ -1953,7 +1922,7 @@
 {
   Query *q = NULL;
   gboolean ok = TRUE;
-  char * search_for = NULL;
+  const gchar * search_for = NULL;
   GSList *sp1 = NULL, *sp2 = NULL, *sp3 = NULL;
   gint so1 = 0, so2 = 0, so3 = 0;
   gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE;
@@ -1963,7 +1932,7 @@
 
   while (!SCM_NULLP (query_scm))
   {
-    char *symbol;
+    const gchar *symbol;
     SCM sym_scm;
     SCM value;
     SCM pair;
@@ -1984,7 +1953,6 @@
       break;
     }
 
-    /* symbol = gh_symbol2newstr (sym_scm, NULL); */
     symbol = SCM_SYMBOL_CHARS (sym_scm);
     if (!symbol) {
       ok = FALSE;
@@ -2006,7 +1974,6 @@
         ok = FALSE;
         break;
       }
-      /* search_for = gh_symbol2newstr (value, NULL); */
       search_for = SCM_SYMBOL_CHARS (value);
 
     } else if (safe_strcmp ("primary-sort", symbol) == 0) {
@@ -2061,7 +2028,7 @@
 gnc_scm2query (SCM query_scm)
 {
   SCM q_type;
-  char *type;
+  const gchar *type;
   Query *q = NULL;
 
   /* Not a list or NULL?  No need to go further */
@@ -2081,7 +2048,6 @@
   }
 
   /* Ok, the LHS is the version and the RHS is the actual query list */
-  /* type = gh_symbol2newstr (q_type, NULL); */
   type = SCM_SYMBOL_CHARS (q_type);
   if (!type)
     return NULL;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/Makefile.am,v
retrieving revision 1.125
retrieving revision 1.126
diff -Lsrc/engine/Makefile.am -Lsrc/engine/Makefile.am -u -r1.125 -r1.126
--- src/engine/Makefile.am
+++ src/engine/Makefile.am
@@ -1,7 +1,3 @@
-#INCLUDES = /usr/include/glib-1.2 /usr/lib/glib/include
-
-qof_book_merge_lo_INCLUDES = -DG_LOG_DOMAIN=\"qof-book-merge\"
-
 SUBDIRS = . test-core test 
 PWD := $(shell pwd)
 
@@ -9,13 +5,113 @@
 
 AM_CFLAGS = \
 	-I${top_srcdir}/lib/libc \
+	-I${top_srcdir}/src/core-utils \
 	-I${top_srcdir}/src \
 	-I${top_srcdir}/src/gnc-module \
+	-I${top_srcdir}/src/business/business-core/ \
+	${QOF_CFLAGS} \
 	${GNUCASH_ENGINE_CFLAGS}
 
+qof_library = \
+   gnc-date.c        \
+   gnc-engine-util.c \
+   gnc-numeric.c     \
+   gnc-event.c       \
+   gnc-trace.c       \
+   guid.c            \
+   kvp_frame.c       \
+   kvp-util.c        \
+   md5.c             \
+   qofbackend.c      \
+   qofclass.c        \
+   qofchoice.c       \
+   qofid.c           \
+   qofinstance.c     \
+   qofquery.c        \
+   qofbook.c         \
+   qofobject.c       \
+   qofquerycore.c    \
+   qofsession.c      \
+   qof_book_merge.c
+
+qof_headers =  \
+   gnc-date.h        \
+   gnc-engine-util.h \
+   gnc-numeric.h     \
+   gnc-event.h       \
+   gnc-trace.h       \
+   guid.h            \
+   kvp_frame.h       \
+   kvp-util.h        \
+   kvp-util-p.h      \
+   qof.h             \
+   qof-be-utils.h    \
+   qofbackend.h      \
+   qofbackend-p.h    \
+   qofclass.h        \
+   qofchoice.h       \
+   qofid.h           \
+   qofid-p.h         \
+   qofinstance-p.h   \
+   qofinstance.h     \
+   qofquery.h        \
+   qofbook.h         \
+   qofobject.h       \
+   qofquerycore.h    \
+   qofsession.h      \
+   qof_book_merge.h
+
+qof_noinst_headers = \
+   gnc-event-p.h \
+   md5.h  \
+   qofclass-p.h  \
+   qofmath128.h  \
+   qofquery-p.h  \
+   qofbook-p.h  \
+   qofobject-p.h  \
+   qofquerycore-p.h \
+   qofsession-p.h \
+   qofsql.h
+				 
+if USE_LIBQOF
+
+lib_LTLIBRARIES = libqof.la
+
+libqof_la_LDFLAGS= -version-info $(LIBQOF_LIBRARY_VERSION) 
+
+libqof_la_SOURCES =  ${qof_library}
+
+qofincludedir = ${pkgincludedir}
+
+qofinclude_HEADERS = ${qof_headers} \
+   qofla-dir.h
+
+QOFLIBdir = $(libdir)
+
+qofla-dir.h: qofla-dir.h.in
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+                -e 's:@-libdir-@:${QOFLIBdir}:g'
+	mv $@.tmp $@
+
+qof_builds = qofla-dir.h
+
+else
+
+libqof_la_SOURCES =
+
+qofincludedir = ${pkgincludedir}
+
+qofinclude_HEADERS = 
+
+qof_builds =
+
+endif
+
 libgncmod_engine_la_SOURCES = \
   Account.c \
   FreqSpec.c \
+  Recurrence.c \
   Group.c \
   Period.c \
   Query.c \
@@ -28,35 +124,19 @@
   TransLog.c \
   Transaction.c \
   cap-gains.c \
+  cashobjects.c \
   gnc-associate-account.c \
+  gnc-budget.c \
   gnc-commodity.c \
-  gnc-date.c \
-  gnc-engine-util.c \
   gnc-engine.c \
-  gnc-event.c \
   gnc-filepath-utils.c \
+  gnc-hooks.c \
   gnc-lot.c \
-  gnc-numeric.c \
   gnc-pricedb.c \
   gnc-session-scm.c \
-  gnc-trace.c \
   gncmod-engine.c \
-  guid.c \
-  kvp_frame.c \
-  kvp-util.c \
-  md5.c \
   messages.c \
-  policy.c \
-  qofbackend.c \
-  qof_book_merge.c \
-  qofbook.c \
-  qofclass.c \
-  qofid.c \
-  qofinstance.c \
-  qofobject.c \
-  qofquery.c \
-  qofquerycore.c \
-  qofsession.c 
+  policy.c
 
 EXTRA_libgncmod_engine_la_SOURCES = iso-4217-currencies.c
 
@@ -64,6 +144,7 @@
 gncinclude_HEADERS = \
   Account.h \
   FreqSpec.h \
+  Recurrence.h \
   GNCId.h \
   Group.h \
   Period.h \
@@ -80,42 +161,23 @@
   TransLog.h \
   Transaction.h \
   cap-gains.h \
+  cashobjects.h \
   engine-helpers.h \
   glib-helpers.h \
   gnc-associate-account.h \
   gnc-book.h \
+  gnc-budget.h \
   gnc-commodity.h \
-  gnc-date.h \
-  gnc-engine-util.h \
   gnc-engine.h \
-  gnc-event.h \
   gnc-filepath-utils.h \
-  gnc-numeric.h \
+  gnc-hooks.h \
   gnc-pricedb.h \
   gnc-session.h \
   gnc-session-scm.h \
-  gnc-trace.h \
-  guid.h \
   gncObject.h \
-  kvp_frame.h \
   kvp-scm.h \
-  kvp-util.h \
   messages.h \
-  policy.h \
-  qof.h \
-  qofbackend.h \
-  qof-be-utils.h \
-  qofbook.h \
-  qof_book_merge.h \
-  qofclass.h \
-  qofid.h \
-  qofinstance.h \
-  qofmath128.c \
-  qofmath128.h \
-  qofobject.h \
-  qofquery.h \
-  qofquerycore.h \
-  qofsession.h
+  policy.h
 
 noinst_HEADERS = \
   AccountP.h \
@@ -127,39 +189,31 @@
   SX-book.h \
   SX-ttinfo.h \
   TransactionP.h \
-  gnc-event-p.h \
+  gnc-hooks-scm.h \
   gnc-lot.h \
   gnc-lot-p.h \
   gnc-pricedb-p.h \
-  kvp-util-p.h \
-  md5.h \
   gw-engine.h \
   gw-kvp.h \
   policy-p.h \
-  qofbackend-p.h \
-  qofbook-p.h \
-  qofclass-p.h \
-  qofid-p.h \
-  qofinstance-p.h \
-  qofobject-p.h \
-  qofquery-p.h \
-  qofquerycore-p.h \
-  qofsession-p.h
+  ${qof_noinst_headers}
 
 noinst_SCRIPTS = iso-currencies-to-c
 
-libgncmod_engine_la_LDFLAGS = -module
-libgncmod_engine_la_LIBADD = ${GNUCASH_ENGINE_BASE_LIBS} ${INTLLIBS} \
+libgncmod_engine_la_LIBADD = ${GNUCASH_ENGINE_BASE_LIBS} \
+ ${QOF_LIBS} \
  libgw-engine.la \
  libgw-kvp.la \
  ../gnc-module/libgncmodule.la \
  ../../lib/libc/libc-missing.la
 
 libgw_kvp_la_SOURCES = gw-kvp.c kvp-scm.c
-libgw_kvp_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
+libgw_kvp_la_LDFLAGS = ${G_WRAP_LINK_ARGS} ${QOF_LIBS}
 
 libgw_engine_la_SOURCES = gw-engine.c engine-helpers.c glib-helpers.c
-libgw_engine_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
+libgw_engine_la_LDFLAGS = \
+  ${G_WRAP_LINK_ARGS} \
+  ${QOF_LIBS}
 
 gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
 gncmod_DATA = engine.scm 
@@ -185,7 +239,12 @@
   extensions.txt \
   iso-4217-currencies.scm \
   iso-currencies-to-c \
+  qofla-dir.h.in \
+  gncla-dir.h.in \
   kvp_doc.txt \
+  SX-book-p.h \
+  ${qof_library} \
+  ${qof_headers} \
   ${gncmod_DATA} \
   ${gncscm_DATA} \
   ${gwmod_DATA}
@@ -201,7 +260,6 @@
 	rm -f gnucash g-wrapped
 	ln -sf . gnucash 
 	ln -sf . g-wrapped 
-	ln -sf ${srcdir} qof
 if GNUCASH_SEPARATE_BUILDDIR
 	for X in ${SCM_FILE_LINKS} ; do \
 	  ln -sf ${srcdir}/$$X . ; \
@@ -230,9 +288,16 @@
 	 (gw:generate-wrapset \"gw-kvp\")"
 
 BUILT_SOURCES = \
+  ${qof_builds} \
   iso-4217-currencies.c \
   gw-engine.scm gw-engine.c gw-engine.h \
-  gw-kvp.scm gw-kvp.c gw-kvp.h 
+  gw-kvp.scm gw-kvp.c gw-kvp.h gncla-dir.h
+
+DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
+                 gw-engine.html gw-kvp.html qofla-dir.h gncla-dir.h
 
-DISTCLEANFILES = gnucash g-wrapped qof .scm-links ${SCM_FILE_LINKS} \
-                 gw-engine.html gw-kvp.html
+gncla-dir.h: gncla-dir.h.in
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+                -e 's:@-libdir-@:${libdir}:g'
+	mv $@.tmp $@
Index: test-lots.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-lots.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/engine/test/test-lots.c -Lsrc/engine/test/test-lots.c -u -r1.9 -r1.10
--- src/engine/test/test-lots.c
+++ src/engine/test/test-lots.c
@@ -1,24 +1,42 @@
-
+/***************************************************************************
+ *            test-lots.c
+ *
+ *  Copyright (C) 2003 Linas Vepstas <linas at linas.org>
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 /** 
  * @file test-lots.c
  * @brief Minimal test to see if automatic lot scrubbing works.
- * @author Copyright (C) 2003 Linas Vepstas <linas at linas.org>
- * License: GPL
+ * @author Linas Vepstas <linas at linas.org>
  */
 
 #include <ctype.h>
 #include <glib.h>
-
+#include "qof.h"
 #include "Account.h"
 #include "Group.h"
 #include "Scrub3.h"
-#include "gnc-engine-util.h"
-#include "gnc-module.h"
+#include "cashobjects.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "Transaction.h"
 
-
+static gint transaction_num = 720;
+static gint	max_iterate = 30;
 
 static void
 run_test (void)
@@ -34,7 +52,7 @@
   book = qof_session_get_book (sess);
   do_test ((NULL != book), "create random data");
 
-  add_random_transactions_to_book (book, 720);
+  add_random_transactions_to_book (book, transaction_num);
 
   grp = xaccGetAccountGroup (book);
   xaccGroupScrubLots (grp);
@@ -46,39 +64,35 @@
    * XXX not implemented 
    */
   success ("automatic lot scrubbing lightly tested and seem to work");
-  qof_session_destroy (sess);
+  qof_session_end (sess);
 
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  int i;
+	gint i;
 
+	qof_init();
+	if(cashobjects_register()) {
   /* Any tests that cause an error or warning to be printed
    * automatically fail! */
   g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
-
-  //set_success_print (TRUE);
-
-  do_test((NULL!=gnc_module_load("gnucash/engine", 0)), "load engine");
-
   /* Set up a reproducible test-case */
   srand(0);
-
   /* Iterate the test a number of times */
-  for (i=0; i< 100; i++)
+		for (i=0; i< max_iterate; i++)
   {
+			fprintf(stdout, " Lots: %d of %d paired tests . . . \r",
+				(i + 1)*2, max_iterate * 2);
+			fflush(stdout);
     run_test ();
   }
-
+		/* 'erase' the recurring tag line with dummy spaces. */
+		fprintf(stdout, "Lots: Test series complete.         \n");
+		fflush(stdout);
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile(argc, argv, main_helper, NULL);
+	}
+	qof_close();
   return 0;
 }
Index: test-scm-query.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-scm-query.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/test/test-scm-query.c -Lsrc/engine/test/test-scm-query.c -u -r1.6 -r1.7
--- src/engine/test/test-scm-query.c
+++ src/engine/test/test-scm-query.c
@@ -23,9 +23,11 @@
   if (!xaccQueryEqual (q, q2))
   {
     failure ("queries don't match");
-    gh_display (scm_q); gh_newline ();
+    scm_display (scm_q, SCM_UNDEFINED);
+    scm_newline (SCM_UNDEFINED);
     scm_q = gnc_query2scm (q2);
-    gh_display (scm_q); gh_newline ();
+    scm_display (scm_q, SCM_UNDEFINED);
+    scm_newline (SCM_UNDEFINED);
     exit (1);
   }
   else
Index: test-resolve-file-path.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-resolve-file-path.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/test/test-resolve-file-path.c -Lsrc/engine/test/test-resolve-file-path.c -u -r1.5 -r1.6
--- src/engine/test/test-resolve-file-path.c
+++ src/engine/test/test-resolve-file-path.c
@@ -1,12 +1,32 @@
+/***************************************************************************
+ *            test-resolve-file-path.c
+ *
+ *  Thu Sep 29 22:48:57 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
 #include <stdlib.h>
 #include <string.h>
 
 #include <glib.h>
-
+#include "qof.h"
 #include "test-stuff.h"
-#include "gnc-engine-util.h"
 #include "gnc-filepath-utils.h"
-#include "qofsession.h"
 
 struct test_strings_struct
 {
@@ -72,4 +92,3 @@
     print_test_results();
     return get_rv();
 }
-
Index: test-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-numeric.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/engine/test/test-numeric.c -Lsrc/engine/test/test-numeric.c -u -r1.21 -r1.22
--- src/engine/test/test-numeric.c
+++ src/engine/test/test-numeric.c
@@ -4,13 +4,27 @@
  * of vairous operations.
  *
  * June 2004
- * License: GPL
  */
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 
 #include <ctype.h>
 #include <glib.h>
-
-#include "gnc-module.h"
+#include "cashobjects.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "gnc-numeric.h"
@@ -23,15 +37,15 @@
   char * retval;
   if(gnc_numeric_check(in)) 
   {
-    retval = g_strdup_printf("<ERROR> [%lld / %lld]",
-                             (long long int) in.num,
-                             (long long int) in.denom); 
+    retval = g_strdup_printf("<ERROR> [%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "]",
+                             in.num,
+                             in.denom); 
   }
   else 
   {
-    retval = g_strdup_printf("[%lld / %lld]",
-                             (long long int) in.num,
-                             (long long int) in.denom); 
+    retval = g_strdup_printf("[%" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "]",
+                             in.num,
+                             in.denom); 
   }
   return retval;
 }
@@ -744,22 +758,15 @@
 	check_mult_div ();
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
-  do_test((NULL!=gnc_module_load("gnucash/engine", 0)), "couldn't load engine");
-
-  run_test ();
-
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile(argc, argv, main_helper, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+		run_test ();
+		print_test_results();
+	}
+	qof_close();
   return 0;
 }
 
Index: test-commodities.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-commodities.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/test/test-commodities.c -Lsrc/engine/test/test-commodities.c -u -r1.11 -r1.12
--- src/engine/test/test-commodities.c
+++ src/engine/test/test-commodities.c
@@ -1,25 +1,47 @@
-#include <glib.h>
-#include <libguile.h>
+/***************************************************************************
+ *            test-commodities.c
+ *
+ *  Mon Aug 22 09:08:32 2005
+ *  Original authors: Derek Atkins, Linas Vepstas.
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
-#include "gnc-engine-util.h"
+#include <glib.h>
 
 #include "gnc-commodity.h"
-#include "gnc-engine.h"
-#include "gnc-module.h"
-#include "qofbook.h"
+#include "qof.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
 
-
 static void
 test_commodity(void)
 {
     gnc_commodity *com;
 
     {
-        com = gnc_commodity_new(NULL, NULL, NULL, NULL, 0);
+        QofBook *book;
+
+        book = qof_book_new ();
+        com = gnc_commodity_new(book, NULL, NULL, NULL, NULL, 0);
 
         gnc_commodity_destroy(com);
+	qof_book_destroy (book);
 
         success("commodity new and destroy");
     }
@@ -31,14 +53,16 @@
         char *exchange_code;
         int fraction;
         gnc_commodity *com2;
-        
+        QofBook *book;
+
+        book = qof_book_new ();
         fullname = get_random_string();
         namespace = get_random_commodity_namespace();
         mnemonic = get_random_string();
         exchange_code = get_random_string();
         fraction = get_random_int_in_range(0, 10000);
 
-        com = gnc_commodity_new(fullname, namespace, mnemonic,
+        com = gnc_commodity_new(book, fullname, namespace, mnemonic,
                                 exchange_code, fraction);
 
         do_test(
@@ -94,11 +118,12 @@
             gnc_commodity_get_fraction(com) == fraction,
             "reset fraction code equal test");
 
-        com2 = gnc_commodity_new(fullname, namespace, mnemonic,
+        com2 = gnc_commodity_new(book, fullname, namespace, mnemonic,
                                  exchange_code, fraction);
         do_test(
             gnc_commodity_equiv(com, com2), "commodity equiv");
 
+	qof_book_destroy (book);
     }
     
     {
@@ -151,18 +176,18 @@
     
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/engine", 0);
-  test_commodity();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
-  return 0;
+    guid_init ();
+    qof_object_initialize ();
+    qof_query_init ();
+    qof_book_register ();
+    gnc_commodity_table_register();
+    test_commodity();
+    print_test_results();
+    qof_query_shutdown();
+    guid_shutdown();
+    qof_object_shutdown ();
+    return 0;
 }
Index: test-split-vs-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-split-vs-account.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/engine/test/test-split-vs-account.c -Lsrc/engine/test/test-split-vs-account.c -u -r1.12 -r1.13
--- src/engine/test/test-split-vs-account.c
+++ src/engine/test/test-split-vs-account.c
@@ -1,17 +1,35 @@
+/***************************************************************************
+ *            test-split-vs-account.c
+ *
+ *  Tue Sep 27 19:44:50 2005
+ *  Copyright  2005  GnuCash team
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #include <glib.h>
-#include <libguile.h>
-
+#include "qof.h"
+#include "cashobjects.h"
 #include "AccountP.h"
 #include "TransLog.h"
 #include "gnc-engine.h"
-#include "gnc-module.h"
-#include "qofsession.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
 #include "Transaction.h"
-#include "guid.h"
-
 
 static void
 run_test (void)
@@ -31,27 +49,30 @@
         failure("act1 not created");
         return;
     }
-    
+    success("act1 created");
     act2 = get_random_account(book);
     if(!act2)
     {
         failure("act2 not created");
         return;
     }
-
-    spl = get_random_split(book, act1);
+	success("act2 created");
+	/* if we use a trans here, the scrub routines
+	 will add a pointer to a newly created Orphan-...
+	account. */
+    spl = get_random_split(book, act1, NULL);
     if(!spl)
     {
         failure("spl not created");
         return;
     }
-
+	success("random split created");
     if(act1 != xaccSplitGetAccount(spl))
     {
         failure("xaccAccountInsertSplit is broken");
         return;
     }
-
+	success("xaccAccountInsertSplit works");
     /* this is weird -- we are testing an engine private function.
      * is this really what is intended here ??? */
     xaccAccountRemoveSplit (act1, spl);
@@ -62,26 +83,18 @@
 		     __FILE__, __LINE__, "account not NULL");
         return;
     }
+	success("xaccSplitGetAccount works");
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  gnc_module_load("gnucash/engine", 0);
-
+	qof_init();
+	if(cashobjects_register()) {
   xaccLogDisable ();
-
   run_test ();
-
-  success("split account crap seems to work");
-
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	}
+	qof_close();
   return 0;
 }
Index: test-load-engine.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-load-engine.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/test/test-load-engine.c -Lsrc/engine/test/test-load-engine.c -u -r1.2 -r1.3
--- src/engine/test/test-load-engine.c
+++ src/engine/test/test-load-engine.c
@@ -1,36 +1,45 @@
+/***************************************************************************
+ *            test-load-engine.c
+ *
+ *  Tue Sep 27 19:35:28 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <stdio.h>
 #include <stdlib.h>
-#include <libguile.h>
-
-#include "gnc-module.h"
+#include "qof.h"
+#include "cashobjects.h"
+#include "test-stuff.h"
 
 static void
-guile_main (void *closure, int argc, char ** argv)
+run_test(void)
 {
-  GNCModule engine;
-
-  printf("  test-load-engine.c: loading/unloading engine module ... ");
-
-  gnc_module_system_init();
-  engine = gnc_module_load("gnucash/engine", 0);
-  
-  if(!engine) {
-    printf("  Failed to load engine\n");
-    exit(-1);
-  }
-  
-  if(!gnc_module_unload(engine)) {
-    printf("  Failed to unload engine\n");
-    exit(-1);
-  }
-  printf(" successful.\n");
-
-  exit(0);
+	do_test(TRUE, "test engine loaded OK");
 }
 
 int
 main (int argc, char ** argv)
 {
-  scm_boot_guile(argc, argv, guile_main, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+		run_test ();
+		print_test_results();
+	}
+	qof_close();
   return 0;
 }
Index: test-query.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-query.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/engine/test/test-query.c -Lsrc/engine/test/test-query.c -u -r1.11 -r1.12
--- src/engine/test/test-query.c
+++ src/engine/test/test-query.c
@@ -1,13 +1,32 @@
+/***************************************************************************
+ *            test-query.c
+ *
+ *  Tue Sep 27 19:12:41 2005
+ *  Copyright  2005 GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #include <glib.h>
-#include <libguile.h>
-
+#include "qof.h"
+#include "cashobjects.h"
 #include "Group.h"
 #include "Transaction.h"
 #include "TransLog.h"
 #include "gnc-engine.h"
-#include "gnc-module.h"
-#include "gnc-session.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
 
@@ -60,36 +79,29 @@
 
   xaccGroupForEachTransaction (group, test_trans_query, book);
 
-  qof_session_destroy (session);
+  qof_session_end (session);
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
   int i;
 
-  gnc_module_load("gnucash/engine", 0);
-
+	qof_init();
   g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
 
   xaccLogDisable ();
 
   /* Always start from the same random seed so we fail consistently */
   srand(0);
-
+	if(cashobjects_register()) {
   /* Loop the test. */
   for (i=0; i < 10; i++)
+		{
     run_test ();
-
+		}
+	}
   success("queries seem to work");
-
-  print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	qof_close();
   return 0;
 }
Index: test-guid.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-guid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/engine/test/test-guid.c -Lsrc/engine/test/test-guid.c -u -r1.2 -r1.3
--- src/engine/test/test-guid.c
+++ src/engine/test/test-guid.c
@@ -1,23 +1,49 @@
+/***************************************************************************
+ *            test-guid.c
+ *
+ *  October 2003
+ *  Copyright  2003 Linas Vepstas <linas at linas.org
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 /* Test file created by Linas Vepstas <linas at linas.org>
  * Try to create duplicate GUID's, which should never happen.
  *
- * October 2003
- * License: GPL
  */
 
 #include <ctype.h>
 #include <glib.h>
-
-#include "gnc-module.h"
+#include "cashobjects.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
-#include "qofbook.h"
-#include "qofid.h"
-#include "qofid-p.h"
-#include "qofsession.h"
+#include "qof.h"
 
+static void test_null_guid(void)
+{
+  GUID g;
+  GUID *gp;
 
+  g = guid_new_return();
+  gp = guid_malloc();
+  guid_new(gp);
+
+  do_test(guid_equal(guid_null(), guid_null()), "null guids equal");
+  do_test(!guid_equal(&g, gp), "two guids equal");
+}
 
 static void
 run_test (void)
@@ -47,23 +73,20 @@
 	 ent->e_type = type;
 	 qof_collection_insert_entity (col, ent);
   }
-}
-
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
-  do_test((NULL!=gnc_module_load("gnucash/engine", 0)), "couldn't load engine");
-
-  run_test ();
 
-  print_test_results();
-  exit(get_rv());
+  /* Make valgrind happy -- destroy the session. */
+  qof_session_destroy(sess);
 }
 
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile(argc, argv, main_helper, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+		test_null_guid();
+		run_test ();
+		print_test_results();
+	}
+	qof_close();
   return 0;
 }
Index: test-querynew.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-querynew.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/test/test-querynew.c -Lsrc/engine/test/test-querynew.c -u -r1.10 -r1.11
--- src/engine/test/test-querynew.c
+++ src/engine/test/test-querynew.c
@@ -1,17 +1,32 @@
+/***************************************************************************
+ *            test-querynew.c
+ *
+ *  Tue Sep 27 19:18:57 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <glib.h>
-#include <libguile.h>
 #include <stdio.h>
-
+#include "qof.h"
 #include "guid.h"
-#include "gnc-module.h"
 #include "gnc-engine-util.h"
 #include "messages.h"
-
-#include "qofclass-p.h"
-#include "qofquery.h"
-#include "qofquerycore.h"
-#include "qofquerycore-p.h"
-
+#include "cashobjects.h"
 #include "test-stuff.h"
 
 #define TEST_MODULE_NAME	"TestModuleName"
@@ -60,10 +75,10 @@
 						     TEST_PARAM),
 			TEST_CORE) == 0, "qof_class_get_parameter_type");
 
-  do_test (qof_class_get_default_sort (TEST_MODULE_NAME) == test_sort,
+/*  do_test (qof_class_get_default_sort (TEST_MODULE_NAME) == test_sort,
 	   "qof_class_get_default_sort");
   do_test (qof_class_get_default_sort (NULL) == NULL,
-	   "qof_class_get_default_sort (NULL)");
+	   "qof_class_get_default_sort (NULL)");*/
 }
 
 static void test_query_core (void)
@@ -75,20 +90,16 @@
 {
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  gnc_module_load("gnucash/engine", 0);
+	qof_init();
+	if(cashobjects_register()) {
   test_query_core();
   test_class();
   test_querynew();
+	}
+	qof_close();
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
   return 0;
 }
Index: test-freq-spec.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-freq-spec.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/engine/test/test-freq-spec.c -Lsrc/engine/test/test-freq-spec.c -u -r1.10 -r1.11
--- src/engine/test/test-freq-spec.c
+++ src/engine/test/test-freq-spec.c
@@ -1,20 +1,31 @@
-
 /*
  * Testing routine added by Ben Stanley bds02 at uow.edu.au 20010320
  * Try to test Joshua Sled's FreqSpec module.
  *
  */
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #include "config.h"
-
 #include <stdlib.h>
 #include <glib.h>
-#include <libguile.h>
-
+#include "cashobjects.h"
 #include "test-stuff.h"
 #include "FreqSpec.h"
 #include "gnc-engine.h"
-#include "gnc-module.h"
 #include "qofbook.h"
 
 static QofBook *book;
@@ -41,7 +52,8 @@
             "once off" );
       }
    }
-
+   fprintf (stdout, " FreqSpec: Single test OK, continuing . . . \r");
+   fflush(stdout);
    xaccFreqSpecFree(fs);
 }
 
@@ -77,7 +89,7 @@
    g_date_set_dmy( &date1, 25, 3, 2001 );
    for( interval = 1; interval < 20; ++interval ) {
       xaccFreqSpecSetDaily( fs, &date1, interval );
-      for( j = 0; j < 20; ++j ) {
+      for( j = 0; j < 20; ++j ) { /* j=0 passes by luck, but it's not valid */
          date2 = date1;
          for( i = 0; i < j; ++i ) {
             xaccFreqSpecGetNextInstance( fs, &date2, &next_date );
@@ -89,7 +101,8 @@
             interval, j );
       }
    }
-
+   fprintf(stdout, " FreqSpec: Daily test OK, continuing . . . \r");
+   fflush(stdout);
    xaccFreqSpecFree(fs);
 }
 
@@ -149,7 +162,8 @@
             interval, j );
       }
    }
-
+   fprintf(stdout, " FreqSpec: Weekly test OK, continuing . . . \r");
+   fflush(stdout);
    xaccFreqSpecFree(fs);
 }
 
@@ -222,7 +236,8 @@
          }
       }
    }
-
+   fprintf(stdout, " FreqSpec: Monthly test OK, continuing . . . \r");
+   fflush(stdout);
    xaccFreqSpecFree(fs);
 }
 
@@ -258,11 +273,11 @@
                g_date_set_julian( &date2, start_julian + i );
                xaccFreqSpecGetNextInstance( fs, &date2, &next_date );
                do_test_args(
-                  g_date_weekday( &next_date ) == g_date_weekday( &date1 ),
+                  g_date_get_weekday( &next_date ) == g_date_get_weekday( &date1 ),
                   "month relative repeats - check weekday",
                   __FILE__, __LINE__,
                   "monthday = %d, month = %d, interval = %d months, days from start = %d, weekday = %d",
-                  monthday, month, interval, i, g_date_weekday( &date1 ) );
+                  monthday, month, interval, i, g_date_get_weekday( &date1 ) );
                do_test_args(
                   (g_date_day( &next_date )-1)/7 == (g_date_day( &date1 )-1)/7,
                   "month relative repeats - check occurrence",
@@ -301,15 +316,15 @@
          do_test_args( g_date_month( &date2 ) == g_date_month( &next_date ),
             "month_relative repeats end up in the right place - month",
             __FILE__, __LINE__, "interval = %d months, iters = %d, weekday = %d",
-            interval, j, g_date_weekday( &date1 ) );
-         do_test_args( g_date_weekday( &date1 ) == g_date_weekday( &next_date ),
+            interval, j, g_date_get_weekday( &date1 ) );
+         do_test_args( g_date_get_weekday( &date1 ) == g_date_get_weekday( &next_date ),
             "month_relative repeats end up in the right place - weekday",
             __FILE__, __LINE__, "interval = %d months, iters = %d, weekday = %d",
-            interval, j, g_date_weekday( &date1 ) );
+            interval, j, g_date_get_weekday( &date1 ) );
          do_test_args( (g_date_day( &date2 )-1)/7 == (g_date_day( &next_date )-1)/7,
             "month_relative repeats end up in the right place - occurrence",
             __FILE__, __LINE__, "interval = %d months, iters = %d, weekday = %d",
-            interval, j, g_date_weekday( &date1 ) );
+            interval, j, g_date_get_weekday( &date1 ) );
       }
    }
    
@@ -337,7 +352,28 @@
    g_date_set_dmy( &date1, 31, 3, 2002 );
    do_test( g_date_compare( &next_date, &date1 ) == 0, "find five-sunday months" );
    date2 = next_date;
-   
+   fprintf(stdout, " FreqSpec: Relative months test OK, continuing . . . \r");
+   fflush(stdout);   
+   xaccFreqSpecFree(fs);
+}
+
+static void test_caseA()
+{
+   FreqSpec *fs;
+   GDate date0, date1, date2, date3;
+
+   fs = xaccFreqSpecMalloc(book);
+
+   g_date_set_dmy(&date0, 31, 12, 1); /* end of year */
+
+   xaccFreqSpecSetMonthly(fs, &date0, 3);  /* quarterly */
+
+   g_date_set_dmy(&date1, 13, 2, 1);  /* Feb 13th */
+   xaccFreqSpecGetNextInstance( fs, &date1, &date2 );
+
+   g_date_set_dmy( &date3, 31, 3, 1 ); /* Should get March 31st */
+   do_test( g_date_compare( &date2, &date3 ) == 0, "end of quarter" );
+
    xaccFreqSpecFree(fs);
 }
 
@@ -518,45 +554,29 @@
    xaccFreqSpecGetNextInstance( fs, &date0, &date1 );
    g_date_set_dmy( &date2, 21, 4, 2001 );
    do_test( g_date_compare( &date1, &date2 ) == 0, "sixth date in sequence" );
-
+   fprintf(stdout, " FreqSpec: Composite months test OK, cleaning up\n");
+   fflush(stdout);   
    xaccFreqSpecFree(fs);
 }
 
-static void
-guile_main ( void *closure, int argc, char* argv[] )
+int
+main (int argc, char **argv)
 {
-   gnc_module_load("gnucash/engine", 0);
-
-   g_log_set_always_fatal( G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING );
-
-#if 0
-   set_success_print(TRUE);
-#endif
-
-   book = qof_book_new ();
+	QofSession *session;
 
+	qof_init();
+	g_return_val_if_fail(cashobjects_register(), -1);
+	session = qof_session_new ();
+	book = qof_session_get_book(session);
    test_once();
-
+   test_caseA();
    test_daily();
-
    test_weekly();
-
    test_monthly();
-
    test_month_relative();
-
    test_composite();
-
-   qof_book_destroy (book);
-
    print_test_results();
-   exit (get_rv());
-}
-
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, guile_main, NULL);
+	qof_session_end(session);
+	qof_close();
   return 0;
 }
Index: test-transaction-voiding.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-transaction-voiding.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/test/test-transaction-voiding.c -Lsrc/engine/test/test-transaction-voiding.c -u -r1.13 -r1.14
--- src/engine/test/test-transaction-voiding.c
+++ src/engine/test/test-transaction-voiding.c
@@ -1,18 +1,34 @@
+/***************************************************************************
+ *            test-transaction-voiding.c
+ *
+ *  Modified to run without Guile: Mon Aug 22 11:24:44 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <glib.h>
-#include <libguile.h>
 #include <string.h>
-
+#include "cashobjects.h"
 #include "Account.h"
 #include "TransLog.h"
-#include "Transaction.h"
-#include "gnc-engine.h"
-#include "gnc-module.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
 #include "Transaction.h"
-#include "guid.h"
-
-
 
 #define print_gnc_numeric(num) fprintf(stderr, "%s\n", gnc_numeric_to_string(num))
 
@@ -172,24 +188,17 @@
   return;
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  gnc_module_load("gnucash/engine", 0);
-
+	qof_init();
+	if(cashobjects_register())
+	{
   xaccLogDisable ();
-
   run_test ();
-
   success("transaction voiding seems OK");
-
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	}
+	qof_close();
   return 0;
 }
Index: test-period.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-period.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/engine/test/test-period.c -Lsrc/engine/test/test-period.c -u -r1.14 -r1.15
--- src/engine/test/test-period.c
+++ src/engine/test/test-period.c
@@ -1,27 +1,40 @@
-
-/* Test file created by Linas Vepstas <linas at linas.org>
+/***************************************************************************
+ *            test-period.c
+ *
+ *  December 2001
+ *  Copyright  2001 Linas Vepstas <linas at linas.org
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ /* 
  * Minimal test to see if a book can be split into two periods
  * without crashing.
- * December 2001
- * License: GPL
  */
 
 #include <ctype.h>
 #include <glib.h>
-#include <libguile.h>
+#include "qof.h"
 #include <time.h>
-
+#include "cashobjects.h"
 #include "Account.h"
 #include "Group.h"
 #include "Period.h"
-#include "gnc-engine-util.h"
-#include "gnc-module.h"
 #include "test-stuff.h"
 #include "test-engine-stuff.h"
 #include "Transaction.h"
-#include "qofbook.h"
-
-
 
 static void
 run_test (void)
@@ -30,22 +43,18 @@
   QofBook *openbook, *closedbook;
   AccountGroup *grp;
   AccountList *acclist, *anode;
-  Account * acc = NULL;
+  Account *acc, *equity;
   SplitList *splist;
   Split *sfirst, *slast;
   Transaction *tfirst, *tlast;
   Timespec tsfirst, tslast, tsmiddle;
   
-
-
-  if(!gnc_module_load("gnucash/engine", 0))
-  {
-    failure("couldn't load gnucash/engine");
-    exit(get_rv());
-  }
-
   sess = get_random_session ();
   openbook = qof_session_get_book (sess);
+  sess = get_random_session ();
+  closedbook = qof_session_get_book(sess);
+  acc = NULL;
+  equity = get_random_account(openbook);
   if (!openbook)
   {
     failure("book not created");
@@ -107,12 +116,10 @@
 
   tsmiddle = tsfirst;
   tsmiddle.tv_sec = (tsfirst.tv_sec + tslast.tv_sec)/2;
-
-  // stdout is broken with guile for some reason
-  // gnc_set_logfile (stdout);
-  // gnc_set_log_level_global (GNC_LOG_INFO);
+  gnc_set_logfile (stdout);
+  gnc_set_log_level_global (GNC_LOG_FATAL);
   closedbook = gnc_book_close_period (openbook, tsmiddle, 
-                  NULL, "this is opening balance dude");
+                  equity, "this is opening balance dude");
 
   if (!closedbook)
   {
@@ -123,18 +130,14 @@
   success ("periods lightly tested and seem to work");
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  run_test ();
-
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile(argc, argv, main_helper, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+		run_test ();
+		print_test_results();
+	}
+	qof_close();
   return 0;
 }
Index: test-group-vs-book.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-group-vs-book.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/engine/test/test-group-vs-book.c -Lsrc/engine/test/test-group-vs-book.c -u -r1.17 -r1.18
--- src/engine/test/test-group-vs-book.c
+++ src/engine/test/test-group-vs-book.c
@@ -1,17 +1,34 @@
+/***************************************************************************
+ *            test-group-vs-book.c
+ *
+ *  Tue Sep 27 19:32:31 2005
+ *  Copyright  2005  Gnucash team
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
 
 #include <glib.h>
-#include <libguile.h>
-
+#include "qof.h"
+#include "cashobjects.h"
 #include "Group.h"
 #include "GroupP.h"
 #include "TransLog.h"
 #include "gnc-engine.h"
-#include "gnc-module.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
-#include "qofbook.h"
-#include "qofbook-p.h"
-
 
 static gboolean
 group_has_book (AccountGroup *group, QofBook *book)
@@ -139,43 +156,22 @@
     failure("remove group didn't take");
     exit(get_rv());
   }
-
-#if 0
-  /* a group cannot have a 'null' book; this test is nonsense. */
-  if (!group_has_book (xaccAccountGetParent (account2), NULL))
-  {
-    failure("remove group didn't clear book");
-    exit(get_rv());
-  }
-#endif
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  int i;
-
-  gnc_module_system_init();
-
-  if(!gnc_module_load("gnucash/engine", 0))
-  {
-    failure("couldn't load gnucash/engine");
-    exit(get_rv());
-  }
-
+	gint i;
+	qof_init();
+	if(cashobjects_register()) {
   xaccLogDisable ();
-
   for (i = 0; i < 10; i++)
+		{
     run_test ();
-
+		}
   success ("group/book stuff seems to work");
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	}
+	qof_close();
   return 0;
 }
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/.cvsignore,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/engine/test/.cvsignore -Lsrc/engine/test/.cvsignore -u -r1.19 -r1.20
--- src/engine/test/.cvsignore
+++ src/engine/test/.cvsignore
@@ -4,6 +4,7 @@
 .deps
 .libs
 test-load-engine
+test-book-merge
 test-commodities
 test-date
 test-freq-spec
@@ -17,6 +18,7 @@
 test-print-queries
 test-query
 test-querynew
+test-recurrence
 test-resolve-file-path
 test-scm-query
 test-split-vs-account
Index: test-book-merge.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-book-merge.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/engine/test/test-book-merge.c -Lsrc/engine/test/test-book-merge.c -u -r1.5 -r1.6
--- src/engine/test/test-book-merge.c
+++ src/engine/test/test-book-merge.c
@@ -23,17 +23,13 @@
  /* Test the qof_book_merge infrastructure. */
  
 #include <glib.h>
-#include <libguile.h>
+
 #define _GNU_SOURCE
 
-#include "qofinstance-p.h"
-#include "gnc-module.h"
-#include "gnc-event-p.h"
 #include "qof.h"
-#include "qof_book_merge.h"
 #include "test-stuff.h"
-
 #include "gnc-engine.h"
+
 #define TEST_MODULE_NAME "book-merge-test"
 #define TEST_MODULE_DESC "Test Book Merge"
 #define OBJ_NAME "somename"
@@ -169,7 +165,7 @@
 Timespec
 obj_getDate(myobj *g)
 {
-	Timespec ts;
+  Timespec ts = {0};
 	if(!g) return ts;
 	ts = g->date;
 	return ts;
@@ -469,19 +465,13 @@
 	do_test ((rule->mergeResult != MERGE_REPORT), "update result fail");
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
 	gnc_engine_init(argc, argv);
 	myobjRegister();
 	test_merge();
 	print_test_results();
 	exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-	scm_boot_guile (argc, argv, main_helper, NULL);
 	return 0;
 }
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/Makefile.am,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/engine/test/Makefile.am -Lsrc/engine/test/Makefile.am -u -r1.39 -r1.40
--- src/engine/test/Makefile.am
+++ src/engine/test/Makefile.am
@@ -1,24 +1,24 @@
-# may need to use ln -s ./ qof in src/engine
-# INCLUDES = -DG_LOG_DOMAIN=\"qof_book_merge\"
 
 AM_CFLAGS = \
+  -I${top_srcdir} \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/test-core \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/engine/test-core \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 LDADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/test-core/libgncmod-test.la \
   ../libgncmod-engine.la \
-  ../qof_book_merge.lo \
   ../libgw-engine.la \
   ../libgw-kvp.la \
   ../test-core/libgncmod-test-engine.la \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   -lltdl
 
 # these tests are ordered kind more or less in the order
@@ -43,6 +43,7 @@
   test-transaction-reversal \
   test-transaction-voiding \
   test-freq-spec \
+  test-recurrence \
   test-scm-query \
   test-book-merge 
   
@@ -65,6 +66,7 @@
   test-commodities \
   test-date \
   test-freq-spec \
+  test-recurrence \
   test-guid \
   test-group-vs-book \
   test-load-engine \
@@ -82,7 +84,7 @@
   test-transaction-voiding
 
 test_link_SOURCES = test-link.c
-test_link_LDADD = ../libgncmod-engine.la 
+test_link_LDADD = ../libgncmod-engine.la ${QOF_LIBS}
 
 EXTRA_DIST = \
   test-create-account \
Index: test-transaction-reversal.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-transaction-reversal.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/engine/test/test-transaction-reversal.c -Lsrc/engine/test/test-transaction-reversal.c -u -r1.6 -r1.7
--- src/engine/test/test-transaction-reversal.c
+++ src/engine/test/test-transaction-reversal.c
@@ -1,19 +1,34 @@
+/***************************************************************************
+ *            test-transaction-reversal.c
+ *
+ *  Modified to run without Guile: Mon Aug 22 11:19:56 2005
+ *  Copyright  2005  Neil Williams
+ *  linux at codehelp.co.uk
+ ****************************************************************************/
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ 
 #include <glib.h>
-#include <libguile.h>
 #include <string.h>
-
+#include "cashobjects.h"
+#include "Transaction.h"
 #include "Account.h"
 #include "TransLog.h"
-#include "Transaction.h"
-#include "gnc-engine.h"
-#include "gnc-module.h"
-#include "qofsession.h"
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
-#include "Transaction.h"
-#include "guid.h"
-
-
 
 #define print_gnc_numeric(num) fprintf(stderr, "%s\n", gnc_numeric_to_string(num))
 
@@ -101,25 +116,16 @@
   return;
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
+int
+main (int argc, char **argv)
 {
-  gnc_module_load("gnucash/engine", 0);
-
-  xaccLogDisable ();
+	qof_init();
+	if(cashobjects_register()) {
   set_success_print (TRUE);
-
   run_test ();
-
   success("transaction voiding seems OK");
-
   print_test_results();
-  exit(get_rv());
-}
-
-int
-main (int argc, char **argv)
-{
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	}
+	qof_close();
   return 0;
 }
Index: test-object.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test/test-object.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/engine/test/test-object.c -Lsrc/engine/test/test-object.c -u -r1.13 -r1.14
--- src/engine/test/test-object.c
+++ src/engine/test/test-object.c
@@ -1,16 +1,31 @@
+/***************************************************************************
+ *            test-object.c
+ *
+ *  Tue Sep 27 19:37:28 2005
+ *  Copyright  2005  GnuCash team
+ ****************************************************************************/
 /*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+ /*
  * Lightly test the QofObject infrastructure.
  */
 #include <glib.h>
-#include <libguile.h>
-
-#include "guid.h"
-#include "gnc-module.h"
-#include "gnc-engine-util.h"
+#include "qof.h"
+#include "cashobjects.h"
 #include "messages.h"
-#include "qofbook.h"
-#include "qofobject.h"
-
 #include "test-stuff.h"
 
 #define TEST_MODULE_NAME "object-test"
@@ -128,18 +143,14 @@
   do_test (res != NULL, "object: Printable: mod_name, object");
 }
 
-static void
-main_helper (void *closure, int argc, char **argv)
-{
-  gnc_module_load("gnucash/engine", 0);
-  test_object();
-  print_test_results();
-  exit(get_rv());
-}
-
 int
 main (int argc, char **argv)
 {
-  scm_boot_guile (argc, argv, main_helper, NULL);
+	qof_init();
+	if(cashobjects_register()) {
+		test_object();
+		print_test_results();
+	}
+	qof_close();
   return 0;
 }
Index: test-engine-stuff.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test-core/test-engine-stuff.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -Lsrc/engine/test-core/test-engine-stuff.c -Lsrc/engine/test-core/test-engine-stuff.c -u -r1.78 -r1.79
--- src/engine/test-core/test-engine-stuff.c
+++ src/engine/test-core/test-engine-stuff.c
@@ -31,12 +31,9 @@
 #include "AccountP.h"
 #include "Group.h"
 #include "GroupP.h"
-#include "gnc-date.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
 #include "Transaction.h"
 #include "TransactionP.h"
-#include "qofquerycore.h"
 
 #include "test-engine-stuff.h"
 #include "test-stuff.h"
@@ -251,12 +248,12 @@
 
     len = get_random_int_in_range(20,100);
     ret = g_new(bin_data, 1);
-    ret->data = g_new(char, len);
+    ret->data = g_new(guchar, len);
     ret->len = len;
 
     for(len--; len >= 0; len--)
     {
-        ret->data[len] = (char)get_random_int_in_range(0,255);
+        ret->data[len] = (guchar)get_random_int_in_range(0,255);
     }
 
     return ret;
@@ -271,6 +268,7 @@
 get_random_kvp_value_depth (int type, gint depth)
 {
     int datype = type;
+    KvpValue *ret;
 
     if (datype == -1)
     {
@@ -294,82 +292,74 @@
     switch(datype)
     {
     case KVP_TYPE_GINT64:
-        return kvp_value_new_gint64(get_random_gint64());
+        ret = kvp_value_new_gint64(get_random_gint64());
         break;
 
     case KVP_TYPE_DOUBLE:
-        return NULL;
+        ret = NULL;
         break;
 
     case KVP_TYPE_NUMERIC:
-        return kvp_value_new_gnc_numeric(get_random_gnc_numeric());
+        ret = kvp_value_new_gnc_numeric(get_random_gnc_numeric());
         break;
 
     case KVP_TYPE_STRING:
     {
         gchar *tmp_str;
-        KvpValue *ret;
         tmp_str = get_random_string();
         if(!tmp_str)
-        {
-            return NULL;
-        }
+	  return NULL;
         
         ret = kvp_value_new_string(tmp_str);
         g_free(tmp_str);
-        return ret;
     }
         break;
 
     case KVP_TYPE_GUID:
     {
         GUID *tmp_guid;
-        KvpValue *ret;
         tmp_guid = get_random_guid();
         ret = kvp_value_new_guid(tmp_guid);
         g_free(tmp_guid);
-        return ret;
     }
         break;
 
     case KVP_TYPE_TIMESPEC:
     {
         Timespec *ts = get_random_timespec();
-        return kvp_value_new_timespec (*ts);
+        ret = kvp_value_new_timespec (*ts);
+        g_free(ts);
     }
 	break;
     
     case KVP_TYPE_BINARY:
     {
         bin_data *tmp_data;
-        KvpValue *ret;
         tmp_data = get_random_binary_data();
         ret = kvp_value_new_binary(tmp_data->data, tmp_data->len);
         g_free(tmp_data->data);
         g_free(tmp_data);
-        return ret;
     }
         break;
  
     case KVP_TYPE_GLIST:
-        return kvp_value_new_glist_nc(get_random_glist_depth (depth + 1));
+        ret = kvp_value_new_glist_nc(get_random_glist_depth (depth + 1));
         break;
 
     case KVP_TYPE_FRAME:
     {
         KvpFrame *tmp_frame;
-        KvpValue *ret;
         tmp_frame = get_random_kvp_frame_depth(depth + 1);
         ret = kvp_value_new_frame(tmp_frame);
         kvp_frame_delete(tmp_frame);
-        return ret;
     }
         break;
 
     default:
-        return NULL;
+        ret = NULL;
         break;
     }
+    return ret;
 }
 
 static KvpFrame*
@@ -392,14 +382,19 @@
         gchar *key;
         KvpValue *val;
 
-        do
-        {
-          key = get_random_string_without("/");
-        } while (!key || *key == '\0');
-
+	key = NULL;
+	while (key == NULL) {
+	  key = get_random_string_without("/");
+	  if (*key == '\0') {
+	    g_free(key);
+	    key = NULL;
+	  }
+	}
+	
         val = get_random_kvp_value_depth (-1, depth + 1);
         if (!val)
         {
+	  g_free(key);
           if (!val_added)
             vals_to_add++;
           continue;
@@ -557,7 +552,7 @@
 #define MAX_SCU 6000
     ran_int = get_random_int_in_range(1, MAX_SCU);
 
-    ret = gnc_commodity_new (name, space, mn, xcode, ran_int);
+    ret = gnc_commodity_new (book, name, space, mn, xcode, ran_int);
 
     g_free(mn);
     g_free(name);
@@ -673,29 +668,56 @@
   GNCPrice *p;
 
   p = gnc_price_create (book);
+  if(!p)
+  {
+      failure_args("engine-stuff", __FILE__, __LINE__,
+                   "get_random_price failed");
+      return NULL;
+  }
 
   make_random_changes_to_price (book, p);
+  if(!p)
+  {
+      failure_args("engine-stuff", __FILE__, __LINE__,
+                   "make_random_changes_to_price failed");
+      return NULL;
+  }
 
   return p;
 }
 
-void
+gboolean
 make_random_pricedb (QofBook *book, GNCPriceDB *db)
 {
   int num_prices;
+   gboolean check;
 
-  num_prices = get_random_int_in_range (0, 40);
+  num_prices = get_random_int_in_range (1, 41);
+  if(num_prices < 1) /* should be impossible */
+  {
+      failure_args("engine-stuff", __FILE__, __LINE__,
+                   "get_random_int_in_range failed");
+        return FALSE;
+  }
 
   while (num_prices-- > 0)
   {
     GNCPrice *p;
 
     p = get_random_price (book);
+    if(!p)
+    {
+        failure_args("engine-stuff", __FILE__, __LINE__,
+                     "get_random_price failed");
+                return FALSE;
+    }
 
-    gnc_pricedb_add_price (db, p);
+        check = gnc_pricedb_add_price (db, p);
+        if(!check) { return check; }
 
     gnc_price_unref (p);
   }
+	return TRUE;
 }
 
 GNCPriceDB *
@@ -703,9 +725,14 @@
 {
   GNCPriceDB *db;
 
-  // db = gnc_pricedb_create (book);
   db = gnc_pricedb_get_db (book);
-  make_random_pricedb (book, db);
+  if(!db)
+  {
+      failure_args("engine-stuff", __FILE__, __LINE__,
+                   "gnc_pricedb_get_db failed");
+      return NULL;
+  }
+  if(!make_random_pricedb (book, db)) { return NULL; }
 
   return db;
 }
@@ -888,8 +915,7 @@
     if (!do_bork()) num = gnc_numeric_convert (num, scu, GNC_HOW_RND_ROUND);
 
     acc = get_random_list_element (account_list);
-    s = get_random_split(book, acc);
-    xaccTransAppendSplit(trn, s);
+    s = get_random_split(book, acc, trn);
     xaccSplitSetValue(s, num);
 
     /* If the currencies are the same, the split amount should equal
@@ -916,8 +942,7 @@
       }
     }
 
-    s = get_random_split(book, bcc);
-    xaccTransAppendSplit(trn, s);
+    s = get_random_split(book, bcc, trn);
 
     /* Other split should have equal and opposite value */
     if (do_bork()) 
@@ -1239,7 +1264,7 @@
 static char possible_chars[] = { NREC, CREC, YREC, FREC };
 
 Split*
-get_random_split(QofBook *book, Account *acct)
+get_random_split(QofBook *book, Account *acct, Transaction *trn)
 {
     Split *ret;
     gnc_numeric num;
@@ -1254,6 +1279,8 @@
     xaccSplitSetDateReconciledTS(ret, get_random_timespec());
 
     /* Split must be in an account before we can set an amount */
+    /* and in a transaction before it can be added to an account. */
+    xaccTransAppendSplit(trn, ret);
     xaccAccountInsertSplit (acct, ret);
     num = get_random_gnc_numeric ();
     xaccSplitSetAmount(ret, num);
@@ -1298,10 +1325,13 @@
                        void(*func)(Transaction *act, const gchar*str))
 {
     gchar *tmp_str = get_random_string();
+    if(!trn || !(&trn->inst)) { return; }
     if(tmp_str)
     {
+        xaccTransBeginEdit(trn);
         (func)(trn, tmp_str);
         g_free(tmp_str);
+        xaccTransCommitEdit(trn);
     }
 }
 
@@ -1336,6 +1366,7 @@
     ret = xaccMallocTransaction(book);
 
     xaccTransBeginEdit(ret);
+
     xaccTransSetCurrency (ret,
                           currency ? currency :
                           get_random_commodity (book));
@@ -1358,13 +1389,30 @@
     }
 
     xaccTransCommitEdit(ret);
+    if(!ret)
+    {
+        failure_args("engine-stuff", __FILE__, __LINE__,
+                     "get_random_transaction_with_currency failed");
+        return NULL;
+    }
+
     return ret;
 }
 
 Transaction*
 get_random_transaction (QofBook *book)
 {
-  return get_random_transaction_with_currency (book, NULL, NULL);
+	Transaction *ret;
+
+	g_return_val_if_fail(book, NULL);
+	ret = get_random_transaction_with_currency (book, NULL, NULL);
+    if(!ret)
+    {
+        failure_args("engine-stuff", __FILE__, __LINE__,
+                     "get_random_transaction failed");
+        return NULL;
+    }
+	return ret;
 }
 
 void
Index: test-engine-stuff.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test-core/test-engine-stuff.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -Lsrc/engine/test-core/test-engine-stuff.h -Lsrc/engine/test-core/test-engine-stuff.h -u -r1.27 -r1.28
--- src/engine/test-core/test-engine-stuff.h
+++ src/engine/test-core/test-engine-stuff.h
@@ -43,11 +43,11 @@
 void set_max_group_accounts (gint max_group_accounts);
 
 GNCPrice * get_random_price(QofBook *book);
-void make_random_pricedb (QofBook *book, GNCPriceDB *pdb);
+gboolean make_random_pricedb (QofBook *book, GNCPriceDB *pdb);
 GNCPriceDB * get_random_pricedb(QofBook *book);
 AccountGroup * get_random_group(QofBook * book);
 Account* get_random_account(QofBook * book);
-Split* get_random_split(QofBook *book, Account *account);
+Split* get_random_split(QofBook *book, Account *account, Transaction *trn);
 Transaction* get_random_transaction(QofBook *book);
 Transaction* get_random_transaction_with_currency(QofBook *book,
                                                   gnc_commodity *currency,
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/engine/test-core/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/engine/test-core/Makefile.am -Lsrc/engine/test-core/Makefile.am -u -r1.7 -r1.8
--- src/engine/test-core/Makefile.am
+++ src/engine/test-core/Makefile.am
@@ -6,6 +6,7 @@
   ../libgw-engine.la \
   ../libgw-kvp.la \
   ${GLIB_LIBS} \
+  ${QOF_LIBS} \
   -lltdl
 
 libgncmod_test_engine_la_SOURCES = gncmod-test-engine.c test-engine-stuff.c
@@ -15,6 +16,7 @@
   ../libgncmod-engine.la \
   ../libgw-engine.la \
   ../libgw-kvp.la \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
 noinst_HEADERS=test-engine-stuff.h
@@ -24,4 +26,6 @@
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/test-core \
   -I${top_srcdir}/src/engine \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${GUILE_INCS}
Index: gnc-server.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/experimental/cgi-bin/gnc-server.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/experimental/cgi-bin/gnc-server.c -Lsrc/experimental/cgi-bin/gnc-server.c -u -r1.6 -r1.7
--- src/experimental/cgi-bin/gnc-server.c
+++ src/experimental/cgi-bin/gnc-server.c
@@ -120,7 +120,7 @@
   guid = g_new (GUID, 1);
   guid_new (guid);
   logged_in_users = g_list_prepend (logged_in_users, guid);
-  session_auth_string = guid_to_string (guid);
+  session_auth_string = guid_to_string (guid); /* THREAD UNSAFE */
   return session_auth_string;
 }
 
Index: gnc-module.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/gnc-module.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnc-module/gnc-module.h -Lsrc/gnc-module/gnc-module.h -u -r1.5 -r1.6
--- src/gnc-module/gnc-module.h
+++ src/gnc-module/gnc-module.h
@@ -9,7 +9,6 @@
 #include <glib.h>
 #include <ltdl.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #ifndef lt_ptr
 #define lt_ptr lt_ptr_t
Index: gnc-module.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/gnc-module.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/gnc-module/gnc-module.c -Lsrc/gnc-module/gnc-module.c -u -r1.22 -r1.23
--- src/gnc-module/gnc-module.c
+++ src/gnc-module/gnc-module.c
@@ -14,8 +14,9 @@
 #include <sys/types.h>
 #include <dirent.h>
 
-
-#include "core-utils.h"
+#ifndef HAVE_SETENV
+#include "setenv.h"
+#endif
 #include "gnc-module.h"
 #include "gw-gnc-module.h"
 
@@ -132,7 +133,7 @@
     }
     g_list_free(dirs);
     
-    if(gnc_setenv("LD_LIBRARY_PATH", envt, 1) != 0)
+    if(setenv("LD_LIBRARY_PATH", envt, 1) != 0)
     {
       g_warning ("gnc-module failed to set LD_LIBRARY_PATH");
     }
@@ -257,25 +258,35 @@
 GNCModuleInfo * 
 gnc_module_get_info(const char * fullpath) 
 {
-  lt_dlhandle  handle;
+  lt_dlhandle handle;
+  lt_ptr modsysver;
 
   //printf("(init) dlopening %s\n", fullpath);
   handle = lt_dlopen(fullpath);
-  if(handle) 
-  {
-    lt_ptr modsysver   = lt_dlsym(handle, "gnc_module_system_interface");
+  if (handle == NULL) {
+      g_warning ("Failed to dlopen() '%s': %s\n", fullpath, lt_dlerror());
+      return NULL;
+  }
+
+  modsysver   = lt_dlsym(handle, "gnc_module_system_interface");
     
-    /* the modsysver tells us what the expected symbols and their 
-     * types are */ 
-    if (!modsysver) 
-    {
+  /* the modsysver tells us what the expected symbols and their
+   * types are */
+  if (!modsysver) {
       //printf("(init) closing %s\n", fullpath);
       //lt_dlclose(handle);
       return NULL;
-    }
+  }
 
-    if(*(int *)modsysver == 0) 
-    {
+  if (*(int *)modsysver != 0) {
+      /* unsupported module system interface version */
+      /* printf("\n** WARNING ** : module '%s' requires newer module system\n",
+         fullpath); */
+      //lt_dlclose(handle);
+      return NULL;
+  }
+
+  {
       lt_ptr initfunc    = lt_dlsym(handle, "gnc_module_init");
       lt_ptr pathfunc    = lt_dlsym(handle, "gnc_module_path");
       lt_ptr descripfunc = lt_dlsym(handle, "gnc_module_description");
@@ -283,43 +294,29 @@
       lt_ptr revision    = lt_dlsym(handle, "gnc_module_revision");
       lt_ptr age         = lt_dlsym(handle, "gnc_module_age");
       
-      if(initfunc && pathfunc && descripfunc && interface &&
-         revision && age) 
-      {
-        /* we have found a gnc_module. */
-        GNCModuleInfo * info = g_new0(GNCModuleInfo, 1);
-        char * (* f_path)(void) = pathfunc;
-        char * (* f_descrip)(void) = descripfunc;
-        info->module_path        = f_path();
-        info->module_description = f_descrip();
-        info->module_filepath    = g_strdup(fullpath);
-        info->module_interface   = *(int *)interface;
-        info->module_age         = *(int *)age;
-        info->module_revision    = *(int *)revision;
-        //printf("(init) closing %s\n", fullpath);
-        //lt_dlclose(handle);
-        return info;
+      if (!(initfunc && pathfunc && descripfunc && interface &&
+            revision && age)) {
+          g_warning ("module '%s' does not match module signature\n",
+                     fullpath);
+          //lt_dlclose(handle);
+          return NULL;
       }
-      else 
+
       {
-        g_warning ("module '%s' does not match module signature\n", fullpath);
-        //lt_dlclose(handle);
-        return NULL;
+          /* we have found a gnc_module. */
+          GNCModuleInfo * info = g_new0(GNCModuleInfo, 1);
+          char * (* f_path)(void) = pathfunc;
+          char * (* f_descrip)(void) = descripfunc;
+          info->module_path        = f_path();
+          info->module_description = f_descrip();
+          info->module_filepath    = g_strdup(fullpath);
+          info->module_interface   = *(int *)interface;
+          info->module_age         = *(int *)age;
+          info->module_revision    = *(int *)revision;
+          //printf("(init) closing %s\n", fullpath);
+          //lt_dlclose(handle);
+          return info;
       }
-    }
-    else 
-    {
-      /* unsupported module system interface version */
-      /* printf("\n** WARNING ** : module '%s' requires newer module system\n",
-         fullpath); */
-      //lt_dlclose(handle);
-      return NULL;
-    }
-  }
-  else 
-  {
-    g_warning ("Failed to dlopen() '%s': %s\n", fullpath, lt_dlerror());
-    return NULL;
   }
 }
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/Makefile.am,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/gnc-module/Makefile.am -Lsrc/gnc-module/Makefile.am -u -r1.25 -r1.26
--- src/gnc-module/Makefile.am
+++ src/gnc-module/Makefile.am
@@ -1,6 +1,7 @@
 SUBDIRS = . test
 
 AM_CFLAGS = \
+   -I${top_srcdir}/lib/libc \
    -I${top_srcdir}/src \
    -I${top_srcdir}/src/core-utils \
    ${GLIB_CFLAGS} ${G_WRAP_COMPILE_ARGS} ${GUILE_INCS}
@@ -9,15 +10,16 @@
 pkglib_LTLIBRARIES = libgw-gnc-module.la
 
 libgncmodule_la_SOURCES = gnc-module.c
-libgncmodule_la_LDFLAGS = -module
+
 libgncmodule_la_LIBADD = \
   ../core-utils/libcore-utils.la \
   ${G_WRAP_LINK_ARGS} \
+ ${top_builddir}/lib/libc/libc-missing.la \
   ${GLIB_LIBS} \
   -lltdl
 
 libgw_gnc_module_la_SOURCES = gw-gnc-module.c
-libgw_gnc_module_la_LDFLAGS = -module 
+
 libgw_gnc_module_la_LIBADD = libgncmodule.la \
   ${G_WRAP_LINK_ARGS} \
   ${GUILE_LIBS} \
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/misc-mods/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/gnc-module/test/misc-mods/Makefile.am -Lsrc/gnc-module/test/misc-mods/Makefile.am -u -r1.9 -r1.10
--- src/gnc-module/test/misc-mods/Makefile.am
+++ src/gnc-module/test/misc-mods/Makefile.am
@@ -1,7 +1,8 @@
 AM_CFLAGS = \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${GUILE_INCS}
 
 LDADD = -L../.. -L../../.libs
 
@@ -10,13 +11,11 @@
 checklib_LTLIBRARIES=libfuturemodsys.la libincompatdep.la libagedver.la
 
 libfuturemodsys_la_SOURCES=futuremodsys.c
-libfuturemodsys_la_LDFLAGS=-module
 
 libincompatdep_la_SOURCES=incompatdep.c
 libincompatdep_la_LDFLAGS=-module
 
 libagedver_la_SOURCES=agedver.c
-libagedver_la_LDFLAGS=-module
 
 CLEANFILES = *.so* *.a
 
Index: gnc-mod-bar.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-bar/gnc-mod-bar.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnc-module/test/mod-bar/gnc-mod-bar.c -Lsrc/gnc-module/test/mod-bar/gnc-mod-bar.c -u -r1.5 -r1.6
--- src/gnc-module/test/mod-bar/gnc-mod-bar.c
+++ src/gnc-module/test/mod-bar/gnc-mod-bar.c
@@ -5,7 +5,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "bar-gwrap.h"
 #include "gnc-module-api.h"
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-bar/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/gnc-module/test/mod-bar/Makefile.am -Lsrc/gnc-module/test/mod-bar/Makefile.am -u -r1.17 -r1.18
--- src/gnc-module/test/mod-bar/Makefile.am
+++ src/gnc-module/test/mod-bar/Makefile.am
@@ -9,7 +9,6 @@
 checklibdir=${PWD}
 checklib_LTLIBRARIES = libbar.la libgncmodbar.la
 
-libbar_la_LDFLAGS = -module
 libbar_la_SOURCES = bar.c
 
 noinst_HEADERS = \
@@ -17,7 +16,7 @@
   bar-gwrap.h
 
 libgncmodbar_la_SOURCES=bar-gwrap.c gnc-mod-bar.c
-libgncmodbar_la_LDFLAGS=-module
+
 libgncmodbar_la_LIBADD=libbar.la
 
 EXTRA_DIST = \
Index: gnc-mod-baz.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-baz/gnc-mod-baz.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnc-module/test/mod-baz/gnc-mod-baz.c -Lsrc/gnc-module/test/mod-baz/gnc-mod-baz.c -u -r1.5 -r1.6
--- src/gnc-module/test/mod-baz/gnc-mod-baz.c
+++ src/gnc-module/test/mod-baz/gnc-mod-baz.c
@@ -4,7 +4,6 @@
 #include "config.h"
 #include <stdio.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-baz/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/gnc-module/test/mod-baz/Makefile.am -Lsrc/gnc-module/test/mod-baz/Makefile.am -u -r1.15 -r1.16
--- src/gnc-module/test/mod-baz/Makefile.am
+++ src/gnc-module/test/mod-baz/Makefile.am
@@ -10,7 +10,6 @@
 checklibdir = ${PWD}
 checklib_LTLIBRARIES = libbaz.la libgncmodbaz.la
 
-libbaz_la_LDFLAGS = -module
 libbaz_la_SOURCES = baz.c
 
 noinst_HEADERS = \
@@ -18,7 +17,6 @@
   baz-gwrap.h
 
 libgncmodbaz_la_SOURCES = baz-gwrap.c gnc-mod-baz.c
-libgncmodbaz_la_LDFLAGS = -module
 
 libgncmodbaz_la_LIBADD = ../mod-foo/libfoo.la libbaz.la
 
Index: gnc-mod-foo.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-foo/gnc-mod-foo.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnc-module/test/mod-foo/gnc-mod-foo.c -Lsrc/gnc-module/test/mod-foo/gnc-mod-foo.c -u -r1.5 -r1.6
--- src/gnc-module/test/mod-foo/gnc-mod-foo.c
+++ src/gnc-module/test/mod-foo/gnc-mod-foo.c
@@ -5,7 +5,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "foo-gwrap.h"
 #include "gnc-module-api.h"
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnc-module/test/mod-foo/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/gnc-module/test/mod-foo/Makefile.am -Lsrc/gnc-module/test/mod-foo/Makefile.am -u -r1.16 -r1.17
--- src/gnc-module/test/mod-foo/Makefile.am
+++ src/gnc-module/test/mod-foo/Makefile.am
@@ -9,7 +9,6 @@
 checklibdir=${PWD}
 checklib_LTLIBRARIES=libfoo.la libgncmodfoo.la
 
-libfoo_la_LDFLAGS = -module
 libfoo_la_SOURCES = foo.c
 
 noinst_HEADERS = \
@@ -17,7 +16,7 @@
   foo-gwrap.h
 
 libgncmodfoo_la_SOURCES = foo-gwrap.c gnc-mod-foo.c
-libgncmodfoo_la_LDFLAGS = -module 
+
 libgncmodfoo_la_LIBADD = libfoo.la
 
 EXTRA_DIST = \
Index: dialog-price-editor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-price-editor.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -Lsrc/gnome/dialog-price-editor.c -Lsrc/gnome/dialog-price-editor.c -u -r1.33 -r1.34
--- src/gnome/dialog-price-editor.c
+++ src/gnome/dialog-price-editor.c
@@ -27,7 +27,6 @@
 #include <time.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-general-select.h"
@@ -44,6 +43,7 @@
 
 
 #define DIALOG_PRICE_EDIT_CM_CLASS "dialog-price-edit"
+#define GCONF_SECTION "dialogs/price_editor"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 /* static short module = MOD_GUI; */
@@ -216,35 +216,28 @@
 }
 
 static void
-price_ok_clicked (GtkWidget *widget, gpointer data)
+pedit_dialog_response (GtkDialog *dialog, gint response, gpointer data)
 {
   PriceEditDialog *pedit_dialog = data;
   GNCBook *book = gnc_get_current_book ();
   GNCPriceDB *pdb = gnc_book_get_pricedb (book);
   const char *error_str;
 
-  error_str = gui_to_price (pedit_dialog);
-  if (error_str) {
-    gnc_warning_dialog (pedit_dialog->dialog, error_str);
-    return;
-  }
+  if (response == GTK_RESPONSE_OK) {
+    error_str = gui_to_price (pedit_dialog);
+    if (error_str) {
+      gnc_warning_dialog (pedit_dialog->dialog, error_str);
+      return;
+    }
 
-  pedit_dialog->changed = FALSE;
-  if (TRUE == pedit_dialog->new)
-    gnc_pricedb_add_price (pdb, pedit_dialog->price);
+    pedit_dialog->changed = FALSE;
+    if (TRUE == pedit_dialog->new)
+      gnc_pricedb_add_price (pdb, pedit_dialog->price);
   
-  gnc_gui_refresh_all ();
-
-  gnome_dialog_close (GNOME_DIALOG (pedit_dialog->dialog));
-}
-
-static void
-price_cancel_clicked (GtkWidget *widget, gpointer data)
-{
-  PriceEditDialog *pedit_dialog = data;
+    gnc_gui_refresh_all ();
+  }
 
-  /* price_window_destroy_cb will unref the price */
-  gnome_dialog_close (GNOME_DIALOG (pedit_dialog->dialog));
+  gtk_widget_destroy (GTK_WIDGET (pedit_dialog->dialog));
 }
 
 static void
@@ -321,8 +314,8 @@
 static void
 connect_type_menu_item (GtkWidget *item, gpointer data)
 {
-  gtk_signal_connect (GTK_OBJECT(item), "activate",
-                      GTK_SIGNAL_FUNC (type_menu_changed), data);
+  g_signal_connect (G_OBJECT(item), "activate",
+                      G_CALLBACK (type_menu_changed), data);
 }
 
 static void
@@ -351,19 +344,14 @@
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+	  gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0,
-                               GTK_SIGNAL_FUNC (price_ok_clicked),
-                               pedit_dialog);
-
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1,
-                               GTK_SIGNAL_FUNC (price_cancel_clicked),
-                               pedit_dialog);
-
-  gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
-		      GTK_SIGNAL_FUNC (price_window_destroy_cb),
-		      pedit_dialog);
+  g_signal_connect (G_OBJECT (dialog), "response",
+		    G_CALLBACK (pedit_dialog_response), pedit_dialog);
+
+  g_signal_connect (G_OBJECT (dialog), "destroy",
+		    G_CALLBACK (price_window_destroy_cb),
+		    pedit_dialog);
 
   box = glade_xml_get_widget (xml, "commodity_box");
   w = gnc_general_select_new (GNC_GENERAL_SELECT_TYPE_SELECT,
@@ -373,8 +361,8 @@
   pedit_dialog->commodity_edit = w;
   gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
   gtk_widget_show (w);
-  gtk_signal_connect (GTK_OBJECT (w), "changed",
-                      GTK_SIGNAL_FUNC (commodity_changed_cb), pedit_dialog);
+  g_signal_connect (G_OBJECT (w), "changed",
+                    G_CALLBACK (commodity_changed_cb), pedit_dialog);
 
 
   box = glade_xml_get_widget (xml, "currency_box");
@@ -384,21 +372,19 @@
   pedit_dialog->currency_edit = w;
   gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
   gtk_widget_show (w);
-  gtk_signal_connect (GTK_OBJECT (GTK_COMBO(w)->entry), "changed",
-                      GTK_SIGNAL_FUNC (currency_changed_cb), pedit_dialog);
-  gnome_dialog_editable_enters(GNOME_DIALOG(dialog),
-			       GTK_EDITABLE(GTK_COMBO(w)->entry));
+  g_signal_connect (G_OBJECT (GTK_COMBO_BOX(w)), "changed",
+                    G_CALLBACK (currency_changed_cb), pedit_dialog);
 
   box = glade_xml_get_widget (xml, "date_box");
   w = gnc_date_edit_new (time (NULL), FALSE, FALSE);
   pedit_dialog->date_edit = w;
   gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
   gtk_widget_show (w);
-  gtk_signal_connect (GTK_OBJECT (w), "date_changed",
-                      GTK_SIGNAL_FUNC (date_changed_cb), pedit_dialog);
-  gtk_signal_connect (GTK_OBJECT (GNC_DATE_EDIT (w)->date_entry), "changed",
-                      GTK_SIGNAL_FUNC (date_entry_changed_cb), pedit_dialog);
-  gnc_date_editable_enters(GNOME_DIALOG(dialog), GNC_DATE_EDIT(w));
+  g_signal_connect (G_OBJECT (w), "date_changed",
+                    G_CALLBACK (date_changed_cb), pedit_dialog);
+  g_signal_connect (G_OBJECT (GNC_DATE_EDIT (w)->date_entry), "changed",
+                    G_CALLBACK (date_entry_changed_cb), pedit_dialog);
+  gtk_entry_set_activates_default(GTK_ENTRY(GNC_DATE_EDIT(w)->date_entry), TRUE);
 
 
   w = glade_xml_get_widget (xml, "source_entry");
@@ -421,12 +407,12 @@
   print_info = gnc_default_price_print_info ();
   gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (w), print_info);
   gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (w), 1000000);
-  gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(w));
+  gtk_entry_set_activates_default(GTK_ENTRY(w), TRUE);
   gtk_widget_show (w);
 
   entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (w));
-  gtk_signal_connect (GTK_OBJECT (entry), "changed",
-                      GTK_SIGNAL_FUNC (amount_changed_cb), pedit_dialog);
+  g_signal_connect (G_OBJECT (entry), "changed",
+                      G_CALLBACK (amount_changed_cb), pedit_dialog);
 }
 
 static void
@@ -450,12 +436,8 @@
 {
   PriceEditDialog *pedit_dialog = user_data;
 
-  //  gdk_window_get_geometry (GTK_WIDGET(pedit_dialog->dialog)->window,
-  //                           NULL, NULL, &last_width, &last_height, NULL);
-
-  //  gnc_save_window_size ("prices_win", last_width, last_height);
-
-  gnome_dialog_close (GNOME_DIALOG (pedit_dialog->dialog));
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
+  gtk_widget_destroy (GTK_WIDGET (pedit_dialog->dialog));
 }
 
 static void
@@ -500,6 +482,7 @@
 
   pedit_dialog = g_new0 (PriceEditDialog, 1);
   gnc_price_pedit_dialog_create (parent, pedit_dialog);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pedit_dialog->dialog));
 
   switch (type) {
    case GNC_PRICE_NEW:
Index: top-level.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/top-level.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/gnome/top-level.h -Lsrc/gnome/top-level.h -u -r1.15 -r1.16
--- src/gnome/top-level.h
+++ src/gnome/top-level.h
@@ -26,8 +26,6 @@
 #include <glib.h>
 #include <libguile.h>
 
-#include "window-main.h"
-
 gboolean      gnucash_ui_is_running (void);
 gboolean      gnucash_ui_is_terminating (void);
 SCM           gnc_gui_init_splash (SCM command_line);
Index: dialog-find-transactions.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-find-transactions.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -Lsrc/gnome/dialog-find-transactions.c -Lsrc/gnome/dialog-find-transactions.c -u -r1.42 -r1.43
--- src/gnome/dialog-find-transactions.c
+++ src/gnome/dialog-find-transactions.c
@@ -35,10 +35,13 @@
 #include "SX-book.h"
 #include "Transaction.h"
 #include "dialog-find-transactions.h"
-#include "window-register.h"
+#include "gnc-main-window.h"
+#include "gnc-plugin-page-register.h"
 #include "messages.h"
 #include "search-param.h"
 
+#define GCONF_SECTION "dialogs/find"
+
 struct _ftd_data {
   QueryNew *		q;
   QueryNew *		ledger_q;
@@ -51,6 +54,7 @@
   struct _ftd_data *ftd = user_data;
   GNCLedgerDisplay *ledger;
   gboolean new_ledger = FALSE;
+  GncPluginPage *page;
 
   ledger = gnc_ledger_display_find_by_query (ftd->ledger_q);
   if(!ledger) {
@@ -63,8 +67,10 @@
 
   gnc_ledger_display_refresh (ledger);
 
-  if (new_ledger)
-    regWindowLedger(ledger);
+  if (new_ledger) {
+    page = gnc_plugin_page_register_new_ledger (ledger);
+    gnc_main_window_open_page (NULL, page);
+  }
 
   gncQueryDestroy (ftd->q);
 
@@ -164,7 +170,7 @@
 
   ftd->sw = gnc_search_dialog_create (type, params, NULL, start_q, show_q,
 				      NULL, do_find_cb, NULL,
-				      ftd, free_ftd_cb);
+				      ftd, free_ftd_cb, GCONF_SECTION);
 
   if (!ftd->sw) {
     free_ftd_cb (ftd);
--- src/gnome/gnc-network.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/********************************************************************
- * gnc-network.h -- handlers for forms and objects relevant to      *
- * GnuCash Network functions                                        *
- * Copyright (C) 2001 Bill Gribble <grib at billgribble.com>           *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#ifndef GNC_NETWORK_H
-#define GNC_NETWORK_H
-
-#include "config.h"
-
-void     gnc_network_init(void);
-
-char   * gnc_network_get_passphrase(void);
-char   * gnc_network_ask_passphrase(const char * prompt);
-char   * gnc_network_build_url(const char * gnc_action);
-char   * gnc_network_get_session_id(void);
-void     gnc_network_set_session_id(char * sid);
-char   * gnc_network_get_uid(void);
-#endif
--- src/gnome/window-register.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************\
- * window-register.h -- public GnuCash register functions           *
- * Copyright (C) 1998,1999,2000 Linas Vepstas                       *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#ifndef WINDOW_REGISTER_H
-#define WINDOW_REGISTER_H
-
-#include "gnc-ledger-display.h"
-#include "gnc-split-reg.h"
-
-/** STRUCTS *********************************************************/
-typedef struct _RegWindow RegWindow;
-/* Getters */
-GtkWidget *gnc_RegWindow_window (RegWindow *data);
-GNCLedgerDisplay *gnc_RegWindow_ledger (RegWindow *data);
-
-/** PROTOTYPES ******************************************************/
-GNCSplitReg* regWindowSimple(Account *account);
-GNCSplitReg* regWindowAccGroup(Account *account_group);
-
-RegWindow* regWindowLedger(GNCLedgerDisplay *ledger);
-
-gpointer gnc_RegWindow_get_pcd (RegWindow *data);
-void     gnc_RegWindow_set_pcd (RegWindow *data, gpointer);
-
-void gnc_register_raise(RegWindow *regData);
-
-#endif
Index: druid-hierarchy.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/gnome/druid-hierarchy.c -Lsrc/gnome/druid-hierarchy.c -u -r1.24 -r1.25
--- src/gnome/druid-hierarchy.c
+++ src/gnome/druid-hierarchy.c
@@ -37,39 +37,61 @@
 #include "gnc-amount-edit.h"
 #include "gnc-currency-edit.h"
 #include "gnc-general-select.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-hooks.h"
 #include "gnc-component-manager.h"
 #include "../gnome-utils/gnc-dir.h"
 #include "gnc-gui-query.h"
+#include "gnc-tree-model-example-account.h"
+#include "gnc-tree-model-selection.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-ui-util.h"
-#include "global-options.h"
 #include "io-example-account.h"
 #include "top-level.h"
-#include "qofbook.h"
 
-#include "gnc-trace.h"
-static short module = MOD_IMPORT; 
+#include "gnc-engine.h"
+static QofLogModule log_module = GNC_MOD_IMPORT; 
+
+#define GCONF_SECTION "dialogs/new_hierarchy"
 
 static GtkWidget *hierarchy_window = NULL;
 GtkWidget *qof_book_merge_window = NULL;
 static AccountGroup *our_final_group = NULL;
 QofBook *temporary;
 
-static void on_balance_changed (GNCAmountEdit *gae);
+typedef struct {
+  GtkWidget *dialog;
 
+  GtkWidget *currency_selector;
 
-static GtkWidget*
-hierarchy_get_widget (const char *name)
-{
-  if (!hierarchy_window) return NULL;
+  GtkTreeView *categories_tree;
+  GtkLabel *category_description;
+  GtkBox *category_accounts_box;
+  GtkTreeView *category_accounts_tree;
+  gboolean category_set_changed;
+
+  GncTreeViewAccount *final_account_tree;
+  GtkWidget *final_account_tree_box;
+  Account *selected_account;
+  GNCAmountEdit *balance_edit;
+  GHashTable *balance_hash;
+} hierarchy_data;
+
+static void on_balance_changed (GNCAmountEdit *gae, hierarchy_data *data);
+void on_choose_account_categories_prepare (GnomeDruidPage  *gnomedruidpage,
+					   gpointer         arg1,
+					   hierarchy_data  *data);
+void select_all_clicked (GtkButton       *button,
+			 hierarchy_data  *data);
+void clear_all_clicked (GtkButton       *button,
+			hierarchy_data  *data);
+void on_final_account_prepare (GnomeDruidPage  *gnomedruidpage,
+			       gpointer         arg1,
+			       hierarchy_data  *data);
+void on_cancel (GnomeDruid      *gnomedruid, hierarchy_data *data);
+void on_finish (GnomeDruidPage  *gnomedruidpage, gpointer arg1, hierarchy_data *data);
 
-  return gnc_glade_lookup_widget (hierarchy_window, name);
-}
 
-static GtkCTree *
-hierarchy_get_final_account_tree (void)
-{
-    return GTK_CTREE (hierarchy_get_widget ("final_account_ctree"));
-}
 
 static void
 delete_hierarchy_window (void)
@@ -90,155 +112,90 @@
   g_free (balance);
 }
 
-static GNCAmountEdit *
-get_balance_editor (void)
-{
-  if (!hierarchy_window) return NULL;
-
-  return gtk_object_get_data (GTK_OBJECT (hierarchy_window), "balance_editor");
-}
-
-static GtkToggleButton *
-get_placeholder_checkbox (void)
-{
-  if (!hierarchy_window) return NULL;
-
-  return GTK_TOGGLE_BUTTON(gnc_glade_lookup_widget(GTK_WIDGET(hierarchy_window),
-						   "placeholder"));
-}
-
-static GtkCList*
-get_account_types_clist (void)
-{
-  return GTK_CLIST(hierarchy_get_widget ("account_types_clist"));
-}
-
-static GtkWidget *
-get_currency_editor(void)
-{
-  GtkWidget *selector;
-  GtkWidget *tmp_wid = gtk_object_get_data (GTK_OBJECT (hierarchy_window),
-                                            "currency_editor");
-  if (tmp_wid)
-    return tmp_wid;
-
-  selector = gnc_currency_edit_new();
-  gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(selector), gnc_default_currency());
-  gtk_widget_show (selector);
-  gtk_object_set_data(GTK_OBJECT(hierarchy_window),
-		      "currency_editor", selector);
-  return selector;
-}
-
 static void
-gnc_hierarchy_destroy_cb (GtkObject *obj, gpointer user_data)
+gnc_hierarchy_destroy_cb (GtkObject *obj,   hierarchy_data *data)
 {
   GHashTable *hash;
 
-  hash = gtk_object_get_data (obj, "balance_hash");
+  hash = data->balance_hash;
   if (hash)
   {
     g_hash_table_foreach (hash, destroy_hash_helper, NULL);
     g_hash_table_destroy (hash);
-    gtk_object_set_data (obj, "balance_hash", NULL);
+    data->balance_hash = NULL;
   }
 }
 
 static void
-block_amount_changed (void)
+block_amount_changed (hierarchy_data *data)
 {
-  GNCAmountEdit *balance_edit;
-
-  balance_edit = get_balance_editor ();
-  if (!balance_edit) return;
-
-  gtk_signal_handler_block_by_func
-    (GTK_OBJECT (balance_edit),
-     GTK_SIGNAL_FUNC(on_balance_changed), NULL);
+  g_signal_handlers_block_by_func
+    (G_OBJECT (data->balance_edit),
+     G_CALLBACK (on_balance_changed), data);
 }
 
 static void
-unblock_amount_changed (void)
+unblock_amount_changed (hierarchy_data *data)
 {
-  GNCAmountEdit *balance_edit;
-
-  balance_edit = get_balance_editor ();
-  if (!balance_edit) return;
-
-  gtk_signal_handler_unblock_by_func
-    (GTK_OBJECT (balance_edit),
-     GTK_SIGNAL_FUNC(on_balance_changed), NULL);
+  g_signal_handlers_unblock_by_func
+    (G_OBJECT (data->balance_edit),
+     G_CALLBACK (on_balance_changed), data);
 }
 
 static gnc_numeric
-get_final_balance (Account *account)
+get_final_balance (GHashTable *hash, Account *account)
 {
-  GHashTable *hash;
   gnc_numeric *balance;
   char *fullname;
 
-  if (!account || !hierarchy_window) return gnc_numeric_zero ();
-
-  hash = gtk_object_get_data (GTK_OBJECT (hierarchy_window), "balance_hash");
-  if (!hash) return gnc_numeric_zero ();
+  if (!hash || !account)
+    return gnc_numeric_zero ();
 
   fullname = xaccAccountGetFullName (account, ':');
-
   balance = g_hash_table_lookup (hash, fullname);
-
   g_free (fullname);
 
   if (balance)
     return *balance;
-
   return gnc_numeric_zero ();
 }
 
 static void
-set_final_balance (Account *account, gnc_numeric in_balance)
+set_final_balance (GHashTable *hash, Account *account, gnc_numeric in_balance)
 {
-  GHashTable *hash;
   gnc_numeric *balance;
   char *fullname;
 
-  if (!account || !hierarchy_window) return;
-
-  hash = gtk_object_get_data (GTK_OBJECT (hierarchy_window), "balance_hash");
-  if (!hash) return;
+  if (!hash || !account)
+    return;
 
   fullname = xaccAccountGetFullName (account, ':');
 
   balance = g_hash_table_lookup (hash, fullname);
-  if (balance)
-  {
+  if (balance) {
     *balance = in_balance;
     g_free (fullname);
+    return;
   }
-  else
-  {
-    balance = g_new (gnc_numeric, 1);
-    *balance = in_balance;
 
-    g_hash_table_insert (hash, fullname, balance);
-  }
+  balance = g_new (gnc_numeric, 1);
+  *balance = in_balance;
+  g_hash_table_insert (hash, fullname, balance);
+  /* fullname string now owned by the hash */
 }
 
 static void
-update_account_balance (GtkCTree *ctree, GtkCTreeNode *node)
+update_account_balance (Account *account,
+			hierarchy_data *data)
 {
-  Account *account;
-  GNCAmountEdit *balance_edit;
   gboolean result, placeholder;
 
-  balance_edit = get_balance_editor ();
-
-  account = gtk_ctree_node_get_row_data (ctree, node);
   if (!account)
     return;
 
-  block_amount_changed ();
-  result = gnc_amount_edit_evaluate (balance_edit);
-  unblock_amount_changed ();
+  block_amount_changed (data);
+  result = gnc_amount_edit_evaluate (data->balance_edit);
+  unblock_amount_changed (data);
 
   if (result)
   {
@@ -246,7 +203,7 @@
     GNCPrintAmountInfo print_info;
     const char *string;
 
-    balance = gnc_amount_edit_get_amount (balance_edit);
+    balance = gnc_amount_edit_get_amount (data->balance_edit);
     placeholder = xaccAccountGetPlaceholder (account);
 
     print_info = gnc_account_print_info (account, FALSE);
@@ -255,50 +212,34 @@
     if (gnc_numeric_zero_p (balance) || placeholder)
       string = "";
 
-    gtk_ctree_node_set_text (ctree, GTK_CTREE_NODE (node), 2, string);
-
     if (gnc_reverse_balance (account))
       balance = gnc_numeric_neg (balance);
 
-    set_final_balance (account, balance);
+    set_final_balance (data->balance_hash, account, balance);
+    gnc_engine_gen_event ((QofEntity*)account,
+			       GNC_EVENT_MODIFY);
   }
 }
 
 static void
-on_balance_changed (GNCAmountEdit *gae)
+on_balance_changed (GNCAmountEdit *gae, hierarchy_data *data)
 {
-  GtkCTree *ctree;
-  GtkCTreeNode *node;
-
-  if (!GTK_WIDGET_SENSITIVE (GTK_WIDGET (gae)))
-    return;
-
-  ctree = hierarchy_get_final_account_tree ();
-  if (!ctree)
-    return;
+	Account *account;
 
-  node = gtk_ctree_node_nth (ctree, GTK_CLIST(ctree)->focus_row);
-  if (!node)
-    return;
+	g_return_if_fail(data != NULL);
+	if (!GTK_WIDGET_SENSITIVE (GTK_WIDGET (gae)))
+		return;
 
-  update_account_balance (ctree, node);
+	account = gnc_tree_view_account_get_selected_account(data->final_account_tree);
+	if (account == NULL)
+	  return;
+	update_account_balance (account, data);
 }
 
 static void
-on_choose_currency_prepare (GnomeDruidPage  *gnomedruidpage,
-                            gpointer         arg1,
-                            gpointer         user_data)
+on_balance_focus_out (GNCAmountEdit *gae, GdkEventFocus *event, hierarchy_data *data)
 {
-  if(!GPOINTER_TO_INT (gtk_object_get_data
-                       (GTK_OBJECT(hierarchy_window), "currency_added")))
-  {
-    gtk_object_set_data (GTK_OBJECT(hierarchy_window),
-                         "currency_added", GINT_TO_POINTER (1));
-
-    gtk_box_pack_start(GTK_BOX(gnc_glade_lookup_widget
-                               (hierarchy_window, "currency_chooser_vbox")),
-                       GTK_WIDGET(get_currency_editor()), FALSE, FALSE, 0);
-  }
+  on_balance_changed (gae, data);
 }
 
 static gchar*
@@ -343,267 +284,203 @@
     return ret;
 }
 
-static void
-add_each_gea_to_clist (gpointer data, gpointer user_data)
+/************************************************************
+ *                  Choose Categories Page                  *
+ ************************************************************/
+static void
+categories_selection_changed (GtkTreeModel *treemodel,
+			      GtkTreePath *arg1,
+			      GtkTreeIter *arg2,
+			      hierarchy_data *data)
 {
-  GncExampleAccount *gea = (GncExampleAccount*)data;
-  GtkCList *clist = GTK_CLIST (user_data);
-  gchar *rowdata[2];
-  int row = 0;
+	data->category_set_changed = TRUE;
+}
+
 
-  rowdata[0] = gea->title;
-  rowdata[1] = gea->short_description;
+static gboolean
+start_helper (GncTreeModelSelection *selection_model,
+	      GtkTreePath           *selection_path,
+	      GtkTreeIter           *selection_iter,
+	      gpointer               data)
+{
+	GtkTreeModel      *model;
+	GtkTreeIter  	   iter;
+	GncExampleAccount *gea;
+
+	g_return_val_if_fail(GNC_IS_TREE_MODEL_SELECTION(selection_model), FALSE);
+	model = gnc_tree_model_selection_get_model (selection_model);
+	gnc_tree_model_selection_convert_iter_to_child_iter (selection_model,
+							     &iter, selection_iter);
+
+	gea = gnc_tree_model_example_account_get_account (GNC_TREE_MODEL_EXAMPLE_ACCOUNT(model), &iter);
+	if (gea != NULL) {
+	  gnc_tree_model_selection_set_selected (selection_model,
+						 selection_iter,
+						 gea->start_selected);
+	}
 
-  row = gtk_clist_insert(clist, row, rowdata);
-  gtk_clist_set_row_data(clist, row, gea);
+	return FALSE;  /* Run entire tree */
 }
 
 static void
-select_initial_geas (gpointer data, gpointer user_data)
+account_categories_tree_view_prepare (hierarchy_data  *data)
 {
-  GncExampleAccount *gea = (GncExampleAccount*)data;
-  GtkCList *clist = GTK_CLIST (user_data);
-
-  if (gea->start_selected) {
-    gint row = gtk_clist_find_row_from_data (clist, gea);
-    gtk_clist_select_row (clist, row, 0);
-  }
+	GSList *list;
+	gchar *locale_dir;
+	GtkTreeView *tree_view;
+	GtkTreeModel *model, *selection_model;
+	GtkTreeViewColumn *column;
+	GtkCellRenderer *renderer;
+
+	locale_dir = gnc_get_ea_locale_dir (GNC_ACCOUNTS_DIR);
+ 	list = gnc_load_example_account_list (temporary,
+					      locale_dir);
+	g_free (locale_dir);
+
+	/* Prepare the account_categories GtkTreeView with a model and with some columns */
+	tree_view = data->categories_tree;
+	model = gnc_tree_model_example_account_new (list);
+	selection_model = gnc_tree_model_selection_new (model);
+	gtk_tree_view_set_model (tree_view, selection_model);
+	g_object_unref (model);
+	g_object_unref (selection_model);
+
+	g_signal_connect (G_OBJECT (selection_model), "row_changed",
+			  G_CALLBACK (categories_selection_changed),
+			  data);
+
+	column = gnc_tree_model_selection_create_tree_view_column (GNC_TREE_MODEL_SELECTION (selection_model),
+								   _("Selected"));
+	gtk_tree_view_append_column (tree_view, column);
+
+	renderer = gtk_cell_renderer_text_new ();
+	column = gtk_tree_view_column_new_with_attributes (_("Account Types"),
+							   renderer,
+							   "text", GNC_TREE_MODEL_EXAMPLE_ACCOUNT_COL_TITLE,
+							   NULL);
+	gtk_tree_view_append_column (tree_view, column);
+
+	column = gtk_tree_view_column_new_with_attributes (_("Description"),
+							   renderer,
+							   "text", GNC_TREE_MODEL_EXAMPLE_ACCOUNT_COL_SHORT_DESCRIPTION,
+							   NULL);
+	gtk_tree_view_append_column (tree_view, column);
+
+	/* Now set the selected checkbox for each item */
+	gtk_tree_model_foreach (GTK_TREE_MODEL (selection_model),
+				(GtkTreeModelForeachFunc)start_helper,
+				NULL);
 }
 
-static void
-on_choose_account_types_prepare (GnomeDruidPage  *gnomedruidpage,
-                                 gpointer         arg1,
-                                 gpointer         user_data)
+void
+on_choose_account_categories_prepare (GnomeDruidPage  *gnomedruidpage,
+				      gpointer         arg1,
+				      hierarchy_data  *data)
 {
   gpointer added_ptr;
 
-  added_ptr = gtk_object_get_data (GTK_OBJECT(hierarchy_window),
-                                   "account_list_added");
+  added_ptr = g_object_get_data (G_OBJECT(hierarchy_window),
+                                 "account_list_added");
 
-  if (!GPOINTER_TO_INT(added_ptr))
+  if (GPOINTER_TO_INT(added_ptr) == 0)
   {
-    GSList *list;
-    GtkCList *clist;
-    gchar *locale_dir = gnc_get_ea_locale_dir (GNC_ACCOUNTS_DIR);
-
+    /* Build the categories tree if necessary */
     gnc_suspend_gui_refresh ();
-	temporary = qof_book_new();
-    list = gnc_load_example_account_list (temporary,
-                                          locale_dir);
+    temporary = qof_book_new();
+    account_categories_tree_view_prepare (data);
     gnc_resume_gui_refresh ();
 
-    clist = get_account_types_clist ();
-
-    gtk_clist_freeze (clist);
-
-    g_slist_foreach (list, add_each_gea_to_clist, (gpointer)clist);
-
-    gtk_clist_set_sort_column (clist, 0);
-    gtk_clist_sort (clist);
-
-    gtk_clist_thaw (clist);
-
-    g_slist_foreach (list, select_initial_geas, (gpointer)clist);
-
     /* clear out the description/tree */
-    {
-      GtkLabel *datext = GTK_LABEL (hierarchy_get_widget
-				    ("account_types_description_entry"));
-      GtkTree *datree = GTK_TREE (hierarchy_get_widget ("account_type_tree"));
-      gtk_label_set_text (datext, "");
-      gtk_tree_clear_items (datree, 0, g_list_length (datree->children));
-    }
-
-    g_slist_free (list);
-    g_free (locale_dir);
-
-    gtk_object_set_data (GTK_OBJECT(hierarchy_window),
-                         "account_list_added",
-                         GINT_TO_POINTER(1));
+    if (data->category_accounts_tree)
+      gtk_widget_destroy(GTK_WIDGET(data->category_accounts_tree));
+    data->category_accounts_tree = NULL;
+    gtk_label_set_text (data->category_description, "");
+
+    g_object_set_data (G_OBJECT(hierarchy_window),
+                       "account_list_added", GINT_TO_POINTER(1));
   }
 }
 
-static gpointer
-add_to_tree_account (Account* toadd, gpointer data)
-{
-  GtkWidget *item;
-  GtkTree *tree = GTK_TREE (data);
-
-  if (!toadd)
-    return NULL;
-
-  item = gtk_tree_item_new_with_label (xaccAccountGetName(toadd));
-  gtk_tree_insert (tree, item, 0);
-  gtk_widget_show (item);
-
-  if (xaccGroupGetNumSubAccounts (xaccAccountGetChildren (toadd)) > 0)
-  {
-    GtkWidget *subtree = gtk_tree_new ();
-
-    gtk_tree_item_set_subtree (GTK_TREE_ITEM(item), subtree);
-    gtk_tree_item_expand (GTK_TREE_ITEM(item));
-    xaccGroupForEachAccount (xaccAccountGetChildren(toadd),
-                             add_to_tree_account, subtree, FALSE);
-  }
-
-  return NULL;
-}
-
-static void
-add_to_tree (GtkTree *tree, AccountGroup *grp)
-{
-  xaccGroupForEachAccount(grp, add_to_tree_account, tree, FALSE);
-}
-
 static void
-on_account_types_list_select_row (GtkCList        *clist,
-                                  gint             row,
-                                  gint             column,
-                                  GdkEvent        *event,
-                                  gpointer         user_data)
-{
-  GtkLabel *datext = GTK_LABEL (hierarchy_get_widget
-                                ("account_types_description_entry"));
-  GtkTree *datree = GTK_TREE (hierarchy_get_widget ("account_type_tree"));
-  GncExampleAccount *gea = gtk_clist_get_row_data (clist, row);
-
-  if(gea->long_description != NULL)
-    gtk_label_set_text (datext, gea->long_description);
-
-  gtk_tree_clear_items (datree, 0, g_list_length (datree->children));
-  add_to_tree (datree, gea->group);
+categories_tree_selection_changed (GtkTreeSelection *selection,
+				      hierarchy_data *data)
+{
+	GtkTreeView *tree_view;
+	GtkTreeModel *selection_model, *model;
+	GtkTreeIter selection_iter, iter;
+	GncExampleAccount *gea;
+
+	/* Remove the old account tree */
+	if (data->category_accounts_tree)
+	  gtk_widget_destroy(GTK_WIDGET(data->category_accounts_tree));
+	data->category_accounts_tree = NULL;
+	gtk_label_set_text (data->category_description, "");
+
+	/* Add a new one if something selected */
+	if (gtk_tree_selection_get_selected (selection, &selection_model, &selection_iter)) {
+		model = gnc_tree_model_selection_get_model (GNC_TREE_MODEL_SELECTION (selection_model));
+		gnc_tree_model_selection_convert_iter_to_child_iter (GNC_TREE_MODEL_SELECTION (selection_model),
+								     &iter, &selection_iter);
+		gea = gnc_tree_model_example_account_get_account (GNC_TREE_MODEL_EXAMPLE_ACCOUNT (model),
+								  &iter);
+		gtk_label_set_text (data->category_description, gea->long_description);
+
+		tree_view = gnc_tree_view_account_new_with_group (gea->group, FALSE);
+		gnc_tree_view_configure_columns (GNC_TREE_VIEW(tree_view), NULL);
+
+		data->category_accounts_tree = tree_view;
+		gtk_tree_view_expand_all (tree_view);
+		gtk_container_add(GTK_CONTAINER(data->category_accounts_box), GTK_WIDGET(tree_view));
+		gtk_widget_show(GTK_WIDGET(tree_view));
+	}
 }
 
-static void
-on_account_types_list_unselect_row (GtkCList        *clist,
-                                    gint             row,
-                                    gint             column,
-                                    GdkEvent        *event,
-                                    gpointer         user_data)
-{
-  GtkLabel *datext = GTK_LABEL (hierarchy_get_widget
-                                ("account_types_description_entry"));
-  GtkTree *datree = GTK_TREE (hierarchy_get_widget ("account_type_tree"));
-
-  gtk_label_set_text (datext, "");
+static gboolean
+select_helper (GncTreeModelSelection *selection_model,
+	       GtkTreePath 	     *selection_path,
+	       GtkTreeIter 	     *selection_iter,
+	       gpointer               data)
+{
+	GtkTreeModel 	  *model;
+	GtkTreeIter  	   iter;
+	GncExampleAccount *gea;
+
+	g_return_val_if_fail(GNC_IS_TREE_MODEL_SELECTION(selection_model), FALSE);
+	model = gnc_tree_model_selection_get_model (selection_model);
+	gnc_tree_model_selection_convert_iter_to_child_iter (selection_model,
+							     &iter, selection_iter);
+
+	gea = gnc_tree_model_example_account_get_account (GNC_TREE_MODEL_EXAMPLE_ACCOUNT(model), &iter);
+	if ((gea != NULL) && !gea->exclude_from_select_all) {
+	  gnc_tree_model_selection_set_selected (selection_model,
+						 selection_iter,
+						 GPOINTER_TO_INT(data));
+	}
 
-  gtk_tree_clear_items (datree, 0, g_list_length (datree->children));
+	return FALSE;  /* Run entire tree */
 }
 
-static void
+void
 select_all_clicked (GtkButton       *button,
-                    gpointer         user_data)
+                    hierarchy_data  *data)
 {
-  //  gtk_clist_select_all (get_account_types_clist ());
-  GtkCList *clist;
-  gint row;
-
-  /* Walk the list; select the rows that are not "excluded" */
-  clist = get_account_types_clist ();
-  for (row = 0; row < clist->rows; row++) {
-    GncExampleAccount *gea = gtk_clist_get_row_data (clist, row);
-    if (! gea->exclude_from_select_all)
-      gtk_clist_select_row (clist, row, 0);
-  }
+	gtk_tree_model_foreach (gtk_tree_view_get_model (data->categories_tree),
+				(GtkTreeModelForeachFunc)select_helper,
+				GINT_TO_POINTER(TRUE));
 }
 
-static void
+void
 clear_all_clicked (GtkButton       *button,
-                   gpointer         user_data)
+		   hierarchy_data  *data)
 {
-  gtk_clist_unselect_all (get_account_types_clist ());
+	gtk_tree_model_foreach (gtk_tree_view_get_model (data->categories_tree),
+				(GtkTreeModelForeachFunc)select_helper,
+				GINT_TO_POINTER(FALSE));
 }
 
-typedef struct FinalInsertData_struct
-{
-  GtkCTree *tree;
-  GtkCTreeNode *node;
-  GtkCTreeNode *sibling;
-} FinalInsertData;
-
-static gchar**
-generate_account_titles (Account *act)
-{
-  gchar **ret;
-
-  ret = g_new (gchar *, 3);
-
-  ret[0] = (gchar*)xaccAccountGetName(act);
-  ret[1] = (gchar*)xaccAccountGetTypeStr(xaccAccountGetType(act));
-
-  {
-    gnc_numeric balance;
-    const char *string;
-
-    balance = get_final_balance (act);
-
-    if (gnc_numeric_zero_p (balance))
-      string = "";
-    else
-    {
-      GNCPrintAmountInfo print_info;
-
-      print_info = gnc_account_print_info (act, FALSE);
-      string = xaccPrintAmount (balance, print_info);
-    }
-
-    ret[2] = (gchar*)string;
-  }
-
-  return ret;
-}
-
-static void
-free_account_titles (gchar **tofree)
-{
-  g_free (tofree);
-}
-
-static gpointer
-add_to_ctree_final_account (Account* toadd, gpointer data)
-{
-  FinalInsertData *topdata = (FinalInsertData*)data;
-  GtkCTreeNode *node;
-  gchar **titles;
-
-  titles = generate_account_titles (toadd);
-
-  node = gtk_ctree_insert_node (topdata->tree, topdata->node,
-                                topdata->sibling, 
-                                titles, 0,
-                                NULL, NULL, NULL, NULL,
-                                FALSE, TRUE);
-
-  free_account_titles (titles);
-
-  gtk_ctree_node_set_row_data (topdata->tree, node, toadd);
-
-  if (xaccGroupGetNumAccounts (xaccAccountGetChildren (toadd)) > 0)
-  {
-    FinalInsertData nextdata;
-    nextdata.tree = topdata->tree;
-    nextdata.node = node;
-    nextdata.sibling = NULL;
-
-    xaccGroupForEachAccount (xaccAccountGetChildren(toadd),
-                             add_to_ctree_final_account, &nextdata, FALSE);
-  }
-
-  topdata->sibling = node;
-
-  return NULL;
-}
-
-static void
-insert_final_accounts (GtkCTree *tree, AccountGroup *group)
-{
-  FinalInsertData data;
-  data.tree = tree;
-  data.node = NULL;
-  data.sibling = NULL;
-
-  xaccGroupForEachAccount(group, add_to_ctree_final_account, &data, FALSE);
-}
+/************************************************************
+ *                  Opening Balances Page                   *
+ ************************************************************/
 
 static void
 delete_our_final_group (void)
@@ -689,14 +566,11 @@
 }
 
 static AccountGroup *
-hierarchy_merge_groups (GSList *dalist)
+hierarchy_merge_groups (GSList *dalist, gnc_commodity *com)
 {
   GSList *mark;
-  gnc_commodity *com;
   AccountGroup *ret = xaccMallocAccountGroup (gnc_get_current_book ());
 
-  com = gnc_currency_edit_get_currency (GNC_CURRENCY_EDIT(get_currency_editor ()));
-
   for (mark = dalist; mark; mark = mark->next)
   {
     GncExampleAccount *xea = mark->data;
@@ -707,201 +581,215 @@
   return ret;
 }
 
-static void
-on_final_account_prepare (GnomeDruidPage  *gnomedruidpage,
-                          gpointer         arg1,
-                          gpointer         user_data)
+static GSList *
+get_selected_account_list (GtkTreeView *tree_view)
 {
-  GtkCList *clist;
-  GtkWidget *ctree;
-  GSList *actlist;
-  GList *dalist;
-
-  clist = get_account_types_clist ();
-  ctree = GTK_WIDGET (hierarchy_get_final_account_tree ());
-
-  gtk_clist_clear (GTK_CLIST(ctree));
-
-  actlist = NULL;
-  for (dalist = clist->selection; dalist; dalist = dalist->next)
-  {
-    int row = GPOINTER_TO_INT(dalist->data);
-    actlist = g_slist_append (actlist, gtk_clist_get_row_data(clist, row));
-  }
-
-  gnc_suspend_gui_refresh ();
-  delete_our_final_group ();
-  our_final_group = hierarchy_merge_groups (actlist);
-  gnc_resume_gui_refresh ();
-
-  insert_final_accounts (GTK_CTREE(ctree), our_final_group);
-
-  gnc_clist_columns_autosize (GTK_CLIST(ctree));
-
-  {
-    GNCAmountEdit *balance_edit;
-    GtkWidget *entry;
-
-    block_amount_changed ();
-
-    balance_edit = get_balance_editor ();
-    gnc_amount_edit_set_amount (balance_edit, gnc_numeric_zero ());
+	GSList *actlist = NULL;
+	GtkTreeModel *model, *selection_model;
+	GtkTreeIter iter, selection_iter;
+	GncExampleAccount *gea;
+
+	selection_model = gtk_tree_view_get_model (tree_view);
+	model = gnc_tree_model_selection_get_model (GNC_TREE_MODEL_SELECTION (selection_model));
+
+	if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter)) {
+		do {
+			gnc_tree_model_selection_convert_child_iter_to_iter (GNC_TREE_MODEL_SELECTION (selection_model),
+									     &selection_iter, &iter);
+
+			if (gnc_tree_model_selection_is_selected (GNC_TREE_MODEL_SELECTION (selection_model),
+								  &selection_iter)) {
+				gea = gnc_tree_model_example_account_get_account (GNC_TREE_MODEL_EXAMPLE_ACCOUNT (model),
+										  &iter);
+				
+				actlist = g_slist_append (actlist, gea);
+			}
+		} while (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter));
+	}
 
-    entry = gnc_amount_edit_gtk_entry (balance_edit);
-    gtk_entry_set_text (GTK_ENTRY (entry), "");
+	return actlist;
+}
 
-    unblock_amount_changed ();
+static void
+balance_cell_data_func (GtkTreeViewColumn *tree_column,
+	       		GtkCellRenderer *cell,
+			GtkTreeModel *model,
+			GtkTreeIter *iter,
+			gpointer user_data)
+{
+	Account *account;
+	gnc_numeric balance;
+	const gchar *string;
+	GNCPrintAmountInfo print_info;
+	hierarchy_data *data = (hierarchy_data *)user_data;
+
+	g_return_if_fail (GTK_TREE_MODEL (model));
+	account = gnc_tree_view_account_get_account_from_iter (model, iter);
+
+	balance = get_final_balance (data->balance_hash, account);
+	if (gnc_reverse_balance (account))
+		balance = gnc_numeric_neg (balance);
+
+	if (gnc_numeric_zero_p (balance)) {
+		string = "";
+	} else {
+		print_info = gnc_account_print_info (account, FALSE);
+		string = xaccPrintAmount (balance, print_info);
+	}
 
-    gtk_widget_set_sensitive (GTK_WIDGET (balance_edit), FALSE);
-  }
+	g_object_set (G_OBJECT (cell),
+		      "text", string,
+		      NULL);
 }
 
 static void
-on_final_account_tree_select_row (GtkCTree        *ctree,
-                                  GList           *node,
-                                  gint             column,
-                                  gpointer         user_data)
+on_final_account_tree_selection_changed (GtkTreeSelection *selection,
+					 hierarchy_data *data)
 {
-  Account *account;
-  GtkToggleButton *placeholder_button;
-  GNCAmountEdit *balance_edit;
-  GNCPrintAmountInfo print_info;
-  gnc_numeric balance;
-  gboolean is_placeholder;
-
-  balance_edit = get_balance_editor ();
-
-  account = gtk_ctree_node_get_row_data (ctree, GTK_CTREE_NODE (node));
-  if (!account || xaccAccountGetType (account) == EQUITY)
-  {
-    GtkWidget *entry;
-
-    entry = gnc_amount_edit_gtk_entry (balance_edit);
-    gtk_entry_set_text (GTK_ENTRY (entry), "");
-
-    gtk_widget_set_sensitive (GTK_WIDGET (balance_edit), FALSE);
-
-    return;
-  }
-
-  is_placeholder = xaccAccountGetPlaceholder (account);
-  placeholder_button = get_placeholder_checkbox ();
-  gtk_toggle_button_set_active(placeholder_button, is_placeholder);
-
-  gtk_widget_set_sensitive (GTK_WIDGET (balance_edit), !is_placeholder);
+	Account *account;
+	GNCPrintAmountInfo print_info;
+	gnc_numeric balance;
+	GtkWidget *entry;
 
-  balance = get_final_balance (account);
-
-  if (gnc_reverse_balance (account))
-    balance = gnc_numeric_neg (balance);
-
-  print_info = gnc_account_print_info (account, FALSE);
-  gnc_amount_edit_set_print_info (balance_edit, print_info);
-  gnc_amount_edit_set_fraction (balance_edit,
-                                xaccAccountGetCommoditySCU (account));
+	/* Update the account we came from */
+	if (data->selected_account) {
+	  update_account_balance (data->selected_account, data);
+	  data->selected_account = NULL;
+	}
 
-  block_amount_changed ();
+	/* Clean up the amount entry box */
+	entry = gnc_amount_edit_gtk_entry (data->balance_edit);
+	gtk_entry_set_text (GTK_ENTRY (entry), "");
+	gtk_widget_set_sensitive (GTK_WIDGET (data->balance_edit), FALSE);
 
-  gnc_amount_edit_set_amount (balance_edit, balance);
-  if (gnc_numeric_zero_p (balance))
-  {
-    GtkWidget *entry;
+	/* What's the new selection? */
+	if (!gtk_tree_selection_get_selected (selection, NULL, NULL))
+		return;
 
-    entry = gnc_amount_edit_gtk_entry (balance_edit);
-    gtk_entry_set_text (GTK_ENTRY (entry), "");
-  }
+	/* Ignore equity accounts */
+	account = gnc_tree_view_account_get_selected_account(data->final_account_tree);
+	if (xaccAccountGetType (account) == EQUITY)
+		return;
 
-  unblock_amount_changed ();
+	/* Set up the amount entry box */
+	data->selected_account = account;
+	gtk_widget_set_sensitive (GTK_WIDGET (data->balance_edit),
+				  !xaccAccountGetPlaceholder (account));
+	balance = get_final_balance (data->balance_hash, account);
+	if (gnc_reverse_balance (account))
+		balance = gnc_numeric_neg (balance);
+	print_info = gnc_account_print_info (account, FALSE);
+	gnc_amount_edit_set_print_info (data->balance_edit, print_info);
+	gnc_amount_edit_set_fraction (data->balance_edit,
+				      xaccAccountGetCommoditySCU (account));
+	block_amount_changed (data);
+	gnc_amount_edit_set_amount (data->balance_edit, balance);
+	if (gnc_numeric_zero_p (balance))
+		gtk_entry_set_text (GTK_ENTRY (entry), "");
+	unblock_amount_changed (data);
 }
 
-static void
-on_final_account_tree_unselect_row (GtkCTree        *ctree,
-                                    GList           *node,
-                                    gint             column,
-                                    gpointer         user_data)
+void
+on_final_account_prepare (GnomeDruidPage  *gnomedruidpage,
+                          gpointer         arg1,
+                          hierarchy_data  *data)
 {
-  update_account_balance (ctree, GTK_CTREE_NODE (node));
-
-  {
-    GNCAmountEdit *balance_edit;
-    GtkWidget *entry;
+  GSList *actlist;
+  GtkTreeView *tree_view;
+  GtkTreeSelection *selection;
+  GtkCellRenderer *renderer;
+  GtkTreeViewColumn *column;
+  gnc_commodity *com;
+  GtkWidget *entry;
 
-    balance_edit = get_balance_editor ();
+  /* Anything to do? */
+  if (!data->category_set_changed)
+    return;
+  data->category_set_changed = FALSE;
 
-    entry = gnc_amount_edit_gtk_entry (balance_edit);
-    gtk_entry_set_text (GTK_ENTRY (entry), "");
+  gnc_suspend_gui_refresh ();
 
-    gtk_widget_set_sensitive (GTK_WIDGET (balance_edit), FALSE);
+  /* Delete any existing account tree */
+  if (data->final_account_tree) {
+    gtk_widget_destroy(GTK_WIDGET(data->final_account_tree));
+    data->final_account_tree = NULL;
   }
-}
-
-static void
-on_final_account_tree_placeholder_toggled (GtkToggleButton *button,
-					   gpointer   user_data)
-{
-  gboolean state;
-  Account *account;
-  GtkCTree *ctree;
-  GtkCTreeNode *node;
-  GNCAmountEdit *balance_edit;
+  delete_our_final_group ();
 
-  state = gtk_toggle_button_get_active(button);
-  if (((ctree = hierarchy_get_final_account_tree ()) != NULL) &&
-      ((node = gtk_ctree_node_nth (ctree, GTK_CLIST(ctree)->focus_row)) != NULL) &&
-      ((account = gtk_ctree_node_get_row_data (ctree, node)) != NULL)) {
-          xaccAccountSetPlaceholder (account, state);
-  }
 
-  balance_edit = get_balance_editor ();
-  if (balance_edit) {
-      gtk_widget_set_sensitive(GTK_WIDGET(balance_edit), !state);
-  }
-}
-
-static gboolean
-on_final_account_next (GnomeDruidPage  *gnomedruidpage,
-                       gpointer         arg1,
-                       gpointer         user_data)
-{
-  GNCAmountEdit *balance_edit;
+  /* Build a new account list */
+  actlist = get_selected_account_list (data->categories_tree);
+  com = gnc_currency_edit_get_currency (GNC_CURRENCY_EDIT(data->currency_selector));
+  our_final_group = hierarchy_merge_groups (actlist, com);
+
+
+  /* Now build a new account tree */
+  data->final_account_tree = GNC_TREE_VIEW_ACCOUNT(gnc_tree_view_account_new_with_group (our_final_group, FALSE));
+  tree_view = GTK_TREE_VIEW(data->final_account_tree);
+  gtk_tree_view_set_headers_visible (tree_view, TRUE);
+
+  gnc_tree_view_configure_columns (GNC_TREE_VIEW(data->final_account_tree),
+				   "type", "placeholder", NULL);
+
+  selection = gtk_tree_view_get_selection (tree_view);
+  gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
+  g_signal_connect (G_OBJECT (selection), "changed",
+		    G_CALLBACK (on_final_account_tree_selection_changed),
+		    data);
+
+  renderer = gtk_cell_renderer_text_new ();
+  g_object_set (G_OBJECT (renderer),
+		"xalign", 1.0,
+		NULL);
+  column = gtk_tree_view_column_new_with_attributes (_("Opening Balance"),
+						     renderer,
+						     NULL);
+  gtk_tree_view_column_set_cell_data_func (column, renderer, 
+					   balance_cell_data_func,
+					   (gpointer)data, NULL);
+  gnc_tree_view_append_column (GNC_TREE_VIEW(tree_view), column);
+
+  gtk_container_add(GTK_CONTAINER(data->final_account_tree_box),
+		    GTK_WIDGET(data->final_account_tree));
+
+  /* Expand the entire tree */
+  gtk_tree_view_expand_all (tree_view);
+  gtk_widget_show(GTK_WIDGET(data->final_account_tree));
+  gnc_resume_gui_refresh ();
 
-  balance_edit = get_balance_editor ();
 
-  if (!gnc_amount_edit_evaluate (balance_edit))
-  {
-    GtkWidget *top;
-    const char *message = _("You must enter a valid balance.");
 
-    top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
-    gnc_error_dialog(top, message);
+  /* Now set up the balance widget */
+  entry = gnc_amount_edit_gtk_entry (data->balance_edit);
 
-    return TRUE;
-  }
+  block_amount_changed (data);
+  gnc_amount_edit_set_amount (data->balance_edit, gnc_numeric_zero ());
+  gtk_entry_set_text (GTK_ENTRY(entry), "");
+  unblock_amount_changed (data);
 
-  return FALSE;
+  gtk_widget_set_sensitive (GTK_WIDGET (data->balance_edit), FALSE);
 }
 
-static void
-cancel_everything_out(void)
+
+void
+on_cancel (GnomeDruid      *gnomedruid,
+	   hierarchy_data  *data)
 {
+  gnc_suspend_gui_refresh ();
   delete_our_final_group ();
   delete_hierarchy_window ();
   gncp_new_user_finish ();
+  g_free(data);
+  gnc_resume_gui_refresh ();
 }
 
-static void
-on_cancel (GnomeDruid      *gnomedruid,
-                 gpointer         user_data)
-{
-  cancel_everything_out ();
-}
 
 static gpointer
-starting_balance_helper (Account *account, gpointer data)
+starting_balance_helper (Account *account, hierarchy_data *data)
 {
   gnc_numeric balance;
 
-  balance = get_final_balance (account);
+  balance = get_final_balance (data->balance_hash, account);
   if (!gnc_numeric_zero_p (balance))
     gnc_account_create_opening_balance (account, balance, time (NULL),
                                         gnc_get_current_book ());
@@ -909,16 +797,16 @@
   return NULL;
 }
 
-static void
+void
 on_finish (GnomeDruidPage  *gnomedruidpage,
            gpointer         arg1,
-           gpointer         user_data)
+           hierarchy_data  *data)
 {
 	gnc_suspend_gui_refresh ();
 	
 	if (our_final_group)
-	xaccGroupForEachAccount (our_final_group, starting_balance_helper,
-							 NULL, TRUE);
+	  xaccGroupForEachAccount (our_final_group, (AccountCallback)starting_balance_helper,
+				   data, TRUE);
 	ENTER (" ");
 	qof_book_merge_window = gtk_object_get_data (GTK_OBJECT (hierarchy_window), "Merge Druid");
 	if(qof_book_merge_window) {
@@ -942,6 +830,7 @@
 	xaccGroupConcatGroup (gnc_get_current_group (), our_final_group);
 	qof_book_destroy(temporary);
 	
+	g_free(data);
 	gnc_resume_gui_refresh ();
 	LEAVE (" ");
 }
@@ -949,89 +838,65 @@
 static GtkWidget *
 gnc_create_hierarchy_druid (void)
 {
+	hierarchy_data *data;
 	GtkWidget *balance_edit;
 	GtkWidget *dialog;
 	GtkWidget *druid;
-	GtkWidget *clist;
+	GtkTreeView *tree_view;
 	GtkWidget *box;
-	GHashTable *hash;
 	GladeXML *xml;
 	
+	data = g_new0 (hierarchy_data, 1);
 	xml = gnc_glade_xml_new ("account.glade", "Hierarchy Druid");
 	
-	glade_xml_signal_connect
-	(xml, "on_choose_currency_prepare",
-		 GTK_SIGNAL_FUNC (on_choose_currency_prepare));
-	
-	glade_xml_signal_connect
-	(xml, "on_choose_account_types_prepare",
-		 GTK_SIGNAL_FUNC (on_choose_account_types_prepare));
-	
-	glade_xml_signal_connect
-	(xml, "on_account_types_list_select_row",
-		 GTK_SIGNAL_FUNC (on_account_types_list_select_row));
-	
-	glade_xml_signal_connect
-	(xml, "on_account_types_list_unselect_row",
-		 GTK_SIGNAL_FUNC (on_account_types_list_unselect_row));
-	
-	glade_xml_signal_connect
-	(xml, "on_final_account_prepare",
-		 GTK_SIGNAL_FUNC (on_final_account_prepare));
-	
-	glade_xml_signal_connect
-	(xml, "on_final_account_tree_select_row",
-		 GTK_SIGNAL_FUNC (on_final_account_tree_select_row));
-	
-	glade_xml_signal_connect
-	(xml, "on_final_account_tree_unselect_row",
-		 GTK_SIGNAL_FUNC (on_final_account_tree_unselect_row));
-	
-	glade_xml_signal_connect
-	(xml, "on_final_account_tree_placeholder_toggled",
-		 GTK_SIGNAL_FUNC (on_final_account_tree_placeholder_toggled));
-	
-	glade_xml_signal_connect
-	(xml, "on_final_account_next",
-		 GTK_SIGNAL_FUNC (on_final_account_next));
-	
-	glade_xml_signal_connect
-	(xml, "select_all_clicked", GTK_SIGNAL_FUNC (select_all_clicked));
-	
-	glade_xml_signal_connect
-	(xml, "clear_all_clicked", GTK_SIGNAL_FUNC (clear_all_clicked));
-	
-	glade_xml_signal_connect (xml, "on_finish", GTK_SIGNAL_FUNC (on_finish));
-	
-	glade_xml_signal_connect (xml, "on_cancel", GTK_SIGNAL_FUNC (on_cancel));
-	
 	dialog = glade_xml_get_widget (xml, "Hierarchy Druid");
 	gnome_window_icon_set_from_default (GTK_WINDOW (dialog));
+	data->dialog = dialog;
 	
 	druid = glade_xml_get_widget (xml, "hierarchy_druid");
 	gnc_druid_set_colors (GNOME_DRUID (druid));
 	
+	gtk_widget_show (glade_xml_get_widget (xml, "start_page"));
+	gtk_widget_show (glade_xml_get_widget (xml, "newUserDruidFinishPage"));
+	
+	/* Currency Page */
+	data->currency_selector = gnc_currency_edit_new();
+	gnc_currency_edit_set_currency (GNC_CURRENCY_EDIT(data->currency_selector), gnc_default_currency());
+	gtk_widget_show (data->currency_selector);
+	box = glade_xml_get_widget (xml, "currency_chooser_vbox");
+	gtk_box_pack_start(GTK_BOX(box), data->currency_selector, FALSE, FALSE, 0);
+
+	/* Categories Page */
 	balance_edit = gnc_amount_edit_new ();
+	data->balance_edit = GNC_AMOUNT_EDIT(balance_edit);
 	gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (balance_edit), TRUE);
 	gtk_widget_show (balance_edit);
-	
-	gtk_signal_connect (GTK_OBJECT (balance_edit), "amount_changed",
-					  GTK_SIGNAL_FUNC(on_balance_changed), NULL);
-	
-	clist = glade_xml_get_widget (xml, "account_types_clist");
-	gtk_clist_column_titles_passive (GTK_CLIST (clist));
-	
 	box = glade_xml_get_widget (xml, "start_balance_box");
 	gtk_box_pack_start (GTK_BOX (box), balance_edit, TRUE, TRUE, 0);
+	g_signal_connect (G_OBJECT (balance_edit), "amount_changed",
+			  G_CALLBACK (on_balance_changed), data);
+	g_signal_connect (G_OBJECT (balance_edit), "focus_out_event",
+			  G_CALLBACK (on_balance_focus_out), data);
+	
+	/* Opening Balances Page */
+	tree_view = GTK_TREE_VIEW(glade_xml_get_widget (xml, "account_categories_tree_view"));
+	g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (tree_view)), "changed",
+			  G_CALLBACK (categories_tree_selection_changed), data);
+	gtk_tree_selection_set_mode (gtk_tree_view_get_selection (tree_view), GTK_SELECTION_SINGLE);
+	data->categories_tree = tree_view;
+	
+	data->category_accounts_box = GTK_BOX(glade_xml_get_widget (xml, "accounts_in_category"));
+	data->category_description = GTK_LABEL(glade_xml_get_widget (xml, "account_types_description_entry"));
+	
+	data->final_account_tree_box = glade_xml_get_widget (xml, "final_account_tree_box");
+	data->final_account_tree = NULL;
 	
-	gtk_object_set_data (GTK_OBJECT(dialog), "balance_editor", balance_edit);
+	data->balance_hash = g_hash_table_new (g_str_hash, g_str_equal);
 	
-	hash = g_hash_table_new (g_str_hash, g_str_equal);
+	g_signal_connect (G_OBJECT(dialog), "destroy",
+			  G_CALLBACK (gnc_hierarchy_destroy_cb), data);
 	
-	gtk_object_set_data (GTK_OBJECT(dialog), "balance_hash", hash);
-	
-	gtk_signal_connect (GTK_OBJECT(dialog), "destroy",
-					  GTK_SIGNAL_FUNC(gnc_hierarchy_destroy_cb), NULL);
+	glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, data);
 	
 	return dialog;
 }
@@ -1052,3 +917,19 @@
 
 	return;
 }
+
+static void
+gnc_ui_hierarchy_druid_hook (void)
+{
+  if (gnc_gconf_get_bool(GCONF_SECTION, "show_on_new_file", NULL)) {
+    printf("start druid\n");
+    gnc_ui_hierarchy_druid();
+  }
+}
+
+void
+gnc_ui_hierarchy_druid_initialize (void)
+{
+  gnc_hook_add_dangler(HOOK_NEW_BOOK,
+		       (GFunc)gnc_ui_hierarchy_druid_hook, NULL);
+}
Index: dialog-scheduledxaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-scheduledxaction.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -Lsrc/gnome/dialog-scheduledxaction.c -Lsrc/gnome/dialog-scheduledxaction.c -u -r1.80 -r1.81
--- src/gnome/dialog-scheduledxaction.c
+++ src/gnome/dialog-scheduledxaction.c
@@ -31,6 +31,7 @@
 #include "SchedXaction.h"
 #include "SX-book.h"
 #include "SX-book-p.h"
+#include "dialog-preferences.h"
 #include "dialog-scheduledxaction.h"
 #include "dialog-utils.h"
 #include "gnc-book.h"
@@ -38,17 +39,19 @@
 #include "gnc-date.h"
 #include "gnc-date-edit.h"
 #include "gnc-dense-cal.h"
-#include "gnc-engine-util.h"
+#include "gnc-embedded-window.h"
+#include "gnc-engine.h"
 #include "gnc-frequency.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
+#include "gnc-hooks.h"
 #include "gnc-ledger-display.h"
+#include "gnc-plugin-page.h"
+#include "gnc-plugin-page-register.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
-#include "global-options.h"
 #include "gnucash-sheet.h"
 #include "messages.h"
-#include "window-help.h"
-#include "window-register.h"
 
 #include "gnc-split-reg.h"
 
@@ -59,14 +62,14 @@
 #include <langinfo.h>
 #endif
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
+#define SX_LIST_GCONF_SECTION "dialogs/scheduled_trans/transaction_list"
 #define SX_LIST_WIN_PREFIX "sx_list_win"
 #define SX_LIST_GLADE_NAME "Scheduled Transaction List"
 #define SX_LIST "sched_xact_list"
 #define SX_LIST_UPCOMING_FRAME "upcoming_cal_frame"
 #define SX_EDITOR_GLADE_NAME "Scheduled Transaction Editor"
-#define SX_OPT_STR "Scheduled Transactions"
 
 #define SXED_WIN_PREFIX "sx_editor_win"
 #define SXED_NAME_ENTRY "sxe_name"
@@ -78,10 +81,11 @@
 #define REMIND_OPT "remind_opt"
 #define REMIND_DAYS_SPIN "remind_days"
 #define END_DATE_BOX "end_date_hbox"
-#define END_GNOME_NUMENTRY "end_gnome_nentry"
-#define REMAIN_GNOME_NUMENTRY "remain_gnome_nentry"
+#define END_ENTRY "end_nentry"
 #define REMAIN_ENTRY "remain_nentry"
 
+#define SX_GLADE_FILE "sched-xact.glade"
+
 #define END_NEVER_OPTION 0
 #define END_DATE_OPTION  1
 #define NUM_OCCUR_OPTION 2
@@ -156,13 +160,14 @@
         GtkToggleButton *optEndDate;
         GtkToggleButton *optEndNone;
         GtkToggleButton *optEndCount;
-        GnomeNumberEntry *endCountEntry;
-        GnomeNumberEntry *endRemainEntry;
+        GtkEntry *endCountEntry;
+        GtkEntry *endRemainEntry;
         GNCDateEdit *endDateEntry;
 
         char *sxGUIDstr;
 
-        GtkWidget *toolbar;
+        GncEmbeddedWindow *embed_window;
+	GncPluginPage *plugin_page;
 };
 
 /** Prototypes **********************************************************/
@@ -215,7 +220,7 @@
 
 static void gnc_sxed_reg_check_close(SchedXactionEditorDialog *sxed);
 
-static gint sxed_close_event( GnomeDialog *dlg, gpointer ud );
+static gint sxed_close_event( GtkDialog *dlg, gpointer ud );
 
 static gboolean sxed_confirmed_cancel( SchedXactionEditorDialog *sxed );
 
@@ -226,6 +231,33 @@
 static void _clear_runtime_info_row( gpointer key, gpointer value, gpointer user_data );
 
 
+static void gnc_sxed_cmd_edit_cut (GtkAction *action, SchedXactionEditorDialog *sxed);
+static void gnc_sxed_cmd_edit_copy (GtkAction *action, SchedXactionEditorDialog *sxed);
+static void gnc_sxed_cmd_edit_paste (GtkAction *action, SchedXactionEditorDialog *sxed);
+
+static GtkActionEntry gnc_sxed_menu_entries [] =
+{
+	/* Toplevel */
+	{ "EditAction", NULL, N_("_Edit"), NULL, NULL, NULL },
+	{ "ViewAction", NULL, N_("_View"), NULL, NULL, NULL },
+	{ "ViewAction", NULL, N_("_View"), NULL, NULL, NULL },
+	{ "ActionsAction", NULL, N_("_Actions"), NULL, NULL, NULL },
+	{ "TransactionAction", NULL, N_("_Transaction"), NULL, NULL, NULL },
+
+	/* Edit menu */
+	{ "EditCutAction", GTK_STOCK_CUT, N_("Cu_t"), "<control>x",
+	  NULL,
+	  G_CALLBACK (gnc_sxed_cmd_edit_cut) },
+	{ "EditCopyAction", GTK_STOCK_COPY, N_("_Copy"), "<control>c",
+	  NULL,
+	  G_CALLBACK (gnc_sxed_cmd_edit_copy) },
+	{ "EditPasteAction", GTK_STOCK_PASTE, N_("_Paste"), "<control>v",
+	  NULL,
+	  G_CALLBACK (gnc_sxed_cmd_edit_paste) },
+
+};
+static guint gnc_sxed_menu_n_entries = G_N_ELEMENTS (gnc_sxed_menu_entries);
+
 /** Implementations *****************************************************/
 
 static
@@ -235,7 +267,7 @@
         SchedXactionDialog        *sxd = user_data;
         
         gnc_sxl_record_size( sxd );
-        gnome_dialog_close( GNOME_DIALOG( sxd->dialog ) );
+        gtk_widget_hide( sxd->dialog );
 }
 
 static
@@ -274,8 +306,8 @@
 
         gnc_sxed_reg_check_close( sxed );
         gnc_sxed_record_size( sxed );
-        /* Real dialog cleanup occurs in "destroy" callback. */
-        gnome_dialog_close( GNOME_DIALOG( sxed->dialog ) );
+        gtk_widget_destroy( sxed->dialog );
+        /* The data will be cleaned up in the destroy handler. */
 }
 
 static
@@ -323,9 +355,7 @@
 void
 editor_help_button_clicked(GtkButton *b, SchedXactionEditorDialog *sxed)
 {
-        gnc_help_window *help = gnc_help_window_new();
-	gnc_help_window_show_help(help, HH_SXEDITOR, NULL);
-	return;
+	gnc_gnome_help(HF_USAGE, HL_SXEDITOR);
 }
 
 static void
@@ -460,15 +490,17 @@
                 /* dialog says... num occur */
                 if ( gtk_toggle_button_get_active( sxed->optEndCount ) ) {
                         gint sxNumOccur, sxNumRem, dlgNumOccur, dlgNumRem;
+			const gchar *text;
 
                         if ( ! xaccSchedXactionGetNumOccur( sxed->sx ) ) {
                                 return TRUE;
                         }
 
-                        dlgNumOccur = (gint)gnome_number_entry_get_number( sxed->
-                                                                           endCountEntry );
-                        dlgNumRem = (gint)gnome_number_entry_get_number( sxed->
-                                                                         endRemainEntry );
+			text = gtk_entry_get_text (sxed->endCountEntry);
+			sscanf (text, "%d", &dlgNumOccur);
+
+			text = gtk_entry_get_text (sxed->endRemainEntry);
+			sscanf (text, "%d", &dlgNumRem);
 
                         sxNumOccur = xaccSchedXactionGetNumOccur( sxed->sx );
                         sxNumRem = xaccSchedXactionGetRemOccur( sxed->sx );
@@ -909,12 +941,13 @@
 
                 if ( gtk_toggle_button_get_active(sxed->optEndCount)) {
                         gint occur, rem;
+			const gchar *text;
 
-                        occur = (gint)gnome_number_entry_get_number( sxed->endCountEntry );
-                        xaccSchedXactionSetNumOccur( sxed->sx, occur );
+			text = gtk_entry_get_text (sxed->endCountEntry);
+			sscanf (text, "%d", &occur);
 
-                        rem = (gint)gnome_number_entry_get_number( sxed->endRemainEntry );
-                        xaccSchedXactionSetRemOccur( sxed->sx, rem );
+			text = gtk_entry_get_text (sxed->endRemainEntry);
+			sscanf (text, "%d", &rem);
 
                         if ( occur == 0 ) {
                                 const char *sx_occur_count_zero_msg =
@@ -1004,10 +1037,15 @@
                         xaccSchedXactionSetNumOccur( sxed->sx, 0 );
                 } else if ( gtk_toggle_button_get_active(sxed->optEndCount) ) {
                         gint num;
+			const gchar *text;
+
                         /* get the occurances data */
-                        num = (gint)gnome_number_entry_get_number( sxed->endCountEntry );
+			text = gtk_entry_get_text (sxed->endCountEntry);
+			sscanf (text, "%d", &num);
                         xaccSchedXactionSetNumOccur( sxed->sx, num );
-                        num = (gint)gnome_number_entry_get_number( sxed->endRemainEntry );
+
+			text = gtk_entry_get_text (sxed->endRemainEntry);
+			sscanf (text, "%d", &num);
                         xaccSchedXactionSetRemOccur( sxed->sx, num );
 
                         g_date_clear( &gdate, 1 );
@@ -1172,7 +1210,7 @@
 
         sxd = g_new0( SchedXactionDialog, 1 );
 
-        sxd->gxml = gnc_glade_xml_new( "sched-xact.glade", SX_LIST_GLADE_NAME );
+        sxd->gxml = gnc_glade_xml_new( SX_GLADE_FILE, SX_LIST_GLADE_NAME );
         sxd->dialog = glade_xml_get_widget( sxd->gxml, SX_LIST_GLADE_NAME );
 
         sxd->sxData = g_hash_table_new( NULL, NULL );
@@ -1216,15 +1254,7 @@
         gnc_sxd_set_sort_compare( GTK_CLIST(w), sxd->currentSortCol );
         gtk_clist_set_auto_sort( GTK_CLIST(w), TRUE );
 
-        {
-                int width, height;
-
-                gnc_get_window_size( SX_LIST_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW(sxd->dialog),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(SX_LIST_GCONF_SECTION, GTK_WINDOW(sxd->dialog));
 
         gnc_register_gui_component( DIALOG_SCHEDXACTION_CM_CLASS,
                                     NULL, /* no refresh_handler */
@@ -1242,10 +1272,7 @@
 void
 gnc_sxl_record_size( SchedXactionDialog *sxd )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxd->dialog->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SX_LIST_WIN_PREFIX, w, h );
+	gnc_save_window_size(SX_LIST_GCONF_SECTION, GTK_WINDOW(sxd->dialog));
 }
 
 void
@@ -1296,7 +1323,7 @@
 
 static
 gint
-sxed_close_event( GnomeDialog *dlg, gpointer ud )
+sxed_close_event( GtkDialog *dlg, gpointer ud )
 {
         SchedXactionEditorDialog *sxed = (SchedXactionEditorDialog*)ud;
 
@@ -1344,11 +1371,11 @@
         w = glade_xml_get_widget( sxed->gxml, "rb_num_occur" );
         sxed->optEndCount = GTK_TOGGLE_BUTTON(w);
 
-        w = glade_xml_get_widget( sxed->gxml, END_GNOME_NUMENTRY );
-        sxed->endCountEntry = GNOME_NUMBER_ENTRY(w);
+        w = glade_xml_get_widget( sxed->gxml, END_ENTRY );
+        sxed->endCountEntry = GTK_ENTRY(w);
 
-        w = glade_xml_get_widget( sxed->gxml, REMAIN_GNOME_NUMENTRY );
-        sxed->endRemainEntry = GNOME_NUMBER_ENTRY(w);
+        w = glade_xml_get_widget( sxed->gxml, REMAIN_ENTRY );
+        sxed->endRemainEntry = GTK_ENTRY(w);
 
 }
 
@@ -1397,7 +1424,7 @@
         }
 
         sxed         = g_new0( SchedXactionEditorDialog, 1 );
-        sxed->gxml   = gnc_glade_xml_new( "sched-xact.glade",
+        sxed->gxml   = gnc_glade_xml_new( SX_GLADE_FILE,
                                         SX_EDITOR_GLADE_NAME );
         sxed->dialog = glade_xml_get_widget( sxed->gxml, SX_EDITOR_GLADE_NAME );
 
@@ -1406,7 +1433,6 @@
         sxed->newsxP = newSX;
         /* Setup dense-cal local mark storage */
         {
-                int i;
                 sxed->cal_marks = g_new0( GDate*, EX_CAL_NUM_MONTHS * 31 );
                 for( i=0; i<(EX_CAL_NUM_MONTHS * 31); i++ ) {
                         sxed->cal_marks[i] = g_date_new();
@@ -1473,14 +1499,7 @@
 	/* Allow grow, allow shrink, auto-shrink */
         gtk_window_set_policy (GTK_WINDOW(sxed->dialog), TRUE, TRUE, FALSE);
 
-        {
-                int width, height;
-                gnc_get_window_size( SXED_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW( sxed->dialog ),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog));
 
         /* create the frequency-selection macrowidget and example
          * [dense-]calendar. */
@@ -1490,7 +1509,8 @@
         /* populate */
         schedXact_editor_populate( sxed );
 
-        gtk_widget_show_all(sxed->dialog);
+	/* Do not call show_all here. Screws up the gtkuimanager code */
+        gtk_widget_show(sxed->dialog);
 
 	/* Refresh the cal and the ledger */
 	gtk_widget_queue_resize( GTK_WIDGET( sxed->example_cal ) );
@@ -1503,10 +1523,7 @@
 void
 gnc_sxed_record_size( SchedXactionEditorDialog *sxed )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxed->dialog->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SXED_WIN_PREFIX, w, h );
+	gnc_save_window_size( SXED_GCONF_SECTION, GTK_WINDOW(sxed->dialog) );
 }
 
 static
@@ -1534,6 +1551,7 @@
         gnc_dense_cal_set_num_months( sxed->example_cal, EX_CAL_NUM_MONTHS );
         gnc_dense_cal_set_months_per_col( sxed->example_cal, EX_CAL_MO_PER_COL );
         gtk_container_add( GTK_CONTAINER(f), GTK_WIDGET(sxed->example_cal) );
+	gtk_widget_show( GTK_WIDGET(sxed->example_cal) );
 }
 
 static
@@ -1542,35 +1560,42 @@
 {
         GtkFrame *tempxaction_frame;
         SplitRegister *splitreg;
-        GtkWidget *vbox;
-        int numLedgerLines = NUM_LEDGER_LINES_DEFAULT;
+        GtkWidget *main_vbox;
 
         tempxaction_frame =
                 GTK_FRAME( glade_xml_get_widget( sxed->gxml,
                                                  "tempxaction_frame" ) );
-        vbox = glade_xml_get_widget( sxed->gxml, "register_vbox" );
 
-        sxed->sxGUIDstr = g_strdup( guid_to_string( xaccSchedXactionGetGUID(sxed->sx) ) );
+	/* Create the ledger */
+        /* THREAD-UNSAFE */
+        sxed->sxGUIDstr = g_strdup( guid_to_string(
+                                        xaccSchedXactionGetGUID(sxed->sx) ) );
         sxed->ledger = gnc_ledger_display_template_gl( sxed->sxGUIDstr );
         splitreg = gnc_ledger_display_get_split_register( sxed->ledger );
 
-        numLedgerLines =
-                (int)gnc_lookup_number_option( SX_OPT_STR,
-                                               "Template Register Lines",
-                                               NUM_LEDGER_LINES_DEFAULT );
-        sxed->gsr = GNC_SPLIT_REG(
-                gnc_split_reg_new( sxed->ledger, GTK_WINDOW(sxed->dialog),
-                                   numLedgerLines,
-                                   (CREATE_TOOLBAR | CREATE_POPUP | CREATE_MENUS),
-                                   (CAP_JUMP | CAP_SCHEDULE) ) );
-
-        gnc_split_reg_use_extended_popup( sxed->gsr );
-
-        gtk_box_pack_start( GTK_BOX(vbox),
-                            gnc_split_reg_get_toolbar( sxed->gsr ),
-                            FALSE, TRUE, 2 );
-        gtk_box_pack_start( GTK_BOX(vbox), GTK_WIDGET(sxed->gsr),
-                            TRUE, TRUE, 2 );
+	/* First the embedded window */
+        main_vbox = glade_xml_get_widget( sxed->gxml, "register_vbox" );
+	sxed->embed_window =
+	  gnc_embedded_window_new("SXWindowActions",
+				     gnc_sxed_menu_entries,
+				     gnc_sxed_menu_n_entries,
+				     "gnc-sxed-window-ui.xml",
+				     sxed->dialog,
+				     FALSE, /* no accelerators */
+				     sxed);
+	gtk_box_pack_start (GTK_BOX (main_vbox), GTK_WIDGET(sxed->embed_window),
+			    TRUE, TRUE, 0);
+
+	/* Now create the register plugin page. */
+	sxed->plugin_page = gnc_plugin_page_register_new_ledger (sxed->ledger);
+	gnc_plugin_page_set_ui_description (sxed->plugin_page,
+					    "gnc-plugin-page-sxregister-ui.xml");
+	gnc_plugin_page_register_set_options (sxed->plugin_page,
+					      SXED_GCONF_SECTION,
+					      KEY_NUMBER_OF_ROWS,
+					      NUM_LEDGER_LINES_DEFAULT,
+					      (CAP_JUMP | CAP_SCHEDULE) );
+	gnc_embedded_window_open_page (sxed->embed_window, sxed->plugin_page);
 
         /* configure... */
         /* don't use double-line */
@@ -1580,7 +1605,6 @@
 
         /* don't show present/future divider [by definition, not necessary] */
         gnc_split_register_show_present_divider( splitreg, FALSE );
-
 }
 
 static
@@ -1590,7 +1614,6 @@
         char *name;
         time_t tmpDate;
         SplitRegister *splitReg;
-        GtkWidget *w;
         GString *tmpgStr;
         struct tm *tmpTm;
         GDate *gd;
@@ -1605,7 +1628,7 @@
                 gd = xaccSchedXactionGetLastOccurDate( sxed->sx );
                 if ( g_date_valid( gd ) ) {
                         gchar dateBuf[ MAX_DATE_LENGTH+1 ];
-                        printGDate( dateBuf, gd );
+                        qof_print_gdate( dateBuf,MAX_DATE_LENGTH, gd );
                         gtk_label_set_text( sxed->lastOccurLabel, dateBuf );
                 } else {
                         gtk_label_set_text( sxed->lastOccurLabel, _( "(never)" ) );
@@ -1630,16 +1653,14 @@
 
                 gtk_toggle_button_set_active( sxed->optEndCount, TRUE );
 
-                w = gnome_number_entry_gtk_entry( sxed->endCountEntry );
                 tmpgStr = g_string_sized_new(5);
                 g_string_sprintf( tmpgStr, "%d", numOccur );
-                gtk_entry_set_text( GTK_ENTRY(w), tmpgStr->str );
+                gtk_entry_set_text( sxed->endCountEntry, tmpgStr->str );
                 g_string_free( tmpgStr, TRUE );
 
-                w = gnome_number_entry_gtk_entry( sxed->endRemainEntry );
                 tmpgStr = g_string_sized_new(5);
                 g_string_sprintf( tmpgStr, "%d", numRemain );
-                gtk_entry_set_text( GTK_ENTRY(w), tmpgStr->str );
+                gtk_entry_set_text( sxed->endRemainEntry, tmpgStr->str );
                 g_string_free( tmpgStr, TRUE );
 
                 set_endgroup_toggle_states( sxed, END_OCCUR );
@@ -1651,13 +1672,9 @@
         /* Do auto-create/notify setup */
         if ( sxed->newsxP ) {
                 autoCreateState =
-                        gnc_lookup_boolean_option( SX_OPT_STR,
-                                                   "Auto-Create new Scheduled "
-                                                   "Transactions by default", FALSE );
+		  gnc_gconf_get_bool( SXED_GCONF_SECTION, KEY_CREATE_AUTO, NULL );
                 notifyState =
-                        gnc_lookup_boolean_option( SX_OPT_STR,
-                                                   "Notify on new, auto-created "
-                                                   "Scheduled Transactions", FALSE );
+		  gnc_gconf_get_bool( SXED_GCONF_SECTION, KEY_NOTIFY, NULL );
         } else {
                 xaccSchedXactionGetAutoCreate( sxed->sx,
                                                &autoCreateState,
@@ -1673,9 +1690,7 @@
         /* Do days-in-advance-to-create widget[s] setup. */
         if ( sxed->newsxP ) {
                 daysInAdvance =
-                        (int)gnc_lookup_number_option( SX_OPT_STR,
-                                                       "Default number of days in "
-                                                       "advance to create", 0 );
+		  gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
         } else {
                 daysInAdvance =
                         xaccSchedXactionGetAdvanceCreation( sxed->sx );
@@ -1689,9 +1704,7 @@
         /* Do days-in-advance-to-remind widget[s] setup. */
         if ( sxed->newsxP ) {
                 daysInAdvance =
-                        (int)gnc_lookup_number_option( SX_OPT_STR,
-                                                       "Default number of days in "
-                                                       "advance to remind", 0 );
+		  gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
         } else {
                 daysInAdvance =
                         xaccSchedXactionGetAdvanceReminder( sxed->sx );
@@ -2042,7 +2055,7 @@
                 char tmpBuf[ MAX_DATE_LENGTH+1 ];
                 char dowBuf[ 25 ]; /* <- FIXME: appropriate length? */
                 nextInstDate = (GDate*)instList->data;
-                printGDate( tmpBuf, nextInstDate );
+                qof_print_gdate( tmpBuf, MAX_DATE_LENGTH, nextInstDate );
                 g_date_strftime( dowBuf, 25, "%A", nextInstDate );
                 g_string_sprintf( nextDate, "%s (%s)", tmpBuf, dowBuf );
         }
@@ -2311,6 +2324,7 @@
         END_TYPE endType;
         GDate endDate;
         int numRemain;
+	gchar *text;
 
         endType = NO_END;
         numRemain = -1;
@@ -2330,9 +2344,10 @@
                 endType = NO_END;
         } else if ( gtk_toggle_button_get_active( sxed->optEndCount ) ) {
                 endType = COUNT_END;
-                numRemain =
-                        (gint)gnome_number_entry_get_number(
-                                sxed->endRemainEntry );
+		text = gtk_editable_get_chars( GTK_EDITABLE (sxed->endRemainEntry),
+					       0, -1 );
+		sscanf (text, "%d", &numRemain);
+		g_free (text);
         } else {
                 g_assert( FALSE );
         }
@@ -2425,3 +2440,50 @@
 {
         gnc_sxed_update_cal( (SchedXactionEditorDialog*)ud );
 }
+
+/* Command callbacks */
+static void
+gnc_sxed_cmd_edit_cut (GtkAction *action, SchedXactionEditorDialog *sxed)
+{
+}
+
+static void
+gnc_sxed_cmd_edit_copy (GtkAction *action, SchedXactionEditorDialog *sxed)
+{
+}
+
+static void
+gnc_sxed_cmd_edit_paste (GtkAction *action, SchedXactionEditorDialog *sxed)
+{
+}
+
+
+void on_sx_check_toggled (GtkWidget *togglebutton, gpointer user_data);
+
+void
+on_sx_check_toggled (GtkWidget *togglebutton,
+		     gpointer user_data)
+{
+  GtkWidget *widget;
+  gboolean create; // , notify;
+
+  /* The gnc_glade_lookup_widget() function works because all of these
+   * widgets come from the same glade file. */
+  widget = gnc_glade_lookup_widget(togglebutton,
+	"gconf/dialogs/scheduled_trans/transaction_editor/create_auto");
+  create = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
+  widget = gnc_glade_lookup_widget(togglebutton,
+	"gconf/dialogs/scheduled_trans/transaction_editor/notify");
+  gtk_widget_set_sensitive(widget, create);
+}
+
+
+void
+gnc_ui_sx_initialize (void)
+{
+  gnc_hook_add_dangler(HOOK_BOOK_OPENED,
+		       (GFunc)gnc_sx_sxsincelast_book_opened, NULL);
+  gnc_preferences_add_page (SX_GLADE_FILE,
+			    "sx_prefs",
+			    "Scheduled Transactions");
+}
Index: dialog-new-user.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-new-user.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnome/dialog-new-user.c -Lsrc/gnome/dialog-new-user.c -u -r1.5 -r1.6
--- src/gnome/dialog-new-user.c
+++ src/gnome/dialog-new-user.c
@@ -28,10 +28,16 @@
 #include "dialog-new-user.h"
 #include "dialog-utils.h"
 #include "druid-hierarchy.h"
-#include "global-options.h"
+#include "gnc-engine.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-hooks.h"
 #include "gnc-ui.h"
-#include "window-help.h"
 
+#define GCONF_SECTION "dialogs/new_user"
+#define FIRST_STARTUP "first_startup"
+
+/* This static indicates the debugging module that this .o belongs to.  */
+static QofLogModule log_module = GNC_MOD_GUI;
 
 /* function to open a qif import druid */
 static void (*qifImportDruidFcn)(void) = NULL;
@@ -50,7 +56,7 @@
 void
 gnc_set_first_startup (gboolean first_startup)
 {
-  gnc_set_boolean_option ("__new_user", "first_startup", first_startup);
+  gnc_gconf_set_bool(GCONF_SECTION, FIRST_STARTUP, first_startup, NULL);
 }
 
 void
@@ -63,12 +69,11 @@
   GladeXML  *xml;
   gint result;
 
+  ENTER(" ");
   xml = gnc_glade_xml_new ("newuser.glade", "New User Dialog");
 
   dialog = glade_xml_get_widget (xml, "New User Dialog");
 
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
   new_accounts_button = glade_xml_get_widget (xml, "new_accounts_button");
   import_qif_button = glade_xml_get_widget (xml, "import_qif_button");
   tutorial_button = glade_xml_get_widget (xml, "tutorial_button");
@@ -78,66 +83,57 @@
    */
   gtk_widget_set_sensitive (import_qif_button, (qifImportDruidFcn != NULL));
 
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-  if (result != 0)
-  {
-    gnc_ui_new_user_cancel_dialog ();
-    gtk_widget_destroy (dialog);
-    gncp_new_user_finish ();
-    return;
-  }
-
-  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (new_accounts_button)))
-  {
-    gnc_ui_hierarchy_druid ();
-    gtk_widget_destroy (dialog);
-    return;
-  }
-
-  if ((qifImportDruidFcn != NULL) &&
-      gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (import_qif_button)))
-  {
-    qifImportDruidFcn();
-  }
-  else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tutorial_button)))
-  {
-    helpWindow (NULL, NULL, HH_QUICKSTART);
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
+  switch (result) {
+	  case GTK_RESPONSE_CANCEL:
+		gnc_ui_new_user_cancel_dialog ();
+		break;
+	  case GTK_RESPONSE_OK:
+		if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (new_accounts_button))) {
+			gnc_ui_hierarchy_druid ();
+			break;
+		} else if ((qifImportDruidFcn != NULL) &&
+				gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (import_qif_button))) {
+			qifImportDruidFcn();
+			gncp_new_user_finish ();
+			break;
+		} else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tutorial_button))) {
+			gnc_gnome_help (HF_GUIDE, NULL);
+			gncp_new_user_finish ();
+			break;
+		}
+	  default:
+		g_print ("DEBUG: Response: %d", result);
+		g_assert_not_reached ();
   }
 
-  gncp_new_user_finish ();
   gtk_widget_destroy (dialog);
+  LEAVE(" ");
 }
 
 static void
 gnc_ui_new_user_cancel_dialog (void)
 {
   GtkWidget *dialog;
-  GtkWidget *toggle;
   GladeXML  *xml;
   gint result;
+  gboolean keepshowing;
 
   xml = gnc_glade_xml_new ("newuser.glade", "New User Cancel Dialog");
 
   dialog = glade_xml_get_widget (xml, "New User Cancel Dialog");
-  toggle = glade_xml_get_widget (xml, "run_again_toggle");
-
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
 
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-  if (result == 0)
-  {
-    gboolean keepshowing = TRUE;
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
+  keepshowing = (result == GTK_RESPONSE_YES);
 
-    keepshowing = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle));
-
-    gnc_set_first_startup (keepshowing);
+  gnc_set_first_startup (keepshowing);
+  gncp_new_user_finish ();
 
-    gncp_new_user_finish ();
-  }
+  gtk_widget_destroy(dialog);
 }
 
 void
 gncp_new_user_finish (void)
 {
-  scm_c_eval_string("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
+  gnc_hook_run(HOOK_BOOK_OPENED, NULL);
 }
--- src/gnome/mainwindow-account-tree.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/********************************************************************\
- * mainwindow-account-tree.c -- composite account selection widget  *
- *                              wrapped up for the main window      * 
- *                  and callback functions for GnuCash              *
- * Copyright (C) 2000 Gnumatic, Inc.                                *
- * Written by Robert Merkel <rgmerk at mira.net>                       *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-#include "mainwindow-account-tree.h"
-
-
-static GList *mw_acc_trees = NULL;
-
-enum {
-      SELECT_ACCOUNT_SIGNAL,
-      UNSELECT_ACCOUNT_SIGNAL,
-      ACTIVATE_ACCOUNT_SIGNAL,
-      LAST_SIGNAL
-    };
-
-static guint mainwinaccounttree_signals[LAST_SIGNAL] = { 0 };
-
-static void
-unselect_account_callback(GNCAccountTree *tree, Account *account, gpointer user_data)
-{
-  GNCMainWinAccountTree *mw_tree = (GNCMainWinAccountTree *) user_data;
-  gtk_signal_emit(GTK_OBJECT(mw_tree),
-		  mainwinaccounttree_signals[UNSELECT_ACCOUNT_SIGNAL],
-		  account);
-  return;
-}
-
-static void
-activate_account_callback(GNCAccountTree *tree, Account *account, gpointer user_data)
-{  
-  GNCMainWinAccountTree *mw_tree = (GNCMainWinAccountTree *) user_data;
-  gtk_signal_emit(GTK_OBJECT(mw_tree),
-		  mainwinaccounttree_signals[ACTIVATE_ACCOUNT_SIGNAL],
-		  account);
-  return;
-}
-
-static void
-select_account_callback(GNCAccountTree  *tree, Account *account, gpointer user_data)
-{
-  GNCMainWinAccountTree *clicked_window = (GNCMainWinAccountTree *) user_data;
-  GList *list_iterator;
-  GNCMainWinAccountTree *current_window;
-  for(list_iterator = mw_acc_trees; list_iterator; list_iterator=g_list_next(list_iterator))
-  {
-    current_window = list_iterator->data;
-    if(current_window != clicked_window)
-    {
-      gnc_account_tree_unselect_account
-        (current_window->acc_tree,
-         gnc_account_tree_get_current_account(current_window->acc_tree),
-         FALSE);
-    }
-  }
-
-  gtk_signal_emit(GTK_OBJECT(clicked_window),
-		  mainwinaccounttree_signals[SELECT_ACCOUNT_SIGNAL],
-		  account);
-
-  return;
-}
-
-static void
-gnc_mainwin_account_tree_class_init (GNCMainWinAccountTreeClass *klass)
-{
-  GtkObjectClass *object_class;
-  
-  object_class = (GtkObjectClass*) klass;
-      
-  
-  
-  mainwinaccounttree_signals[SELECT_ACCOUNT_SIGNAL] = 
-    gtk_signal_new("select_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCMainWinAccountTreeClass,
-				     select_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  mainwinaccounttree_signals[UNSELECT_ACCOUNT_SIGNAL] =
-    gtk_signal_new("unselect_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCMainWinAccountTreeClass,
-				     unselect_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  mainwinaccounttree_signals[ACTIVATE_ACCOUNT_SIGNAL] =
-    gtk_signal_new("activate_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCMainWinAccountTreeClass,
-				     activate_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  gtk_object_class_add_signals(object_class,
-			       mainwinaccounttree_signals,
-			       LAST_SIGNAL);
-
-  klass->select_account   = NULL;
-  klass->unselect_account = NULL;
-  klass->activate_account = NULL;
-}
-static void
-gnc_mainwin_account_tree_init(GNCMainWinAccountTree *mwac_tree)
-{
-  mwac_tree->acc_tree = GNC_ACCOUNT_TREE(gnc_account_tree_new());
-  mwac_tree->scrolled_window = GTK_SCROLLED_WINDOW(gtk_scrolled_window_new(NULL, NULL));
-
-  gtk_scrolled_window_set_policy (mwac_tree->scrolled_window,
-                                  GTK_POLICY_AUTOMATIC,
-                                  GTK_POLICY_AUTOMATIC);
-
-  gtk_signal_connect(GTK_OBJECT(mwac_tree->acc_tree), "activate_account",
-		     GTK_SIGNAL_FUNC (activate_account_callback), mwac_tree);
-
-  gtk_signal_connect(GTK_OBJECT(mwac_tree->acc_tree), "select_account",
-                     GTK_SIGNAL_FUNC(select_account_callback), mwac_tree);
-
-  gtk_signal_connect(GTK_OBJECT(mwac_tree->acc_tree), "unselect_account",
-                     GTK_SIGNAL_FUNC(unselect_account_callback), mwac_tree);
- 
-  gtk_container_add(GTK_CONTAINER(mwac_tree->scrolled_window), GTK_WIDGET(mwac_tree->acc_tree));
-
-  gtk_box_pack_start(GTK_BOX(mwac_tree), GTK_WIDGET(mwac_tree->scrolled_window), TRUE, TRUE, 0);
-  gtk_widget_show(GTK_WIDGET(mwac_tree->acc_tree));
-  gtk_widget_show(GTK_WIDGET(mwac_tree->scrolled_window));
-}
-
-guint
-gnc_mainwin_account_tree_get_type ()
-{
-  static guint mwactree = 0;
-  
-  if (!mwactree)
-    {
-      static const GtkTypeInfo mwactree_info =
-      {
-	"GNCMainWinAccountTree",
-	sizeof (GNCMainWinAccountTree),
-	sizeof (GNCMainWinAccountTreeClass),
-	(GtkClassInitFunc) gnc_mainwin_account_tree_class_init,
-	(GtkObjectInitFunc) gnc_mainwin_account_tree_init,
-	(GtkArgSetFunc) NULL,
-	(GtkArgGetFunc) NULL,
-	(GtkClassInitFunc) NULL
-      };
-      
-      mwactree = gtk_type_unique (gtk_hbox_get_type (), &mwactree_info);
-    }
-  
-  return mwactree;
-}
-
-
-/*
- * Note that the interface was chosen purely because it's the calls needed to
- * get this working with the existing window-main.c
- * This is all subject to change
- */
-
-/*******************************************************************************\
- * gnc_mainwin_account_tree_attach_popup                                       *
- *   attaches a popup window                                                   *
- *                                                                             *
- * Args: mwac_trec - the mainwindow account tree to attach to                  *
- *       popup_info - the popup to attach                                      *
- * Returns: The menu created.                                                  *
-\*******************************************************************************/
-
-GtkWidget *
-gnc_mainwin_account_tree_attach_popup(GNCMainWinAccountTree *mwac_tree,
-                                      GnomeUIInfo *popup_info,
-                                      gpointer user_data)
-{
-  GtkWidget *popup = gnome_popup_menu_new(popup_info);
-  gnome_popup_menu_attach(popup, GTK_WIDGET(mwac_tree->acc_tree), user_data);
-  return(popup);
-}
-
-/*******************************************************************************\
- * gnc_mainwin_account_tree_set_view_info                                      *
- *   set which accounts get viewed                                             *
- *                                                                             *
- * Args: mwac_tree - the mainwindow account tree to attach to                  *
- *       new_info - the new view info (see account-tree.c for more details)    *
- * Returns: Nothing                                                            *
-\*******************************************************************************/
-
-void
-gnc_mainwin_account_tree_set_view_info(GNCMainWinAccountTree *mwac_tree, AccountViewInfo new_info)
-{
-  AccountViewInfo old_info;
-  gnc_account_tree_get_view_info(mwac_tree->acc_tree, &old_info);
-  
-  if(memcmp(&new_info, &old_info, sizeof(AccountViewInfo)) != 0)
-  {
-    gnc_account_tree_set_view_info(mwac_tree->acc_tree, &new_info);
-  }
-  
-  return;
-}
-
-/*******************************************************************************\
- * gnc_mainwin_account_tree_new                                                *
- *   create a new mainwindow_account_tree                                      *
- *                                                                             *
- * Args: nothing                                                               *
- * Returns : a new fresh-baked mainwindow_account_tree                         *
-\*******************************************************************************/
-
-GtkWidget *
-gnc_mainwin_account_tree_new()
-{
-  GtkWidget *tree;
-  guint type_of;
-  type_of = gnc_mainwin_account_tree_get_type();
-  tree = gtk_widget_new(type_of, NULL);
-
-  return tree;
-}
-
-/*******************************************************************************\
- * gnc_mainwin_account_tree_get_current_acount                                 *
- *   get the current account selected in a mainwindow_account_tree             *
- *                                                                             *
- * Args: the account tree                                                      *
- * Returns : a pointer to the selected account                                 *
-\*******************************************************************************/
-Account *
-gnc_mainwin_account_tree_get_current_account(GNCMainWinAccountTree *list)
-{
-  return gnc_account_tree_get_current_account(list->acc_tree);
-}
-/*******************************************************************************\
- * gnc_mainwin_account_tree_get_current_accounts                               *
- *   get the current account(s) selected in a mainwindow_account_tree          *
- *                                                                             *
- * Args: the account tree                                                      *
- * Returns : a Glist of selected accounts                                      *
-\*******************************************************************************/
-
-GList *
-gnc_mainwin_account_tree_get_current_accounts(GNCMainWinAccountTree *list)
-{
-  return gnc_account_tree_get_current_accounts(list->acc_tree);
-}
-
-/*******************************************************************************\
- * gnc_mainwin_account_tree_toggle_account_expansion                           *
- *   toggle expans the nominated account to show children (or not)             *
- *                                                                             *
- * Args: the account tree                                                      *
- *       the account whose children to show/not show                           *
- * Returns : nothing                                                           *
-\*******************************************************************************/
-
-void 
-gnc_mainwin_account_tree_toggle_account_expansion(
-  GNCMainWinAccountTree *mwac_tree, Account *account)
-{
-  GNCAccountTree *tree = mwac_tree->acc_tree;
-  gnc_account_tree_toggle_account_expansion(tree, account);
-  return;
-}
-
Index: gnc-split-reg.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gnc-split-reg.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/gnome/gnc-split-reg.h -Lsrc/gnome/gnc-split-reg.h -u -r1.11 -r1.12
--- src/gnome/gnc-split-reg.h
+++ src/gnome/gnc-split-reg.h
@@ -90,7 +90,6 @@
   gint width;
   gint height;
 
-  SCM toolbar_change_callback_id;
   GtkWidget *toolbar;
   GtkWidget *summarybar; 
 
@@ -108,6 +107,7 @@
   GtkWidget *split_menu_check;
   GtkWidget *split_popup_check;
 
+  /* Summary Bar Labels */
   GtkWidget *balance_label;
   GtkWidget *cleared_label;
   GtkWidget *reconciled_label;
@@ -181,19 +181,22 @@
  * but this provides a simple case statement internally.  This should
  * probably not actually be exposed in the external interface....
  */
-typedef enum {
-  BY_NONE = 0,
-  BY_STANDARD,
-  BY_DATE,
-  BY_DATE_ENTERED,
-  BY_DATE_RECONCILED,
-  BY_NUM,
-  BY_AMOUNT,
-  BY_MEMO,
-  BY_DESC,
-  BY_ACTION,
-  BY_NOTES
-} SortType;
+#define ENUM_LIST_SORTTYPE(_) \
+  _(BY_NONE,) \
+  _(BY_STANDARD,) \
+  _(BY_DATE,) \
+  _(BY_DATE_ENTERED,) \
+  _(BY_DATE_RECONCILED,) \
+  _(BY_NUM,) \
+  _(BY_AMOUNT,) \
+  _(BY_MEMO,) \
+  _(BY_DESC,) \
+  _(BY_ACTION,) \
+  _(BY_NOTES,)
+
+DEFINE_ENUM(SortType, ENUM_LIST_SORTTYPE)
+AS_STRING_DEC(SortType, ENUM_LIST_SORTTYPE)
+FROM_STRING_DEC(SortType, ENUM_LIST_SORTTYPE)
 
 /**
  * Flags for creation-time selection of what subwidgets are to be created.
@@ -238,12 +241,22 @@
 GnucashRegister *gnc_split_reg_get_register( GNCSplitReg *gsr );
 
 /**
+ * Create and returns a summarybar for this GNCSplitReg.
+ **/
+GtkWidget *gsr_create_summary_bar( GNCSplitReg *gsr );
+
+/**
  * Gets/sets the sort-type of the GNCSplitReg.
  **/
 SortType gnc_split_reg_get_sort_type( GNCSplitReg *gsr );
 void gnc_split_reg_set_sort_type( GNCSplitReg *gsr, SortType t );
 
 /**
+ * Gets/sets the style of the GNCSplitReg.
+ **/
+void gnc_split_reg_change_style (GNCSplitReg *gsr, SplitRegisterStyle style);
+
+/**
  * Retreives the various menus created by the GNCSplitReg.  Callers may want
  * to put these in a more traditional menu bar, for instance.
  **/
@@ -303,4 +316,11 @@
 void gnc_split_reg_jump_to_split(GNCSplitReg *gsr, Split *split);
 void gnc_split_reg_jump_to_split_amount(GNCSplitReg *gsr, Split *split);
 
+void gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data );
+void gnc_split_reg_enter( GNCSplitReg *gsr, gboolean next_transaction );
+void gsr_default_delete_handler( GNCSplitReg *gsr, gpointer data );
+void gsr_default_reinit_handler( GNCSplitReg *gsr, gpointer data );
+void gsr_default_expand_handler( GNCSplitReg *gsr, gpointer data );
+void gsr_default_schedule_handler( GNCSplitReg *gsr, gpointer data );
+
 #endif /* GNC_SPLIT_REG_H */
Index: druid-merge.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-merge.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/druid-merge.h -Lsrc/gnome/druid-merge.h -u -r1.2 -r1.3
--- src/gnome/druid-merge.h
+++ src/gnome/druid-merge.h
@@ -23,6 +23,8 @@
 
 #ifndef DRUID_MERGE_H
 #define DRUID_MERGE_H
+#include "qofsession.h"
+
 /** @addtogroup GUI
 	@{ */
 /** @addtogroup NewHierarchy Merging a new account tree into an existing file
@@ -67,12 +69,15 @@
 any error values to the calling process. 
 
 	@{ */
-/** @file  druid_merge.h
+/** @file  druid-merge.h
 	@brief API for merging two \c QofBook* structures with collision handling
 	@author Copyright (c) 2004 Neil Williams <linux at codehelp.co.uk>
 */
 
 void gnc_ui_qof_book_merge_druid (void);
+
+void gnc_ui_qsf_import_merge_druid(QofSession *original, QofSession *import);
+
 GtkWidget* qof_book_merge_running (void);
 
 /** \brief 	gncCommodity is not QOF enabled, need to set a default commodity before the merge */
Index: druid-acct-period.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-acct-period.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/gnome/druid-acct-period.c -Lsrc/gnome/druid-acct-period.c -u -r1.23 -r1.24
--- src/gnome/druid-acct-period.c
+++ src/gnome/druid-acct-period.c
@@ -42,17 +42,18 @@
 #include "gnc-date.h"
 #include "gnc-file.h"
 #include "gnc-frequency.h"
+#include "gnc-gdate-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-trace.h"
 #include "gnc-ui-util.h"
 #include "misc-gnome-utils.h"
 #include "messages.h"
-#include "qofbook.h"
+#include "qof.h"
 
 
 #define DRUID_ACCT_PERIOD_CM_CLASS "druid-acct-period"
 
-static short module = MOD_DRUID;
+static QofLogModule log_module = GNC_MOD_DRUID;
 
 /** structures *********************************************************/
 typedef struct
@@ -68,7 +69,7 @@
   GtkLabel  * close_results;
   GtkLabel  * book_details;
   GtkEntry  * book_title;
-  GtkText   * book_notes;
+  GtkTextView * book_notes;
 
   time_t earliest;
   char * earliest_str;
@@ -191,7 +192,7 @@
 }
 
 static void
-ap_finish (GnomeDruidPageFinish *druidpage,
+ap_finish (GnomeDruidPageEdge *druidpage,
                     GtkWidget *druid,
                     gpointer user_data)
 {
@@ -308,7 +309,7 @@
 
   str = g_strdup_printf (_("Period %s - %s"), prev_close_date_str, close_date_str);
   gtk_entry_set_text (info->book_title, str);
-  xxxgtk_text_set_text (info->book_notes, str);
+  xxxgtk_textview_set_text (info->book_notes, str);
   g_free (str);
 
 }
@@ -409,7 +410,8 @@
 {
   AcctPeriodInfo *info = user_data;
   QofBook *closed_book = NULL, *current_book;
-  const char *btitle, *bnotes;
+  const char *btitle;
+  char *bnotes;
   Timespec closing_date;
   KvpFrame *book_frame;
   gboolean really_do_close_books = FALSE;
@@ -419,7 +421,7 @@
   current_book = gnc_get_current_book ();
 
   btitle = gtk_entry_get_text (info->book_title);
-  bnotes = xxxgtk_text_get_text (info->book_notes);
+  bnotes = xxxgtk_textview_get_text (info->book_notes);
   PINFO("book title=%s\n", btitle);
 
   timespecFromTime_t (&closing_date,
@@ -454,6 +456,7 @@
     gnc_engine_resume_events ();
     gnc_gui_refresh_all ();  /* resume above should have been enough ??? */
   }
+  g_free(bnotes);
 
   /* Report the status back to the user. */
   info->close_status = 0;  /* XXX fixme success or failure? */
@@ -478,7 +481,7 @@
 /* =============================================================== */
 
 static void
-ap_show_done (GnomeDruidPageFinish *druidpage,
+ap_show_done (GnomeDruidPageEdge *druidpage,
                     GtkWidget *druid,
                     gpointer user_data)
 {
@@ -490,7 +493,7 @@
   msg = _("%s\nCongradulations! You are done closing books!");
 
   str = g_strdup_printf (msg, get_close_status_str (info));
-  gnome_druid_page_finish_set_text (druidpage, str);
+  gnome_druid_page_edge_set_text (druidpage, str);
   g_free (str);
 }
 
@@ -564,7 +567,7 @@
         GTK_ENTRY (glade_xml_get_widget (xml, "book title entry"));
 
   info->book_notes = 
-        GTK_TEXT (glade_xml_get_widget (xml, "book notes text"));
+        GTK_TEXT_VIEW (glade_xml_get_widget (xml, "book notes text"));
 
   /* generic finished/close/abort signals */
   gtk_signal_connect (GTK_OBJECT (info->window), "destroy",
Index: dialog-sxsincelast.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sxsincelast.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -Lsrc/gnome/dialog-sxsincelast.c -Lsrc/gnome/dialog-sxsincelast.c -u -r1.76 -r1.77
--- src/gnome/dialog-sxsincelast.c
+++ src/gnome/dialog-sxsincelast.c
@@ -64,12 +64,16 @@
 #include "SX-book-p.h"
 #include "dialog-utils.h"
 #include "finvar.h"
-#include "gnc-book.h"
 #include "gnc-date.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-exp-parser.h"
+#include "gnc-embedded-window.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-main-window.h"
 #include "gnc-numeric.h"
+#include "gnc-plugin-page.h"
+#include "gnc-plugin-page-register.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
@@ -77,7 +81,6 @@
 #include "gnc-ledger-display.h"
 #include "gnucash-sheet.h"
 #include "gnc-split-reg.h"
-#include "window-register.h"
 #include "messages.h"
 
 #include "dialog-sxsincelast.h"
@@ -94,6 +97,7 @@
 #define DIALOG_SXSINCELAST_GLADE_NAME "Since Last Run Druid"
 #define SXSLD_DRUID_GLADE_NAME "sincelast_druid"
 #define SXSLD_WIN_PREFIX "sx_sincelast_win"
+#define GCONF_SECTION "dialogs/scheduled_trans/since_last_run"
 
 #define SINCELAST_DRUID   "sincelast_druid"
 #define WHAT_TO_DO_PG "what_to_do"
@@ -102,6 +106,7 @@
 #define TO_CREATE_PG "to_create_page"
 #define CREATED_PG "created_page"
 #define OBSOLETE_PG "obsolete_page"
+#define COMMIT_PG "commit_page"
 
 #define SX_OBSOLETE_CLIST "sx_obsolete_clist"
 #define TO_CREATE_LIST "to_create_list"
@@ -116,7 +121,7 @@
 #define CANCEL_BUTTON "cancel_button"
 #define VARIABLE_TABLE "variables_table"
 #define AUTO_CREATE_VBOX "ac_vbox"
-#define TO_CREATE_TXN_REG_FRAME "to_create_txn_reg_frame"
+#define TO_CREATE_TXN_VBOX "to_create_txn_vbox"
 #define CREATED_VBOX "created_vbox"
 #define WHAT_TO_DO_VBOX "what_to_do_vbox"
 #define WHAT_TO_DO_PROGRESS "creation_progress"
@@ -133,7 +138,7 @@
 #define READY_TEXT          "Ready to create"
 #define NEEDS_BINDINGS_TEXT "Needs values for variables"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /**
  * Directions for {forward,back}-page determining.
@@ -269,14 +274,17 @@
         /* The count of auto-created transactions. */
         gint autoCreatedCount;
 
-        GNCLedgerDisplay *ac_ledger;
-        GNCSplitReg *ac_gsr;
-
-        GNCLedgerDisplay *created_ledger;
-        GNCSplitReg *created_gsr;
-
-        GNCLedgerDisplay *to_create_ledger;
-        GNCSplitReg *to_create_gsr;
+	GncEmbeddedWindow   *ac_window;
+	GncPluginPage       *ac_register;
+        GNCLedgerDisplay    *ac_ledger;
+
+	GncEmbeddedWindow   *created_window;
+	GncPluginPage       *created_register;
+        GNCLedgerDisplay    *created_ledger;
+
+	GncEmbeddedWindow   *to_create_window;
+	GncPluginPage       *to_create_register;
+        GNCLedgerDisplay    *to_create_ledger;
 
 } sxSinceLastData;
 
@@ -285,6 +293,7 @@
 static void create_created_ledger( sxSinceLastData *sxsld );
 static void create_to_create_ledger( sxSinceLastData *sxsld );
 static void gnc_sxsld_commit_ledgers( sxSinceLastData *sxsld );
+static void sxsld_jump_to_real_txn( GtkAction *action, sxSinceLastData *sxsld );
 
 static gint sxsincelast_populate( sxSinceLastData *sxsld );
 static void sxsincelast_druid_cancelled( GnomeDruid *druid, gpointer ud );
@@ -299,6 +308,7 @@
 static gboolean gnc_sxsld_autocreate_appr( sxSinceLastData *sxsld );
 static gboolean gnc_sxsld_created_appr( sxSinceLastData *sxsld );
 static gboolean gnc_sxsld_obsolete_appr( sxSinceLastData *sxsld );
+static gboolean gnc_sxsld_commit_appr( sxSinceLastData *sxsld );
 
 static void sxsincelast_entry_changed( GtkEditable *e, gpointer ud );
 static void sxsincelast_destroy( GtkObject *o, gpointer ud );
@@ -373,13 +383,46 @@
                                          toCreateInstance *tci );
 static gint sxsld_get_future_created_txn_count( sxSinceLastData *sxsld );
 
+static void gnc_sxsld_cmd_edit_cut (GtkAction *action, sxSinceLastData *sxsld);
+static void gnc_sxsld_cmd_edit_copy (GtkAction *action, sxSinceLastData *sxsld);
+static void gnc_sxsld_cmd_edit_paste (GtkAction *action, sxSinceLastData *sxsld);
+
+static GtkActionEntry gnc_sxsld_menu_entries [] =
+{
+	/* Toplevel */
+	{ "EditAction", NULL, N_("_Edit"), NULL, NULL, NULL },
+	{ "ViewAction", NULL, N_("_View"), NULL, NULL, NULL },
+	{ "ActionsAction", NULL, N_("_Actions"), NULL, NULL, NULL },
+
+	/* Edit menu */
+	{ "EditCutAction", GTK_STOCK_CUT, N_("Cu_t"), "<control>x",
+	  NULL,
+	  G_CALLBACK (gnc_sxsld_cmd_edit_cut) },
+	{ "EditCopyAction", GTK_STOCK_COPY, N_("_Copy"), "<control>c",
+	  NULL,
+	  G_CALLBACK (gnc_sxsld_cmd_edit_copy) },
+	{ "EditPasteAction", GTK_STOCK_PASTE, N_("_Paste"), "<control>v",
+	  NULL,
+	  G_CALLBACK (gnc_sxsld_cmd_edit_paste) },
+
+	/* Actions menu */
+	{ "JumpTransactionAction", GTK_STOCK_JUMP_TO, N_("_Jump"), NULL,
+	  N_("Jump to the corresponding transaction in the other account"),
+	  G_CALLBACK (sxsld_jump_to_real_txn) },
+};
+static guint gnc_sxsld_menu_n_entries = G_N_ELEMENTS (gnc_sxsld_menu_entries);
+
 /**
  * Used to wrap for the book-open hook, where the book filename is given.
  **/
 void
-gnc_ui_sxsincelast_guile_wrapper( char *bookfile )
+gnc_sx_sxsincelast_book_opened (void)
 {
   gint ret;
+
+  if (!gnc_gconf_get_bool(GCONF_SECTION, "show_at_file_open", NULL))
+    return;
+
   ret = gnc_ui_sxsincelast_dialog_create();
   if ( ret < 0 ) {
     gnc_info_dialog
@@ -394,6 +437,7 @@
   }
 }
 
+
 static gboolean
 show_handler (const char *class, gint component_id,
               gpointer user_data, gpointer iter_data)
@@ -490,9 +534,9 @@
         for(i = 0; handler_info[i].name != NULL; i++)
         {
                 w = glade_xml_get_widget(dialog_xml, handler_info[i].name);
-                gtk_signal_connect( GTK_OBJECT(w), handler_info[i].signal, 
-                                    GTK_SIGNAL_FUNC(handler_info[i].handlerFn),
-                                    sxsld);
+                g_signal_connect( G_OBJECT(w), handler_info[i].signal, 
+				  G_CALLBACK(handler_info[i].handlerFn),
+				  sxsld);
         }
 }
 
@@ -508,34 +552,34 @@
         {
                 w = glade_xml_get_widget(dialog_xml, handler_info[i].pageName);
                 if ( handler_info[i].prepareHandlerFn ) {
-                        gtk_signal_connect( GTK_OBJECT(w), "prepare",
-                                            GTK_SIGNAL_FUNC(handler_info[i].
-                                                            prepareHandlerFn),
-                                            sxsld);
+                        g_signal_connect( G_OBJECT(w), "prepare",
+					  G_CALLBACK(handler_info[i].
+						     prepareHandlerFn),
+					  sxsld);
                 }
                 if ( handler_info[i].backHandlerFn ) {
-                        gtk_signal_connect( GTK_OBJECT(w), "back",
-                                            GTK_SIGNAL_FUNC(handler_info[i].
-                                                            backHandlerFn),
-                                            sxsld);
+                        g_signal_connect( G_OBJECT(w), "back",
+					  G_CALLBACK(handler_info[i].
+						     backHandlerFn),
+					  sxsld);
                 }
                 if ( handler_info[i].nextHandlerFn ) {
-                        gtk_signal_connect( GTK_OBJECT(w), "next",
-                                            GTK_SIGNAL_FUNC(handler_info[i].
-                                                            nextHandlerFn),
-                                            sxsld);
+                        g_signal_connect( G_OBJECT(w), "next",
+					  G_CALLBACK(handler_info[i].
+						     nextHandlerFn),
+					  sxsld);
                 }
                 if ( handler_info[i].finishHandlerFn ) {
-                        gtk_signal_connect( GTK_OBJECT(w), "finish",
-                                            GTK_SIGNAL_FUNC(handler_info[i].
-                                                            finishHandlerFn),
-                                            sxsld);
+                        g_signal_connect( G_OBJECT(w), "finish",
+					  G_CALLBACK(handler_info[i].
+						     finishHandlerFn),
+					  sxsld);
                 }
                 if ( handler_info[i].cancelHandlerFn ) {
-                        gtk_signal_connect( GTK_OBJECT(w), "cancel",
-                                            GTK_SIGNAL_FUNC(handler_info[i].
-                                                            cancelHandlerFn),
-                                            sxsld);
+                        g_signal_connect( G_OBJECT(w), "cancel",
+					  G_CALLBACK(handler_info[i].
+						     cancelHandlerFn),
+					  sxsld);
                 }
         }
 }
@@ -569,6 +613,7 @@
                 { TO_CREATE_PG,          gnc_sxsld_tocreate_appr },
                 { CREATED_PG,            gnc_sxsld_created_appr },
                 { OBSOLETE_PG,           gnc_sxsld_obsolete_appr },
+                { COMMIT_PG,             gnc_sxsld_commit_appr },
                 { NULL,                  NULL }
         };
         int modifier;
@@ -649,6 +694,14 @@
 
 static
 gboolean
+gnc_sxsld_commit_appr( sxSinceLastData *sxsld )
+{
+	/* Always show this page */
+        return TRUE;
+}
+
+static
+gboolean
 gen_back( GnomeDruidPage *druid_page,
           gpointer arg1, gpointer ud )
 {
@@ -704,7 +757,7 @@
                                                   druid_page,
                                                   BACK )
                   != NULL ),
-                TRUE, TRUE );
+                TRUE, TRUE, TRUE );
         /* FIXME: this isn't quite right; see the comment in
          * sxsld_remind_row_toggle */
         gnome_druid_set_show_finish( sxsld->sincelast_druid,
@@ -833,7 +886,7 @@
                                                   druid_page,
                                                   BACK )
                   != NULL ),
-                TRUE, TRUE );
+                TRUE, TRUE, TRUE );
 
         if ( !gnc_sxsld_get_appropriate_page( sxsld,
                                               druid_page,
@@ -855,10 +908,22 @@
                                                   druid_page,
                                                   BACK )
                   != NULL ),
-                TRUE, TRUE );
+                TRUE, TRUE, TRUE );
+}
+
+static void
+commit_prep( GnomeDruidPage *druid_page,
+	     gpointer arg1, gpointer ud )
+{
+        sxSinceLastData *sxsld = (sxSinceLastData*)ud;
 
-        /* This is always the last/finish page. */
-        gnome_druid_set_show_finish( sxsld->sincelast_druid, TRUE );
+        gnome_druid_set_buttons_sensitive(
+                sxsld->sincelast_druid,
+                ( gnc_sxsld_get_appropriate_page( sxsld,
+                                                  druid_page,
+                                                  BACK )
+                  != NULL ),
+                TRUE, TRUE, TRUE );
 }
 
 static
@@ -946,7 +1011,7 @@
                                                   druid_page,
                                                   BACK )
                   != NULL ),
-                TRUE, TRUE );
+                TRUE, TRUE, TRUE );
 
         if ( !gnc_sxsld_get_appropriate_page( sxsld,
                                               druid_page,
@@ -978,7 +1043,7 @@
                                                   druid_page,
                                                   BACK )
                   != NULL ),
-                TRUE, TRUE );
+                TRUE, TRUE, TRUE );
         /* Setup next/finish button based on the number of ready-to-go
          * to-create transactions */
         gnome_druid_set_show_finish(
@@ -1133,7 +1198,7 @@
                 /* add to the postponed list. */
                 { 
                         char tmpBuf[ MAX_DATE_LENGTH+1 ];
-                        printGDate( tmpBuf, tci->date );
+                        qof_print_gdate( tmpBuf, MAX_DATE_LENGTH, tci->date );
                         DEBUG( "Adding defer instance on %s for %s",
                                tmpBuf,
                                xaccSchedXactionGetName( tci->parentTCT->sx ) );
@@ -1230,7 +1295,7 @@
                                               &allVarsBound );
                         if ( !allVarsBound ) {
                                 char tmpBuf[ MAX_DATE_LENGTH+1 ];
-                                printGDate( tmpBuf, tci->date );
+                                qof_print_gdate( tmpBuf, MAX_DATE_LENGTH, tci->date );
                                 /* FIXME: this should be better-presented to the user. */
                                 DEBUG( "SX %s on date %s still has unbound variables.",
                                        xaccSchedXactionGetName(tci->parentTCT->sx), tmpBuf );
@@ -1477,7 +1542,7 @@
 sxsincelast_init( sxSinceLastData *sxsld )
 {
         GtkWidget *w;
-        GtkObject *o;
+        GObject *o;
         GnomeDruidPage *nextPage;
         int i;
         static widgetSignalHandlerTuple widgets[] = {
@@ -1525,6 +1590,10 @@
                   obsolete_prep, gen_back, gen_next,
                   gnc_sxsld_finish, cancel_check },
 
+                { COMMIT_PG,
+                  commit_prep, gen_back, gen_next,
+                  gnc_sxsld_finish, cancel_check },
+
                 { NULL, NULL, NULL, NULL, NULL, NULL }
         };
 
@@ -1542,8 +1611,8 @@
                                     sxsincelast_close_handler,
                                     sxsld->sincelast_window );
 
-        gtk_signal_connect( GTK_OBJECT(sxsld->sincelast_window), "destroy",
-                            GTK_SIGNAL_FUNC( sxsincelast_destroy ), sxsld );
+        g_signal_connect( G_OBJECT(sxsld->sincelast_window), "destroy",
+			  G_CALLBACK( sxsincelast_destroy ), sxsld );
 
         dialog_widgets_attach_handlers(sxsld->gxml, widgets, sxsld);
         druid_pages_attach_handlers( sxsld->gxml, pages, sxsld );
@@ -1552,10 +1621,10 @@
         for ( i=0; optionMenus[i].name != NULL; i++ ) {
                 w = glade_xml_get_widget( sxsld->gxml, optionMenus[i].name );
                 gnc_option_menu_init( w );
-                o = GTK_OBJECT(gtk_option_menu_get_menu(GTK_OPTION_MENU(w)));
-                gtk_signal_connect( o, "selection-done",
-                                    GTK_SIGNAL_FUNC( optionMenus[i].fn ),
-                                    sxsld );
+                o = G_OBJECT(gtk_option_menu_get_menu(GTK_OPTION_MENU(w)));
+                g_signal_connect( o, "selection-done",
+				  G_CALLBACK( optionMenus[i].fn ),
+				  sxsld );
         }
 
         /* set all to-create clist columns to auto-resize. */
@@ -1580,20 +1649,17 @@
                                                * cares... */
                                               TO_CREATE_STATUS );
 
+	/* The last druid page is blank without this call. */
+        gtk_widget_show_all( sxsld->sincelast_window );
+
         create_autoCreate_ledger( sxsld );
         create_created_ledger( sxsld );
         create_to_create_ledger( sxsld );
 
-        {
-                int width, height;
-                gnc_get_window_size( SXSLD_WIN_PREFIX, &width, &height );
-                if ( width != 0 && height != 0 ) {
-                        gtk_window_set_default_size( GTK_WINDOW(sxsld->sincelast_window),
-                                                     width, height );
-                }
-        }
+	gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(sxsld->sincelast_window));
 
-        gtk_widget_show_all( sxsld->sincelast_window );
+	/* Do not call show_all here. Screws up the gtkuimanager code */
+        gtk_widget_show( sxsld->sincelast_window );
 
         process_auto_create_list( sxsld->autoCreateList, sxsld );
 
@@ -1613,10 +1679,7 @@
 void
 sxsincelast_save_size( sxSinceLastData *sxsld )
 {
-        gint x, y, w, h, d;
-        gdk_window_get_geometry( sxsld->sincelast_window->window,
-                                 &x, &y, &w, &h, &d );
-        gnc_save_window_size( SXSLD_WIN_PREFIX, w, h );
+  gnc_save_window_size( GCONF_SECTION, GTK_WINDOW(sxsld->sincelast_window) );
 }
 
 static void
@@ -1789,7 +1852,7 @@
                         }
 
                         rowText[0] = g_new0( char, MAX_DATE_LENGTH+1 );
-                        printGDate( rowText[0], tci->date );
+                        qof_print_gdate( rowText[0], MAX_DATE_LENGTH, tci->date );
                         
 
                         switch ( tci->state ) {
@@ -1876,7 +1939,7 @@
                         rit = (reminderInstanceTuple*)instances->data;
 
                         rowText[0] = g_new0( gchar, MAX_DATE_LENGTH+1 );
-                        printGDate( rowText[0], rit->occurDate );
+                        qof_print_gdate( rowText[0], MAX_DATE_LENGTH, rit->occurDate );
                         rowText[1] = "";
                         rowText[2] = g_new0( gchar, 5 ); /* FIXME: appropriate size? */
                         sprintf( rowText[2], "%d",
@@ -1890,15 +1953,15 @@
                         gtk_ctree_node_set_row_data( ctree,
                                                      instNode,
                                                      (gpointer)rit );
-                        gtk_signal_handler_block_by_func( GTK_OBJECT(ctree),
-                                                          sxsld_remind_row_toggle,
-                                                          sxsld ); 
+                        g_signal_handlers_block_by_func( G_OBJECT(ctree),
+                                                         sxsld_remind_row_toggle,
+                                                         sxsld ); 
                         if ( rit->isSelected ) {
                                 gtk_ctree_select( ctree, instNode );
                         }
-                        gtk_signal_handler_unblock_by_func( GTK_OBJECT(ctree),
-                                                            sxsld_remind_row_toggle,
-                                                            sxsld );
+                        g_signal_handlers_unblock_by_func( G_OBJECT(ctree),
+                                                           sxsld_remind_row_toggle,
+                                                           sxsld );
                         g_free( rowText[0] );
                         g_free( rowText[2] );
                 }
@@ -1922,9 +1985,9 @@
 
         gtk_clist_freeze( cl );
         gtk_clist_clear( cl );
-        gtk_signal_handler_block_by_func( GTK_OBJECT(cl),
-                                          sxsld_obsolete_row_toggle,
-                                          sxsld );
+        g_signal_handlers_block_by_func( G_OBJECT(cl),
+                                         sxsld_obsolete_row_toggle,
+                                         sxsld );
 
         for ( row = 0; removeList;
               row++, removeList = removeList->next ) {
@@ -1944,9 +2007,9 @@
                         gtk_clist_select_row( cl, row, 0 );
                 }
         }
-        gtk_signal_handler_unblock_by_func( GTK_OBJECT(cl),
-                                            sxsld_obsolete_row_toggle,
-                                            sxsld );
+        g_signal_handlers_unblock_by_func( G_OBJECT(cl),
+                                           sxsld_obsolete_row_toggle,
+                                           sxsld );
         gtk_clist_thaw( cl );
 
         g_string_free(tmp_str, TRUE);
@@ -2628,6 +2691,8 @@
         ag = gnc_book_get_template_group( gnc_get_current_book () );
         id = guid_to_string( xaccSchedXactionGetGUID(sx) );
         if ( ag && id ) {
+            /* This looks strange but it's right.  The account is
+               named after the guid string. */
                 acct = xaccGetAccountFromName( ag, id );
                 if ( acct ) {
                         createUD.tci = tci;
@@ -2675,6 +2740,7 @@
 
                 ag = gnc_book_get_template_group( gnc_get_current_book () );
                 id = guid_to_string( xaccSchedXactionGetGUID(sx) );
+                /* Get account named after guid string. */
                 acct = xaccGetAccountFromName( ag, id );
                 splitList = xaccAccountGetSplitList( acct );
         }
@@ -3427,7 +3493,7 @@
 
         rit = (reminderInstanceTuple*)data;
         msg = (GString*)ud;
-        printGDate( tmpBuf, rit->occurDate );
+        qof_print_gdate( tmpBuf, MAX_DATE_LENGTH, rit->occurDate );
         g_string_sprintfa( msg, tmpBuf );
         g_string_sprintfa( msg, "\n" );
 }
@@ -3496,7 +3562,7 @@
 create_autoCreate_ledger( sxSinceLastData *sxsld )
 {
         SplitRegister *splitreg;
-        GtkWidget *vbox, *toolbar;
+        GtkWidget *vbox;
         Query *q;
 
         q = xaccMallocQuery();
@@ -3504,34 +3570,42 @@
         sxsld->ac_ledger = gnc_ledger_display_query( q,
                                                      GENERAL_LEDGER,
                                                      REG_STYLE_LEDGER );
-        splitreg = gnc_ledger_display_get_split_register( sxsld->ac_ledger );
 
-        /* FIXME: Make numRows configurable. */
-        sxsld->ac_gsr =
-                GNC_SPLIT_REG(
-                        gnc_split_reg_new( sxsld->ac_ledger,
-                                           GTK_WINDOW( sxsld->sincelast_window ),
-                                           4,
-                                           (CREATE_TOOLBAR | CREATE_POPUP),
-                                           CAP_SCHEDULE ) );
+	/* First the embedded window */
         vbox = glade_xml_get_widget( sxsld->gxml, AUTO_CREATE_VBOX );
-        toolbar = gnc_split_reg_get_toolbar( sxsld->ac_gsr );
+	sxsld->ac_window =
+	  gnc_embedded_window_new("SXWindowActions",
+				     gnc_sxsld_menu_entries,
+				     gnc_sxsld_menu_n_entries,
+				     "gnc-sxed-window-ui.xml",
+				     sxsld->sincelast_window,
+				     FALSE, /* no accelerators */
+				     sxsld);
+	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->ac_window),
+			    TRUE, TRUE, 0);
+
+	/* Then the register in it */
+	sxsld->ac_register = gnc_plugin_page_register_new_ledger(sxsld->ac_ledger);
+	gnc_plugin_page_set_ui_description (sxsld->ac_register,
+					    "gnc-plugin-page-sxregister-ui.xml");
+	gnc_plugin_page_register_set_options (sxsld->ac_register,
+					      NULL, NULL, 4,
+					      CAP_SCHEDULE);
+	gnc_embedded_window_open_page (sxsld->ac_window, sxsld->ac_register);
 
-        gtk_box_pack_start( GTK_BOX(vbox), toolbar, FALSE, FALSE, 2 );
-        gtk_box_pack_end( GTK_BOX(vbox), GTK_WIDGET(sxsld->ac_gsr), TRUE, TRUE, 2 );
-        gnc_split_reg_use_extended_popup( sxsld->ac_gsr );
+	/* Now configure the register */
+        splitreg = gnc_ledger_display_get_split_register( sxsld->ac_ledger );
         gnc_split_register_config(splitreg,
                                   splitreg->type, splitreg->style,
                                   FALSE);
         gnc_split_register_show_present_divider( splitreg, FALSE );
-        gnc_ledger_display_refresh( sxsld->ac_ledger );
 }
 
 static void
 create_created_ledger( sxSinceLastData *sxsld )
 {
         SplitRegister *splitreg;
-        GtkWidget *vbox, *toolbar;
+        GtkWidget *vbox;
         Query *q;
 
         q = xaccMallocQuery();
@@ -3539,41 +3613,49 @@
         sxsld->created_ledger = gnc_ledger_display_query( q,
                                                           GENERAL_LEDGER,
                                                           REG_STYLE_LEDGER );
-        splitreg = gnc_ledger_display_get_split_register( sxsld->created_ledger );
-        /* FIXME: make numRows configurable? */
-        sxsld->created_gsr =
-                GNC_SPLIT_REG( 
-                        gnc_split_reg_new( sxsld->created_ledger,
-                                           GTK_WINDOW( sxsld->sincelast_window ),
-                                           4,
-                                           ( CREATE_TOOLBAR | CREATE_POPUP ),
-                                           CAP_SCHEDULE ) );
 
+	/* First the embedded window */
         vbox = glade_xml_get_widget( sxsld->gxml, CREATED_VBOX );
-        toolbar = gnc_split_reg_get_toolbar( sxsld->created_gsr );
+	sxsld->created_window =
+	  gnc_embedded_window_new("SXWindowActions",
+				  gnc_sxsld_menu_entries,
+				  gnc_sxsld_menu_n_entries,
+				  "gnc-sxed-window-ui.xml",
+				  sxsld->sincelast_window,
+				  FALSE, /* no accelerators */
+				  sxsld);
+	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->created_window),
+			    TRUE, TRUE, 0);
+
+	/* Then the register in it */
+	sxsld->created_register = gnc_plugin_page_register_new_ledger(sxsld->created_ledger);
+	gnc_plugin_page_set_ui_description (sxsld->created_register,
+					    "gnc-plugin-page-sxregister-ui.xml");
+	gnc_plugin_page_register_set_options (sxsld->created_register,
+					      NULL, NULL, 4,
+					      CAP_SCHEDULE);
+	gnc_embedded_window_open_page (sxsld->created_window, sxsld->created_register);
 
-        gtk_box_pack_start( GTK_BOX(vbox), toolbar, FALSE, FALSE, 2 );
-        gtk_box_pack_end( GTK_BOX(vbox), GTK_WIDGET(sxsld->created_gsr), TRUE, TRUE, 2 );
-
-        gnc_split_reg_use_extended_popup( sxsld->created_gsr );
+	/* Now configure the register */
+        splitreg = gnc_ledger_display_get_split_register( sxsld->created_ledger );
         gnc_split_register_config(splitreg,
                                   splitreg->type, splitreg->style,
                                   FALSE);
         gnc_split_register_show_present_divider( splitreg, FALSE );
-        gnc_ledger_display_refresh( sxsld->created_ledger );
 }
 
 static
 void
-sxsld_jump_to_real_txn( GNCSplitReg *gsr, gpointer ud )
+sxsld_jump_to_real_txn( GtkAction *action, sxSinceLastData *sxsld )
 {
         SplitRegister *reg;
+	GNCSplitReg *gsr;
         Account *account;
         Account *leader;
         Split *split;
-        sxSinceLastData *sxsld = (sxSinceLastData*)ud;
-        reg = gnc_ledger_display_get_split_register( sxsld
-                                                     ->to_create_ledger );
+
+        reg = gnc_ledger_display_get_split_register(sxsld->to_create_ledger);
+	gsr = gnc_ledger_display_get_user_data(sxsld->to_create_ledger);
 
         split = gnc_split_register_get_current_split (reg);
         if (split == NULL)
@@ -3616,17 +3698,13 @@
         }
 
         {
-                GNCLedgerDisplay *ld;
+		GncPluginPage *new_page;
                 GNCSplitReg *gsr;
 
-                ld = gnc_ledger_display_simple( account );
-                gsr = gnc_ledger_display_get_user_data( ld );
-                if ( !gsr ) {
-                        /* create new */
-                        gsr = regWindowSimple( account );
-                }
-                gnc_split_reg_raise( gsr );
-                gnc_split_reg_jump_to_split( gsr, split );
+		new_page = gnc_plugin_page_register_new (account, FALSE);
+		gnc_main_window_open_page (NULL, new_page);
+		gsr = gnc_plugin_page_register_get_gsr (new_page);
+		gnc_split_reg_jump_to_split(gsr, split);
         }
         
         gtk_signal_emit_stop_by_name( GTK_OBJECT(gsr), "jump" );
@@ -3636,34 +3714,41 @@
 create_to_create_ledger( sxSinceLastData *sxsld )
 {
         SplitRegister *splitreg;
-        GtkWidget *txn_reg_frame;
+        GtkWidget *vbox;
         Query *q;
 
         sxsld->to_create_ledger = gnc_ledger_display_template_gl( NULL );
         q = xaccMallocQuery();
         xaccQueryClear( q );
         gnc_ledger_display_set_query( sxsld->to_create_ledger, q );
+
+ 	/* First the embedded window */
+	vbox = glade_xml_get_widget( sxsld->gxml, TO_CREATE_TXN_VBOX );
+	sxsld->to_create_window =
+	  gnc_embedded_window_new("SXWindowActions",
+				  gnc_sxsld_menu_entries,
+				  gnc_sxsld_menu_n_entries,
+				  "gnc-sxed-to-create-window-ui.xml",
+				  sxsld->sincelast_window,
+				  FALSE, /* no accelerators */
+				  sxsld);
+	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(sxsld->to_create_window),
+			    TRUE, TRUE, 0);
+
+	/* Then the register in it */
+	sxsld->to_create_register = gnc_plugin_page_register_new_ledger(sxsld->to_create_ledger);
+	gnc_plugin_page_set_ui_description (sxsld->to_create_register,
+					    "gnc-plugin-page-sxregister-ui.xml");
+	gnc_plugin_page_register_set_options (sxsld->to_create_register,
+					      NULL, NULL, 4,
+					      CAP_READ_ONLY | CAP_SCHEDULE);
+	gnc_embedded_window_open_page (sxsld->to_create_window, sxsld->to_create_register);
+
+	/* Now configure the register */
         splitreg = gnc_ledger_display_get_split_register( sxsld->to_create_ledger );
-        /* FIXME: make numRows configurable? */
-        sxsld->to_create_gsr =
-                GNC_SPLIT_REG( 
-                        gnc_split_reg_new( sxsld->to_create_ledger,
-                                           GTK_WINDOW( sxsld->sincelast_window ),
-                                           4,
-                                           ( CREATE_TOOLBAR | CREATE_POPUP ),
-                                           ( CAP_READ_ONLY | CAP_SCHEDULE) ) );
-
-        gtk_signal_connect( GTK_OBJECT(sxsld->to_create_gsr), "jump",
-                            GTK_SIGNAL_FUNC( sxsld_jump_to_real_txn ),
-                            sxsld );
-
-        txn_reg_frame = glade_xml_get_widget( sxsld->gxml, TO_CREATE_TXN_REG_FRAME );
-        gtk_container_add( GTK_CONTAINER( txn_reg_frame ),
-                           GTK_WIDGET( sxsld->to_create_gsr ) );
         gnc_split_register_config( splitreg, splitreg->type, splitreg->style,
                                    FALSE );
         gnc_split_register_show_present_divider( splitreg, FALSE );
-        gnc_ledger_display_refresh( sxsld->to_create_ledger );
 }
 
 static void
@@ -3831,3 +3916,18 @@
                 TRUE );
 }
 
+/* Command callbacks */
+static void
+gnc_sxsld_cmd_edit_cut (GtkAction *action, sxSinceLastData *sxsld)
+{
+}
+
+static void
+gnc_sxsld_cmd_edit_copy (GtkAction *action, sxSinceLastData *sxsld)
+{
+}
+
+static void
+gnc_sxsld_cmd_edit_paste (GtkAction *action, sxSinceLastData *sxsld)
+{
+}
--- src/gnome/window-main.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/********************************************************************
- * window-main.h -- public GNOME main window functions              *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- * Copyright (C) 2001 Bill Gribble <grib at gnumatic.com>              *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#ifndef WINDOW_MAIN_H
-#define WINDOW_MAIN_H
-
-#include "gnc-mdi-utils.h"
-
-GNCMDIInfo * gnc_main_window_new (void);
-void gnc_shutdown(int);
-
-/*
- * Functions used as callbacks from multiple dialogs.
- */
-void gnc_main_window_about_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_file_save_cb(GtkWidget * widget, gpointer data);
-void gnc_main_window_file_save_as_cb(GtkWidget * widget, gpointer data);
-void gnc_main_window_tutorial_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_totd_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_help_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_exit_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_file_save_cb(GtkWidget * widget, gpointer data);
-void gnc_main_window_file_save_as_cb(GtkWidget * widget, gpointer data);
-void gnc_main_window_fincalc_cb(GtkWidget *widget, gpointer data);
-void gnc_main_window_gl_cb(GtkWidget *widget, gpointer data);
-void gnc_main_window_prices_cb(GtkWidget *widget, gpointer data);
-void gnc_main_window_find_transactions_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_sched_xaction_cb (GtkWidget *widget, gpointer data);
-void gnc_main_window_commodities_cb(GtkWidget *widget, gpointer data);
-
-#endif
Index: gnc-split-reg.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gnc-split-reg.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/gnome/gnc-split-reg.c -Lsrc/gnome/gnc-split-reg.c -u -r1.39 -r1.40
--- src/gnome/gnc-split-reg.c
+++ src/gnome/gnc-split-reg.c
@@ -34,20 +34,18 @@
 
 #include "gnc-split-reg.h"
 
-#include "window-register.h"
 #include "Account.h"
 #include "QueryNew.h"
 #include "SX-book.h"
 #include "dialog-account.h"
 #include "dialog-scheduledxaction.h"
 #include "dialog-sx-from-trans.h"
-#include "global-options.h"
-#include "gnc-book.h"
 #include "gnc-component-manager.h"
 #include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-err-popup.h"
 #include "gnc-euro.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ledger-display.h"
 #include "gnc-pricedb.h"
@@ -58,10 +56,9 @@
 #include "table-allgui.h"
 
 #include <libguile.h>
-#include "gnc-engine-util.h"
 #include "dialog-utils.h"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /**
  * TODO list:
@@ -84,24 +81,20 @@
  **/
 
 
-/** PROTOTYPES ******************************************************/
+/***** PROTOTYPES ***************************************************/
 void gnc_split_reg_raise( GNCSplitReg *gsr );
 
 static GtkWidget* add_summary_label( GtkWidget *summarybar,
                                      const char *label_str );
 
-static void gnc_toolbar_change_cb( void *data );
 static void gnc_split_reg_determine_read_only( GNCSplitReg *gsr );
 
-static void gnc_split_reg_change_style (GNCSplitReg *gsr, SplitRegisterStyle style);
-
 static GNCPlaceholderType gnc_split_reg_get_placeholder( GNCSplitReg *gsr );
 static gncUIWidget gnc_split_reg_get_parent( GNCLedgerDisplay *ledger );
 
 static void gsr_create_menus( GNCSplitReg *gsr );
 static void gsr_setup_menu_widgets( GNCSplitReg *gsr, GladeXML *xml );
 static void gsr_create_toolbar( GNCSplitReg *gsr );
-static void gsr_create_summary_bar( GNCSplitReg *gsr );
 static void gsr_create_table( GNCSplitReg *gsr );
 static void gsr_setup_table( GNCSplitReg *gsr );
 static void gsr_setup_status_widgets( GNCSplitReg *gsr );
@@ -203,6 +196,8 @@
                                        GtkAllocation *allocation,
                                        gpointer user_data);
 
+FROM_STRING_FUNC(SortType, ENUM_LIST_SORTTYPE)
+AS_STRING_FUNC(SortType, ENUM_LIST_SORTTYPE)
 
 guint
 gnc_split_reg_get_type( void )
@@ -295,7 +290,7 @@
     gnc_split_reg_signals[ signals[i].s ] =
       gtk_signal_new( signals[i].signal_name,
                       GTK_RUN_LAST,
-                      object_class->type, signals[i].defaultOffset,
+                      GTK_CLASS_TYPE(object_class), signals[i].defaultOffset,
                       gtk_signal_default_marshaller, GTK_TYPE_NONE, 0 );
   }
   /* Setup the non-default-marshalled signals; 'i' is still valid, here. */
@@ -303,15 +298,13 @@
   gnc_split_reg_signals[ INCLUDE_DATE_SIGNAL ] =
     gtk_signal_new( "include-date",
                     GTK_RUN_LAST,
-                    object_class->type,
+                    GTK_CLASS_TYPE(object_class),
                     signals[i++].defaultOffset,
                     gtk_marshal_NONE__INT, /* time_t == int */
                     GTK_TYPE_NONE, 1, GTK_TYPE_INT );
 
   g_assert( i == LAST_SIGNAL );
 
-  gtk_object_class_add_signals (object_class, gnc_split_reg_signals, LAST_SIGNAL);
-
   /* Setup the default handlers. */
   class->enter_ent_cb    = gsr_default_enter_handler;
   class->cancel_ent_cb   = gsr_default_cancel_handler;
@@ -366,8 +359,8 @@
   gsr->width = -1;
   gsr->height = -1;
   gsr->disallowedCaps = 0;
-  gsr->numRows = (guint) gnc_lookup_number_option ( "_+Advanced",
-                                                    "Number of Rows", 20.0 );
+  gsr->numRows = gnc_gconf_get_float(GCONF_GENERAL_REGISTER,
+				     KEY_NUMBER_OF_ROWS, NULL);
   gsr->read_only = FALSE;
 
   /* IMPORTANT: If we set this to anything other than GTK_RESIZE_QUEUE, we
@@ -377,7 +370,11 @@
    * iterations of the Druid resizing without bound.  Contact
    * jsled at asynchronous.org for details. -- 2002.04.15
    */
-  gtk_container_set_resize_mode( GTK_CONTAINER(gsr), GTK_RESIZE_QUEUE );
+  /* This function call causes several problems in gnome2 port.  I do
+   * not see any problems with the code when it is removed.
+   * hampton at employees.org -- 2003-10-06
+   */
+  //gtk_container_set_resize_mode( GTK_CONTAINER(gsr), GTK_RESIZE_QUEUE );
 
   gtk_signal_connect( GTK_OBJECT(gsr), "destroy",
                       GTK_SIGNAL_FUNC (gnc_split_reg_destroy_cb), gsr );
@@ -445,12 +442,12 @@
   gtk_widget_hide( mbar );
 
   gsr->edit_menu = glade_xml_get_widget( xml, "menu_edit_menu" );
-  gtk_object_ref( GTK_OBJECT(gsr->edit_menu) );
+  g_object_ref( gsr->edit_menu );
   mi = glade_xml_get_widget( xml, "menu_edit" );
   gtk_menu_item_remove_submenu( GTK_MENU_ITEM( mi ) );
 
   gsr->view_menu = glade_xml_get_widget( xml, "menu_view_menu" );
-  gtk_object_ref( GTK_OBJECT(gsr->view_menu) );
+  g_object_ref( gsr->view_menu );
   mi = glade_xml_get_widget( xml, "menu_view" );
   gtk_menu_item_remove_submenu( GTK_MENU_ITEM(mi) );
 
@@ -458,7 +455,7 @@
   gsr->sort_submenu = glade_xml_get_widget( xml, "menu_sort_order_menu" );
 
   gsr->action_menu = glade_xml_get_widget( xml, "menu_actions_menu" );
-  gtk_object_ref( GTK_OBJECT(gsr->action_menu) );
+  g_object_ref( gsr->action_menu );
   mi = glade_xml_get_widget( xml, "menu_actions" );
   gtk_menu_item_remove_submenu( GTK_MENU_ITEM(mi) );
 
@@ -477,6 +474,7 @@
 void
 gsr_create_toolbar( GNCSplitReg *gsr )
 {
+#if 0
   GladeXML *xml;
   GtkWidget *widget;
   SCM id;
@@ -489,11 +487,6 @@
   gsr->toolbar = glade_xml_get_widget( xml, "toolbar" );
   gsr->split_button = glade_xml_get_widget( xml, "toolbar_split" );
 
-  id = gnc_register_option_change_callback( gnc_toolbar_change_cb, gsr,
-                                            "General", "Toolbar Buttons" );
-  gsr->toolbar_change_callback_id = id;
-
-
   if ( gsr->disallowedCaps & CAP_DELETE ) {
     widget = glade_xml_get_widget( xml, "toolbar_delete" );
     gtk_widget_set_sensitive( widget, FALSE );
@@ -515,6 +508,7 @@
     widget = glade_xml_get_widget (xml, "toolbar_duplicate");
     gtk_widget_set_sensitive(widget, FALSE);
   }
+#endif
 }
 
 static
@@ -536,9 +530,9 @@
   gsr->reg = GNUCASH_REGISTER( register_widget );
   gnc_table_init_gui( GTK_WIDGET(gsr->reg), sr );
 
-  gtk_container_add( GTK_CONTAINER(gsr), GTK_WIDGET(gsr->reg) );
+  gtk_box_pack_start (GTK_BOX (gsr), GTK_WIDGET(gsr->reg), TRUE, TRUE, 0);
   GNUCASH_SHEET(gsr->reg->sheet)->window = gsr->window;
-  gtk_widget_show_all( GTK_WIDGET(gsr->reg) );
+  gtk_widget_show ( GTK_WIDGET(gsr->reg) );
   gtk_signal_connect (GTK_OBJECT(gsr->reg), "activate_cursor",
                       GTK_SIGNAL_FUNC(gnc_split_reg_record_cb), gsr);
   gtk_signal_connect (GTK_OBJECT(gsr->reg), "redraw_all",
@@ -581,11 +575,6 @@
 void
 gnc_split_reg_destroy_cb(GtkWidget *widget, gpointer data)
 {
-  GNCSplitReg *gsr = data;
-  SCM id;
-
-  id = gsr->toolbar_change_callback_id;
-  gnc_unregister_option_change_callback_id(id);
 }
 
 /**
@@ -646,7 +635,7 @@
 static GNCPrice *
 account_latest_price (Account *account)
 {
-  GNCBook *book;
+  QofBook *book;
   GNCPriceDB *pdb;
   gnc_commodity *commodity;
   gnc_commodity *currency;
@@ -664,7 +653,7 @@
 static GNCPrice *
 account_latest_price_any_currency (Account *account)
 {
-  GNCBook *book;
+  QofBook *book;
   GNCPriceDB *pdb;
   gnc_commodity *commodity;
   GList *price_list;
@@ -699,13 +688,11 @@
   gboolean reverse;
   gboolean euro;
 
-  if ( gsr->window == NULL )
+  if ( gsr->summarybar == NULL )
     return;
 
   leader = gnc_ledger_display_leader( gsr->ledger );
-  euro = gnc_lookup_boolean_option( "International",
-                                    "Enable EURO support",
-                                    FALSE );
+  euro = gnc_gconf_get_bool(GCONF_GENERAL, KEY_ENABLE_EURO, NULL);
 
   commodity = xaccAccountGetCommodity( leader );
 
@@ -719,9 +706,6 @@
   print_info = gnc_account_print_info( leader, TRUE );
   reverse = gnc_reverse_balance( leader );
 
-  /* Handle the summary bar */
-  if ( gsr->createFlags & CREATE_SUMMARYBAR ) 
-  {
     gsr_update_summary_label( gsr->balance_label,
                               xaccAccountGetPresentBalance,
                               leader, print_info, commodity, reverse, euro );
@@ -837,47 +821,6 @@
             gnc_price_unref (price);
           }
       }
-  }
-
-  {
-    gboolean expand;
-    gboolean sensitive;
-    SplitRegister *reg;
-
-    reg = gnc_ledger_display_get_split_register( gsr->ledger );
-    expand = gnc_split_register_current_trans_expanded (reg);
-    sensitive = (reg->style == REG_STYLE_LEDGER);
-
-    if ( gsr->createFlags & CREATE_TOOLBAR ) {
-      gtk_signal_handler_block_by_data
-        (GTK_OBJECT(gsr->split_button), gsr);
-      gtk_toggle_button_set_active
-        (GTK_TOGGLE_BUTTON (gsr->split_button), expand);
-      gtk_signal_handler_unblock_by_data
-        (GTK_OBJECT (gsr->split_button), gsr);
-      gtk_widget_set_sensitive( gsr->split_button, sensitive );
-    }
-
-    if ( gsr->createFlags & CREATE_MENUS ) {
-      gtk_signal_handler_block_by_data
-        (GTK_OBJECT (gsr->split_menu_check), gsr);
-      gtk_check_menu_item_set_active
-        (GTK_CHECK_MENU_ITEM (gsr->split_menu_check), expand);
-      gtk_signal_handler_unblock_by_data
-        (GTK_OBJECT (gsr->split_menu_check), gsr);
-      gtk_widget_set_sensitive( gsr->split_menu_check, sensitive );
-    }
-
-    if ( gsr->createFlags & CREATE_POPUP ) {
-      gtk_signal_handler_block_by_data
-        (GTK_OBJECT (gsr->split_popup_check), gsr);
-      gtk_check_menu_item_set_active
-        (GTK_CHECK_MENU_ITEM (gsr->split_popup_check), expand);
-      gtk_signal_handler_unblock_by_data
-        (GTK_OBJECT (gsr->split_popup_check), gsr);
-      gtk_widget_set_sensitive( gsr->split_popup_check, sensitive );
-    }
-  }
 }
 
 static void
@@ -906,8 +849,10 @@
     if (reg && reg->table)
       gnc_table_save_state (reg->table);
 
-    gtk_widget_hide_all( gsr->window );
-    gtk_widget_destroy( gsr->window );
+    /*
+     * Don't destroy the window here any more.  The register no longer
+     * owns it.
+     */
   }
   gnc_ledger_display_set_user_data (ledger, NULL);
 }
@@ -915,7 +860,7 @@
 gboolean
 gnc_split_reg_check_close( GNCSplitReg *gsr )
 {
-  GNCVerifyResult result;
+  gint result;
   gboolean pending_changes;
   SplitRegister *reg;
   const char *message = _("The current transaction has been changed.\n"
@@ -1140,10 +1085,6 @@
   gsr_emit_simple_signal( gsr, "reverse_txn" );
 }
 
-/* Remove when porting to gtk2.0 */
-#define GTK_STOCK_CANCEL           GNOME_STOCK_BUTTON_CANCEL
-#define GTK_STOCK_DELETE           "Delete"
-
 
 static gboolean
 xaccTransWarnReadOnly (const Transaction *trans)
@@ -1593,49 +1534,7 @@
 void
 gsr_default_jump_handler( GNCSplitReg *gsr, gpointer data )
 {
-  SplitRegister *reg;
-  Account *account;
-  Account *leader;
-  Split *split;
-
-  reg = gnc_ledger_display_get_split_register (gsr->ledger);
-
-  split = gnc_split_register_get_current_split (reg);
-  if (split == NULL)
-    return;
-
-  account = xaccSplitGetAccount(split);
-  if (account == NULL)
-    return;
-
-  leader = gnc_ledger_display_leader( gsr->ledger );
-
-  if (account == leader)
-  {
-    split = xaccSplitGetOtherSplit(split);
-    if (split == NULL)
-      return;
-
-    account = xaccSplitGetAccount(split);
-    if (account == NULL)
-      return;
-    if (account == leader)
-      return;
-  }
-
-  {
-    GNCLedgerDisplay *ld;
-    GNCSplitReg *gsr;
-
-    ld = gnc_ledger_display_simple( account );
-    gsr = gnc_ledger_display_get_user_data( ld );
-    if ( !gsr ) {
-      /* create new */
-      gsr = regWindowSimple( account );
-    }
-    gnc_split_reg_raise( gsr );
-    gnc_split_reg_jump_to_split( gsr, split );
-  }
+  g_assert_not_reached();
 }
 
 void
@@ -1645,7 +1544,6 @@
   gsr_emit_simple_signal( gsr, "jump" );
 }
 
-static
 void
 gnc_split_reg_change_style (GNCSplitReg *gsr, SplitRegisterStyle style)
 {
@@ -1901,15 +1799,14 @@
                                            gsr );
 }
 
-static void
+void
 gnc_split_reg_enter( GNCSplitReg *gsr, gboolean next_transaction )
 {
   SplitRegister *sr = gnc_ledger_display_get_split_register( gsr->ledger );
   gboolean goto_blank;
 
-  goto_blank = gnc_lookup_boolean_option( "Register",
-                                          "'Enter' moves to blank transaction",
-                                          FALSE );
+  goto_blank = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+				  "enter_moves_to_end", NULL);
 
   /* If we are in single or double line mode and we hit enter
    * on the blank split, go to the blank split instead of the
@@ -1994,8 +1891,7 @@
   return label;
 }
 
-static
-void
+GtkWidget *
 gsr_create_summary_bar( GNCSplitReg *gsr )
 {
   gboolean has_shares;
@@ -2011,6 +1907,7 @@
 
   if ( gnc_ledger_display_type(gsr->ledger) >= LD_SUBACCOUNT ) {
     gsr->summarybar = NULL;
+    return NULL;
   }
 
   {
@@ -2051,6 +1948,10 @@
   }
 
   gsr->summarybar = summarybar;
+
+  /* Force the first update */
+  gsr_redraw_all_cb(NULL, gsr);
+  return gsr->summarybar;
 }
 
 static
@@ -2141,7 +2042,7 @@
                                      gsr );
 
   /* Glade insists on making this a tearoff menu. */
-  if (gnome_preferences_get_menus_have_tearoff()) {
+  if (gnc_gconf_menus_have_tearoff()) {
     GtkMenuShell *ms = GTK_MENU_SHELL(popup);
     GtkWidget *tearoff;
 
@@ -2303,14 +2204,6 @@
 }
 
 static
-void
-gnc_toolbar_change_cb (void *data)
-{
-  GNCSplitReg *gsr = data;
-  gnc_split_reg_refresh_toolbar( gsr );
-}
-
-static
 gncUIWidget
 gnc_split_reg_get_parent( GNCLedgerDisplay *ledger )
 {
@@ -2363,8 +2256,7 @@
 void
 gnc_split_reg_set_sort_type( GNCSplitReg *gsr, SortType t )
 {
-  /* FIXME */
-  PERR( "unimplemented" );
+  gnc_split_reg_sort( gsr, t );
 }
 
 GtkWidget*
Index: top-level.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/top-level.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -Lsrc/gnome/top-level.c -Lsrc/gnome/top-level.c -u -r1.147 -r1.148
--- src/gnome/top-level.c
+++ src/gnome/top-level.c
@@ -32,21 +32,32 @@
 #include <X11/Xlib.h>
 
 #include "TransLog.h"
-#include "backend/gnc-backend-api.h"
 #include "combocell.h"
 #include "dialog-account.h"
 #include "dialog-commodity.h"
 #include "dialog-options.h"
+#include "dialog-scheduledxaction.h"
 #include "dialog-transfer.h"
+#include "dialog-totd.h"
 #include "dialog-utils.h"
+#include "druid-hierarchy.h"
 #include "file-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
-#include "gnc-date.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-file.h"
+#include "gnc-hooks.h"
+#include "gnc-main-window.h"
 #include "gnc-menu-extensions.h"
-#include "gnc-network.h"
+#include "gnc-plugin-menu-additions.h" /* FIXME Remove this line*/
+#include "gnc-plugin-account-tree.h" /* FIXME Remove this line*/
+#include "gnc-plugin-basic-commands.h" /* FIXME Remove this line*/
+#include "gnc-plugin-file-history.h" /* FIXME Remove this line*/
+#include "gnc-plugin-register.h" /* FIXME Remove this line*/
+#include "gnc-plugin-budget.h"
+#include "gnc-plugin-page-register.h"
+#include "gnc-plugin-manager.h" /* FIXME Remove this line*/
+#include "gnc-icons.h" /* FIXME Remove this line*/
 #include "gnc-splash.h"
 #include "gnc-html.h"
 #include "gnc-gnome-utils.h"
@@ -54,70 +65,29 @@
 #include "gnc-report.h"
 #include "gnc-split-reg.h"
 #include "gnc-ui.h"
+#include "gnc-ui-util.h"
 #include "gnucash-color.h"
 #include "gnucash-sheet.h"
 #include "gnucash-style.h"
 #include "guile-util.h"
-#include "qofbook.h"
-#include "qofsession.h"
 #include "messages.h"
-#include "split-register.h"
 #include "top-level.h"
-#include "window-help.h"
-#include "window-main.h"
-#include "window-acct-tree.h"
-#include "window-register.h"
 #include "window-report.h"
 
 
 /** PROTOTYPES ******************************************************/
-static void gnc_configure_date_format_cb(gpointer);
 static void gnc_configure_date_format(void);
-static void gnc_configure_account_separator_cb(gpointer);
-static void gnc_configure_register_colors_cb(gpointer);
-static void gnc_configure_register_colors(void);
-static void gnc_configure_register_borders_cb(gpointer);
-static void gnc_configure_register_borders(void);
-static void gnc_configure_auto_raise_cb(gpointer);
-static void gnc_configure_auto_raise(void);
-static void gnc_configure_negative_color_cb(gpointer);
-static void gnc_configure_negative_color(void);
-static void gnc_configure_auto_decimal_cb(gpointer);
-static void gnc_configure_auto_decimal(void);
-static void gnc_configure_auto_decimal_places_cb(gpointer);
-static void gnc_configure_auto_decimal_places(void);
-static void gnc_configure_file_be_retention_days_cb(gpointer);
-static void gnc_configure_file_be_retention_days(void);
-static void gnc_configure_file_be_compression_cb(gpointer);
-static void gnc_configure_file_be_compression(void);
-static void gnc_configure_register_font_cb(gpointer);
-static void gnc_configure_register_font(void);
-static void gnc_configure_register_hint_font_cb(gpointer);
-static void gnc_configure_register_hint_font(void);
 
 
 /** GLOBALS *********************************************************/
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 static int gnome_is_running = FALSE;
 static int splash_is_initialized = FALSE;
 static int gnome_is_initialized = FALSE;
 static int gnome_is_terminating = FALSE;
 
-static SCM date_callback_id = SCM_UNDEFINED;
-static SCM account_separator_callback_id = SCM_UNDEFINED;
-static SCM register_colors_callback_id = SCM_UNDEFINED;
-static SCM register_borders_callback_id = SCM_UNDEFINED;
-static SCM auto_raise_callback_id = SCM_UNDEFINED;
-static SCM negative_color_callback_id = SCM_UNDEFINED;
-static SCM auto_decimal_callback_id = SCM_UNDEFINED;
-static SCM auto_decimal_places_callback_id = SCM_UNDEFINED;
-static SCM log_retention_days_callback_id = SCM_UNDEFINED;
-static SCM compression_callback_id = SCM_UNDEFINED;
-static SCM register_font_callback_id = SCM_UNDEFINED;
-static SCM register_hint_font_callback_id = SCM_UNDEFINED;
-
 
 gboolean
 gnucash_ui_is_running(void)
@@ -134,13 +104,13 @@
 static void
 gnc_global_options_help_cb (GNCOptionWin *win, gpointer dat)
 {
-  helpWindow (NULL, NULL, HH_GLOBPREFS);
+  gnc_gnome_help (HF_CUSTOM, HL_GLOBPREFS);
 }
 
 static void
 gnc_commodity_help_cb (void)
 {
-  helpWindow (NULL, _("Help"), HH_COMMODITY);
+  gnc_gnome_help (HF_USAGE, HL_COMMODITY);
 }
 
 /* ============================================================== */
@@ -170,6 +140,7 @@
 gnc_html_register_url_cb (const char *location, const char *label,
                           gboolean new_window, GNCURLResult *result)
 {
+  GncPluginPage *page = NULL;
   GNCSplitReg * gsr   = NULL;
   Split       * split = NULL;
   Account     * account = NULL;
@@ -223,10 +194,12 @@
     return FALSE;
   }
 
-  gsr = regWindowSimple (account);
-  gnc_split_reg_raise(gsr);
-  if (split)
+  page = gnc_plugin_page_register_new (account, FALSE);
+  gnc_main_window_open_page (NULL, page);
+  if (split) {
+      gsr = gnc_plugin_page_register_get_gsr(page);
       gnc_split_reg_jump_to_split( gsr, split );
+  }
 
   return TRUE;
 }
@@ -290,6 +263,7 @@
 gnc_gui_init (SCM command_line)
 {
   SCM ret = command_line;
+  GncMainWindow *main_window;
 
   ENTER (" ");
 
@@ -301,75 +275,11 @@
 
     gnome_is_initialized = TRUE;
 
-    /* load default HTML action handlers */ 
-    // gnc_network_init();
-
+    gnc_ui_util_init();
     gnc_configure_date_format();
-    date_callback_id =
-      gnc_register_option_change_callback(gnc_configure_date_format_cb, NULL,
-                                          "International", "Date Format");
-
-    account_separator_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_account_separator_cb,
-                                          NULL, "Accounts",
-                                          "Account Separator");
-
-    gnc_configure_register_colors();
-    register_colors_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_register_colors_cb,
-                                          NULL, "Register Colors", NULL);
-
-    gnc_configure_register_borders();
-    register_borders_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_register_borders_cb,
-                                          NULL, "Register", NULL);
-    
-    gnc_configure_auto_raise();
-    auto_raise_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_auto_raise_cb,
-                                          NULL, "_+Advanced",
-                                          "Auto-Raise Lists");
-
-    gnc_configure_negative_color();
-    negative_color_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_negative_color_cb,
-                                          NULL, "General",
-                                          "Display negative amounts in red");
-
-    gnc_configure_auto_decimal();
-    auto_decimal_callback_id =
-      gnc_register_option_change_callback(gnc_configure_auto_decimal_cb,
-                                          NULL, "General",
-                                          "Automatic Decimal Point");
-
-    gnc_configure_auto_decimal_places();
-    auto_decimal_places_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_auto_decimal_places_cb,
-                                          NULL, "General",
-                                          "Auto Decimal Places");
-
-    gnc_configure_file_be_retention_days();
-    log_retention_days_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_file_be_retention_days_cb,
-                                          NULL, "General",
-                                          "Days to retain log files");
-
-    gnc_configure_file_be_compression();
-    compression_callback_id = 
-      gnc_register_option_change_callback(gnc_configure_file_be_compression_cb,
-                                          NULL, "General",
-                                          "Use file compression");
-
-    gnc_configure_register_font();
-    register_font_callback_id =
-      gnc_register_option_change_callback(gnc_configure_register_font_cb,
-                                          NULL, "Register", "Register font");
-
-    gnc_configure_register_hint_font();
-    register_hint_font_callback_id =
-      gnc_register_option_change_callback(gnc_configure_register_hint_font_cb,
-                                          NULL, "Register",
-                                          "Register hint font");
+    gnc_gconf_general_register_cb(KEY_DATE_FORMAT,
+				  (GncGconfGeneralCb)gnc_configure_date_format, NULL);
+    gnc_gconf_general_register_any_cb((GncGconfGeneralAnyCb)gnc_gui_refresh_all, NULL);
 
     if (!gnucash_style_init())
       gnc_shutdown(1);
@@ -383,21 +293,39 @@
 
     gnc_ui_commodity_set_help_callback (gnc_commodity_help_cb);
 
-    gnc_file_set_can_cancel_callback (gnc_mdi_has_apps);
     gnc_file_set_shutdown_callback (gnc_shutdown);
 
     gnc_options_dialog_set_global_help_cb (gnc_global_options_help_cb, NULL);
 
-    /* initialize gnome MDI and set up application window defaults  */
-    if (!gnc_mdi_get_current ())
-      gnc_main_window_new ();
+    gnc_totd_dialog(NULL, TRUE);
+    gnc_ui_sx_initialize();
+
+    main_window = gnc_main_window_new ();
+    gtk_widget_show (GTK_WIDGET (main_window));
+
+    /* FIXME Remove this test code */
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_account_tree_new ());
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_basic_commands_new ());
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_file_history_new ());
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_menu_additions_new ());
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (), gnc_plugin_register_new ());
+    /* I'm not sure why the FIXME note says to remove this.  Maybe
+       each module should be adding its own plugin to the manager?
+       Anyway... Oh, maybe... nah */
+    gnc_plugin_manager_add_plugin (gnc_plugin_manager_get (),
+                                   gnc_plugin_budget_new ());
+    gnc_load_stock_icons ();
+    gnc_ui_hierarchy_druid_initialize();
 
     /* Run the ui startup hooks. */
+    gnc_hook_run(HOOK_UI_STARTUP, NULL);
+
+    // return ( main_window . command_line )
     {
-      SCM run_danglers = scm_c_eval_string("gnc:hook-run-danglers");
-      SCM hook = scm_c_eval_string("gnc:*ui-startup-hook*");
-      scm_call_1(run_danglers, hook); 
-    }    
+      SCM gncMainWindowType;
+      gncMainWindowType = scm_c_eval_string("<gnc:MainWindow*>");
+      ret = scm_cons( gw_wcp_assimilate_ptr(main_window, gncMainWindowType), ret );
+    }
   }
 
   LEAVE (" ");
@@ -428,17 +356,6 @@
   if (!gnome_is_initialized)
     return;
 
-  gnc_unregister_option_change_callback_id(date_callback_id);
-  gnc_unregister_option_change_callback_id(account_separator_callback_id);
-  gnc_unregister_option_change_callback_id(register_colors_callback_id);
-  gnc_unregister_option_change_callback_id(register_borders_callback_id);
-  gnc_unregister_option_change_callback_id(auto_raise_callback_id);
-  gnc_unregister_option_change_callback_id(negative_color_callback_id);
-  gnc_unregister_option_change_callback_id(register_font_callback_id);
-  gnc_unregister_option_change_callback_id(register_hint_font_callback_id);
-
-  gnc_mdi_destroy (gnc_mdi_get_current ());
-
   gnc_extensions_shutdown ();
 }
 
@@ -521,21 +438,6 @@
 
 /* ============================================================== */
 
-/* gnc_configure_date_format_cb
- *    Callback called when options change - sets dateFormat to the current
- *    value on the scheme side and refreshes register windows
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void 
-gnc_configure_date_format_cb (gpointer data)
-{
-  gnc_configure_date_format ();
-  gnc_gui_refresh_all ();
-}
-
-
 /* gnc_configure_date_format
  *    sets dateFormat to the current value on the scheme side
  *
@@ -545,11 +447,16 @@
 static void 
 gnc_configure_date_format (void)
 {
-  char *format_code = gnc_lookup_multichoice_option("International", 
-                                                    "Date Format",
-                                                    "locale");
+  char *format_code = gnc_gconf_get_string(GCONF_GENERAL, KEY_DATE_FORMAT, NULL);
 
-  DateFormat df;
+  QofDateFormat df;
+
+  if (format_code == NULL)
+    format_code = g_strdup("locale");
+  if (*format_code == '\0') {
+    g_free(format_code);
+    format_code = g_strdup("locale");
+  }
 
   if (gnc_date_string_to_dateformat(format_code, &df))
   {
@@ -559,370 +466,10 @@
     return;
   }
 
-  setDateFormat(df);
+  qof_date_format_set(df);
 
   if (format_code != NULL)
     free(format_code);
 }
 
-/* gnc_configure_account_separator_cb
- *    Callback called when options change - sets account separator
- *    to the current value on the scheme side
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void 
-gnc_configure_account_separator_cb (gpointer data)
-{
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_register_colors_cb
- *    Callback called when options change - sets
- *    register colors to their guile values
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_register_colors_cb (gpointer data)
-{
-  gnc_configure_register_colors ();
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_register_colors_cb
- *    sets register colors to their guile values
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_register_colors (void)
-{
-  SplitRegisterColors reg_colors;
-
-  reg_colors.header_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Header color",
-                                 0xffffff);
-
-  reg_colors.primary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary color",
-                                 0xffffff);
-
-  reg_colors.secondary_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary color",
-                                 0xffffff);
-
-  reg_colors.primary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Primary active color",
-                                 0xffffff);
-
-  reg_colors.secondary_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Secondary active color",
-                                 0xffffff);
-
-  reg_colors.split_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Split color",
-                                 0xffffff);
-
-  reg_colors.split_active_bg_color =
-    gnc_lookup_color_option_argb("Register Colors",
-                                 "Split active color",
-                                 0xffffff);
-
-  reg_colors.double_alternate_virt =
-    gnc_lookup_boolean_option("Register Colors",
-                              "Double mode colors alternate with transactions",
-                              FALSE);
-
-  gnc_split_register_set_colors (reg_colors);
-}
-
-
-/* gnc_configure_register_borders_cb
- *    Callback called when options change - sets
- *    register borders to their guile values
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_register_borders_cb (gpointer data)
-{
-  gnc_configure_register_borders ();
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_register_border
- *    sets register borders to their guile values
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_register_borders (void)
-{
-  gboolean use_vertical_lines;
-  gboolean use_horizontal_lines;
-
-  use_vertical_lines = gnc_lookup_boolean_option("_+Advanced",
-                                                 "Show Vertical Borders",
-                                                 FALSE);
-
-  
-  use_horizontal_lines = gnc_lookup_boolean_option("_+Advanced",
-                                                   "Show Horizontal Borders",
-                                                   FALSE);
-
-  gnucash_style_config_register_borders (use_vertical_lines,
-                                         use_horizontal_lines);
-}
-
-/* gnc_configure_auto_raise_cb
- *    Callback called when options change - sets
- *    auto-raise status of combocell class
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_raise_cb (gpointer data)
-{
-  gnc_configure_auto_raise ();
-}
-
-/* gnc_configure_auto_raise
- *    sets combocell auto raise status
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_raise (void)
-{
-  gboolean auto_pop;
-
-  auto_pop = gnc_lookup_boolean_option("_+Advanced", "Auto-Raise Lists", TRUE);
-
-  gnc_combo_cell_set_autopop (auto_pop);
-}
-
-/* gnc_configure_negative_color_cb
- *    Callback called when options change - sets
- *    negative amount color flags
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_negative_color_cb (gpointer data)
-{
-  gnc_configure_negative_color ();
-
-  gnc_gui_refresh_all ();
-}
-
-/* gnc_configure_negative_color
- *    sets negative amount color flags
- *
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_negative_color(void)
-{
-  gboolean use_red;
-
-  use_red = gnc_lookup_boolean_option("General",
-                                      "Display negative amounts in red",
-                                      TRUE);
-
-  gnc_split_register_colorize_negative (use_red);
-}
-
-
-/* gnc_configure_auto_decimal_cb
- *     Callback called when options change -
- *     sets auto decimal option.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_cb(gpointer not_used)
-{
-  gnc_configure_auto_decimal();
-}
-
-/* gnc_configure_auto_decimal
- *     Pass the global value for the auto decimal field to the engine.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal(void)
-{
-  gboolean enabled;
-
-  enabled = gnc_lookup_boolean_option("General",
-                                      "Automatic Decimal Point",
-                                      FALSE);
-
-  gnc_set_auto_decimal_enabled(enabled);
-}
-
-/* gnc_configure_auto_decimal_places_cb
- *     Callback called when options change -
- *     sets auto decimal places option.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_places_cb (gpointer not_used)
-{
-  gnc_configure_auto_decimal_places ();
-}
-
-/* gnc_configure_auto_decimal_places
- *     Pass the global value for the auto decimal places range to the engine.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_auto_decimal_places (void)
-{
-   gnc_set_auto_decimal_places
-     (gnc_lookup_number_option("General",
-                               "Auto Decimal Places", 2));
-}
-
-
-/* gnc_configure_file_be_retention_days_cb
- *     Callback called when options change -
- *     sets days retained for the file backend.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_file_be_retention_days_cb (gpointer not_used)
-{
-  gnc_configure_file_be_retention_days ();
-}
-
-/* gnc_configure_file_be_retention_days
- *     Pass the global value for the number of days to retain files to the file backend.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_file_be_retention_days (void)
-{
-  gnc_file_be_set_retention_days
-    (gnc_lookup_number_option("General",
-                              "Days to retain log files", 0));
-}
-
-/* gnc_configure_file_be_retention_days_cb
- *     Callback called when options change -
- *     sets days retained for the file backend.
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_file_be_compression_cb (gpointer not_used)
-{
-  gnc_configure_file_be_compression ();
-}
-
-/* gnc_configure_file_be_retention_days
- *     Pass the global value for the number of days to retain files to the file backend.
- * 
- * Args: Nothing
- * Returns: Nothing
- */
-static void
-gnc_configure_file_be_compression (void)
-{
-  gnc_file_be_set_compression
-    (gnc_lookup_boolean_option("General", "Use file compression", FALSE));
-}
-
-/* gnc_configure_register_font_cb
- *     Callback called when options change -
- *     sets register font
- * 
- *  Args: unused data
- *  Returns: Nothing
- */
-static void
-gnc_configure_register_font_cb (gpointer not_used)
-{
-  gnc_configure_register_font ();
-}
-
-/* gnc_configure_register_font
- *     Set up the register font
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_register_font(void)
-{
-  char *font_name;
-
-  font_name = gnc_lookup_font_option("Register", "Register font", NULL);
-
-  gnucash_style_set_register_font_name(font_name);
-
-  if (font_name != NULL)
-    free(font_name);
-}
-
-/* gnc_configure_register_hint_font_cb
- *     Callback called when options change -
- *     sets register hint font
- * 
- *  Args: unused data
- *  Returns: Nothing
- */
-static void
-gnc_configure_register_hint_font_cb(gpointer not_used)
-{
-  gnc_configure_register_hint_font();
-}
-
-/* gnc_configure_register_hint_font
- *     Set up the register hint font
- * 
- *  Args: Nothing
- *  Returns: Nothing
- */
-static void
-gnc_configure_register_hint_font(void)
-{
-  char *font_name;
-
-  font_name = gnc_lookup_font_option("Register", "Register hint font", NULL);
-
-  gnucash_style_set_register_hint_font_name(font_name);
-
-  if (font_name != NULL)
-    free(font_name);
-}
-
 /****************** END OF FILE **********************/
Index: dialog-userpass.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-userpass.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome/dialog-userpass.c -Lsrc/gnome/dialog-userpass.c -u -r1.4 -r1.5
--- src/gnome/dialog-userpass.c
+++ src/gnome/dialog-userpass.c
@@ -60,11 +60,6 @@
 
   gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
 
-  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                GTK_EDITABLE (username_entry));
-  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                GTK_EDITABLE (password_entry));
-
   if (heading)
     gtk_label_set_text (GTK_LABEL (heading_label), heading);
 
--- src/gnome/window-acct-tree.c
+++ /dev/null
@@ -1,1450 +0,0 @@
-/********************************************************************
- * window-acct-tree.c -- the main window account tree               * 
- * Copyright (C) 1998,1999 Jeremy Collins	                          *
- * Copyright (C) 1998,1999,2000 Linas Vepstas                       *
- * Copyright (C) 2001 Bill Gribble                                  *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-#include <libguile.h>
-#include <string.h>
-#include "guile-mappings.h"
-
-#include "Scrub.h"
-#include "Scrub3.h"
-#include "dialog-account.h"
-#include "dialog-options.h"
-#include "dialog-transfer.h"
-#include "dialog-utils.h"
-#include "druid-stock-split.h"
-#include "global-options.h"
-#include "gnc-account-tree.h"
-#include "gnc-book.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-engine.h"
-#include "gnc-gui-query.h"
-#include "gnc-html.h"
-#include "gnc-menu-extensions.h"
-#include "gnc-split-reg.h"
-#include "gnc-ui.h"
-#include "gtkselect.h"
-#include "io-gncxml-v2.h"
-#include "lot-viewer.h"
-#include "mainwindow-account-tree.h"
-#include "messages.h"
-#include "option-util.h"
-#include "window-acct-tree.h"
-#include "window-main.h"
-#include "window-reconcile.h"
-#include "window-register.h"
-
-static short module = MOD_GUI;
-#define WINDOW_ACCT_TREE_CM_CLASS "window-acct-tree"
-
-
-/* acct tree window information structure */
-struct GNCAcctTreeWin_p 
-{
-  GtkWidget   * account_tree;
-
-  SCM         euro_change_callback_id;
-  SCM         name_change_callback_id;
-
-  GNCOptionDB * odb;
-  SCM         options; 
-  int         options_id;
-  GNCOptionWin * editor_dialog;
-
-  GList       * account_sensitives;
-};
-
-static void gnc_acct_tree_tweak_menu (GNCMDIChildInfo * mc);
-
-
-/**
- * gnc_acct_tree_window_set_sensitives
- *
- * @win: A pointer to the data structure holding all the data
- * associated with the Account Tree window.
- *
- * @sensitive: TRUE to enable the list of widgets, FALSE to disable
- * them.
- *
- * Run the list of account sensitive widgets and enable/disable all
- * the items in the list.
- */
-static void
-gnc_acct_tree_window_set_sensitives(GNCAcctTreeWin * win,
-                                    gboolean sensitive)
-{
-  g_list_foreach(win->account_sensitives, (GFunc)gtk_widget_set_sensitive,
-		 (gpointer)sensitive);
-}
-
-
-/**
- * gnc_acct_tree_window_add_sensitive
- *
- * @win: A pointer to the data structure holding all the data
- * associated with the Account Tree window.
- *
- * @widget: A pointer to a menu or toolbar item.
- *
- * Add this widget to the list of items to be enabled/disabled when an
- * account is selected in this window.
- */
-static void
-gnc_acct_tree_window_add_sensitive(GNCAcctTreeWin * win, GtkWidget *widget)
-{
-  if (widget == NULL)
-    return;
-  win->account_sensitives = g_list_append(win->account_sensitives, widget);
-}
-
-/**
- * gnc_acct_tree_window_find_popup_item
- *
- * @win: A pointer to the data structure holding all the data
- * associated with the Account Tree window.
- *
- * @popup: A pointer to the popup menu for this window.
- *
- * @name: The name of the menu item to find.
- *
- * This routine looks for a particular menu item in a popup menu.  If
- * found, it adds the menu to the list of items to be enabled/disabled
- * when an account is selected in this window.
- */
-static void
-gnc_acct_tree_window_find_popup_item(GNCAcctTreeWin * win, GtkWidget *popup,
-				     gchar *name)
-{
-    GtkWidget *menuitem;
-    gint pos;
-
-    if (gnome_app_find_menu_pos(popup, name, &pos)) {
-      menuitem = (GtkWidget*)g_list_nth_data(GTK_MENU_SHELL(popup)->children,
-					     pos-1);
-      gnc_acct_tree_window_add_sensitive(win, menuitem);
-    }
-}
-
-/********************************************************************
- * ACCOUNT WINDOW FUNCTIONS 
- * creating/managing account-window mdi children
- ********************************************************************/
-
-/********************************************************************
- * acct_labeler
- ********************************************************************/
-
-static GtkWidget * 
-gnc_acct_tree_view_labeler(GnomeMDIChild * child, GtkWidget * current,
-                           gpointer user_data)
-{
-  GNCMDIChildInfo * mc = gtk_object_get_user_data(GTK_OBJECT(child));
-  GNCAcctTreeWin   * win = NULL;
-  char             * name = NULL;
-
-  if(mc) {
-    win = mc->user_data;
-    if(win) {
-      name = gnc_option_db_lookup_string_option(win->odb, 
-                                                "Account Tree", 
-                                                "Name of account view",
-                                                NULL);
-    }
-    else {
-      name = strdup(_("Accounts"));
-    }
-    g_free(mc->title);
-    mc->title = g_strdup(name);
-  }
-  else {
-    name = strdup(_("Accounts"));
-  }
-  
-  if(current == NULL) {    
-    current = gtk_label_new(name); 
-  }
-  else {
-    gtk_label_set_text(GTK_LABEL(current), name);
-  }
-
-  gtk_misc_set_alignment (GTK_MISC(current), 0.0, 0.5);
-
-  if (name) free (name);
-
-  return current;
-}
-
-
-static void
-gnc_acct_tree_view_destroy(GtkObject * obj, gpointer user_data)
-{
-  GNCMDIChildInfo * mc = user_data;
-  GNCAcctTreeWin * w = mc->user_data;
-
-  gnc_mdi_remove_child(gnc_mdi_get_current (), mc);
-  gnc_unregister_gui_component (mc->component_id);
-  gnc_acct_tree_window_destroy(w);
-  g_free(mc->toolbar_info);
-  g_free(mc->menu_info);
-  g_free(mc->title);
-  g_free(mc);
-}
-
-
-/********************************************************************
- * acct_tree_view_new
- * create a new account view.  
- ********************************************************************/
-
-static void
-gnc_acct_tree_view_refresh (gpointer data)
-{
-  gnc_mdi_child_refresh (data);
-}
-
-static GtkWidget *
-gnc_acct_tree_view_new(GnomeMDIChild * child, gpointer user_data)
-{
-  GNCMDIInfo        * maininfo = user_data;
-  GNCMDIChildInfo   * mc = g_new0(GNCMDIChildInfo, 1);
-  GNCAcctTreeWin     * win = gnc_acct_tree_window_new(child->name);
-  GtkWidget          * popup;
-  char		     * name_id;
-  char               * name;
-
-  mc->contents     = gnc_acct_tree_window_get_widget(win);
-  mc->child        = child;
-  mc->app          = NULL;
-  mc->toolbar      = NULL;
-  mc->component_id = gnc_register_gui_component(WINDOW_ACCT_TREE_CM_CLASS,
-                                                NULL, NULL, mc);
-  mc->user_data    = win;
-  mc->title        = g_strdup(_("Accounts"));
-
-  mc->menu_tweaking = gnc_acct_tree_tweak_menu;
-
-  gtk_object_set_user_data(GTK_OBJECT(child), mc);
-
-  /* set the child name that will get used to save app state */
-  name_id = g_strdup_printf("id=%d", win->options_id);
-  name = gnc_build_url (URL_TYPE_ACCTTREE, name_id, NULL);
-  gnome_mdi_child_set_name(mc->child, name);
-  g_free (name_id);
-  g_free (name);
-
-  gtk_signal_connect(GTK_OBJECT(child), "destroy", 
-                     gnc_acct_tree_view_destroy, mc);
-
-  gnc_mdi_add_child (maininfo, mc);
-
-  win->name_change_callback_id = 
-    gnc_option_db_register_change_callback(win->odb, 
-                                           gnc_acct_tree_view_refresh,
-                                           mc, 
-                                           N_("Account Tree"),
-                                           N_("Name of account view"));
-  scm_gc_protect_object(win->name_change_callback_id);
-
-  gnc_acct_tree_window_create_menu(win, mc);
-  gnc_acct_tree_window_create_toolbar(win, mc);
-  gnc_mdi_create_child_toolbar(maininfo, mc);
-
-  if (mc->menu_info) {
-    popup = gnc_mainwin_account_tree_attach_popup
-      (GNC_MAINWIN_ACCOUNT_TREE (win->account_tree),
-       mc->menu_info->moreinfo, maininfo);
-    gnc_acct_tree_window_find_popup_item(win, popup, "Open Account");
-    gnc_acct_tree_window_find_popup_item(win, popup, "Open Subaccounts");
-    gnc_acct_tree_window_find_popup_item(win, popup, "Edit Account");
-    gnc_acct_tree_window_find_popup_item(win, popup, "Delete Account");
-    gnc_acct_tree_window_find_popup_item(win, popup, "Reconcile...");
-    gnc_acct_tree_window_find_popup_item(win, popup, "View Lots...");
-  }
-
-  /*
-   * The 'Account' menu used to be created at this point. Its
-   * functionality has been integrated into the other menus.  The
-   * GnomeUIInfo data structures are still used to create the popup
-   * menu.
-   */
-
-  return mc->contents;
-}
-
-
-/********************************************************************
- * gnc_acct_tree_window_create_child()
- * return an MDI child that will create views of the specified tree 
- * (configstring is the acct tree URL)
- ********************************************************************/
-
-GnomeMDIChild * 
-gnc_acct_tree_window_create_child(const gchar * url)
-{
-  GNCMDIInfo          * maininfo = gnc_mdi_get_current ();
-  GnomeMDIGenericChild * accountchild = 
-    gnome_mdi_generic_child_new(url);
-
-  gnome_mdi_generic_child_set_label_func(accountchild, 
-                                         gnc_acct_tree_view_labeler,
-                                         maininfo);
-  gnome_mdi_generic_child_set_view_creator(accountchild, 
-                                           gnc_acct_tree_view_new,
-                                           maininfo);
-  return GNOME_MDI_CHILD(accountchild);
-}
-
-
-/********************************************************************
- * gnc_main_window_open_accounts()
- * open a top-level window with the account browser in it
- ********************************************************************/
-
-void
-gnc_main_window_open_accounts(gboolean toplevel)
-{
-  GNCMDIInfo * maininfo = gnc_mdi_get_current ();
-  GnomeMDIChild * accountchild = gnc_acct_tree_window_create_child(NULL);
-  gnome_mdi_add_child(GNOME_MDI(maininfo->mdi), 
-                      GNOME_MDI_CHILD(accountchild));  
-  
-  if(toplevel) {
-    gnome_mdi_add_toplevel_view(GNOME_MDI(maininfo->mdi), 
-                                GNOME_MDI_CHILD(accountchild));
-  }
-  else {
-    gnome_mdi_add_view(GNOME_MDI(maininfo->mdi), 
-                       GNOME_MDI_CHILD(accountchild));
-  }
-}
-
-
-static void
-gnc_acct_tree_window_toolbar_open_cb (GtkWidget *widget, gpointer data)
-{
-  GNCSplitReg *gsr;
-  GNCAcctTreeWin * win = data;
-  Account * account = gnc_acct_tree_window_get_current_account(win);
-
-  if (account == NULL)
-  {
-    const char *message = _("To open an account, you must first\n"
-                            "choose an account to open.");
-    gnc_error_dialog(NULL, message);
-    return;
-  }
-
-  PINFO ("calling regWindowSimple(%p)\n", account);
-
-  gsr = regWindowSimple(account);
-  gnc_split_reg_raise( gsr );
-}
-
-static void
-gnc_acct_tree_window_toolbar_edit_cb (GtkWidget *widget, gpointer data)
-{
-  GNCAcctTreeWin * win = data;
-  Account        * account = gnc_acct_tree_window_get_current_account(win);
-
-  AccountWindow *edit_window_data;
-  
-  if (account != NULL)
-  {
-    edit_window_data = gnc_ui_edit_account_window(account);
-    gnc_ui_edit_account_window_raise(edit_window_data);
-  }
-  else
-  {
-    const char *message = _("To edit an account, you must first\n"
-                            "choose an account to edit.\n");
-    gnc_error_dialog(NULL, message);
-  }
-}
-
-static void
-gnc_acct_tree_window_toolbar_add_account_cb (GtkWidget *widget, gpointer data)
-{
-  GNCAcctTreeWin * win = data;
-  Account        * account = gnc_acct_tree_window_get_current_account(win);
-  gnc_ui_new_account_window_with_default (NULL, account);
-}
-
-
-/********************************************************************
- * delete_account_helper
- * See if this account has any splits present.  Set the user data
- * and return the same value to stop walking the account tree if
- * appropriate.
- ********************************************************************/
-typedef struct _delete_helper {
-  gboolean	has_splits;
-  gboolean	has_ro_splits;
-} delete_helper_t;
-
-static gpointer
-delete_account_helper (Account *account, gpointer data)
-{
-  delete_helper_t *helper_res = data;
-  GList *splits;
-
-  splits = xaccAccountGetSplitList(account);
-  if (splits) {
-    helper_res->has_splits = TRUE;
-    while (splits) {
-      Split *s = splits->data;
-      Transaction *txn = xaccSplitGetParent (s);
-      if (xaccTransGetReadOnly (txn)) {
-	helper_res->has_ro_splits = TRUE;
-	break;
-      }
-      splits = splits->next;
-    }
-  }
-
-  return (gpointer)(helper_res->has_splits || helper_res->has_ro_splits);
-}
-
-static void
-gnc_acct_tree_window_delete_common (Account *account)
-{
-  if (account)
-  {
-    const char *no_splits_no_children =
-			    _("Are you sure you want to delete the %s account?");
-    const char *no_splits = _("Are you sure you want to delete the %s\n"
-			      "account and all its children?");
-    const char *acct_has_splits = 
-			 _("This account contains transactions.  Are you sure you\n"
-			   "want to delete the %s account?");
-    const char *child_has_splits =
-			 _("One (or more) children of this account contain\n"
-			   "transactions.  Are you sure you want to delete the\n"
-			   "%s account and all its children?");
-    const char *acct_has_ro_splits =
-      			_("This account contains read-only transactions.  You "
-			  "may not delete %s.");
-    const char *child_has_ro_splits =
-      			_("One (or more) children of this account contains "
-			  "read-only transactions.  You may not delete %s.");
-    const char *format;
-    char *name;
-    GList *splits;
-
-    name = xaccAccountGetFullName(account, gnc_get_account_separator ());
-    if (!name)
-      name = g_strdup ("");
-
-    if ((splits = xaccAccountGetSplitList(account)) != NULL) {
-      /* Check for RO txns -- if there are any, disallow deletion */
-      for ( ; splits ; splits = splits->next) {
-	Split *s = splits->data;
-	Transaction *txn = xaccSplitGetParent (s);
-	if (xaccTransGetReadOnly (txn)) {
-	  gnc_error_dialog (NULL, acct_has_ro_splits, name);
-	  return;
-	}
-      }
-      format = acct_has_splits;
-    } else {
-      AccountGroup *children;
-      delete_helper_t delete_res = { FALSE, FALSE };
-
-      children = xaccAccountGetChildren(account);
-      xaccGroupForEachAccount(children, delete_account_helper, &delete_res, TRUE);
-
-      /* Check for RO txns in the children -- disallow deletion if there are any */
-      if (delete_res.has_ro_splits) {
-	gnc_error_dialog (NULL, child_has_ro_splits, name);
-	return;
-
-      } else if (delete_res.has_splits) 
-	format= child_has_splits;
-      else
-	format = children ? no_splits : no_splits_no_children;
-    }
-
-    if (gnc_verify_dialog(NULL, FALSE, format, name)) {
-      gnc_suspend_gui_refresh ();
-      
-      xaccAccountBeginEdit (account);
-      xaccAccountDestroy (account);
-      
-      gnc_resume_gui_refresh ();
-    }
-    g_free(name);
-  }
-  else
-  {
-    const char *message = _("To delete an account, you must first\n"
-                            "choose an account to delete.\n");
-    gnc_error_dialog(NULL, message);
-  }
-}
-
-static void
-gnc_acct_tree_window_toolbar_delete_account_cb (GtkWidget *widget, 
-                                                gpointer data)
-{
-  GNCAcctTreeWin * win = data;
-  Account        * account = gnc_acct_tree_window_get_current_account(win);
-
-  gnc_acct_tree_window_delete_common (account);
-}
-
-
-static Account *
-gnc_acct_tree_find_account_from_gncmdi(GNCMDIInfo * info)
-{
-  GnomeMDIChild   * child;
-  GNCMDIChildInfo * mc;
-  GNCAcctTreeWin  * win;
-  Account         * account;
-
-  child = gnome_mdi_get_active_child(info->mdi);
-  mc = gtk_object_get_user_data(GTK_OBJECT(child));
-  win = mc->user_data;
-  account = gnc_acct_tree_window_get_current_account(win);
-
-  return account;
-}
-
-
-static void
-gnc_acct_tree_window_menu_open_subs_cb(GtkWidget * widget, 
-                                       GNCMDIInfo * info)
-{
-  Account   *account;
-  GNCSplitReg *gsr;
-  
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account == NULL) {
-    const char *message = _("To open an account, you must first\n"
-                            "choose an account to open.");
-    gnc_error_dialog(NULL, message);
-    return;
-  }
-  else {
-    PINFO ("calling regWindowAccGroup(%p)\n", account);
-    
-    gsr = regWindowAccGroup(account);
-    gnc_split_reg_raise(gsr);
-  }
-}
-
-
-static void
-gnc_acct_tree_window_menu_edit_cb (GtkWidget * widget, 
-                                   GNCMDIInfo * info)
-{
-  Account       *account;
-  AccountWindow *edit_window_data;
-  
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account != NULL)
-  {
-    edit_window_data = gnc_ui_edit_account_window(account);
-    gnc_ui_edit_account_window_raise(edit_window_data);
-  }
-  else
-  {
-    const char *message = _("To edit an account, you must first\n"
-                            "choose an account to edit.\n");
-    gnc_error_dialog(NULL, message);
-  }
-}
-
-
-static void
-gnc_acct_tree_window_menu_reconcile_cb(GtkWidget * widget, 
-				       GNCMDIInfo * info)
-{
-  Account    *account;
-  RecnWindow *recnData;
-  
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account != NULL)
-  {
-    recnData = recnWindow(gnc_ui_get_toplevel(), account);
-    gnc_ui_reconcile_window_raise(recnData);
-  }
-  else
-  {
-    const char *message = _("To reconcile an account, you must first\n"
-                            "choose an account to reconcile.");
-    gnc_error_dialog(NULL, message);
-  }
-}
-
-static void
-
-gnc_acct_tree_window_menu_transfer_cb (GtkWidget * widget, 
-				       GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  gnc_xfer_dialog (gnc_ui_get_toplevel (), account);
-}
-
-static void
-gnc_acct_tree_window_menu_stock_split_cb (GtkWidget * widget, 
-					  GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  gnc_stock_split_dialog (account);
-}
-
-static void
-gnc_acct_tree_window_menu_lots_view_cb (GtkWidget * widget, 
-					  GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  gnc_lot_viewer_dialog (account);
-}
-
-static void
-gnc_acct_tree_window_menu_add_account_cb (GtkWidget * widget, 
-                                          GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  gnc_ui_new_account_window_with_default (NULL, account);
-}
-
-static void
-gnc_acct_tree_window_menu_delete_account_cb (GtkWidget *widget, 
-                                             GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  gnc_acct_tree_window_delete_common (account);
-}
-
-static void
-gnc_acct_tree_window_menu_scrub_cb(GtkWidget * widget, 
-				   GNCMDIInfo * info)
-{
-  Account *account;
-
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account == NULL)
-  {
-    const char *message = _("You must select an account to check and repair.");
-    gnc_error_dialog (NULL, message);
-    return;
-  }
-
-  gnc_suspend_gui_refresh ();
-
-  xaccAccountScrubOrphans (account);
-  xaccAccountScrubImbalance (account);
-  xaccAccountScrubLots (account);
-
-  gnc_resume_gui_refresh ();
-}
-
-static void
-gnc_acct_tree_window_menu_scrub_sub_cb(GtkWidget * widget, 
-				       GNCMDIInfo * info)
-{
-  Account *account;
-  
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account == NULL)
-  {
-    const char *message = _("You must select an account to check and repair.");
-    gnc_error_dialog(NULL, message);
-    return;
-  }
-
-  gnc_suspend_gui_refresh ();
-
-  xaccAccountTreeScrubOrphans (account);
-  xaccAccountTreeScrubImbalance (account);
-  xaccAccountTreeScrubLots (account);
-
-  gnc_resume_gui_refresh ();
-}
-
-static void
-gnc_acct_tree_window_menu_scrub_all_cb(GtkWidget * widget, 
-				       GNCMDIInfo * info)
-{
-  AccountGroup *group = gnc_get_current_group ();
-
-  gnc_suspend_gui_refresh ();
-
-  xaccGroupScrubOrphans (group);
-  xaccGroupScrubImbalance (group);
-  xaccGroupScrubLots (group);
-
-  gnc_resume_gui_refresh ();
-}
-
-static void
-gnc_acct_tree_window_menu_open_cb (GtkWidget *widget, GNCMDIInfo * info)
-{
-  Account   *account;
-  GNCSplitReg *gsr;
-  
-  account = gnc_acct_tree_find_account_from_gncmdi(info);
-  if (account == NULL) {
-    const char *message = _("To open an account, you must first\n"
-                            "choose an account to open.");
-    gnc_error_dialog(NULL, message);
-    return;
-  }
-  else {
-    PINFO ("calling regWindowSimple(%p)\n", account);
-    
-    gsr = regWindowSimple(account);
-    gnc_split_reg_raise(gsr);
-  }
-}
-
-
-static void
-gnc_acct_tree_window_activate_cb(GNCMainWinAccountTree *tree,
-                                 Account *account,
-                                 gpointer user_data)
-{
-  GNCAcctTreeWin * win = user_data;
-  GNCSplitReg *gsr;
-  gboolean expand;
-
-  expand =
-    gnc_option_db_lookup_boolean_option(win->odb, 
-                                        "Account Tree",
-                                        "Double click expands parent accounts",
-                                        FALSE);
-
-  if (expand)
-  {
-    AccountGroup *group;
-
-    group = xaccAccountGetChildren(account);
-    if (xaccGroupGetNumAccounts(group) > 0)
-    {
-      gnc_mainwin_account_tree_toggle_account_expansion(tree, account);
-      return;
-    }
-  }
-
-  gsr = regWindowSimple(account);
-  gnc_split_reg_raise(gsr);
-}
-
-static void
-gnc_acct_tree_window_configure (GNCAcctTreeWin * info)
-{
-  GNCMainWinAccountTree *tree;
-  AccountViewInfo new_avi;
-  AccountFieldCode field;
-  GSList *list, *node;
-
-  memset (&new_avi, 0, sizeof(new_avi));
-
-  tree = GNC_MAINWIN_ACCOUNT_TREE(info->account_tree);
-
-  list = gnc_option_db_lookup_list_option(info->odb,
-                                          "Account Tree",
-                                          "Account types to display",
-                                          NULL);
-
-  for (node = list; node != NULL; node = node->next)
-  {
-    if (safe_strcmp(node->data, "bank") == 0)
-      new_avi.include_type[BANK] = TRUE;
-
-    else if (safe_strcmp(node->data, "cash") == 0)
-      new_avi.include_type[CASH] = TRUE;
-
-    else if (safe_strcmp(node->data, "credit") == 0)
-      new_avi.include_type[CREDIT] = TRUE;
-
-    else if (safe_strcmp(node->data, "asset") == 0)
-      new_avi.include_type[ASSET] = TRUE;
-
-    else if (safe_strcmp(node->data, "liability") == 0)
-      new_avi.include_type[LIABILITY] = TRUE;
-
-    else if (safe_strcmp(node->data, "stock") == 0)
-      new_avi.include_type[STOCK] = TRUE;
-
-    else if (safe_strcmp(node->data, "mutual") == 0)
-      new_avi.include_type[MUTUAL] = TRUE;
-
-    else if (safe_strcmp(node->data, "currency") == 0)
-      new_avi.include_type[CURRENCY] = TRUE;
-
-    else if (safe_strcmp(node->data, "income") == 0)
-      new_avi.include_type[INCOME] = TRUE;
-
-    else if (safe_strcmp(node->data, "expense") == 0)
-      new_avi.include_type[EXPENSE] = TRUE;
-
-    else if (safe_strcmp(node->data, "equity") == 0)
-      new_avi.include_type[EQUITY] = TRUE;
-
-    else if (safe_strcmp(node->data, "payable") == 0)
-      new_avi.include_type[PAYABLE] = TRUE;
-
-    else if (safe_strcmp(node->data, "receivable") == 0)
-      new_avi.include_type[RECEIVABLE] = TRUE;
-  }
-
-  gnc_free_list_option_value (list);
-
-  list = gnc_option_db_lookup_list_option(info->odb, 
-                                          "Account Tree",
-                                          "Account fields to display",
-                                          NULL);
-
-  for (node = list; node != NULL; node = node->next)
-  {
-    field = gnc_ui_account_pref_name_to_code(node->data);
-    if (field < NUM_ACCOUNT_FIELDS)
-      new_avi.show_field[field] = TRUE;
-  }
-
-  gnc_free_list_option_value (list);
-
-  new_avi.show_field[ACCOUNT_NAME] = TRUE;
-
-  gnc_mainwin_account_tree_set_view_info (tree, new_avi);
-}
-
-static void
-gnc_euro_change (gpointer data)
-{
-  gnc_acct_tree_window_configure (data);
-  gnc_gui_refresh_all ();
-}
-
-static void gnc_acct_tree_window_toolbar_options_cb(GtkWidget * w, gpointer d);
-
-void
-gnc_acct_tree_window_create_toolbar(GNCAcctTreeWin * win, 
-                                    GNCMDIChildInfo * child)
-{
-  GnomeUIInfo toolbar_template[] = 
-  {
-    { GNOME_APP_UI_ITEM, 
-      N_("Open"),
-      N_("Open the selected account"),
-      gnc_acct_tree_window_toolbar_open_cb, 
-      win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_JUMP_TO,
-      0, 0, NULL 
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Edit"),
-      N_("Edit the selected account"),
-      gnc_acct_tree_window_toolbar_edit_cb, 
-      win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_PROPERTIES,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("Options"),
-      N_("Edit the account view options"),
-      gnc_acct_tree_window_toolbar_options_cb, 
-      win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_PROPERTIES,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("New"),
-      N_("Create a new account"),
-      gnc_acct_tree_window_toolbar_add_account_cb, 
-      win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_ADD,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Delete"),
-      N_("Delete selected account"),
-      gnc_acct_tree_window_toolbar_delete_account_cb, 
-      win,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_REMOVE,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  child->toolbar_info = g_memdup (toolbar_template, sizeof(toolbar_template));
-}
-
-/*
- * The scrub menu is shared by both the code to insert items into the
- * main menus, and the code to create the right click popup menu.
- */
-static GnomeUIInfo scrubmenu[] =
-{
-  {
-    GNOME_APP_UI_ITEM,
-    N_("Check & Repair A_ccount"),
-    N_("Check for and repair unbalanced transactions and orphan splits "
-       "in this account"),
-    gnc_acct_tree_window_menu_scrub_cb, NULL, NULL,
-    GNOME_APP_PIXMAP_NONE, NULL,
-    0, 0, NULL
-  },
-  {
-    GNOME_APP_UI_ITEM,
-    N_("Check & Repair Su_baccounts"),
-    N_("Check for and repair unbalanced transactions and orphan splits "
-       "in this account and its subaccounts"),
-    gnc_acct_tree_window_menu_scrub_sub_cb, NULL, NULL,
-    GNOME_APP_PIXMAP_NONE, NULL,
-    0, 0, NULL
-  },
-  {
-    GNOME_APP_UI_ITEM,
-    N_("Check & Repair A_ll"),
-    N_("Check for and repair unbalanced transactions and orphan splits "
-       "in all accounts"),
-    gnc_acct_tree_window_menu_scrub_all_cb, NULL, NULL,
-    GNOME_APP_PIXMAP_NONE, NULL,
-    0, 0, NULL
-  },
-  GNOMEUIINFO_END
-};
-
-/**
- * gnc_acct_tree_window_create_menu
- *
- * @main_info: A pointer to the data structure holding all the data
- * associated with the Account Tree window.
- *
- * @child: A pointer to the GNC MDI child associated with the Account
- * Tree window.
- *
- * This routine creates the menu for the right-click popup menu in the
- * account tree window.  This same menu was also previously inserted
- * into the menu bar and available there.  These menu items are now
- * separately incorporated into the menus.  See
- * gnc_acct_tree_tweak_menu().
- */
-void
-gnc_acct_tree_window_create_menu(GNCAcctTreeWin * main_info,
-				 GNCMDIChildInfo * child)
-{
-  GnomeUIInfo * dup_scrub = g_memdup(scrubmenu, sizeof(scrubmenu));
-  
-  GnomeUIInfo accountsmenu[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Open Account"),
-      N_("Open the selected account"),
-      gnc_acct_tree_window_menu_open_cb, child->child, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
-      'o', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Open _Subaccounts"),
-      N_("Open the selected account and all its subaccounts"),
-      gnc_acct_tree_window_menu_open_subs_cb, child->child, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Edit Account"),
-      N_("Edit the selected account"),
-      gnc_acct_tree_window_menu_edit_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PROP,
-      'e', GDK_CONTROL_MASK, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Reconcile..."),
-      N_("Reconcile the selected account"),
-      gnc_acct_tree_window_menu_reconcile_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      'r', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Transfer..."),
-      N_("Transfer funds from one account to another"),
-      gnc_acct_tree_window_menu_transfer_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      't', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Stock S_plit..."),
-      N_("Record a stock split or a stock merger"),
-      gnc_acct_tree_window_menu_stock_split_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("View _Lots..."),
-      N_("View and edit the lots in this account"),
-      gnc_acct_tree_window_menu_lots_view_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_New Account..."),
-      N_("Create a new account"),
-      gnc_acct_tree_window_menu_add_account_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_ADD,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Delete Account"),
-      N_("Delete selected account"),
-      gnc_acct_tree_window_menu_delete_account_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_REMOVE,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_SUBTREE(N_("_Check & Repair"), dup_scrub),
-    GNOMEUIINFO_END
-  };
-  GnomeUIInfo * dup_accts = g_memdup(accountsmenu, sizeof(accountsmenu));
-
-  GnomeUIInfo menucontainer[] = 
-  {
-    GNOMEUIINFO_SUBTREE(N_("_Account"), dup_accts),
-    GNOMEUIINFO_END
-  };
-  
-  child->menu_info = g_memdup(menucontainer, sizeof(menucontainer));
-}
-
-
-static void
-gnc_acct_tree_window_select_cb(GNCMainWinAccountTree *tree, 
-                               Account *account, 
-                               GNCAcctTreeWin * win) {
-  gboolean sensitive;
-  
-  account = gnc_mainwin_account_tree_get_current_account(tree);
-  sensitive = (account != NULL);
-  
-  gnc_acct_tree_window_set_sensitives(win, sensitive);
-}
-
-
-Account * 
-gnc_acct_tree_window_get_current_account(GNCAcctTreeWin * win) {
-  return gnc_mainwin_account_tree_get_current_account
-    (GNC_MAINWIN_ACCOUNT_TREE(win->account_tree));
-}
-
-
-static void
-gnc_acct_tree_window_options_new(GNCAcctTreeWin * win) {
-  SCM func = scm_c_eval_string("gnc:make-new-acct-tree-window");
-  SCM opts_and_id = scm_call_0(func);
-  
-  scm_gc_unprotect_object(win->options);
-  win->options = SCM_CAR(opts_and_id);
-  scm_gc_protect_object(win->options);
-  win->options_id = scm_num2int(SCM_CDR(opts_and_id), SCM_ARG1, __FUNCTION__);
-}
-
-void
-gnc_acct_tree_window_destroy(GNCAcctTreeWin * win) {
-  SCM  free_tree = scm_c_eval_string("gnc:free-acct-tree-window");
-  gnc_unregister_option_change_callback_id
-    (win->euro_change_callback_id);
-  
-  if(win->editor_dialog) {
-    gnc_options_dialog_destroy(win->editor_dialog);
-    win->editor_dialog = NULL;
-  }
-  
-  g_list_free(win->account_sensitives);
-  win->account_sensitives = NULL;
-  
-  gnc_option_db_destroy(win->odb);
-
-  scm_call_1(free_tree, scm_int2num(win->options_id));
-
-  scm_gc_unprotect_object(win->options);
-  g_free (win);
-}
-
-
-GNCAcctTreeWin *
-gnc_acct_tree_window_new(const gchar * url)  {
-  GNCAcctTreeWin * treewin = g_new0(GNCAcctTreeWin, 1);
-  SCM find_options = scm_c_eval_string("gnc:find-acct-tree-window-options");
-  SCM temp;
-  int options_id;
-  URLType type;
-
-  treewin->euro_change_callback_id =
-    gnc_register_option_change_callback(gnc_euro_change, treewin,
-                                        "International",
-                                        "Enable EURO support");
-  treewin->account_tree = gnc_mainwin_account_tree_new();
-  treewin->options = SCM_BOOL_F;
-  scm_gc_protect_object(treewin->options);
-  treewin->editor_dialog = NULL;
-
-  /* get the options and the window ID */ 
-  if(!url) {
-    gnc_acct_tree_window_options_new(treewin);
-  }
-  else {
-    char * location = NULL;
-    char * label = NULL;
-
-    /* if an URL is specified, it should look like 
-     * gnc-acct-tree:id=17 .  We want to get the number out,
-     * then look up the options in the global DB. */
-    type = gnc_html_parse_url(NULL, url, &location, &label);
-    if (!safe_strcmp (type, URL_TYPE_ACCTTREE) &&
-	location && (strlen(location) > 3) && 
-	!strncmp("id=", location, 3)) {
-      sscanf(location+3, "%d", &options_id);
-      temp = scm_call_1(find_options, scm_int2num(options_id));
-
-      if(temp != SCM_BOOL_F) {
-        scm_gc_unprotect_object(treewin->options);
-        treewin->options = temp;
-        scm_gc_protect_object(treewin->options);
-        treewin->options_id = options_id;
-      }
-      else {
-        gnc_acct_tree_window_options_new(treewin);
-      }
-    }
-    else {
-      gnc_acct_tree_window_options_new(treewin);
-    }
-
-    g_free (location);
-    g_free (label);
-  }
-
-  treewin->odb     = gnc_option_db_new(treewin->options);
-  
-  gtk_signal_connect(GTK_OBJECT(treewin->account_tree), "activate_account",
-		     GTK_SIGNAL_FUNC (gnc_acct_tree_window_activate_cb), 
-                     treewin);
-
-  gtk_signal_connect(GTK_OBJECT(treewin->account_tree), "select_account",
-                     GTK_SIGNAL_FUNC(gnc_acct_tree_window_select_cb), 
-                     treewin);
-
-  gtk_signal_connect(GTK_OBJECT(treewin->account_tree), "unselect_account",
-                     GTK_SIGNAL_FUNC(gnc_acct_tree_window_select_cb), 
-                     treewin);
-  
-  /* Show everything now that it is created */
-  gtk_widget_show (treewin->account_tree);
-
-  gnc_acct_tree_window_configure (treewin);
-
-  /* gnc_refresh_main_window (); */
-  gnc_account_tree_refresh 
-    (GNC_MAINWIN_ACCOUNT_TREE (treewin->account_tree)->acc_tree);
-
-  gnc_acct_tree_window_set_sensitives(treewin, FALSE); 
-
-  gtk_widget_grab_focus(treewin->account_tree);
-  return treewin;
-} 
-
-GtkWidget * 
-gnc_acct_tree_window_get_widget(GNCAcctTreeWin * win) {
-  return win->account_tree;
-}
-
-SCM 
-gnc_acct_tree_window_get_options(GNCAcctTreeWin * w) {
-  return w->options;
-}
-
-int
-gnc_acct_tree_window_get_id(GNCAcctTreeWin * w) {
-  return w->options_id;
-}
-
-/********************************************************************
- * parameter editor handling 
- ********************************************************************/
-
-static void
-gnc_options_dialog_apply_cb(GNCOptionWin * propertybox,
-                            gpointer user_data) {
-  GNCAcctTreeWin * win = user_data;
-  if(!win) return;
-
-  gnc_option_db_commit(win->odb);
-  gnc_acct_tree_window_configure(win);
-}
-
-static void
-gnc_options_dialog_help_cb(GNCOptionWin * propertybox,
-                           gpointer user_data) {
-  gnome_ok_dialog("Set the account tree options you want using this dialog.");
-}
-
-static void
-gnc_options_dialog_close_cb(GNCOptionWin * propertybox,
-                            gpointer user_data) {
-  GNCAcctTreeWin * win = user_data; 
-  gnc_options_dialog_destroy(win->editor_dialog);
-  win->editor_dialog = NULL;
-}
-
-
-void
-gnc_acct_tree_window_toolbar_options_cb(GtkWidget * widget, gpointer data) {
-  GNCAcctTreeWin * win = data;
-
-  if(win->editor_dialog) {
-    gtk_window_present(GTK_WINDOW
-                     (gnc_options_dialog_widget(win->editor_dialog)));
-  }
-  else {
-    win->editor_dialog = gnc_options_dialog_new(TRUE, NULL);
-    gnc_build_options_dialog_contents(win->editor_dialog, 
-                                      win->odb);
-    
-    gnc_options_dialog_set_apply_cb(win->editor_dialog, 
-                                    gnc_options_dialog_apply_cb,
-                                    (gpointer)win);
-    gnc_options_dialog_set_help_cb(win->editor_dialog, 
-                                   gnc_options_dialog_help_cb,
-                                   (gpointer)win);
-    gnc_options_dialog_set_close_cb(win->editor_dialog, 
-                                    gnc_options_dialog_close_cb,
-                                    (gpointer)win);    
-  }
-}
-
-/**
- * gnc_acct_tree_tweak_menu
- *
- * @mc: A pointer to the GNC MDI child associated with the Account
- * Tree window.
- *
- * This routine is called when the account tree view is created and
- * shown for the first time.  It performs a variety of setup functions.
- * First, it creates menu items needed for the Account Tree window,
- * and inserts them into the main MDI application menus at the correct
- * positions.  Second, it also sets up certain main menu items to be
- * enabled/disabled whenever the account tree view is brought to the
- * top.  Third, it builds a list of widgets (menu and toolbar items)
- * to be enabled/disabled whenever an account is selected in the
- * view.
- */
-static void
-gnc_acct_tree_tweak_menu (GNCMDIChildInfo * mc)
-{
-  GNCMDIInfo     * info = mc->gnc_mdi;
-  GNCAcctTreeWin * win;
-  GtkWidget      * widget;
-
-#if FILEITEMS_DEPRECATED
-  /* XXX I think fileitems1 and 2 do not belong in the file menu. */
-  GnomeUIInfo fileitems1[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_New Account..."),
-      N_("Create a new account"),
-      gnc_acct_tree_window_menu_add_account_cb, info, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_PIXMAP_ADD,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-  GnomeUIInfo fileitems2[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Open Account"),
-      N_("Open the selected account"),
-      gnc_acct_tree_window_menu_open_cb, info, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
-      'o', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Open S_ubaccounts"),
-      N_("Open the selected account and all its subaccounts"),
-      gnc_acct_tree_window_menu_open_subs_cb, info, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_OPEN,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-#endif
-
-  GnomeUIInfo edititems[] =
-  {
-    GNOMEUIINFO_SEPARATOR,
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Edit Account"),
-      N_("Edit the selected account"),
-      gnc_acct_tree_window_menu_edit_cb, info, NULL,
-      GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_PROP,
-      'e', GDK_CONTROL_MASK, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("_Delete Account"),
-      N_("Delete selected account"),
-      gnc_acct_tree_window_menu_delete_account_cb, 
-      info,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_REMOVE,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  GnomeUIInfo * dup_scrub = g_memdup(scrubmenu, sizeof(scrubmenu));
-  GnomeUIInfo actionitems[] =
-  {
-    GNOMEUIINFO_SEPARATOR,
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Transfer..."),
-      N_("Transfer funds from one account to another"),
-      gnc_acct_tree_window_menu_transfer_cb, info, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      't', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Reconcile..."),
-      N_("Reconcile the selected account"),
-      gnc_acct_tree_window_menu_reconcile_cb, info, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      'r', GDK_CONTROL_MASK, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Stock S_plit..."),
-      N_("Record a stock split or a stock merger"),
-      gnc_acct_tree_window_menu_stock_split_cb, info, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("View _Lots..."),
-      N_("View and edit the lots in this account"),
-      gnc_acct_tree_window_menu_lots_view_cb, info, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_SUBTREE(N_("_Check & Repair"), dup_scrub),
-    GNOMEUIINFO_END
-  };
-
-  if (mc->app == NULL)
-    return;
-
-  /*
-   * This window can be created multiple times, so the code needs to
-   * check and see if the menus its adding are already present.  This
-   * can't just be code to insure this routine is only called
-   * once,because the Gnome MDI code may destroy and recreate the
-   * menus and toolbars.  What a pain.
-   */
-  /* Do not i18n these strings!!! */
-  if (gnc_mdi_child_find_menu_item(mc, "_File/_New Account..."))
-    return;
-    
-  /* Do not i18n these strings!!! */
-  dup_scrub[0].user_data = info;
-  dup_scrub[1].user_data = info;
-  dup_scrub[2].user_data = info;
-#if FILEITEMS_DEPRECATED
-  gnc_gnome_app_insert_menus (mc->app, "_File/_New File", fileitems1);
-  gnc_gnome_app_insert_menus (mc->app, "_File/_Open...", fileitems2);
-#endif
-  gnc_gnome_app_insert_menus (mc->app, "_Edit/_Paste", edititems);
-  gnome_app_insert_menus (mc->app, "_Actions/_Scheduled Transactions",
-			  actionitems);
-
-  win = (GNCAcctTreeWin *)mc->user_data;
-#if FILEITEMS_DEPRECATED
-  gnc_acct_tree_window_add_sensitive(win, fileitems2[0].widget);
-  gnc_acct_tree_window_add_sensitive(win, fileitems2[1].widget);
-#endif
-  gnc_acct_tree_window_add_sensitive(win, edititems[1].widget);
-  gnc_acct_tree_window_add_sensitive(win, edititems[2].widget);
-  gnc_acct_tree_window_add_sensitive(win, actionitems[2].widget);
-  gnc_acct_tree_window_add_sensitive(win, actionitems[4].widget);
-
-  /* Do not i18n these strings!!! */
-  widget = gnc_mdi_child_find_toolbar_item(mc, "Open");
-  gnc_acct_tree_window_add_sensitive(win, widget);
-  widget = gnc_mdi_child_find_toolbar_item(mc, "Edit");
-  gnc_acct_tree_window_add_sensitive(win, widget);
-  widget = gnc_mdi_child_find_toolbar_item(mc, "Delete");
-  gnc_acct_tree_window_add_sensitive(win, widget);
-
-  /* Do not i18n these strings!!! */
-  gnc_mdi_child_auto_menu(mc, GNC_AUTO_DISABLE, "_File/_Close", NULL);
-  gnc_mdi_child_auto_toolbar(mc, GNC_AUTO_DISABLE, "Close", NULL);
-
-  /* Start with all the 'sensitives' disabled. */
-  g_list_foreach(win->account_sensitives, (GFunc)gtk_widget_set_sensitive,
-		 (gpointer)FALSE);
-}
-
Index: reconcile-list.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/reconcile-list.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/gnome/reconcile-list.h -Lsrc/gnome/reconcile-list.h -u -r1.22 -r1.23
--- src/gnome/reconcile-list.h
+++ src/gnome/reconcile-list.h
@@ -27,27 +27,22 @@
 #include "gnc-query-list.h"
 #include "gnc-numeric.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif				/* __cplusplus */
-
-#define GTK_TYPE_GNC_RECONCILE_LIST (gnc_reconcile_list_get_type ())
-#define GNC_RECONCILE_LIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_GNC_RECONCILE_LIST, GNCReconcileList))
-#define GNC_RECONCILE_LIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_GNC_RECONCILE_LIST, GNCReconcileListClass))
-#define IS_GNC_RECONCILE_LIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_GNC_RECONCILE_LIST))
-#define IS_GNC_RECONCILE_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GNC_RECONCILE_LIST))
+G_BEGIN_DECLS
 
-typedef struct _GNCReconcileList      GNCReconcileList;
-typedef struct _GNCReconcileListClass GNCReconcileListClass;
+#define GNC_TYPE_RECONCILE_LIST		(gnc_reconcile_list_get_type ())
+#define GNC_RECONCILE_LIST(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_RECONCILE_LIST, GNCReconcileList))
+#define GNC_RECONCILE_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_RECONCILE_LIST, GNCReconcileListClass))
+#define GNC_IS_RECONCILE_LIST(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_RECONCILE_LIST))
+#define GNC_IS_RECONCILE_LIST_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_RECONCILE_LIST))
 
-typedef enum
-{
+typedef struct GNCReconcileList GNCReconcileList;
+
+typedef enum {
   RECLIST_DEBIT,
   RECLIST_CREDIT
 } GNCReconcileListType;
 
-struct _GNCReconcileList
-{
+struct GNCReconcileList {
   GNCQueryList qlist;
 
   GHashTable *reconciled;
@@ -59,21 +54,22 @@
   gboolean no_toggle;
 };
 
-struct _GNCReconcileListClass
-{
+typedef struct {
   GtkCListClass parent_class;
 
-  void (*toggle_reconciled) (GNCReconcileList *list,
-			     Split            *split);
+  void (*toggle_reconciled)  (GNCReconcileList *list,
+			      Split            *split);
   void (*double_click_split) (GNCReconcileList *list,
-                              Split            *split);
-};
+			      Split            *split);
+} GNCReconcileListClass;
+
+#define GCONF_RECONCILE_SECTION "dialogs/reconcile"
 
 /***********************************************************
  *                public functions                         *
  ***********************************************************/
 
-GtkType gnc_reconcile_list_get_type (void);
+GType gnc_reconcile_list_get_type (void);
 
 GtkWidget * gnc_reconcile_list_new (Account * account,
 				    GNCReconcileListType type);
@@ -97,8 +93,6 @@
 
 gboolean gnc_reconcile_list_changed(GNCReconcileList *list);
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* RECONCILE_LIST_H */
Index: gw-gnc-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gw-gnc-spec.scm,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/gnome/gw-gnc-spec.scm -Lsrc/gnome/gw-gnc-spec.scm -u -r1.15 -r1.16
--- src/gnome/gw-gnc-spec.scm
+++ src/gnome/gw-gnc-spec.scm
@@ -35,31 +35,23 @@
       "#include <gnc-engine.h>\n"
       "#include <gnc-commodity.h>\n"
       "#include <gnc-numeric.h>\n"
-      "#include <window-main.h>\n"
+      "#include <dialog-totd.h>\n"
       "#include <gnc-gui-query.h>\n"
       "#include <dialog-new-user.h>\n"
       "#include <dialog-progress.h>\n"
-      "#include <dialog-totd.h>\n"
       "#include <dialog-commodity.h>\n"
       "#include <druid-hierarchy.h>\n"
       "#include <top-level.h>\n"
-      "#include <window-help.h>\n"
       "#include <gnc-html.h>\n"
+      "#include <gnc-main-window.h>\n"
+      "#include <gnc-window.h>\n"
+      "#include <gnc-plugin-account-tree.h>\n"
       "#include <gnc-splash.h>\n"
-      "#include <dialog-find-transactions.h>\n"
       "#include <dialog-scheduledxaction.h>\n"
       "#include <dialog-sxsincelast.h>\n" )))
 
   (gw:wrap-function
    ws
-   'gnc:ui-hierarchy-druid
-   '<gw:void>
-   "gnc_ui_hierarchy_druid"
-   '()
-   "Open the hierarchy druid for importing an account hierarchy.")
-
-  (gw:wrap-function
-   ws
    'gnc:ui-is-running?
    '<gw:bool>
    "gnucash_ui_is_running"
@@ -96,7 +88,7 @@
    '<gw:scm>
    "gnc_gui_init"
    '((<gw:scm> command-line))
-   "Initialize the remaining parts of the lower level ui. Returns remaining command line.")
+   "Initialize the remaining parts of the lower level ui. Returns main-window and remaining command line.")
 
   (gw:wrap-function
    ws
@@ -140,11 +132,11 @@
 
   (gw:wrap-function
    ws
-   'gnc:ui-totd-dialog-create-and-run
+   'gnc:new-account-tree
    '<gw:void>
-   "gnc_ui_totd_dialog_create_and_run"
-   '()
-   "Create and run the \"Tip Of The Day\" dialog")
+   "gnc_new_account_tree"
+   '((<gnc:MainWindow*> window))
+   "Create a new account tree window.")
 
   (gw:wrap-as-wct ws
                   '<gnc:ProgressDialog*>
@@ -241,16 +233,4 @@
 order to destroy the dialog. The dialog will not be destroyed
 by the user closing the window.")
 
-  (gw:wrap-function
-   ws
-   'gnc:sx-editor
-   '<gw:void>
-   "gnc_ui_scheduled_xaction_dialog_create" '()
-   "Open the Scheduled Transaction Editor" )
-
-  (gw:wrap-function
-   ws
-   'gnc:sx-since-last-run-wrapper
-   '<gw:void>
-   "gnc_ui_sxsincelast_guile_wrapper" '(((<gw:mchars> caller-owned) bookfile))
-   "Wrapper to open the since-last-run dialog from a book-open hook." ))
+)
Index: dialog-print-check.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-print-check.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/gnome/dialog-print-check.h -Lsrc/gnome/dialog-print-check.h -u -r1.11 -r1.12
--- src/gnome/dialog-print-check.h
+++ src/gnome/dialog-print-check.h
@@ -33,7 +33,7 @@
 typedef struct {
   GtkWidget * dialog;
 
-  RegWindow     *reg_data;
+  GncPluginPageRegister *plugin_page;
   const char    *payee;
   gnc_numeric    amount;
   time_t         date;
@@ -58,7 +58,7 @@
 
 } PrintCheckDialog;
 
-void gnc_ui_print_check_dialog_create(RegWindow     *reg_data,
+void gnc_ui_print_check_dialog_create(GncPluginPageRegister *plugin_page,
 				      const char    *payee,
 				      gnc_numeric    amount,
 				      time_t         date,
Index: dialog-price-edit-db.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-price-edit-db.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/gnome/dialog-price-edit-db.c -Lsrc/gnome/dialog-price-edit-db.c -u -r1.8 -r1.9
--- src/gnome/dialog-price-edit-db.c
+++ src/gnome/dialog-price-edit-db.c
@@ -2,6 +2,7 @@
  * dialog-price-editor.c -- price selector dialog                   *
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  * Author: Dave Peticolas <dave at krondo.com>                         *
+ * Copyright (C) 2003,2005 David Hampton                            *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -28,15 +29,15 @@
 #include <time.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-general-select.h"
 #include "gnc-component-manager.h"
 #include "gnc-currency-edit.h"
 #include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-pricedb.h"
+#include "gnc-tree-view-price.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "guile-util.h"
@@ -45,229 +46,42 @@
 
 
 #define DIALOG_PRICE_DB_CM_CLASS "dialog-price-edit-db"
-
-#define COMMODITY_COLUMN 0
-#define DATE_COLUMN      2
+#define GCONF_SECTION "dialogs/edit_prices"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-/* static short module = MOD_GUI; */
+static QofLogModule log_module = GNC_MOD_GUI;
+
+
+void gnc_prices_dialog_window_destroy_cb (GtkObject *object, gpointer data);
+void gnc_prices_dialog_response (GtkDialog *dialog, gint response_id, gpointer data);
+void gnc_prices_dialog_edit_clicked (GtkWidget *widget, gpointer data);
+void gnc_prices_dialog_remove_clicked (GtkWidget *widget, gpointer data);
+void gnc_prices_dialog_remove_old_clicked (GtkWidget *widget, gpointer data);
+void gnc_prices_dialog_add_clicked (GtkWidget *widget, gpointer data);
+void gnc_prices_dialog_get_quotes_clicked (GtkWidget *widget, gpointer data);
+
 
 typedef struct
 {
   GtkWidget * dialog;
 
-  gint        sort_column;
-  gboolean    ascending;
-  GtkWidget * commodity_arrow;
-  GtkWidget * date_arrow;
+  GncTreeViewPrice * price_tree;
 
-  GtkWidget * price_list;
   GtkWidget * edit_button;
   GtkWidget * remove_button;
   GtkWidget * remove_old_button;
 
+  GNCPriceDB *price_db;
   GNCPrice  * price;		/* Currently selected price */
-  GList     * prices;		/* All prices */
 } PricesDialog;
 
-const char *price_sources[] = {
-  N_("old-file-import"),
-  N_("user:price-editor"),
-  N_("user:stock-split"),
-  N_("user:xfer-dialog")
-};
-  
-static gint last_width = 0;
-static gint last_height = 0;
-
-static gboolean
-load_price_helper (GNCPrice *price, gpointer data)
-{
-  GList **prices_p = data;
-
-  gnc_price_ref (price);
-  *prices_p = g_list_prepend (*prices_p, price);
-
-  return TRUE;
-}
-
-static int
-price_compare (gconstpointer a, gconstpointer b)
-{
-  GNCPrice *price_a = (GNCPrice *) a;
-  GNCPrice *price_b = (GNCPrice *) b;
-  gnc_commodity *comm_a;
-  gnc_commodity *comm_b;
-  Timespec ts_a;
-  Timespec ts_b;
-  gint result;
-
-  comm_a = gnc_price_get_commodity (price_a);
-  comm_b = gnc_price_get_commodity (price_b);
-
-  if (comm_a && comm_b){
-    SAFE_STRCMP (gnc_commodity_get_namespace (comm_a),
-		 gnc_commodity_get_namespace (comm_b));
-
-    SAFE_STRCMP (gnc_commodity_get_mnemonic (comm_a),
-		 gnc_commodity_get_mnemonic (comm_b));
-  }
-
-  comm_a = gnc_price_get_currency (price_a);
-  comm_b = gnc_price_get_currency (price_b);
-
-  if (comm_a && comm_b){
-    SAFE_STRCMP (gnc_commodity_get_namespace (comm_a),
-		 gnc_commodity_get_namespace (comm_b));
-
-    SAFE_STRCMP (gnc_commodity_get_mnemonic (comm_a),
-		 gnc_commodity_get_mnemonic (comm_b));
-  }
-
-  ts_a = gnc_price_get_time (price_a);
-  ts_b = gnc_price_get_time (price_b);
-
-  result = timespec_cmp (&ts_a, &ts_b);
-  if (result)
-    return -result;
-
-  SAFE_STRCMP (gnc_price_get_type (price_a),
-               gnc_price_get_type (price_b));
-
-  SAFE_STRCMP (gnc_price_get_source (price_a),
-               gnc_price_get_source (price_b));
-
-  return gnc_numeric_compare (gnc_price_get_value (price_a),
-			      gnc_price_get_value (price_b));
-}
-
-static int
-price_date_compare (gconstpointer a, gconstpointer b)
-{
-  GNCPrice *price_a = (GNCPrice *) a;
-  GNCPrice *price_b = (GNCPrice *) b;
-  Timespec ts_a;
-  Timespec ts_b;
-  gint result;
-
-  ts_a = gnc_price_get_time (price_a);
-  ts_b = gnc_price_get_time (price_b);
-
-  result = timespec_cmp (&ts_a, &ts_b);
-  if (result)
-    return -result;
-
-  return price_compare (a, b);
-}
-
-static int
-gnc_prices_load_prices (PricesDialog *pdb_dialog)
-{
-  gnc_commodity *current_commodity;
-  GNCPrintAmountInfo print_info;
-  gboolean sort_commodity;
-  GtkArrowType arrow_dir;
-  GtkWidget *show, *hide;
-  GCompareFunc sort_fn;
-  gboolean sort_ascending;
-  GNCPrice *old_price;
-  GNCBook *book;
-  GList *prices;
-  GList *node;
-  int new_row;
-
-  book = gnc_get_current_book ();
-  old_price = pdb_dialog->price;
-  prices = NULL;
-  new_row = 0;
-
-  gnc_pricedb_foreach_price (gnc_book_get_pricedb (book),
-                             load_price_helper, &prices, FALSE);
-
-  sort_commodity = (pdb_dialog->sort_column == COMMODITY_COLUMN);
-
-  if (sort_commodity) {
-    show = pdb_dialog->commodity_arrow;
-    hide = pdb_dialog->date_arrow;
-    sort_fn = price_compare;
-    sort_ascending = pdb_dialog->ascending;
-  } else {
-    show = pdb_dialog->date_arrow;
-    hide = pdb_dialog->commodity_arrow;
-    sort_fn = price_date_compare;
-    sort_ascending = !pdb_dialog->ascending; /* Aren't date sorts fun */
-  }
-
-  prices = g_list_sort (prices, sort_fn);
-  if (!sort_ascending)
-    prices = g_list_reverse (prices);
-
-  arrow_dir = pdb_dialog->ascending ? GTK_ARROW_DOWN: GTK_ARROW_UP;
-  gtk_arrow_set(GTK_ARROW(show), arrow_dir, GTK_SHADOW_ETCHED_IN);
-  gtk_widget_show(show);
-  gtk_widget_hide(hide);
-
-  gtk_clist_freeze (GTK_CLIST (pdb_dialog->price_list));
 
-  gtk_clist_clear (GTK_CLIST (pdb_dialog->price_list));
-
-  current_commodity = NULL;
-  print_info = gnc_default_price_print_info ();
-
-  for (node = prices; node; node = node->next)
-  {
-    GNCPrice *price = node->data;
-    const char *text[6];
-    gint row;
-
-    text[0] = gnc_commodity_get_printname (gnc_price_get_commodity (price));
-    text[1] = gnc_commodity_get_printname (gnc_price_get_currency (price));
-    text[2] = gnc_print_date (gnc_price_get_time (price));
-    text[3] = gettext(gnc_price_get_source (price));
-    text[4] = gnc_price_get_type (price);
-    text[5] = xaccPrintAmount (gnc_price_get_value (price), print_info);
-
-    row = gtk_clist_append (GTK_CLIST (pdb_dialog->price_list), (char **)text);
-
-    gtk_clist_set_row_data (GTK_CLIST (pdb_dialog->price_list), row, price);
-
-    if (price == old_price)
-      new_row = row;
-  }
-
-  gtk_clist_thaw (GTK_CLIST (pdb_dialog->price_list));
-
-  gtk_clist_columns_autosize (GTK_CLIST (pdb_dialog->price_list));
-
-  for (node = pdb_dialog->prices; node; node = node->next)
-  {
-    GNCPrice *price = node->data;
-
-    gnc_price_unref (price);
-  }
-
-  g_list_free (pdb_dialog->prices);
-  pdb_dialog->prices = prices;
-
-  gtk_clist_select_row (GTK_CLIST (pdb_dialog->price_list), new_row, 0);
-  if (gtk_clist_row_is_visible (GTK_CLIST (pdb_dialog->price_list), new_row)
-      != GTK_VISIBILITY_FULL)
-    gtk_clist_moveto (GTK_CLIST (pdb_dialog->price_list),
-                      new_row, 0, 0.5, 0.0);
-
-  gtk_widget_set_sensitive (pdb_dialog->edit_button, prices != NULL);
-  gtk_widget_set_sensitive (pdb_dialog->remove_button, prices != NULL);
-  gtk_widget_set_sensitive (pdb_dialog->remove_old_button, prices != NULL);
-
-  return g_list_length (prices);
-}
-
-static void
-window_destroy_cb (GtkObject *object, gpointer data)
+void
+gnc_prices_dialog_window_destroy_cb (GtkObject *object, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
-  GList *node;
 
+  ENTER(" ");
   gnc_unregister_gui_component_by_data (DIALOG_PRICE_DB_CM_CLASS, pdb_dialog);
 
   if (pdb_dialog->price)
@@ -276,47 +90,47 @@
     pdb_dialog->price = NULL;
   }
 
-  for (node = pdb_dialog->prices; node; node = node->next)
-  {
-    GNCPrice *price = node->data;
-
-    gnc_price_unref (price);
-  }
-
-  g_list_free (pdb_dialog->prices);
-  pdb_dialog->prices = NULL;
-
   g_free (pdb_dialog);
+  LEAVE(" ");
 }
 
-static void
-prices_close_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_response (GtkDialog *dialog, gint response_id, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
 
+  ENTER(" ");
   gnc_close_gui_component_by_data (DIALOG_PRICE_DB_CM_CLASS, pdb_dialog);
+  LEAVE(" ");
 }
 
-static void
-edit_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_edit_clicked (GtkWidget *widget, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
 
-  if (!pdb_dialog->price)
+  ENTER(" ");
+  if (!pdb_dialog->price) {
+    LEAVE("no price selected");
     return;
+  }
 
   gnc_price_edit_dialog (pdb_dialog->dialog, pdb_dialog->price, GNC_PRICE_EDIT);
+  LEAVE(" ");
 }
 
-static void
-remove_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_remove_clicked (GtkWidget *widget, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
   const char *message = _("Are you sure you want to delete the\n"
                           "selected price?");
 
-  if (!pdb_dialog->price)
+  ENTER(" ");
+  if (!pdb_dialog->price) {
+    LEAVE("no price selected");
     return;
+  }
 
   if (gnc_verify_dialog (pdb_dialog->dialog, TRUE, message))
   {
@@ -324,13 +138,12 @@
     GNCPriceDB *pdb = gnc_book_get_pricedb (book);
 
     gnc_pricedb_remove_price (pdb, pdb_dialog->price);
-
-    gnc_gui_refresh_all ();
   }
+  LEAVE(" ");
 }
 
-static void
-remove_old_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_remove_old_clicked (GtkWidget *widget, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
   GtkWidget *dialog;
@@ -339,16 +152,17 @@
   GtkWidget *vbox;
   gint result;
 
-  dialog = gnome_dialog_new (_("Remove old prices"),
-                             GNOME_STOCK_BUTTON_OK,
-                             GNOME_STOCK_BUTTON_CANCEL,
-                             NULL);
-
-  gnome_dialog_set_parent (GNOME_DIALOG (dialog),
-                           GTK_WINDOW (pdb_dialog->dialog));
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), FALSE);
+  ENTER(" ");
+  dialog = gtk_dialog_new_with_buttons (_("Remove old prices"),
+		  			GTK_WINDOW (pdb_dialog->dialog),
+					GTK_DIALOG_DESTROY_WITH_PARENT,
+					GTK_STOCK_CANCEL,
+					GTK_RESPONSE_REJECT,
+					GTK_STOCK_OK,
+					GTK_RESPONSE_ACCEPT,
+					NULL);	    
 
-  vbox = GNOME_DIALOG (dialog)->vbox;
+  vbox = GTK_DIALOG (dialog)->vbox;
 
   gtk_box_set_spacing (GTK_BOX (vbox), 3);
   gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
@@ -360,107 +174,80 @@
   gtk_widget_show (label);
 
   date = gnc_date_edit_new (time (NULL), FALSE, FALSE);
-  gtk_object_ref (GTK_OBJECT (date));
+  g_object_ref (date);
   gtk_object_sink (GTK_OBJECT (date));
 
   gtk_box_pack_start (GTK_BOX (vbox), date, FALSE, FALSE, 0);
   gtk_widget_show (date);
 
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-  if (result == 0)
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
+  if (result == GTK_RESPONSE_ACCEPT)
   {
     GNCBook *book = gnc_get_current_book ();
     GNCPriceDB *pdb = gnc_book_get_pricedb (book);
-    GList *node;
     Timespec ts;
 
+    DEBUG("deleting prices");
     ts.tv_sec = gnc_date_edit_get_date (GNC_DATE_EDIT (date));
     ts.tv_nsec = 0;
 
-    for (node = pdb_dialog->prices; node; node = node->next)
-    {
-      GNCPrice *price = node->data;
-      Timespec pt = gnc_price_get_time (price);;
-
-      if (timespec_cmp (&pt, &ts) < 0)
-        gnc_pricedb_remove_price (pdb, price);
-    }
-
-    gnc_gui_refresh_all ();
+    gnc_pricedb_remove_old_prices(pdb, ts);
   }
 
-  gtk_object_unref (GTK_OBJECT (date));
+  g_object_unref (date);
+  gtk_widget_destroy(dialog);
+  LEAVE(" ");
 }
 
-static void
-add_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_add_clicked (GtkWidget *widget, gpointer data)
 {
   PricesDialog *pdb_dialog = data;
 
+  ENTER(" ");
   gnc_price_edit_dialog (pdb_dialog->dialog, pdb_dialog->price, GNC_PRICE_NEW);
+  LEAVE(" ");
 }
 
-static void
-get_quotes_clicked (GtkWidget *widget, gpointer data)
+void
+gnc_prices_dialog_get_quotes_clicked (GtkWidget *widget, gpointer data)
 {
   GNCBook *book = gnc_get_current_book ();
   SCM quotes_func;
   SCM book_scm;
 
+  ENTER(" ");
   quotes_func = scm_c_eval_string ("gnc:book-add-quotes");
-  if (!SCM_PROCEDUREP (quotes_func))
+  if (!SCM_PROCEDUREP (quotes_func)) {
+    LEAVE(" no procedure");
     return;
+  }
 
   book_scm = gnc_book_to_scm (book);
-  if (SCM_NFALSEP (scm_not (book_scm)))
+  if (SCM_NFALSEP (scm_not (book_scm))) {
+    LEAVE("no book");
     return;
+  }
 
   gnc_set_busy_cursor (NULL, TRUE);
   scm_call_1 (quotes_func, book_scm);
   gnc_unset_busy_cursor (NULL);
-
-  gnc_gui_refresh_all ();
+  LEAVE(" ");
 }
 
-/**
- * gnc_prices_click_column_cb
- *
- * @clist: A pointer to the clist.
- * @column: The column number clicked (0 based).
- * @data: A pointer to the data structure describing this window.
- *
- * This function checks for a valid column number, and determines
- * whether or not to invert the current sort or select a new column
- * for sorting.  It calls the gnc_prices_load_prices() function to
- * sort and display the data.
- */
-static void
-gnc_prices_click_column_cb(GtkCList *clist, gint column, gpointer data)
-{
-  PricesDialog *pdb_dialog = data;
-
-  if ((column != COMMODITY_COLUMN) && (column != DATE_COLUMN))
-    return;
-
-  if (pdb_dialog->sort_column == column) {
-    pdb_dialog->ascending = !pdb_dialog->ascending;
-  } else {
-    pdb_dialog->sort_column = column;
-    pdb_dialog->ascending = TRUE;
-  }
-  gnc_prices_load_prices (pdb_dialog);
-}
 
 static void
-gnc_prices_select_price_cb (GtkCList *clist, gint row, gint col,
-                            GdkEventButton *event, gpointer data)
+gnc_prices_dialog_selection_changed (GtkTreeSelection *treeselection,
+				     gpointer data)
 {
   PricesDialog *pdb_dialog = data;
 
+  ENTER(" ");
   if (pdb_dialog->price)
     gnc_price_unref (pdb_dialog->price);
 
-  pdb_dialog->price = gtk_clist_get_row_data (clist, row);
+  pdb_dialog->price =
+    gnc_tree_view_price_get_selected_price (pdb_dialog->price_tree);
 
   if (pdb_dialog->price)
     gnc_price_ref (pdb_dialog->price);
@@ -471,105 +258,102 @@
                             pdb_dialog->price != NULL);
   gtk_widget_set_sensitive (pdb_dialog->remove_old_button,
                             pdb_dialog->price != NULL);
-
-  if (event && (event->type == GDK_2BUTTON_PRESS)) {
-    edit_clicked(NULL, data);
-  }
+  LEAVE(" ");
 }
 
-static void
-gnc_prices_unselect_price_cb (GtkCTree *ctre, gint row, gint col,
-                              GdkEventButton *event, gpointer data)
+
+static gboolean
+gnc_price_dialog_filter_ns_func (gnc_commodity_namespace *namespace,
+				 gpointer data)
 {
   PricesDialog *pdb_dialog = data;
+  const gchar *name;
+  GList *cm_list, *price_list, *item;
+  gboolean result;
+
+  /* Never show the template list */
+  name = gnc_commodity_namespace_get_name (namespace);
+  if (safe_strcmp (name, "template") == 0)
+    return FALSE;
+
+  /* See if this namespace has commodities */
+  cm_list = gnc_commodity_namespace_get_commodity_list(namespace);
+  for (item = cm_list; item; item = g_list_next(item)) {
+
+    /* For each commodity, see if there are prices */
+    price_list = gnc_pricedb_get_prices(pdb_dialog->price_db, item->data, NULL);
+    result = (price_list != NULL);
+    gnc_price_list_destroy(price_list);
+    if (result) {
+//      printf("Namespace %s visible because %s has prices\n",
+//	     name, gnc_commodity_get_mnemonic(item->data));
+      return TRUE;
+    }
+  }
 
-  if (pdb_dialog->price)
-    gnc_price_unref (pdb_dialog->price);
-
-  pdb_dialog->price = NULL;
-
-  gtk_widget_set_sensitive (pdb_dialog->edit_button, FALSE);
-  gtk_widget_set_sensitive (pdb_dialog->remove_button, FALSE);
-  gtk_widget_set_sensitive (pdb_dialog->remove_old_button, FALSE);
+  //  printf("Namespace %s not visible\n", name);
+  return FALSE;
 }
 
-static void
-prices_set_min_widths (PricesDialog *pdb_dialog)
+static gboolean
+gnc_price_dialog_filter_cm_func (gnc_commodity *commodity,
+				 gpointer data)
 {
-  const char *titles[] = { _("Commodity"),
-                           _("Currency"),
-                           _("Date"),
-                           _("Source"),
-                           _("Type"),
-                           _("Price") };
-
-  GtkStyle *style = gtk_widget_get_style (pdb_dialog->price_list);
-  GdkFont *font = NULL;
-  gint width;
-  gint i;
-
-  if (style != NULL)
-    font = style->font;
-
-  if (font != NULL)
-    for (i = 0; i < 6; i++)
-    {
-      width = gdk_string_width (font, titles[i]);
-      gtk_clist_set_column_min_width (GTK_CLIST (pdb_dialog->price_list),
-                                      i, width + 5);
-    }
+  PricesDialog *pdb_dialog = data;
+  GList *list;
+  gboolean result;
+
+  /* Show any commodity that has prices */
+  list = gnc_pricedb_get_prices(pdb_dialog->price_db, commodity, NULL);
+  result = (list != NULL);
+  gnc_price_list_destroy(list);
+//  printf("Commodity %s%s visible\n",
+//	 gnc_commodity_get_mnemonic(commodity),
+//	 result ? "" : " not");
+  return result;
 }
 
 static void
 gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog)
 {
-  GtkWidget *dialog;
+  GtkWidget *dialog, *scrolled_window;
   GladeXML *xml;
+  GtkTreeView *view;
+  GtkTreeSelection *selection;
 
+  ENTER(" ");
   xml = gnc_glade_xml_new ("price.glade", "Prices Dialog");
 
   dialog = glade_xml_get_widget (xml, "Prices Dialog");
   pdb_dialog->dialog = dialog;
+  pdb_dialog->price_db = gnc_pricedb_get_db(gnc_get_current_book());
 
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0,
-                               GTK_SIGNAL_FUNC (prices_close_clicked),
-                               pdb_dialog);
-
-  gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
-                      GTK_SIGNAL_FUNC (window_destroy_cb), pdb_dialog);
+  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, pdb_dialog);
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   /* default to 'close' button */
-  gnome_dialog_set_default (GNOME_DIALOG(dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
 
   /* price tree */
-  {
-    GtkWidget *list;
-
-    list = glade_xml_get_widget (xml, "price_list");
-    pdb_dialog->price_list = list;
-    pdb_dialog->sort_column = COMMODITY_COLUMN;
-    pdb_dialog->ascending = TRUE;
-
-    gtk_clist_column_titles_passive(GTK_CLIST(list));
-    gtk_clist_column_title_active(GTK_CLIST(list), COMMODITY_COLUMN);
-    gtk_clist_column_title_active(GTK_CLIST(list), DATE_COLUMN);
-
-    gtk_signal_connect (GTK_OBJECT(list), "select_row",
-                        GTK_SIGNAL_FUNC(gnc_prices_select_price_cb),
-                        pdb_dialog);
-
-    gtk_signal_connect (GTK_OBJECT(list), "unselect_row",
-                        GTK_SIGNAL_FUNC(gnc_prices_unselect_price_cb),
-                        pdb_dialog);
-
-    gtk_signal_connect (GTK_OBJECT(list), "click_column",
-			GTK_SIGNAL_FUNC(gnc_prices_click_column_cb),
-			pdb_dialog);
-  }
+  scrolled_window = glade_xml_get_widget (xml, "price_list_window");
+  view = gnc_tree_view_price_new(gnc_get_current_book(),
+				 "gconf-section", GCONF_SECTION,
+				 "show-column-menu", TRUE,
+				 NULL);
+  pdb_dialog->price_tree = GNC_TREE_VIEW_PRICE(view);
+  gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET(view));
+  gnc_tree_view_price_set_filter (pdb_dialog->price_tree,
+				  gnc_price_dialog_filter_ns_func,
+				  gnc_price_dialog_filter_cm_func,
+				  NULL,
+				  pdb_dialog, NULL);
+
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+  g_signal_connect (G_OBJECT (selection), "changed",
+		    G_CALLBACK (gnc_prices_dialog_selection_changed), pdb_dialog);
 
   /* buttons */
   {
@@ -578,54 +362,15 @@
     button = glade_xml_get_widget (xml, "edit_button");
     pdb_dialog->edit_button = button;
 
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (edit_clicked), pdb_dialog);
-
     button = glade_xml_get_widget (xml, "remove_button");
     pdb_dialog->remove_button = button;
 
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (remove_clicked), pdb_dialog);
-
     button = glade_xml_get_widget (xml, "remove_old_button");
     pdb_dialog->remove_old_button = button;
-
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (remove_old_clicked), pdb_dialog);
-
-    button = glade_xml_get_widget (xml, "add_button");
-
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (add_clicked), pdb_dialog);
-
-    button = glade_xml_get_widget (xml, "get_quotes_button");
-
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (get_quotes_clicked), pdb_dialog);
-  }
-
-  /* arrows */
-  {
-    GtkWidget *arrow;
-
-    arrow = glade_xml_get_widget (xml, "commodity_arrow");
-    pdb_dialog->commodity_arrow = arrow;
-
-    arrow = glade_xml_get_widget (xml, "date_arrow");
-    pdb_dialog->date_arrow = arrow;
   }
 
-  gnc_prices_load_prices (pdb_dialog);
-  prices_set_min_widths (pdb_dialog);
-
-  if (last_width == 0)
-    gnc_get_window_size ("prices_win", &last_width, &last_height);
-
-  if (last_height == 0)
-    last_height = 400;
-
-  gtk_window_set_default_size (GTK_WINDOW(pdb_dialog->dialog),
-                               last_width, last_height);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
+  LEAVE(" ");
 }
 
 static void
@@ -633,20 +378,17 @@
 {
   PricesDialog *pdb_dialog = user_data;
 
-  gdk_window_get_geometry (GTK_WIDGET(pdb_dialog->dialog)->window,
-                           NULL, NULL, &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("prices_win", last_width, last_height);
+  ENTER(" ");
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(pdb_dialog->dialog));
 
-  gnome_dialog_close (GNOME_DIALOG (pdb_dialog->dialog));
+  gtk_widget_destroy (GTK_WIDGET (pdb_dialog->dialog));
+  LEAVE(" ");
 }
 
 static void
 refresh_handler (GHashTable *changes, gpointer user_data)
 {
-  PricesDialog *pdb_dialog = user_data;
-
-  gnc_prices_load_prices (pdb_dialog);
+  ENTER(" ");
 }
 
 static gboolean
@@ -655,10 +397,14 @@
 {
   PricesDialog *pdb_dialog = user_data;
 
-  if (!pdb_dialog)
+  ENTER(" ");
+  if (!pdb_dialog) {
+    LEAVE("no data strucure");
     return(FALSE);
+  }
 
   gtk_window_present (GTK_WINDOW(pdb_dialog->dialog));
+  LEAVE(" ");
   return(TRUE);
 }
 
@@ -675,8 +421,11 @@
   PricesDialog *pdb_dialog;
   gint component_id;
 
-  if (gnc_forall_gui_components (DIALOG_PRICE_DB_CM_CLASS, show_handler, NULL))
+  ENTER(" ");
+  if (gnc_forall_gui_components (DIALOG_PRICE_DB_CM_CLASS, show_handler, NULL)) {
+      LEAVE("existing dialog raised");
       return;
+  }
 
   pdb_dialog = g_new0 (PricesDialog, 1);
 
@@ -686,7 +435,8 @@
                                              refresh_handler, close_handler,
                                              pdb_dialog);
 
-  gtk_widget_grab_focus (pdb_dialog->price_list);
+  gtk_widget_grab_focus (GTK_WIDGET(pdb_dialog->price_tree));
 
   gtk_widget_show (pdb_dialog->dialog);
+  LEAVE(" ");
 }
Index: druid-stock-split.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-stock-split.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -Lsrc/gnome/druid-stock-split.c -Lsrc/gnome/druid-stock-split.c -u -r1.40 -r1.41
--- src/gnome/druid-stock-split.c
+++ src/gnome/druid-stock-split.c
@@ -31,8 +31,6 @@
 #include "dialog-utils.h"
 #include "druid-stock-split.h"
 #include "druid-utils.h"
-#include "global-options.h"
-#include "gnc-account-tree.h"
 #include "gnc-amount-edit.h"
 #include "gnc-book.h"
 #include "gnc-component-manager.h"
@@ -41,6 +39,7 @@
 #include "gnc-engine-util.h"
 #include "gnc-exp-parser.h"
 #include "gnc-gui-query.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "messages.h"
@@ -48,7 +47,6 @@
 
 #define DRUID_STOCK_SPLIT_CM_CLASS "druid-stock-split"
 
-
 /** structures *********************************************************/
 typedef struct
 {
@@ -74,9 +72,32 @@
 } StockSplitInfo;
 
 
-/** implementations ****************************************************/
-static void
-window_destroy_cb (GtkObject *object, gpointer data)
+/** declarations *******************************************************/
+void     gnc_stock_split_druid_window_destroy_cb (GtkObject *object, gpointer data);
+gboolean gnc_stock_split_druid_account_next      (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+void     gnc_stock_split_druid_details_prepare   (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+gboolean gnc_stock_split_druid_details_next      (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+void     gnc_stock_split_druid_cash_prepare      (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+gboolean gnc_stock_split_druid_cash_next         (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+void     gnc_stock_split_druid_finish            (GnomeDruidPage *druidpage,
+						  gpointer arg1,
+						  gpointer user_data);
+void     gnc_stock_split_druid_cancel_druid      (GnomeDruid *druid,
+						  gpointer user_data);
+
+/******* implementations ***********************************************/
+void
+gnc_stock_split_druid_window_destroy_cb (GtkObject *object, gpointer data)
 {
   StockSplitInfo *info = data;
 
@@ -171,7 +192,11 @@
   Account *account;
 
   account = gtk_clist_get_row_data (clist, row);
-  
+
+  /* Happens when the first row is inserted, before the row data can be added */
+  if (account == NULL)
+    return;
+
   info->acct = account;
 }
 
@@ -197,10 +222,10 @@
      xaccAccountGetCommodity (account));
 }
 
-static gboolean
-account_next (GnomeDruidPage *druidpage,
-              gpointer arg1,
-              gpointer user_data)
+gboolean
+gnc_stock_split_druid_account_next (GnomeDruidPage *druidpage,
+				    gpointer arg1,
+				    gpointer user_data)
 {
   StockSplitInfo *info = user_data;
 
@@ -229,8 +254,8 @@
 		    parse_error_string);
 }
 
-static void
-details_prepare (GnomeDruidPage *druidpage,
+void
+gnc_stock_split_druid_details_prepare (GnomeDruidPage *druidpage,
 		 gpointer arg1,
 		 gpointer user_data)
 {
@@ -239,10 +264,10 @@
   gtk_widget_grab_focus(info->distribution_edit);
 }
 
-static gboolean
-details_next (GnomeDruidPage *druidpage,
-              gpointer arg1,
-              gpointer user_data)
+gboolean
+gnc_stock_split_druid_details_next (GnomeDruidPage *druidpage,
+				    gpointer arg1,
+				    gpointer user_data)
 {
   StockSplitInfo *info = user_data;
   gnc_numeric amount;
@@ -284,28 +309,29 @@
   return FALSE;
 }
 
-static void
-cash_prepare (GnomeDruidPage *druidpage,
-              gpointer arg1,
-              gpointer user_data)
+void
+gnc_stock_split_druid_cash_prepare (GnomeDruidPage *druidpage,
+				    gpointer arg1,
+				    gpointer user_data)
 {
   StockSplitInfo *info = user_data;
+  GtkTreeSelection *selection;
 
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (info->income_tree));
-  gnc_account_tree_expand_all (GNC_ACCOUNT_TREE (info->income_tree));
-  gtk_clist_select_row (GTK_CLIST (info->income_tree), 0, 0);
-
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (info->asset_tree));
-  gnc_account_tree_expand_all (GNC_ACCOUNT_TREE (info->asset_tree));
-  gtk_clist_select_row (GTK_CLIST (info->asset_tree), 0, 0);
+  gtk_tree_view_expand_all (GTK_TREE_VIEW(info->income_tree));
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(info->income_tree));
+  gtk_tree_selection_unselect_all (selection);
+
+  gtk_tree_view_expand_all (GTK_TREE_VIEW(info->asset_tree));
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(info->asset_tree));
+  gtk_tree_selection_unselect_all (selection);
 
   gtk_widget_grab_focus(info->cash_edit);
 }
 
-static gboolean
-cash_next (GnomeDruidPage *druidpage,
-           gpointer arg1,
-           gpointer user_data)
+gboolean
+gnc_stock_split_druid_cash_next (GnomeDruidPage *druidpage,
+				 gpointer arg1,
+				 gpointer user_data)
 {
   StockSplitInfo *info = user_data;
   gnc_numeric amount;
@@ -331,8 +357,7 @@
   {
     Account *account;
 
-    account = gnc_account_tree_get_current_account
-      (GNC_ACCOUNT_TREE (info->income_tree));
+    account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(info->income_tree));
     if (!account)
     {
       const char *message = _("You must select an income account\n"
@@ -341,8 +366,7 @@
       return TRUE;
     }
 
-    account = gnc_account_tree_get_current_account
-      (GNC_ACCOUNT_TREE (info->asset_tree));
+    account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(info->asset_tree));
     if (!account)
     {
       const char *message = _("You must select an asset account\n"
@@ -355,10 +379,10 @@
   return FALSE;
 }
 
-static void
-stock_split_finish (GnomeDruidPage *druidpage,
-                    gpointer arg1,
-                    gpointer user_data)
+void
+gnc_stock_split_druid_finish (GnomeDruidPage *druidpage,
+			      gpointer arg1,
+			      gpointer user_data)
 {
   StockSplitInfo *info = user_data;
   GList *account_commits;
@@ -450,8 +474,7 @@
     memo = gtk_entry_get_text (GTK_ENTRY (info->memo_entry));
 
     /* asset split */
-    account = gnc_account_tree_get_current_account
-      (GNC_ACCOUNT_TREE (info->asset_tree));
+    account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(info->asset_tree));
 
     split = xaccMallocSplit (gnc_get_current_book ());
 
@@ -469,8 +492,7 @@
 
 
     /* income split */
-    account = gnc_account_tree_get_current_account
-      (GNC_ACCOUNT_TREE (info->income_tree));
+    account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT(info->income_tree));
 
     split = xaccMallocSplit (gnc_get_current_book ());
 
@@ -498,36 +520,51 @@
   gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
 }
 
-static void
-druid_cancel (GnomeDruid *druid, gpointer user_data)
+void
+gnc_stock_split_druid_cancel_druid (GnomeDruid *druid, gpointer user_data)
 {
   StockSplitInfo *info = user_data;
 
   gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
 }
 
+static gboolean
+gnc_stock_split_druid_view_filter_income (Account  *account,
+					  gpointer  data)
+{
+  GNCAccountType type;
+
+  type = xaccAccountGetType(account);
+  return (type == INCOME);
+}
+
+static gboolean
+gnc_stock_split_druid_view_filter_asset (Account  *account,
+					 gpointer  data)
+{
+  GNCAccountType type;
+
+  type = xaccAccountGetType(account);
+  return ((type == BANK) || (type == CASH) || (type == ASSET));
+}
+
 static void
 gnc_stock_split_druid_create (StockSplitInfo *info)
 {
-  GtkWidget *page;
   GladeXML *xml;
 
   xml = gnc_glade_xml_new ("stocks.glade", "Stock Split Druid");
-
   info->window = glade_xml_get_widget (xml, "Stock Split Druid");
-
   info->druid = glade_xml_get_widget (xml, "stock_split_druid");
 
-  gtk_signal_connect (GTK_OBJECT (info->window), "destroy",
-                      GTK_SIGNAL_FUNC (window_destroy_cb), info);
+  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, info);
 
-  gtk_signal_connect (GTK_OBJECT (info->druid), "cancel",
-                      GTK_SIGNAL_FUNC (druid_cancel), info);
+  /* libglade2 is broken. It should read these from the glade file. */
+  gnc_druid_set_colors (GNOME_DRUID(info->druid));
+  gnc_druid_set_watermark_images (GNOME_DRUID(info->druid),
+				  "stock_split_title.png",
+				  "stock_split_watermark.png");
 
-  gnc_druid_set_title_image (GNOME_DRUID(info->druid),
-                             "stock_split_title.png");
-  gnc_druid_set_watermark_image (GNOME_DRUID(info->druid),
-                                 "stock_split_watermark.png");
 
   /* account list */
   {
@@ -541,11 +578,6 @@
 
     gtk_signal_connect (GTK_OBJECT (clist), "select_row",
                         GTK_SIGNAL_FUNC (clist_select_row), info);
-
-    page = glade_xml_get_widget (xml, "account_page");
-
-    gtk_signal_connect (GTK_OBJECT (page), "next",
-                        GTK_SIGNAL_FUNC (account_next), info);
   }
 
   /* info widgets */
@@ -579,19 +611,10 @@
     ce = gnc_currency_edit_new ();
     gtk_box_pack_start (GTK_BOX (box), ce, TRUE, TRUE, 0);
     info->price_currency_edit = ce;
-
-    page = glade_xml_get_widget (xml, "details_page");
-
-    gtk_signal_connect (GTK_OBJECT (page), "prepare",
-                        GTK_SIGNAL_FUNC (details_prepare), info);
-    gtk_signal_connect (GTK_OBJECT (page), "next",
-                        GTK_SIGNAL_FUNC (details_next), info);
   }
 
   /* Cash in Lieu page */
   {
-    AccountViewInfo view_info;
-    GNCAccountType type;
     GtkWidget *box;
     GtkWidget *tree;
     GtkWidget *amount;
@@ -605,18 +628,12 @@
     info->memo_entry = glade_xml_get_widget (xml, "memo_entry");
 
     /* income tree */
-    tree = gnc_account_tree_new ();
+    tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
     info->income_tree = tree;
-    gtk_clist_column_titles_hide (GTK_CLIST (tree));
-    gtk_clist_set_selection_mode (GTK_CLIST (tree), GTK_SELECTION_BROWSE);
-    gnc_account_tree_hide_all_but_name (GNC_ACCOUNT_TREE (tree));
-
-    gnc_account_tree_get_view_info (GNC_ACCOUNT_TREE (tree), &view_info);
-
-    for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
-      view_info.include_type[type] = (type == INCOME);
-
-    gnc_account_tree_set_view_info (GNC_ACCOUNT_TREE (tree), &view_info);
+    gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree),
+				      gnc_stock_split_druid_view_filter_income,
+				      NULL, /* user data */
+				      NULL  /* destroy callback */);
 
     gtk_widget_show (tree);
 
@@ -625,38 +642,18 @@
 
 
     /* asset tree */
-    tree = gnc_account_tree_new ();
+    tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
     info->asset_tree = tree;
-    gtk_clist_column_titles_hide (GTK_CLIST (tree));
-    gtk_clist_set_selection_mode (GTK_CLIST (tree), GTK_SELECTION_BROWSE);
-    gnc_account_tree_hide_all_but_name (GNC_ACCOUNT_TREE (tree));
-
-    gnc_account_tree_get_view_info (GNC_ACCOUNT_TREE (tree), &view_info);
-
-    for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
-      view_info.include_type[type] =
-        (type == BANK) || (type == CASH) || (type == ASSET);
-
-    gnc_account_tree_set_view_info (GNC_ACCOUNT_TREE (tree), &view_info);
+    gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree),
+				      gnc_stock_split_druid_view_filter_asset,
+				      NULL /* user data */,
+				      NULL /* destroy callback */);
 
     gtk_widget_show (tree);
 
     scroll = glade_xml_get_widget (xml, "asset_scroll");
     gtk_container_add (GTK_CONTAINER (scroll), tree);
-
-    page = glade_xml_get_widget (xml, "cash_page");
-
-    gtk_signal_connect (GTK_OBJECT (page), "prepare",
-                        GTK_SIGNAL_FUNC (cash_prepare), info);
-
-    gtk_signal_connect (GTK_OBJECT (page), "next",
-                        GTK_SIGNAL_FUNC (cash_next), info);
   }
-
-  page = glade_xml_get_widget (xml, "finish_page");
-
-  gtk_signal_connect (GTK_OBJECT (page), "finish",
-                      GTK_SIGNAL_FUNC (stock_split_finish), info);
 }
 
 static void
@@ -695,11 +692,12 @@
  * gnc_stock_split_dialog                                           *
  *   opens up a window to record a stock split                      *
  *                                                                  * 
- * Args:   initial - the initial account to use                     *
+ * Args:   parent  - the parent ofthis window                       *
+ *         initial - the initial account to use                     *
  * Return: nothing                                                  *
 \********************************************************************/
 void
-gnc_stock_split_dialog (Account * initial)
+gnc_stock_split_dialog (GtkWidget *parent, Account * initial)
 {
   StockSplitInfo *info;
   gint component_id;
@@ -720,8 +718,7 @@
 
   if (fill_account_list (info, initial) == 0)
   {
-    gnc_warning_dialog (gnc_ui_get_toplevel(),
-			_("You don't have any stock accounts with balances!"));
+    gnc_warning_dialog (parent, _("You don't have any stock accounts with balances!"));
     gnc_close_gui_component_by_data (DRUID_STOCK_SPLIT_CM_CLASS, info);
     return;
   }
Index: lot-viewer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/lot-viewer.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/gnome/lot-viewer.c -Lsrc/gnome/lot-viewer.c -u -r1.14 -r1.15
--- src/gnome/lot-viewer.c
+++ src/gnome/lot-viewer.c
@@ -57,6 +57,7 @@
 #include "lot-viewer.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "misc-gnome-utils.h"
 
 #define LOT_VIEWER_CM_CLASS "lot-viewer"
@@ -68,20 +69,27 @@
 #define GAINS_COL 4
 #define NUM_COLS  5
 
+#define RESPONSE_VIEW          1
+#define RESPONSE_DELETE        2
+#define RESPONSE_SCRUB_LOT     3
+#define RESPONSE_SCRUB_ACCOUNT 4
+
+#define GCONF_SECTION "dialogs/lot_viewer"
+#define GCONF_KEY_HPOSITION "hpane_position"
+#define GCONF_KEY_VPOSITION "vpane_position"
+
 struct _GNCLotViewer 
 {
    GtkWidget     * window;
    GtkButton     * regview_button;
    GtkButton     * delete_button;
    GtkButton     * scrub_lot_button;
-   GtkButton     * scrub_acc_button;
    GtkPaned      * lot_hpaned;
    GtkPaned      * lot_vpaned;
    GtkCList      * lot_clist;
-   GtkText       * lot_notes;
+   GtkTextView   * lot_notes;
    GtkEntry      * title_entry;
    GtkCList      * mini_clist;
-   GtkStatusbar  * status_bar;
 
    Account       * account;
    GNCLot        * selected_lot;
@@ -91,6 +99,26 @@
 static void gnc_lot_viewer_fill (GNCLotViewer *lv);
 
 /* ======================================================================== */
+/* Callback prototypes */
+
+void  lv_select_row_cb (GtkCList       *clist,
+			gint            row,
+			gint            column,
+			GdkEvent       *event,
+			gpointer        user_data);
+void lv_unselect_row_cb (GtkCList       *clist,
+			 gint            row,
+			 gint            column,
+			 GdkEvent       *event,
+			 gpointer        user_data);
+void lv_title_entry_changed_cb (GtkEntry *ent, gpointer user_data);
+void lv_response_cb (GtkDialog *dialog, gint response, gpointer data);
+void lv_window_destroy_cb (GtkObject *object, gpointer user_data);
+void lv_paned_notify_cb (GObject *gobject,
+			 GParamSpec *pspec,
+			 gpointer user_data);
+
+/* ======================================================================== */
 /* Put the splits into the split clist */
 
 #define MINI_DATE_COL 0 
@@ -202,7 +230,7 @@
 /* ======================================================================== */
 /* Callback for selecting a row the the list-of-list clist */
 
-static void 
+void 
 lv_select_row_cb (GtkCList       *clist,
                   gint            row,
                   gint            column,
@@ -223,14 +251,18 @@
    /* Set the notes field */
    str = gnc_lot_get_notes (lot);
    if (!str) str = "";
-   xxxgtk_text_set_text (lv->lot_notes, str);
-   gtk_text_set_editable (lv->lot_notes, TRUE);
+   xxxgtk_textview_set_text (lv->lot_notes, str);
+   gtk_text_view_set_editable (lv->lot_notes, TRUE);
 
    /* Don't set until end, to avoid recursion in gtkentry "changed" cb. */
    lv->selected_lot = lot;
    lv->selected_row = row;
 
    lv_show_splits (lv);
+
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->regview_button), TRUE);
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->delete_button), TRUE);
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->scrub_lot_button), TRUE);
 }
 
 /* ======================================================================== */
@@ -247,17 +279,21 @@
    gtk_entry_set_editable (lv->title_entry, FALSE);
 
    /* Blank the notes area */
-   xxxgtk_text_set_text (lv->lot_notes, "");
-   gtk_text_set_editable (lv->lot_notes, FALSE);
+   xxxgtk_textview_set_text (lv->lot_notes, "");
+   gtk_text_view_set_editable (lv->lot_notes, FALSE);
 
    /* Erase the mini-view area */
    lv_clear_splits (lv);
+
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->regview_button), FALSE);
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->delete_button), FALSE);
+   gtk_widget_set_sensitive(GTK_WIDGET(lv->scrub_lot_button), FALSE);
 }
 
 /* ======================================================================== */
 /* Callback for un-selecting a row the the list-of-list clist */
 
-static void 
+void 
 lv_unselect_row_cb (GtkCList       *clist,
                     gint            row,
                     gint            column,
@@ -267,6 +303,7 @@
    GNCLotViewer *lv = user_data;
    GNCLot *lot = lv->selected_lot;
    const char * str;
+   char * notes;
 
    /* Get the title, plunk it into ctree */
    str = gtk_entry_get_text (lv->title_entry);
@@ -277,8 +314,9 @@
       gnc_lot_set_title (lot, str);
 
       /* Get the notes, save the notes */
-      str = xxxgtk_text_get_text (lv->lot_notes);
-      gnc_lot_set_notes (lot, str);
+      notes = xxxgtk_textview_get_text (lv->lot_notes);
+      gnc_lot_set_notes (lot, notes);
+      g_free(notes);
    }
 
    lv_unset_lot (lv);
@@ -287,70 +325,17 @@
 /* ======================================================================== */
 /* Callback when user types a new lot title into the entry widget */
 
-static void
+void
 lv_title_entry_changed_cb (GtkEntry *ent, gpointer user_data)
 {
    GNCLotViewer *lv = user_data;
-   char * title;
+   const char * title;
    title = gtk_entry_get_text (lv->title_entry);
    if (0 > lv->selected_row) return; 
    gtk_clist_set_text (lv->lot_clist, lv->selected_row, TITLE_COL, title);
 }
 
 /* ======================================================================== */
-/* Delete button was pressed */
-
-static void
-lv_delete_cb (GtkButton *but, gpointer user_data)
-{
-   GNCLotViewer *lv = user_data;
-   GNCLot *lot = lv->selected_lot;
-
-   if (NULL == lot) return; 
-   xaccAccountRemoveLot (gnc_lot_get_account(lot), lot);
-   gnc_lot_destroy (lot);
-   lv_unset_lot (lv);
-   gnc_lot_viewer_fill (lv);
-}
-
-/* ======================================================================== */
-/* Scrub-lot button was pressed */
-
-static void
-lv_scrub_lot_cb (GtkButton *but, gpointer user_data)
-{
-   GNCLotViewer *lv = user_data;
-   if (NULL == lv->selected_lot) return; 
-   xaccScrubLot (lv->selected_lot);
-   gnc_lot_viewer_fill (lv);
-   lv_show_splits (lv);
-}
-
-/* ======================================================================== */
-/* Scrub-acc button was pressed */
-
-static void
-lv_scrub_acc_cb (GtkButton *but, gpointer user_data)
-{
-   GNCLotViewer *lv = user_data;
-   xaccAccountScrubLots (lv->account);
-   gnc_lot_viewer_fill (lv);
-   lv_show_splits (lv);
-}
-
-/* ======================================================================== */
-/* This callback opens a register window, and shows only the splits 
- * in this lot.  */
-
-static void
-lv_regview_cb (GtkButton *but, gpointer user_data)
-{
-   GNCLotViewer *lv = user_data;
-   if (NULL == lv->selected_lot) return; 
-printf ("duude UNIMPLEMENTED: need to disply register showing only this one lot \n");
-}
-
-/* ======================================================================== */
 /* Get the realized gains for this lot.  This routine or a varient of it
  * should probably be moved to gnc-lot.c. 
  * The conceptual difficulty here is that this works only if all of the 
@@ -498,20 +483,23 @@
    if (lot)
    {
       const char * str;
+      char *notes;
 
       /* Get the title, save the title */
       str = gtk_entry_get_text (lv->title_entry);
       gnc_lot_set_title (lot, str);
 
       /* Get the notes, save the notes */
-      str = xxxgtk_text_get_text (lv->lot_notes);
-      gnc_lot_set_notes (lot, str);
+      notes = xxxgtk_textview_get_text (lv->lot_notes);
+      gnc_lot_set_notes (lot, notes);
+      g_free(notes);
    }
 
+   gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(lv->window));
    gtk_widget_destroy (lv->window);
 }
 
-static void
+void
 lv_window_destroy_cb (GtkObject *object, gpointer user_data)
 {
    GNCLotViewer *lv = user_data;
@@ -522,12 +510,81 @@
                                                                                 
 
 /* ======================================================================== */
+/* Divider moved */
+
+void
+lv_paned_notify_cb (GObject *gobject,
+		     GParamSpec *pspec,
+		     gpointer user_data)
+{
+   const gchar *param_name;
+   gint value;
+
+   param_name = g_param_spec_get_name(pspec);
+   if (strcmp(param_name, "position") != 0)
+     return;
+   g_object_get(gobject, "position", &value, NULL);
+
+   if (GTK_IS_HPANED(gobject)) {
+     gnc_gconf_set_int(GCONF_SECTION, GCONF_KEY_HPOSITION, value, NULL);
+   } else {
+     gnc_gconf_set_int(GCONF_SECTION, GCONF_KEY_VPOSITION, value, NULL);
+   }
+}
+
+/* ======================================================================== */
+/* Any button was pressed */
+
+void
+lv_response_cb (GtkDialog *dialog, gint response, gpointer data)
+{
+   GNCLotViewer *lv = data;
+   GNCLot *lot = lv->selected_lot;
+
+   switch (response) {
+   case GTK_RESPONSE_CLOSE:
+     lv_close_handler(lv);
+     return;
+
+   case RESPONSE_VIEW:
+     if (NULL == lot)
+       return; 
+     printf ("duude UNIMPLEMENTED: need to disply register showing only this one lot \n");
+     break;
+
+   case RESPONSE_DELETE:
+     if (NULL == lot)
+       return; 
+     xaccAccountRemoveLot (gnc_lot_get_account(lot), lot);
+     gnc_lot_destroy (lot);
+     lv_unset_lot (lv);
+     gnc_lot_viewer_fill (lv);
+     break;
+
+   case RESPONSE_SCRUB_LOT:
+     if (NULL == lot)
+       return; 
+     xaccScrubLot (lot);
+     gnc_lot_viewer_fill (lv);
+     lv_show_splits (lv);
+     break;
+
+   case RESPONSE_SCRUB_ACCOUNT:
+     xaccAccountScrubLots (lv->account);
+     gnc_lot_viewer_fill (lv);
+     lv_show_splits (lv);
+     break;
+   }
+}
+
+/* ======================================================================== */
 
 static void
 lv_create (GNCLotViewer *lv)
 {
    GladeXML *xml;
    char win_title[251];
+   gint position;
 
    xml = gnc_glade_xml_new ("lots.glade", "Lot Viewer Window");
    lv->window = glade_xml_get_widget (xml, "Lot Viewer Window");
@@ -539,25 +596,30 @@
    lv->regview_button = GTK_BUTTON(glade_xml_get_widget (xml, "regview button"));
    lv->delete_button = GTK_BUTTON(glade_xml_get_widget (xml, "delete button"));
    lv->scrub_lot_button = GTK_BUTTON(glade_xml_get_widget (xml, "scrub lot button"));
-   lv->scrub_acc_button = GTK_BUTTON(glade_xml_get_widget (xml, "scrub account button"));
 
    lv->lot_clist = GTK_CLIST(glade_xml_get_widget (xml, "lot clist"));
-   lv->lot_notes = GTK_TEXT(glade_xml_get_widget (xml, "lot notes text"));
+   lv->lot_notes = GTK_TEXT_VIEW(glade_xml_get_widget (xml, "lot notes text"));
    lv->title_entry = GTK_ENTRY (glade_xml_get_widget (xml, "lot title entry"));
 
    lv->lot_vpaned = GTK_PANED (glade_xml_get_widget (xml, "lot vpaned"));
-   gtk_paned_set_position (lv->lot_vpaned, 200);   /* XXX hack to make visible */
+   position = gnc_gconf_get_int(GCONF_SECTION, GCONF_KEY_VPOSITION, NULL);
+   if (position)
+     gtk_paned_set_position (lv->lot_vpaned, position);
+
    lv->lot_hpaned = GTK_PANED (glade_xml_get_widget (xml, "lot hpaned"));
-   gtk_paned_set_position (lv->lot_hpaned, 200);   /* XXX hack to make visible */
+   position = gnc_gconf_get_int(GCONF_SECTION, GCONF_KEY_HPOSITION, NULL);
+   if (position)
+     gtk_paned_set_position (lv->lot_hpaned, position);
 
    lv->mini_clist = GTK_CLIST(glade_xml_get_widget (xml, "mini clist"));
-   lv->status_bar = GTK_STATUSBAR(glade_xml_get_widget (xml, "lot statusbar"));
 
    lv->selected_lot = NULL;
    lv->selected_row = -1;
     
-   gtk_signal_connect (GTK_OBJECT (lv->window), "destroy",
-                      GTK_SIGNAL_FUNC (lv_window_destroy_cb), lv);
+   /* Setup signals */
+   glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     lv);
 
    gtk_signal_connect (GTK_OBJECT (lv->lot_clist), "select_row",
                       GTK_SIGNAL_FUNC (lv_select_row_cb), lv);
@@ -565,21 +627,7 @@
    gtk_signal_connect (GTK_OBJECT (lv->lot_clist), "unselect_row",
                       GTK_SIGNAL_FUNC (lv_unselect_row_cb), lv);
 
-   gtk_signal_connect (GTK_OBJECT (lv->title_entry), "changed",
-                      GTK_SIGNAL_FUNC (lv_title_entry_changed_cb), lv);
-
-   gtk_signal_connect (GTK_OBJECT (lv->regview_button), "clicked",
-                      GTK_SIGNAL_FUNC (lv_regview_cb), lv);
-
-   gtk_signal_connect (GTK_OBJECT (lv->delete_button), "clicked",
-                      GTK_SIGNAL_FUNC (lv_delete_cb), lv);
-
-   gtk_signal_connect (GTK_OBJECT (lv->scrub_acc_button), "clicked",
-                      GTK_SIGNAL_FUNC (lv_scrub_acc_cb), lv);
-
-   gtk_signal_connect (GTK_OBJECT (lv->scrub_lot_button), "clicked",
-                      GTK_SIGNAL_FUNC (lv_scrub_lot_cb), lv);
-
+   gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(lv->window));
 }
 
 /* ======================================================================== */
Index: dialog-print-check.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-print-check.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/gnome/dialog-print-check.c -Lsrc/gnome/dialog-print-check.c -u -r1.19 -r1.20
--- src/gnome/dialog-print-check.c
+++ src/gnome/dialog-print-check.c
@@ -27,15 +27,13 @@
 #include <stdio.h>
 #include <gnome.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-date.h"
 #include "messages.h"
 #include "gnc-numeric.h"
-#include "window-register.h"
+#include "gnc-plugin-page-register.h"
 #include "dialog-print-check.h"
 #include "dialog-utils.h"
-#include "window-help.h"
 #include "print-session.h"
 #include "gnc-ui.h"
 #include "gnc-date-format.h"
@@ -44,6 +42,8 @@
 #define CHECK_PRINT_NUM_POSITIONS 4
 #define CHECK_PRINT_NUM_UNITS 4
 
+#define PRINT_CHECK_DATA "print-check-data"
+
 /* Used by glade_xml_signal_autoconnect_full */
 void gnc_ui_print_check_dialog_ok_cb(GtkButton * button, gpointer user_data);
 void gnc_ui_print_check_dialog_cancel_cb(GtkButton * button, gpointer user_data);
@@ -56,7 +56,7 @@
 \********************************************************************/
 
 void
-gnc_ui_print_check_dialog_create(RegWindow     *reg_data,
+gnc_ui_print_check_dialog_create(GncPluginPageRegister *plugin_page,
 				 const char    *payee,
 				 gnc_numeric    amount,
 				 time_t         date,
@@ -65,8 +65,9 @@
   PrintCheckDialog * pcd;
   GladeXML *xml;
   GtkWidget *table;
+  GtkWindow *window;
 
-  pcd = (PrintCheckDialog *)gnc_RegWindow_get_pcd(reg_data);
+  pcd = g_object_get_data(G_OBJECT(plugin_page), PRINT_CHECK_DATA);
   if (pcd) {
     pcd->payee = payee;
     pcd->amount = amount;
@@ -78,8 +79,8 @@
   }
 
   pcd = g_new0(PrintCheckDialog, 1);
-  gnc_RegWindow_set_pcd(reg_data, pcd);
-  pcd->reg_data = reg_data;
+  g_object_set_data(G_OBJECT(plugin_page), PRINT_CHECK_DATA, pcd);
+  pcd->plugin_page = plugin_page;
   pcd->payee = payee;
   pcd->amount = amount;
   pcd->date = date;
@@ -114,8 +115,8 @@
   gnc_option_menu_init(pcd->position_picker);
   gnc_option_menu_init(pcd->units_picker);
 
-  gnome_dialog_set_parent(GNOME_DIALOG(pcd->dialog),
-			  GTK_WINDOW(gnc_RegWindow_window(reg_data)));
+  window = GTK_WINDOW(GNC_PLUGIN_PAGE(plugin_page)->window);
+  gtk_window_set_transient_for(GTK_WINDOW(pcd->dialog), window);
 
   /* Create and attach the date-format chooser */
   table = glade_xml_get_widget (xml, "options_table");
@@ -137,11 +138,10 @@
 void
 gnc_ui_print_check_dialog_destroy(PrintCheckDialog * pcd)
 {
-  gnome_dialog_close(GNOME_DIALOG(pcd->dialog));
   gtk_widget_destroy(pcd->dialog);
   pcd->dialog = NULL;
 
-  gnc_RegWindow_set_pcd(pcd->reg_data, NULL);
+  g_object_set_data(G_OBJECT(pcd->plugin_page), PRINT_CHECK_DATA, NULL);
   g_free(pcd);
 }
 
@@ -154,7 +154,7 @@
 static double 
 entry_to_double(GtkWidget * entry)
 {
-  char  * text = gtk_entry_get_text(GTK_ENTRY(entry));
+  const char  * text = gtk_entry_get_text(GTK_ENTRY(entry));
   double retval = 0.0;
   
   sscanf(text, "%le", &retval);
@@ -262,5 +262,5 @@
 gnc_ui_print_check_dialog_help_cb(GtkButton * button, 
                                   gpointer user_data)
 {
-  helpWindow(NULL, NULL, HH_PRINTCHECK);
+  gnc_gnome_help(HF_USAGE, HL_PRINTCHECK);
 }
Index: dialog-totd.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-totd.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/dialog-totd.h -Lsrc/gnome/dialog-totd.h -u -r1.2 -r1.3
--- src/gnome/dialog-totd.h
+++ src/gnome/dialog-totd.h
@@ -1,28 +1,31 @@
-/********************************************************************\
- * dialog-totd.h : dialog to display a "tip of the day"             *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.net>               *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
+/*
+ * dialog-totd.h : dialog to display a "tip of the day"
+ *
+ * Copyright (c) 2005 David Hampton <hampton at employees.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */ 
 
 #ifndef DIALOG_TOTD_H
 #define DIALOG_TOTD_H
 
-void gnc_ui_totd_dialog_create_and_run(void);
+#include <gtk/gtk.h>
+
+void gnc_totd_dialog (GtkWindow *parent, gboolean startup);
 
 #endif 
Index: druid-stock-split.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-stock-split.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome/druid-stock-split.h -Lsrc/gnome/druid-stock-split.h -u -r1.1 -r1.2
--- src/gnome/druid-stock-split.h
+++ src/gnome/druid-stock-split.h
@@ -31,9 +31,10 @@
  * gnc_stock_split_dialog                                           *
  *   opens up a window to record a stock split                      *
  *                                                                  * 
- * Args:   initial - the initial account to use                     *
+ * Args:   parent  - the parent ofthis window                       *
+ *         initial - the initial account to use                     *
  * Return: nothing                                                  *
 \********************************************************************/
-void gnc_stock_split_dialog (Account * initial);
+void gnc_stock_split_dialog (GtkWidget *parent, Account * initial);
 
 #endif
Index: dialog-sx-from-trans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sx-from-trans.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/gnome/dialog-sx-from-trans.c -Lsrc/gnome/dialog-sx-from-trans.c -u -r1.31 -r1.32
--- src/gnome/dialog-sx-from-trans.c
+++ src/gnome/dialog-sx-from-trans.c
@@ -26,6 +26,7 @@
 
 #include <gnome.h>
 
+#include "gnc-engine.h"
 #include "SX-book.h"
 #include "SX-book-p.h"
 #include "SX-ttinfo.h"
@@ -34,10 +35,9 @@
 #include "dialog-scheduledxaction.h"
 #include "dialog-sx-from-trans.h"
 #include "dialog-utils.h"
-#include "global-options.h"
-#include "gnc-book.h"
 #include "gnc-date-edit.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "gnc-dense-cal.h"
@@ -54,27 +54,24 @@
 #define SXFTD_NAME_ENTRY "name_entry"
 #define SXFTD_N_OCCURRENCES_ENTRY "n_occurrences_entry"
 #define SXFTD_FREQ_OPTION_MENU "freq_option_menu"
-//#define SXFTD_END_DATE_EDIT "end_date_edit"
+/* #define SXFTD_END_DATE_EDIT "end_date_edit" */
 #define SXFTD_START_DATE_EDIT "start_date_edit"
 #define SXFTD_EX_CAL_FRAME "ex_cal_frame"
 #define SXFTD_END_DATE_BOX "end_date_hbox"
 
-#define SX_OPT_STR "Scheduled Transactions"
-
 #define SXFTD_ERRNO_UNBALANCED_XACTION 3
 #define SXFTD_ERRNO_OPEN_XACTION -3
 
 #define SXFTD_EXCAL_NUM_MONTHS 4
 #define SXFTD_EXCAL_MONTHS_PER_COL 4
 
-static short module = MOD_SX;
+#define SXFTD_RESPONSE_ADVANCED 100 /* 'Advanced' button response code */
 
-/** start_date_edit, end_date_edit, param_table, end_date_hbox */
+static QofLogModule log_module = GNC_MOD_SX;
 
-static void sxftd_ok_clicked(GtkWidget *w, gpointer user_data);
 static void sxftd_freq_option_changed( GtkWidget *w, gpointer user_data );
-static void sxftd_advanced_clicked(GtkWidget *w, gpointer user_data);
-static void sxftd_cancel_clicked(GtkWidget *w, gpointer user_data);
+static void gnc_sx_trans_window_response_cb(GtkDialog *dialog, gint response, gpointer data);
+
 static void sxftd_destroy( GtkWidget *w, gpointer user_data );
 
 typedef enum { NEVER_END, END_ON_DATE, END_AFTER_N_OCCS, BAD_END } endType;
@@ -114,7 +111,7 @@
 } getEndTuple;
 
 static void sxftd_update_example_cal( SXFromTransInfo *sxfti );
-static void sxftd_update_excal_adapt( GtkObject *o, gpointer ud );
+static void sxftd_update_excal_adapt( GObject *o, gpointer ud );
 
 /* Stolen from jsled - nice and neat, actually (if a little light on 
  * for typechecking, but we'll be careful) . . . 
@@ -126,6 +123,11 @@
   void (*handlerFn)();
 } widgetSignalHandlerTuple;
 
+
+static void sxftd_ok_clicked(SXFromTransInfo *sxfti);
+static void sxftd_advanced_clicked(SXFromTransInfo *sxfti);
+
+
 static void
 sxfti_attach_callbacks(SXFromTransInfo *sxfti)
 {
@@ -139,10 +141,6 @@
       { SXFTD_N_OCCURRENCES_BUTTON, "clicked",      sxftd_update_excal_adapt },
       { SXFTD_N_OCCURRENCES_ENTRY,  "changed",      sxftd_update_excal_adapt },
 
-      { SXFTD_OK_BUTTON,       "clicked", sxftd_ok_clicked },
-      { SXFTD_ADVANCED_BUTTON, "clicked", sxftd_advanced_clicked },
-      { SXFTD_CANCEL_BUTTON,   "clicked", sxftd_cancel_clicked },
-
       { NULL,                  NULL,      NULL }
     };
   
@@ -153,10 +151,14 @@
   {
     w = glade_xml_get_widget(sxfti->gxml, callbacks[i].name);
     
-    gtk_signal_connect( GTK_OBJECT(w), callbacks[i].signal, 
-			GTK_SIGNAL_FUNC(callbacks[i].handlerFn),
-			sxfti );
+    g_signal_connect (GTK_OBJECT(w), callbacks[i].signal, 
+		      G_CALLBACK(callbacks[i].handlerFn),
+		      sxfti );
   }
+
+  g_signal_connect (G_OBJECT(sxfti->dialog), "response",
+                    G_CALLBACK (gnc_sx_trans_window_response_cb), 
+                    sxfti);
 }
   
 
@@ -171,15 +173,13 @@
   retval.n_occurrences = 0;
 
   w = glade_xml_get_widget(sxfti->gxml, SXFTD_NEVER_END_BUTTON);
-  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w)))
-  {
+  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w))) {
     retval.type = NEVER_END;
     return retval;
   }
   
   w = glade_xml_get_widget(sxfti->gxml, SXFTD_END_ON_DATE_BUTTON);
-  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w)))
-  {
+  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w))) {
     time_t end_tt;
     retval.type = END_ON_DATE;
     g_date_clear( &(retval.end_date), 1 );
@@ -189,8 +189,7 @@
   }
     
   w = glade_xml_get_widget(sxfti->gxml, SXFTD_N_OCCURRENCES_BUTTON);
-  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w) ))
-  {
+  if(gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(w) )) {
     gchar *text, *endptr;
     guint n_occs;
     w = glade_xml_get_widget(sxfti->gxml, SXFTD_N_OCCURRENCES_ENTRY);
@@ -200,9 +199,10 @@
     if ( !endptr ) {
       n_occs = -1;
     }
+
     g_free(text);
-    if(n_occs > 0)
-    {
+
+    if(n_occs > 0) {
       retval.type = END_AFTER_N_OCCS;
       retval.n_occurrences = n_occs;
       return retval;
@@ -233,8 +233,7 @@
   gnc_ttinfo_set_num(tti, xaccTransGetNum(tr));
   gnc_ttinfo_set_currency(tti, xaccTransGetCurrency(tr));
 
-  for(splits = xaccTransGetSplitList(tr); splits; splits = splits->next)
-  {
+  for(splits = xaccTransGetSplitList(tr); splits; splits = splits->next) {
     sp = splits->data;
     ttsi = gnc_ttsplitinfo_malloc();
     gnc_ttsplitinfo_set_action(ttsi, xaccSplitGetAction(sp));
@@ -244,14 +243,12 @@
     runningBalance = gnc_numeric_add( runningBalance, split_value,
                                       100, (GNC_DENOM_AUTO | GNC_DENOM_LCD) );
 
-    if(gnc_numeric_positive_p(split_value))
-    {
+    if(gnc_numeric_positive_p(split_value)) {
             tmpStr = xaccPrintAmount( split_value,
                                       gnc_default_print_info(FALSE) );
             gnc_ttsplitinfo_set_debit_formula( ttsi, tmpStr );
     }
-    else
-    {
+    else {
             /* Negate the numeric so it prints w/o the sign at the front. */
             tmpStr = xaccPrintAmount( gnc_numeric_neg( split_value ),
                                       gnc_default_print_info(FALSE) );
@@ -443,12 +440,13 @@
 			   SXFTD_FREQ_OPTION_MENU);
   gnc_option_menu_init(w);
   w = gtk_option_menu_get_menu( GTK_OPTION_MENU(w) );
-  gtk_signal_connect( GTK_OBJECT(w), "selection-done",
-                      GTK_SIGNAL_FUNC(sxftd_freq_option_changed),
-                      sxfti );
-  gtk_signal_connect( GTK_OBJECT(w), "destroy",
-                      GTK_SIGNAL_FUNC(sxftd_destroy),
-                      sxfti );
+  g_signal_connect( GTK_OBJECT(w), "selection-done",
+                    G_CALLBACK(sxftd_freq_option_changed),
+                    sxfti );
+
+  g_signal_connect( GTK_OBJECT(w), "destroy",
+                    G_CALLBACK(sxftd_destroy),
+                    sxfti );
 
   sxftd_update_example_cal( sxfti );
   
@@ -479,8 +477,7 @@
  
   fs = xaccFreqSpecMalloc(gnc_get_current_book ());
   sxftd_update_fs( sxfti, &date, fs );
-  if (sxftd_errno == 0)
-  {
+  if (sxftd_errno == 0) {
     xaccSchedXactionSetFreqSpec( sx, fs);
     xaccSchedXactionSetStartDate( sx, &date );
   }
@@ -514,68 +511,52 @@
     gint daysInAdvance;
 
     autoCreateState =
-      gnc_lookup_boolean_option( SX_OPT_STR,
-                                 "Auto-Create new Scheduled "
-                                 "Transactions by default", FALSE );
+      gnc_gconf_get_bool( SXED_GCONF_SECTION, KEY_CREATE_AUTO, NULL );
     notifyState =
-      gnc_lookup_boolean_option( SX_OPT_STR,
-                                 "Notify on new, auto-created "
-                                 "Scheduled Transactions", FALSE );
+      gnc_gconf_get_bool( SXED_GCONF_SECTION, KEY_NOTIFY, NULL );
     xaccSchedXactionSetAutoCreate( sx,
                                    autoCreateState,
                                    (autoCreateState & notifyState) );
     
     daysInAdvance =
-      (int)gnc_lookup_number_option( SX_OPT_STR,
-                                     "Default number of days in "
-                                     "advance to create", 0 );
+      gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_CREATE_DAYS, NULL );
     xaccSchedXactionSetAdvanceCreation( sx, daysInAdvance );
 
     daysInAdvance =
-      (int)gnc_lookup_number_option( SX_OPT_STR,
-                                     "Default number of days in "
-                                     "advance to remind", 0 );
+      gnc_gconf_get_float( SXED_GCONF_SECTION, KEY_REMIND_DAYS, NULL );
     xaccSchedXactionSetAdvanceReminder( sx, daysInAdvance );
   }
 
-  if ( sxftd_add_template_trans( sxfti ) != 0 )
-  {
+  if ( sxftd_add_template_trans( sxfti ) != 0 ) {
           sxftd_errno = SXFTD_ERRNO_UNBALANCED_XACTION;
   }
 
   return sxftd_errno;
 }
 
-static
-void
+static void
 sxftd_close(SXFromTransInfo *sxfti, gboolean delete_sx)
 {
-  if ( sxfti->sx && delete_sx )
-  {
+  if ( sxfti->sx && delete_sx ) {
     xaccSchedXactionFree(sxfti->sx);
   }
   sxfti->sx = NULL;
 
-  gnome_dialog_close( GNOME_DIALOG(sxfti->dialog));
-
-  return;
+  gtk_widget_destroy (GTK_WIDGET (sxfti->dialog));
 }
 
 static void
-sxftd_ok_clicked(GtkWidget *w, gpointer user_data)
+sxftd_ok_clicked(SXFromTransInfo *sxfti)
 {
-  SXFromTransInfo *sxfti = user_data;
-  GNCBook *book;
+  QofBook *book;
   GList *sx_list;
   guint sx_error = sxftd_compute_sx(sxfti);
 
   if (sx_error != 0
-      && sx_error != SXFTD_ERRNO_UNBALANCED_XACTION)
-  {
+      && sx_error != SXFTD_ERRNO_UNBALANCED_XACTION) {
     PERR( "Error in sxftd_compute_sx after ok_clicked [%d]", sx_error );
   }
-  else
-  {
+  else {
     SchedXactionDialog *sxd;
 
     if ( sx_error == SXFTD_ERRNO_UNBALANCED_XACTION ) {
@@ -631,16 +612,8 @@
 }
 
 static void
-sxftd_cancel_clicked(GtkWidget *w, gpointer user_data)
+sxftd_advanced_clicked(SXFromTransInfo *sxfti)
 {
-  SXFromTransInfo *sxfti = user_data;
-  sxftd_close(sxfti, TRUE);
-}
-
-static void
-sxftd_advanced_clicked(GtkWidget *w, gpointer user_data)
-{
-  SXFromTransInfo *sxfti = user_data;
   guint sx_error = sxftd_compute_sx(sxfti);
   SchedXactionDialog *adv_dlg;
   SchedXactionEditorDialog *adv_edit_dlg;
@@ -667,46 +640,7 @@
   sxftd_close(sxfti, FALSE);
 }
 
-void
-gnc_sx_create_from_trans( Transaction *trans )
-{
-  int errno;
-  SXFromTransInfo *sxfti = g_new0( SXFromTransInfo, 1);
-
-  sxfti->gxml = gnc_glade_xml_new(SX_GLADE_FILE,
-				  SXFTD_DIALOG_GLADE_NAME);
-  
-  sxfti->dialog = glade_xml_get_widget(sxfti->gxml,
-				       SXFTD_DIALOG_GLADE_NAME);
-
-  sxfti->trans = trans;
-  
-  sxfti->sx = xaccSchedXactionMalloc(gnc_get_current_book ());
-
-  if ( (errno = sxftd_init( sxfti )) < 0 ) {
-          if ( errno == SXFTD_ERRNO_OPEN_XACTION )
-          {
-                  gnc_error_dialog( gnc_ui_get_toplevel(),
-                                    _( "Cannot create a Scheduled Transaction "
-                                       "from a Transaction currently\n"
-                                       "being edited. Please Enter the "
-                                       "Transaction before Scheduling." ) );
-                  sxftd_close( sxfti, TRUE );
-                  return;
-          }
-          else
-          {
-                  PERR( "Error in sxftd_init: %d", errno );
-          }
-  }
-
-  gtk_widget_show_all(sxfti->dialog);
-
-  return;
-}
-
-static
-void
+static void
 sxftd_destroy( GtkWidget *w, gpointer user_data )
 {
   int i;
@@ -727,12 +661,43 @@
   g_free(sxfti);
 }
 
+
+/**
+ *
+ **/
+static void
+gnc_sx_trans_window_response_cb (GtkDialog *dialog,
+                                gint response,
+                                gpointer data)
+{
+	SXFromTransInfo *sxfti = (SXFromTransInfo *)data;
+
+	ENTER(" dialog %p, response %d, sx %p", dialog, response, sxfti);
+        switch (response) {
+                case GTK_RESPONSE_OK:
+                        DEBUG(" OK");
+			sxftd_ok_clicked(sxfti);
+			break;
+		case SXFTD_RESPONSE_ADVANCED:
+			DEBUG(" ADVANCED");
+			sxftd_advanced_clicked(sxfti);
+			break;
+                case GTK_RESPONSE_CANCEL:
+                default:
+                        DEBUG(" CANCEL");
+			sxftd_close(sxfti, TRUE);
+                        break;
+
+	}
+	LEAVE(" ");
+}
+
+
 /**
  * Update the example calendar; make sure to take into account the end
  * specification.
  **/
-static
-void
+static void
 sxftd_update_example_cal( SXFromTransInfo *sxfti )
 {
   struct tm *tmpTm;
@@ -802,10 +767,52 @@
 }
 
 
-static
-void
-sxftd_update_excal_adapt( GtkObject *o, gpointer ud )
+/**
+ * Callback to update the calendar
+ **/
+static void
+sxftd_update_excal_adapt( GObject *o, gpointer ud )
 {
   SXFromTransInfo *sxfti = (SXFromTransInfo*)ud;
   sxftd_update_example_cal( sxfti );
 }
+
+
+/**
+ *
+ **/
+void
+gnc_sx_create_from_trans( Transaction *trans )
+{
+  int errno;
+  SXFromTransInfo *sxfti = g_new0( SXFromTransInfo, 1);
+
+  sxfti->gxml = gnc_glade_xml_new(SX_GLADE_FILE,
+				  SXFTD_DIALOG_GLADE_NAME);
+  
+  sxfti->dialog = glade_xml_get_widget(sxfti->gxml,
+				       SXFTD_DIALOG_GLADE_NAME);
+
+  sxfti->trans = trans;
+  
+  sxfti->sx = xaccSchedXactionMalloc(gnc_get_current_book ());
+
+  if ( (errno = sxftd_init( sxfti )) < 0 ) {
+          if ( errno == SXFTD_ERRNO_OPEN_XACTION )
+          {
+                  gnc_error_dialog( gnc_ui_get_toplevel(),
+                                    _( "Cannot create a Scheduled Transaction "
+                                       "from a Transaction currently\n"
+                                       "being edited. Please Enter the "
+                                       "Transaction before Scheduling." ) );
+                  sxftd_close( sxfti, TRUE );
+                  return;
+          }
+          else
+          {
+                  PERR( "Error in sxftd_init: %d", errno );
+          }
+  }
+
+  gtk_widget_show_all(GTK_WIDGET(sxfti->dialog));
+}
--- src/gnome/tip-of-the-day.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/********************************************************************\
- * dialog-totd.h : C wrappers around Scheme "tip of the day" fns    *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.net>               *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef SCM_TIP_OF_THE_DAY_H
-#define SCM_TIP_OF_THE_DAY_H
-
-char * gnc_get_current_tip(void);
-void   gnc_increment_tip(void);
-void   gnc_decrement_tip(void);
-
-#endif
--- src/gnome/gnc-network.c
+++ /dev/null
@@ -1,660 +0,0 @@
-/********************************************************************
- * gnc-network.c -- handlers for forms and objects relevant to      *
- * GnuCash Network functions                                        *
- * Copyright (C) 2001 Bill Gribble <grib at billgribble.com>           *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-#include <gtkhtml/gtkhtml.h>
-#include <gtkhtml/gtkhtml-embedded.h>
-
-#include "global-options.h"
-#include "gnc-ui.h"
-#include "gnc-gpg.h"
-#include "gnc-gui-query.h"
-#include "gnc-html.h"
-#include "gnc-network.h"
-#include "messages.h"
-
-/********************************************************************
- *  THIS IS PRIVACY-SENSITIVE CODE.  The actions handled here are run
- *  when gnucash needs to send HTML form information to a web server
- *  (the "GnuCash Network") and can modify the information being sent
- *  or send additional information.
- * 
- *  Don't panic; all that means is that when an HTML form is loaded
- *  into the Gnucash HTML browser, after the user clicks the "submit"
- *  button, if the "action" in the form definition looks like
- *  "gnc-action:ACTION-NAME?ACTION-ARGS", the action-name is used to
- *  find a handler and the form is submitted by that handler.  The
- *  only web server that will have such forms will be the GnuCash
- *  Network server.  Even if other hosts try to fool gnucash with
- *  GnuCash Network submit actions, we will only ever submit to the
- *  user's specified GnuCash Network server.
- * 
- *  Users: keep in mind that this is *not* a mechanism for executing
- *  arbitrary code in your gnucash; the only "actions" that can be
- *  taken must be compiled into the client, and you can disable them
- *  globally with a Preferences option ("Enable GnuCash Network"). 
- * 
- *  Developers: Until we have a formally-codified privacy policy,
- *  please follow these guidelines:
- * 
- *  1. When actions send information that the user has not explicitly
- *  entered, there should *always* be a dialog or other notification,
- *  including the extra information to be sent, with an opportunity to
- *  bail out.  A server-side confirmation is probably enough, but
- *  client-side confirm is better.
- * 
- *  2. Do not accept a complete URI to submit to as an argument to
- *  actions.  This might allow a malicious server to ask the gnucash
- *  client for private information to be sent to itself, if the user
- *  happened to go to that site from within the gnucash HTML browser
- *  and click a form "SUBMIT" button.  Always use the "GnuCash Network 
- *  server" from the global preferences option. 
- ********************************************************************/
-
-static char * session_id = NULL;
-static char * gnc_passphrase = NULL;
-
-static int 
-gnc_network_get_handler(gnc_html * html, 
-                        const char * method, const char * action, 
-                        GHashTable * formdata);
-static int 
-gnc_network_make_keypair_handler(gnc_html * html, 
-                                 GtkHTMLEmbedded * eb, 
-                                 gpointer data);
-
-/********************************************************************
- * gnc_network_get/set_session_id
- ********************************************************************/
-
-char *
-gnc_network_get_session_id(void) {
-  return session_id;
-}
-
-void
-gnc_network_set_session_id(char * sid) {
-  if(session_id) {
-    g_free(session_id);
-  }
-  session_id = g_strdup(sid);
-}
-
-char * 
-gnc_network_get_uid(void) {
-  SCM val = gnc_lookup_option("__gnc_network", "uid", scm_makfrom0str("0"));
-  if(val != SCM_BOOL_F) {
-    return gh_scm2newstr(val, NULL);
-  }
-  else {
-    return strdup("");
-  }
-}
-
-/********************************************************************
- * gnc_network_build_url
- * build a full URL given the action 
- ********************************************************************/
-
-char * 
-gnc_network_build_url(const char * action) {
-  char * server = 
-    gnc_lookup_string_option("Network", "GnuCash Network server",
-                             "www.gnucash.org");
-  char * retval = g_strconcat("http://", server, "/", action, NULL);
-  g_free(server);
-  return retval;
-}
-
-
-/********************************************************************
- * gnc_network_get/free_passphrase 
- ********************************************************************/
-
-static void 
-get_pp_string_cb(char * string, gpointer data) {
-  if(!data) return;
-  if(!string) {
-    *((char **)data) = NULL;
-  }
-  else {
-    *((char **)data) = g_strdup(string);    
-  }
-}
-
-char * 
-gnc_network_ask_passphrase(const char * prompt) {
-  char      * pp = NULL;
-  gint      retval;
-  GtkWidget * dlg = 
-    gnome_request_dialog(TRUE, prompt, "", 1024,
-                         get_pp_string_cb, (gpointer)&pp, NULL);
-  retval = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
-  if(retval == 0) {
-    return pp;
-  }
-  else {
-    return NULL;
-  }
-}
-
-char * 
-gnc_network_get_passphrase(void) {
-  if(gnc_passphrase) return gnc_passphrase;
-  else {
-    gnc_passphrase = 
-      gnc_network_ask_passphrase(_("Enter GnuCash Network passphrase:"));
-    return gnc_passphrase;
-  }
-}
-
-
-/********************************************************************
- * gnc_network_auth_handler
- * <object classid="gnc-network-auth"> handler.  Sets the gnc-network
- * session ID from the encrypted "data" of the object. 
- ********************************************************************/
-
-struct network_crypt_info {
-  gnc_html * html;
-  char     * cryptext;
-  char     * cleartext;
-  char     * url;
-  char     * passphrase;
-  int      state;
-};
-
-static void
-gnc_network_auth_crypt_cb(char * cleartext, gpointer data) {
-  struct network_crypt_info * na = data;
-  na->cleartext = cleartext;
-  na->state     = 2;
-}
-
-static gboolean
-gnc_network_auth_check(gpointer data) {
-  struct network_crypt_info * na = data;
-
-  switch(na->state) {
-  case 0:
-    /* get pp and start decryption */
-    na->passphrase = gnc_network_get_passphrase();
-    na->cleartext  = NULL;
-    na->state      = 1;
-    gnc_gpg_decrypt_async(na->cryptext, strlen(na->cryptext), na->passphrase,
-                          gnc_network_auth_crypt_cb, na);
-    return TRUE;
-    break;
-
-  case 1: 
-    /* waiting for decryption */
-    return TRUE;
-    break;
-
-  case 2:
-    /* done.. take action */
-    if(na->cleartext && (strlen(na->cleartext) > 0)) {
-      gnc_network_set_session_id(na->cleartext);
-      gnc_html_show_url(na->html, URL_TYPE_ACTION, na->url, NULL, 0);
-    }
-    else {
-      gnc_warning_dialog(NULL, _("GnuCash Network authorization failed."));      
-      gnc_passphrase = NULL;
-    }
-    /* clean up */ 
-    g_free(na->cryptext);
-    g_free(na->cleartext);
-    g_free(na->url);
-    g_free(na);
-    return FALSE;
-  }
-
-  return TRUE;
-}
-
-
-static int
-gnc_network_auth_handler(gnc_html * html, GtkHTMLEmbedded * eb, 
-                         gpointer data) {
-  struct network_crypt_info * na = g_new0(struct network_crypt_info, 1);
-  
-  na->html      = html;
-  na->cryptext  = gnc_html_unescape_newlines(eb->data);
-  na->cleartext = NULL;
-  na->url       = g_strdup(g_hash_table_lookup(eb->params, "url")); 
-  na->state     = 0;
-
-  gtk_timeout_add(100, gnc_network_auth_check, na);
- 
-  return TRUE;
-}
-  
-
-/********************************************************************
- * gnc_network_crypt_handler : receives ascii-armored GPG
- * cryptext, decrypts it, and displays the result as HTML.
- ********************************************************************/
-
-static gboolean
-gnc_network_crypt_check(gpointer data) {
-  struct network_crypt_info * na = data;
-
-  switch(na->state) {
-  case 0:
-    /* get pp and start decryption */
-    na->passphrase = gnc_network_get_passphrase();
-    na->cleartext  = NULL;
-    na->state      = 1;
-    gnc_gpg_decrypt_async(na->cryptext, strlen(na->cryptext), na->passphrase,
-                          gnc_network_auth_crypt_cb, na);
-    return TRUE;
-    break;
-
-  case 1: 
-    /* waiting for decryption */
-    return TRUE;
-    break;
-
-  case 2:
-    if(na->cleartext && (strlen(na->cleartext) > 0)) {
-      gnc_html_show_data(na->html, na->cleartext, strlen(na->cleartext));
-    }
-      
-    /* clean up */ 
-    g_free(na->cryptext);
-    g_free(na->cleartext);
-    g_free(na->url);
-    g_free(na);
-    return FALSE;
-  }
-  return TRUE;
-}
-
-static int
-gnc_network_crypt_handler(gnc_html * html, GtkHTMLEmbedded * eb, 
-                          gpointer data) {
-  struct network_crypt_info * na = g_new0(struct network_crypt_info, 1);
-  
-  na->html      = html;
-  na->cryptext  = gnc_html_unescape_newlines(eb->data);
-  na->cleartext = NULL;
-  na->url       = g_strdup(g_hash_table_lookup(eb->params, "url")); 
-  na->state     = 0;
-  
-  gtk_timeout_add(100, gnc_network_crypt_check, na);
-  
-  return TRUE;
-}
-  
-
-/********************************************************************
- * gnc_make_keypair_handler : queries for a passphrase and
- * generates a keypair in the local keyring
- ********************************************************************/
-
-struct make_keypair_info {
-  gnc_html * html;
-  GtkHTMLEmbedded * eb;
-  int  state;
-  char * username;
-  char * uid;
-  char * email;
-  char * passphrase;
-  char * next_action;
-  char * cancel_action;
-};
-
-
-static void
-gnc_network_free_make_keypair_info(struct make_keypair_info * mk) {
-  g_free(mk->username);
-  g_free(mk->email);
-  g_free(mk->uid);
-  g_free(mk->passphrase);
-  g_free(mk->cancel_action);
-  g_free(mk->next_action);
-  g_free(mk);
-}
-
-static void
-gnc_network_make_keypair_cb(char * output, gpointer data) {
-  struct make_keypair_info * mk = data;
-  mk->state = 3;
-}
-
-static gboolean
-gnc_network_make_keypair_check(gpointer data) {
-  struct make_keypair_info * mk = data;
-  char       * verify_pp = NULL;
-  GHashTable * fd = NULL; 
-
-  switch(mk->state) {
-  case 0:
-    /* start: get first passphrase */ 
-    mk->passphrase = gnc_network_ask_passphrase(_("Enter passphrase:"));
-    
-    if(mk->passphrase) {
-      mk->state = 1;
-      return TRUE;
-    }
-    else {
-      mk->state = 4;
-      return TRUE;
-    }
-    break;
-
-  case 1:
-    /* get another and check for equality */ 
-    verify_pp = gnc_network_ask_passphrase(_("Verify passphrase:"));
-    
-    if(verify_pp) {
-      if(!strcmp(mk->passphrase, verify_pp)) {
-        gnc_gpg_make_keypair_async(mk->username, mk->uid, mk->email, 
-                                   mk->passphrase, 
-                                   gnc_network_make_keypair_cb, mk);
-        mk->state = 2;
-        return TRUE;
-      }
-      else {
-        gnc_error_dialog(_("Passphrases did not match."));
-        gnc_network_make_keypair_handler(mk->html, mk->eb, data);
-        gnc_network_free_make_keypair_info(mk);
-        return FALSE;
-      }      
-    }
-    else {
-      mk->state = 4;
-      return TRUE;
-    }
-    break;
-    
-  case 2:
-    /* waiting for GPG to finish */ 
-    return TRUE;
-    
-  case 3:
-    /* GPG is done making the key pair */ 
-    fd = g_hash_table_new(g_str_hash, g_str_equal);      
-    g_hash_table_insert(fd, g_strdup("uid"), mk->uid);
-    g_hash_table_insert(fd, g_strdup("url"), mk->next_action);
-    gnc_network_get_handler(mk->html, "get", "get", fd);
-    gnc_html_free_form_data(fd);
-    mk->uid = NULL;
-    mk->next_action = NULL;
-    gnc_network_free_make_keypair_info(mk);
-    return FALSE;
-    
-  case 4:
-    /* cancel of passphrase get dialog */ 
-    fd = g_hash_table_new(g_str_hash, g_str_equal);
-    g_hash_table_insert(fd, g_strdup("url"), mk->cancel_action); 
-    gnc_network_get_handler(mk->html, "get", "get", fd);
-    gnc_html_free_form_data(fd);
-    mk->cancel_action = NULL;
-    gnc_network_free_make_keypair_info(mk);
-    return FALSE;
-  }
-  return TRUE;
-}
-
-static int 
-gnc_network_make_keypair_handler(gnc_html * html, GtkHTMLEmbedded * eb, 
-                                 gpointer data) {
-  struct make_keypair_info * mk = g_new0(struct make_keypair_info, 1);
-  mk->html     = html;
-  mk->eb       = eb;
-  mk->username = g_strdup(g_hash_table_lookup(eb->params, "username"));
-  mk->uid      = g_strdup(g_hash_table_lookup(eb->params, "uid"));
-  mk->email    = g_strdup(g_hash_table_lookup(eb->params, "email"));
-  mk->next_action   = 
-    g_strdup(g_hash_table_lookup(eb->params, "next-action"));
-  mk->cancel_action = 
-    g_strdup(g_hash_table_lookup(eb->params, "cancel-action"));
-  mk->passphrase = NULL;
-  mk->state    = 0;
-
-  gtk_timeout_add(100, gnc_network_make_keypair_check, mk);
-  
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_store_uid_handler : store a new GnuCash Network user id
- * (uid) locally.
- ********************************************************************/
-
-static int
-gnc_network_store_uid_handler(gnc_html * html, GtkHTMLEmbedded * eb, 
-                              gpointer data) {
-  char * uid = g_hash_table_lookup(eb->params, "uid");
-  gnc_set_option("__gnc_network", "uid", scm_makfrom0str(uid));
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_get_with_auth_handler() fetch a gnucash network page
- * with an authorizing session ID.  This either uses the current
- * session key or gets a new one if the session_id is null or expired.
- ********************************************************************/
-
-static int
-gnc_network_get_with_auth_handler(gnc_html * html, 
-                                  const char * method, const char * action,
-                                  GHashTable * form_data) {
-  char * new_action = 
-    gnc_network_build_url("gnc-network-auth.php");
-
-  if(!g_hash_table_lookup(form_data, "submit")) {
-    g_hash_table_insert(form_data, g_strdup("submit"), 
-                        g_strdup("gtkhtml-bug"));
-  }
-
-  g_hash_table_insert(form_data, g_strdup("sid"), 
-                      g_strdup(gnc_network_get_session_id()));
-  g_hash_table_insert(form_data, g_strdup("uid"), 
-                      g_strdup(gnc_network_get_uid()));
-  g_hash_table_insert(form_data, g_strdup("gnc_browser"),
-                      g_strdup("true"));
-  
-  if(!strcasecmp(method, "get")) {
-    gnc_html_generic_get_submit(html, new_action, form_data);              
-  }
-  else {
-    gnc_html_generic_post_submit(html, new_action, form_data);              
-  }
-  g_free(new_action);
-  
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_get_handler
- * generic unauthorized 'get' for gnc-network server
- ********************************************************************/
-
-static int
-gnc_network_get_handler(gnc_html * html, 
-                        const char * method, const char * action, 
-                        GHashTable * form_data) {
-  char * new_action = 
-    gnc_network_build_url("gnc-network-get.php");
-  
-  if(!g_hash_table_lookup(form_data, "submit")) {
-    g_hash_table_insert(form_data, g_strdup("submit"), 
-                        g_strdup("gtkhtml-bug"));
-  }
-
-  g_hash_table_insert(form_data, g_strdup("uid"),
-                      g_strdup(gnc_network_get_uid()));
-  g_hash_table_insert(form_data, g_strdup("gnc_browser"),
-                      g_strdup("true"));
-  
-  /* gnc_html_merge_form_data(form_data, act_args); */
-  if(!strcasecmp(method, "get")) {
-    gnc_html_generic_get_submit(html, new_action, form_data);              
-  }
-  else {
-    gnc_html_generic_post_submit(html, new_action, form_data);              
-  }
-  g_free(new_action);
-  
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_send_info_handler() : submit the form arguments
- * from 'encoding', appending additional arguments describing the
- * gnucash client: gnucash version string and some features.
- ********************************************************************/
-
-static int
-gnc_network_send_info_handler(gnc_html * html, 
-                              const char * method, const char * action, 
-                              GHashTable * form_data) {
-  char * new_action = NULL;
-  char * version_string = NULL;
-  char * feature_string = NULL;
-  
-  if(!g_hash_table_lookup(form_data, "submit")) {
-    g_hash_table_insert(form_data, g_strdup("submit"), 
-                        g_strdup("gtkhtml-bug"));
-  }
-  
-  if(!method || !action 
-     || strcmp(action, "get/info")) {
-    return FALSE;
-  }
-  
-  version_string  = gh_scm2newstr(scm_c_eval_string("gnc:version"), NULL);  
-
-  feature_string = 
-    g_strjoin(",",
-#if USE_GUPPI
-              "guppi",
-#endif
-              "gpg",
-#if HAVE_OPENSSL
-              "openssl",
-#endif
-              NULL);
-
-  g_hash_table_insert(form_data, g_strdup("gnc_browser"), g_strdup("true"));
-  g_hash_table_insert(form_data, g_strdup("gnc_version"), 
-                      g_strdup(version_string));
-  g_hash_table_insert(form_data, g_strdup("gnc_features"), 
-                      feature_string);
-  free(version_string);
-
-  new_action = gnc_network_build_url("gnc-network-get.php");
-  
-  if(!strcasecmp(method, "get")) {
-    gnc_html_generic_get_submit(html, new_action, form_data);
-  }
-  else {
-    gnc_html_generic_post_submit(html, new_action, form_data);
-  }    
-  
-  g_free(new_action);
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_send_pubkey_handler : send the public key as a multipart
- * POST submit
- ********************************************************************/
-
-static int
-gnc_network_submit_key_handler(gnc_html * html, 
-                               const char * method, const char * action,
-                               GHashTable * form_data) {
-  char * keyid = g_hash_table_lookup(form_data, "uid");
-  char * submit = g_hash_table_lookup(form_data, "submit");     
-  char * keytext = NULL;
-  char * new_action = 
-    gnc_network_build_url("gnc-network-get.php");
-  
-  if(!g_hash_table_lookup(form_data, "submit")) {
-    g_hash_table_insert(form_data, g_strdup("submit"), 
-                        g_strdup("gtkhtml-bug"));
-  }
-  g_hash_table_insert(form_data, g_strdup("gnc_browser"), g_strdup("true"));
-
-  if(!submit || !strcmp(submit, "OK")) {
-    /* get the public key */
-    if(keyid) {
-      keytext = gnc_gpg_export(keyid);
-    }
-    
-    /* stick it in the form data */
-    g_hash_table_insert(form_data, g_strdup("pubkey"), keytext);
-    
-    /* submit as a multipart form */
-    gnc_html_multipart_post_submit(html, new_action, form_data);
-  }
-  else {
-    /* don't export the pubkey, just submit as is. */
-    gnc_html_generic_post_submit(html, new_action, form_data);
-  }
-  g_free(new_action);
-  return TRUE;
-}
-
-
-/********************************************************************
- * gnc_network_init() 
- * set up GnuCash Network handlers 
- ********************************************************************/
-
-void  
-gnc_network_init(void) {
-  /* <object> handlers */
-  gnc_html_register_object_handler("gnc-network-auth",
-                                   gnc_network_auth_handler);
-  gnc_html_register_object_handler("gnc-network-crypt",
-                                   gnc_network_crypt_handler);
-  gnc_html_register_object_handler("gnc-make-keypair",
-                                   gnc_network_make_keypair_handler);
-  gnc_html_register_object_handler("gnc-store-uid",
-                                   gnc_network_store_uid_handler);
-
-  /* <form> and gnc-action: handlers */ 
-  gnc_html_register_action_handler("get", 
-                                   gnc_network_get_handler);
-  gnc_html_register_action_handler("get/auth", 
-                                   gnc_network_get_with_auth_handler);
-  gnc_html_register_action_handler("get/info", 
-                                   gnc_network_send_info_handler);
-  gnc_html_register_action_handler("submit-key",
-                                   gnc_network_submit_key_handler); 
-}
-
-
-
-
Index: druid-loan.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-loan.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/gnome/druid-loan.c -Lsrc/gnome/druid-loan.c -u -r1.24 -r1.25
--- src/gnome/druid-loan.c
+++ src/gnome/druid-loan.c
@@ -37,22 +37,22 @@
 #include "SX-book.h"
 #include "SX-book-p.h"
 #include "SX-ttinfo.h"
+#include "druid-utils.h"
 #include "gnc-book.h"
 #include "gnc-amount-edit.h"
 #include "gnc-account-sel.h"
 #include "gnc-date.h"
 #include "gnc-exp-parser.h"
 #include "gnc-component-manager.h"
-#include "global-options.h"
 #include "dialog-utils.h"
 #include "Account.h"
 #include "FreqSpec.h"
 #include "gnc-ui.h"
-#include "gnc-helpers.h"
+#include "gnc-gdate-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-frequency.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #define DIALOG_LOAN_DRUID_CM_CLASS "druid-loan-setup"
 
@@ -63,7 +63,6 @@
 #define PG_INTRO "loan_intro_pg"
 #define PG_INFO "loan_info_pg"
 #  define PARAM_TABLE      "param_table"
-#  define ORIG_PRINC_GNE   "orig_princ_gne"
 #  define ORIG_PRINC_ENTRY "orig_princ_ent"
 #  define IRATE_SPIN       "irate_spin"
 #  define VAR_CONTAINER    "type_freq_frame"
@@ -81,7 +80,6 @@
 #  define FREQ_CONTAINER "freq_frame"
 #define PG_PAYMENT "payment_pg"
 #  define PAY_TXN_TITLE      "pay_txn_title"
-#  define PAY_AMT_GNE        "pay_amt_gne"
 #  define PAY_AMT_ENTRY      "pay_amt_ent"
 #  define PAY_TABLE          "pay_table"
 #  define PAY_USE_ESCROW     "pay_use_escrow"
@@ -97,6 +95,7 @@
 #  define REV_DATE_FRAME     "rev_date_frame"
 #  define REV_RANGE_OPT      "rev_range_opt"
 #  define REV_RANGE_TABLE    "rev_date_range_table"
+#define PG_COMMIT "commit_pg"
 
 #define OPT_VBOX_SPACING 2
 
@@ -107,7 +106,7 @@
         CUSTOM
 } REV_RANGE_OPTS;
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /**
  * TODO/fixme:
@@ -279,7 +278,6 @@
 
         /* pay = payment[s] */
         GtkEntry         *payTxnName;
-        GnomeNumberEntry *payAmtGNE;
         GtkEntry         *payAmtEntry;
         GNCAccountSel    *payAcctFromGAS;
         GNCAccountSel    *payAcctEscToGAS;
@@ -388,7 +386,10 @@
 static gboolean ld_rev_next ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
 static void     ld_rev_prep ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
 static gboolean ld_rev_back ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
-static void     ld_rev_fin  ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
+static gboolean ld_com_next ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
+static void     ld_com_prep ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
+static gboolean ld_com_back ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
+static void     ld_com_fin  ( GnomeDruidPage *gdp, gpointer arg1, gpointer ud );
 
 static void ld_create_sxes( LoanDruidData *ldd );
 static gint ld_find_ttsplit_with_acct( gconstpointer elt,
@@ -410,6 +411,7 @@
         ldd->dialog = glade_xml_get_widget( ldd->gxml, LOAN_DRUID_WIN_GLADE_NAME );
         ldd->druid  = GNOME_DRUID(glade_xml_get_widget( ldd->gxml,
                                                         LOAN_DRUID_GLADE_NAME ));
+	gnc_druid_set_colors (ldd->druid);
 
         /* get pointers to the various widgets */
         gnc_loan_druid_get_widgets( ldd );
@@ -741,7 +743,8 @@
                         { PG_OPTS,      ld_opts_tran, ld_opts_prep, ld_opts_tran, NULL },
                         { PG_REPAYMENT, ld_rep_next,  ld_rep_prep,  ld_rep_back,  NULL },
                         { PG_PAYMENT,   ld_pay_next,  ld_pay_prep,  ld_pay_back,  NULL },
-                        { PG_REVIEW,    ld_rev_next,  ld_rev_prep,  ld_rev_back,  ld_rev_fin },
+                        { PG_REVIEW,    ld_rev_next,  ld_rev_prep,  ld_rev_back,  NULL },
+                        { PG_COMMIT,    ld_com_next,  ld_com_prep,  ld_com_back,  ld_com_fin },
                         { NULL }
                 };
 
@@ -897,8 +900,6 @@
         /* pay = payment[s] */
         ldd->payTxnName =
                 GET_CASTED_WIDGET( GTK_ENTRY,          PAY_TXN_TITLE );
-        ldd->payAmtGNE =
-                GET_CASTED_WIDGET( GNOME_NUMBER_ENTRY, PAY_AMT_GNE );
         ldd->payAmtEntry =
                 GET_CASTED_WIDGET( GTK_ENTRY,          PAY_AMT_ENTRY );
         ldd->payTable =
@@ -1739,7 +1740,13 @@
 gboolean
 ld_rev_next( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
 {
-        g_assert( FALSE );
+        LoanDruidData *ldd;
+
+        ldd = (LoanDruidData*)ud;
+        gnome_druid_set_page( ldd->druid,
+                              GNOME_DRUID_PAGE(
+                                      glade_xml_get_widget( ldd->gxml,
+                                                            PG_COMMIT ) ) );
         return TRUE;
 }
 
@@ -1754,7 +1761,6 @@
         int i;
 
         ldd = (LoanDruidData*)ud;
-        gnome_druid_set_show_finish( ldd->druid, TRUE );
 
         /* Cleanup old clist */
         if ( ldd->revCL != NULL ) {
@@ -1830,8 +1836,6 @@
         LoanDruidData *ldd = (LoanDruidData*)ud;
         int i;
 
-        gnome_druid_set_show_finish( ldd->druid, FALSE );
-
         /* Get the correct page based on the repayment state. */
         /* go back through opts list and select next enabled options. */
         for ( i = ldd->currentIdx;
@@ -1854,8 +1858,34 @@
 }
 
 static
+gboolean
+ld_com_next( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
+{
+        g_assert( FALSE );
+        return TRUE;
+}
+
+static
+void
+ld_com_prep( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
+{
+}
+
+static
+gboolean
+ld_com_back( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
+{
+        LoanDruidData *ldd = (LoanDruidData*)ud;
+        gnome_druid_set_page( ldd->druid,
+                              GNOME_DRUID_PAGE(
+                                      glade_xml_get_widget( ldd->gxml,
+                                                            PG_REVIEW ) ) );
+        return TRUE;
+}
+
+static
 void
-ld_rev_fin( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
+ld_com_fin( GnomeDruidPage *gdp, gpointer arg1, gpointer ud )
 {
         LoanDruidData *ldd = (LoanDruidData*)ud;
         ld_create_sxes( ldd );
@@ -2804,7 +2834,7 @@
                 if ( g_date_compare( &rrr->date, end ) > 0 )
                         continue; /* though we can probably return, too. */
 
-                printGDate( tmpBuf, &rrr->date );
+                qof_print_gdate( tmpBuf, MAX_DATE_LENGTH, &rrr->date );
                 rowText[0] = g_strdup( tmpBuf );
 
                 for ( i=0; i<ldd->ld.revNumPmts; i++ )
Index: window-reconcile.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-reconcile.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -Lsrc/gnome/window-reconcile.c -Lsrc/gnome/window-reconcile.c -u -r1.111 -r1.112
--- src/gnome/window-reconcile.c
+++ src/gnome/window-reconcile.c
@@ -41,22 +41,23 @@
 #include "dialog-transfer.h"
 #include "dialog-utils.h"
 #include "dialog-transfer.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-component-manager.h"
 #include "gnc-date.h"
 #include "gnc-date-edit.h"
 #include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ledger-display.h"
+#include "gnc-main-window.h"
+#include "gnc-plugin-page.h"
+#include "gnc-plugin-page-register.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "guile-util.h"
 #include "messages.h"
 #include "reconcile-list.h"
-#include "window-help.h"
 #include "window-reconcile.h"
-#include "window-register.h"
 #include "top-level.h"
 
 #define WINDOW_RECONCILE_CM_CLASS "window-reconcile"
@@ -74,7 +75,8 @@
   GtkWidget *window;        /* The reconcile window                 */
 
   GtkWidget *toolbar;       /* Toolbar widget                       */
-  SCM toolbar_change_cb_id; /* id for toolbar preference change cb  */
+  gint toolbar_change_cb_id;  /* id for toolbar preference change cb  */
+  gint toolbar_change_cb_id2; /* id for toolbar preference change cb  */
 
   GtkWidget *starting;      /* The starting balance                 */
   GtkWidget *ending;        /* The ending balance                   */
@@ -90,8 +92,6 @@
   GtkWidget *debit_frame;   /* Frame around debit matrix            */
   GtkWidget *credit_frame;  /* Frame around credit matrix           */
 
-  SCM title_change_cb_id;   /* id for label preference cb           */
-
   GtkWidget *edit_item;     /* Edit transaction menu item           */
   GtkWidget *delete_item;   /* Delete transaction menu item         */
 
@@ -154,6 +154,9 @@
 static void   recnPostponeCB (GtkWidget *w, gpointer data);
 static void   recnCancelCB (GtkWidget *w, gpointer data);
 
+void gnc_start_recn_children_changed (GtkWidget *widget, startRecnWindowData *data);
+void gnc_start_recn_interest_clicked_cb(GtkButton *button, startRecnWindowData *data);
+
 static void   gnc_reconcile_window_set_sensitivity(RecnWindow *recnData);
 static char * gnc_recn_make_window_name(Account *account);
 static void   gnc_recn_set_window_name(RecnWindow *recnData);
@@ -339,7 +342,7 @@
                               new_balance);
 }
 
-static void
+void
 gnc_start_recn_children_changed (GtkWidget *widget, startRecnWindowData *data)
 {
   data->include_children =
@@ -357,10 +360,11 @@
 static gboolean
 gnc_recn_interest_xfer_get_auto_interest_xfer_allowed( Account *account )
 {
-  return( xaccAccountGetAutoInterestXfer( account,
-               gnc_lookup_boolean_option( "Reconcile",
-                                          "Automatic interest transfer",
-                                          FALSE ) ) );
+  gboolean auto_xfer;
+
+  auto_xfer = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				 "auto_interest_transfer", NULL);
+  return xaccAccountGetAutoInterestXfer( account, auto_xfer );
 }
 
 /********************************************************************\
@@ -441,8 +445,8 @@
 
 
   /* change frame labels */
-  gnc_xfer_dialog_set_information_frame_label( data->xferData,
-                                               _("Payment Information") );
+  gnc_xfer_dialog_set_information_label( data->xferData,
+					 _("Payment Information") );
 
   /* Interest accrued is a transaction from an income account
    * to a bank account.  Interest charged is a transaction from
@@ -451,12 +455,12 @@
    */
   if( account_type_has_auto_interest_payment( data->account_type ) )
   {
-    gnc_xfer_dialog_set_from_account_frame_label( data->xferData,
-                                                  _("Payment From") );
+    gnc_xfer_dialog_set_from_account_label( data->xferData,
+		    			    _("Payment From") );
     gnc_xfer_dialog_set_from_show_button_active( data->xferData, TRUE );
 
-    gnc_xfer_dialog_set_to_account_frame_label( data->xferData,
-                                                _("Reconcile Account") );
+    gnc_xfer_dialog_set_to_account_label( data->xferData,
+		    			  _("Reconcile Account") );
     gnc_xfer_dialog_select_to_account( data->xferData, data->account );
     gnc_xfer_dialog_lock_to_account_tree( data->xferData );
 
@@ -465,13 +469,13 @@
   }
   else  /* interest charged to account rather than paid to it */
   {
-    gnc_xfer_dialog_set_from_account_frame_label( data->xferData, 
-                                                  _("Reconcile Account") );
+    gnc_xfer_dialog_set_from_account_label( data->xferData,
+		    			    _("Reconcile Account") );
     gnc_xfer_dialog_select_from_account( data->xferData, data->account );
     gnc_xfer_dialog_lock_from_account_tree( data->xferData );
 
-    gnc_xfer_dialog_set_to_account_frame_label( data->xferData,
-                                                _("Payment To") );
+    gnc_xfer_dialog_set_to_account_label( data->xferData,
+		    			  _("Payment To") );
     gnc_xfer_dialog_set_to_show_button_active( data->xferData, TRUE );
 
     /* Quickfill based on the reconcile account, which is the "From" acct. */
@@ -488,7 +492,7 @@
     (gpointer) data );
 
   /* no currency frame */
-  gnc_xfer_dialog_toggle_currency_frame( data->xferData, FALSE );
+  gnc_xfer_dialog_toggle_currency_table( data->xferData, FALSE );
 
   /* set the reconcile date for the transaction date */
   gnc_xfer_dialog_set_date( data->xferData, data->date );
@@ -533,13 +537,13 @@
 
     gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (data->end_value), after);
     gtk_widget_grab_focus(GTK_WIDGET(entry));
-    gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
+    gtk_entry_select_region (GTK_ENTRY(entry), 0, -1);
     data->original_value = after;
     data->user_set_value = FALSE;
   }
 }
 
-static void
+void
 gnc_start_recn_interest_clicked_cb(GtkButton *button, startRecnWindowData *data)
 {
   /* indicate in account that user wants
@@ -619,6 +623,7 @@
 		gboolean enable_subaccount)
 {
   GtkWidget *dialog, *end_value, *date_value, *include_children_button;
+  GladeXML *xml;
   startRecnWindowData data = { NULL };
   gboolean auto_interest_xfer_option;
   GNCPrintAmountInfo print_info;
@@ -654,56 +659,46 @@
    */
 
   /* Create the dialog box */
+  xml = gnc_glade_xml_new ("reconcile.glade", "Reconcile Start Dialog");
+  dialog = glade_xml_get_widget (xml, "Reconcile Start Dialog");
   title = gnc_recn_make_window_name (account);
-
-  dialog = gnome_dialog_new (title,
-                             GNOME_STOCK_BUTTON_OK,
-                             GNOME_STOCK_BUTTON_CANCEL,
-                             NULL);
+  gtk_window_set_title(GTK_WINDOW(dialog), title);
   g_free (title);
 
   data.startRecnWindow = GTK_WIDGET(dialog);
 
-  gnome_dialog_set_default(GNOME_DIALOG(dialog), 0);
-  gnome_dialog_set_close(GNOME_DIALOG(dialog), TRUE);
-  gnome_dialog_close_hides(GNOME_DIALOG(dialog), TRUE);
-  gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(parent));
-
-  {
-    GtkWidget *frame = gtk_frame_new(_("Reconcile Information"));
-    GtkWidget *main_area = gtk_hbox_new(FALSE, 5);
-    GtkWidget *left_column = gtk_vbox_new(TRUE, 0);
-    GtkWidget *right_column = gtk_vbox_new(TRUE, 0);
-    GtkWidget *date_title = gtk_label_new(_("Statement Date:"));
-    GtkWidget *start_title = gtk_label_new(_("Starting Balance:"));
-    GtkWidget *end_title = gtk_label_new(_("Ending Balance:"));
-    GtkWidget *start_value =
-      gtk_label_new(xaccPrintAmount (ending, print_info));
-    GtkWidget *blank_label = gtk_label_new("");
-    GtkWidget *vbox = GNOME_DIALOG(dialog)->vbox;
+  if (parent != NULL)
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
+
+  {
+    GtkWidget *start_value, *box;
     GtkWidget *entry;
     GtkWidget *interest = NULL;
 
-    include_children_button =
-      gtk_check_button_new_with_label(_("Include Subaccounts"));
+    start_value = glade_xml_get_widget(xml, "start_value");
+    gtk_label_set_text(GTK_LABEL(start_value), xaccPrintAmount (ending, print_info));
+
+    include_children_button = glade_xml_get_widget(xml, "subaccount_check");
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(include_children_button),
                                  data.include_children);
     gtk_widget_set_sensitive(include_children_button, enable_subaccount);
-    gtk_signal_connect ( GTK_OBJECT (include_children_button), "toggled",
-          GTK_SIGNAL_FUNC (gnc_start_recn_children_changed), (gpointer) &data );
 
     date_value = gnc_date_edit_new(*statement_date, FALSE, FALSE);
     data.date_value = date_value;
+    box = glade_xml_get_widget(xml, "date_value_box");
+    gtk_box_pack_start(GTK_BOX(box), date_value, TRUE, TRUE, 0);
 
     end_value = gnc_amount_edit_new ();
     data.end_value = GNC_AMOUNT_EDIT(end_value);
     data.original_value = *new_ending;
     data.user_set_value = FALSE;
+    box = glade_xml_get_widget(xml, "ending_value_box");
+    gtk_box_pack_start(GTK_BOX(box), end_value, TRUE, TRUE, 0);
 
     /* need to get a callback on date changes to update the recn balance */
-    gtk_signal_connect ( GTK_OBJECT (date_value), "date_changed",
-          GTK_SIGNAL_FUNC (gnc_start_recn_date_changed), (gpointer) &data );
-    gnc_date_editable_enters(GNOME_DIALOG(dialog), GNC_DATE_EDIT(date_value));
+    g_signal_connect ( G_OBJECT (date_value), "date_changed",
+          G_CALLBACK (gnc_start_recn_date_changed), (gpointer) &data );
+    gnc_date_editable_enters(GNC_DATE_EDIT(date_value), TRUE);
 
     print_info.use_symbol = 0;
     gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (end_value), print_info);
@@ -713,61 +708,35 @@
     gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (end_value), *new_ending);
 
     entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (end_value));
-    gtk_editable_select_region (GTK_EDITABLE (entry), 0, -1);
-
-    gtk_signal_connect(GTK_OBJECT(entry), "focus-out-event",
-                       GTK_SIGNAL_FUNC(gnc_start_recn_update_cb), (gpointer) &data);
-
-    gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
-
-    gtk_misc_set_alignment(GTK_MISC(date_title), 1.0, 0.5);
-    gtk_misc_set_alignment(GTK_MISC(start_title), 1.0, 0.5);
-    gtk_misc_set_alignment(GTK_MISC(start_value), 0.0, 0.5);
-    gtk_misc_set_alignment(GTK_MISC(end_title), 1.0, 0.5);
-
-    gtk_container_set_border_width(GTK_CONTAINER(main_area), 10);
-    gtk_container_set_border_width(GTK_CONTAINER(frame), 5);
-    gtk_container_add(GTK_CONTAINER(frame), main_area);
-
-    gtk_box_pack_start(GTK_BOX(vbox), frame, TRUE, TRUE, 0);
-
-    gtk_box_pack_start(GTK_BOX(main_area), left_column, FALSE, FALSE, 0);
-    gtk_box_pack_end(GTK_BOX(main_area), right_column, TRUE, TRUE, 0);
-
-    gtk_box_pack_start(GTK_BOX(left_column), date_title, TRUE, TRUE, 3);
-    gtk_box_pack_start(GTK_BOX(left_column), start_title, TRUE, TRUE, 0);
-    gtk_box_pack_start(GTK_BOX(left_column), end_title, TRUE, TRUE, 0);
-    gtk_box_pack_start(GTK_BOX(left_column), blank_label, TRUE, TRUE, 0);
-
-    gtk_box_pack_start(GTK_BOX(right_column), date_value, TRUE, TRUE, 3);
-    gtk_box_pack_start(GTK_BOX(right_column), start_value, TRUE, TRUE, 0);
-    gtk_box_pack_start(GTK_BOX(right_column), end_value, TRUE, TRUE, 0);
-    gtk_box_pack_start(GTK_BOX(right_column), include_children_button, TRUE, TRUE, 0);
+    gtk_entry_select_region (GTK_ENTRY(entry), 0, -1);
+    g_signal_connect(G_OBJECT(entry), "focus-out-event",
+		     G_CALLBACK(gnc_start_recn_update_cb), (gpointer) &data);
+    gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
 
     /* if it's possible to enter an interest payment or charge for this
      * account, add a button so that the user can pop up the appropriate
      * dialog if it isn't automatically popping up.
      */
+    interest = glade_xml_get_widget(xml, "interest_button");
     if( account_type_has_auto_interest_payment( data.account_type ) )
-      interest = gtk_button_new_with_label( _("Enter Interest Payment...") );
+      gtk_button_set_label(GTK_BUTTON(interest), _("Enter Interest Payment...") );
     else if( account_type_has_auto_interest_charge( data.account_type ) )
-      interest = gtk_button_new_with_label( _("Enter Interest Charge...") );
+      gtk_button_set_label(GTK_BUTTON(interest), _("Enter Interest Charge...") );
+    else {
+      gtk_widget_hide(interest);
+      interest = NULL;
+    }
 
     if( interest )
     {
-      GtkWidget *alignment = gtk_alignment_new(0.5, 0.5, 0.5, 0.5);
       data.xfer_button = interest;
-
-      gtk_box_pack_end( GTK_BOX(vbox), alignment, FALSE, FALSE, 0 );
-      gtk_container_add(GTK_CONTAINER(alignment), interest);
-      gtk_signal_connect(GTK_OBJECT(interest), "clicked",
-                        GTK_SIGNAL_FUNC(gnc_start_recn_interest_clicked_cb),
-                        (gpointer) &data );
-
       if( auto_interest_xfer_option )
        gtk_widget_set_sensitive(GTK_WIDGET(interest), FALSE);
     }
 
+    glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
+				      &data);
+
     gtk_widget_show_all(dialog);
 
     gtk_widget_grab_focus(gnc_amount_edit_gtk_entry
@@ -782,9 +751,8 @@
     gnc_reconcile_interest_xfer_run( &data );
   }
 
-  result = gnome_dialog_run(GNOME_DIALOG(dialog));
-
-  if (result == 0) /* ok button */
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+  if (result == GTK_RESPONSE_OK)
   {
     *new_ending = gnc_amount_edit_get_amount (GNC_AMOUNT_EDIT (end_value));
     *statement_date = gnc_date_edit_get_date(GNC_DATE_EDIT(date_value));
@@ -796,10 +764,9 @@
 
     gnc_save_reconcile_interval(account, *statement_date);
   }
-
   gtk_widget_destroy (dialog);
 
-  return (result == 0);
+  return (result == GTK_RESPONSE_OK);
 }
 
 
@@ -841,17 +808,17 @@
 gnc_reconcile_window_open_register(RecnWindow *recnData)
 {
   Account *account = recn_get_account (recnData);
+  GncPluginPage *page;
   GNCSplitReg *gsr;
+  gboolean include_children;
 
   if (!account)
     return(NULL);
 
-  if (xaccAccountGetReconcileChildrenStatus (account)) {
-    gsr = regWindowAccGroup (account);
-  } else {
-    gsr = regWindowSimple (account);
-  }
-  gnc_split_reg_raise( gsr );
+  include_children = xaccAccountGetReconcileChildrenStatus (account);
+  page = gnc_plugin_page_register_new (account, include_children);
+  gnc_main_window_open_page (NULL, page);
+  gsr = gnc_plugin_page_register_get_gsr(page);
   return gsr;
 }
 
@@ -929,8 +896,7 @@
   gboolean formal;
   gchar *title;
 
-  formal = gnc_lookup_boolean_option("General",
-                                     "Use accounting labels", FALSE);
+  formal = gnc_gconf_get_bool(GCONF_GENERAL, KEY_ACCOUNTING_LABELS, NULL);
 
   if (formal)
     title = _("Debits");
@@ -953,12 +919,6 @@
     g_free(title);
 }
 
-static void
-set_titles_cb(void *data)
-{
-  gnc_reconcile_window_set_titles(data);
-}
-
 static GtkWidget *
 gnc_reconcile_window_create_list_box(Account *account,
                                      GNCReconcileListType type,
@@ -1051,7 +1011,7 @@
 static void
 gnc_ui_reconcile_window_help_cb(GtkWidget *widget, gpointer data)
 {
-  helpWindow(NULL, NULL, HH_RECNWIN);
+  gnc_gnome_help(HF_USAGE, HL_RECNWIN);
 }
 
 static void
@@ -1347,7 +1307,8 @@
   menubar = gtk_menu_bar_new();
 
   accel_group = gtk_accel_group_new();
-  gtk_accel_group_attach(accel_group, GTK_OBJECT(recnData->window));
+  /* GNOME 2 Port (replace this accel_group stuff) */
+  /*gtk_accel_group_attach(accel_group, GTK_OBJECT(recnData->window));*/
 
   gnome_app_fill_menu(GTK_MENU_SHELL(menubar), reconcile_window_menu,
   		      accel_group, TRUE, 0);
@@ -1416,11 +1377,26 @@
 }
 
 static void
-gnc_toolbar_change_cb(void *data)
+gnc_toolbar_change_cb (GConfClient *client,
+		       guint cnxn_id,
+		       GConfEntry *entry,
+		       gpointer data)
 {
   RecnWindow *recnData = data;
+  GConfValue *value;
+  const gchar *key, *key_tail;
 
-  gnc_recn_refresh_toolbar(recnData);
+  key = gconf_entry_get_key(entry);
+  value = gconf_entry_get_value(entry);
+  if (!key || !value)
+    return;
+
+  key_tail = rindex(key, '/');
+  if (key_tail != NULL)
+    key_tail++;
+  if (strcmp(key_tail, KEY_TOOLBAR_STYLE) == 0) {
+    gnc_recn_refresh_toolbar(recnData);
+  }
 }
 
 static GtkWidget *
@@ -1469,7 +1445,7 @@
     GNOMEUIINFO_END
   };
 
-  toolbar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_BOTH);
+  toolbar = gtk_toolbar_new ();
 
   gnome_app_fill_toolbar_with_data(GTK_TOOLBAR(toolbar), toolbar_info,
                                    NULL, recnData);
@@ -1622,6 +1598,7 @@
     }
   }
 
+  gnc_reconcile_window_set_titles(recnData);
   recn_set_watches (recnData);
 
   recnRefresh (recnData);
@@ -1726,7 +1703,7 @@
   vbox = gtk_vbox_new(FALSE, 0);
   gtk_container_add(GTK_CONTAINER(recnData->window), vbox);
 
-  dock = gnome_dock_new();
+  dock = bonobo_dock_new();
   gtk_box_pack_start(GTK_BOX(vbox), dock, TRUE, TRUE, 0);
 
   statusbar = gnc_recn_create_status_bar(recnData);
@@ -1737,47 +1714,49 @@
 
   /* The menu bar */
   {
-    GnomeDockItemBehavior behavior;
+    BonoboDockItemBehavior behavior;
     GtkWidget *dock_item;
     GtkWidget *menubar;
 
-    behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE;
-    if (!gnome_preferences_get_menubar_detachable ())
-      behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+    behavior = BONOBO_DOCK_ITEM_BEH_EXCLUSIVE;
+    if (!gnc_gconf_menubar_detachable())
+      behavior |= BONOBO_DOCK_ITEM_BEH_LOCKED;
 
-    dock_item = gnome_dock_item_new("menu", behavior);
+    dock_item = bonobo_dock_item_new("menu", behavior);
 
     menubar = gnc_recn_create_menu_bar(recnData, statusbar);
     gtk_container_set_border_width(GTK_CONTAINER(menubar), 2);
     gtk_container_add(GTK_CONTAINER(dock_item), menubar);
 
-    gnome_dock_add_item (GNOME_DOCK(dock), GNOME_DOCK_ITEM(dock_item),
-                         GNOME_DOCK_TOP, 0, 0, 0, TRUE);
+    bonobo_dock_add_item (BONOBO_DOCK(dock), BONOBO_DOCK_ITEM(dock_item),
+                         BONOBO_DOCK_TOP, 0, 0, 0, TRUE);
   }
 
   /* The tool bar */
   {
-    GnomeDockItemBehavior behavior;
+    BonoboDockItemBehavior behavior;
     GtkWidget *dock_item;
     GtkWidget *toolbar;
-    SCM id;
 
-    behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE;
-    if (!gnome_preferences_get_toolbar_detachable ())
-      behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
+    behavior = BONOBO_DOCK_ITEM_BEH_EXCLUSIVE;
+    if (!gnc_gconf_toolbar_detachable())
+      behavior |= BONOBO_DOCK_ITEM_BEH_LOCKED;
 
-    dock_item = gnome_dock_item_new("toolbar", behavior);
+    dock_item = bonobo_dock_item_new("toolbar", behavior);
 
     toolbar = gnc_recn_create_tool_bar(recnData);
     gtk_container_set_border_width(GTK_CONTAINER(toolbar), 2);
     gtk_container_add(GTK_CONTAINER(dock_item), toolbar);
 
-    id = gnc_register_option_change_callback(gnc_toolbar_change_cb, recnData,
-                                             "General", "Toolbar Buttons");
-    recnData->toolbar_change_cb_id = id;
+    recnData->toolbar_change_cb_id =
+      gnc_gconf_add_anon_notification(GCONF_GENERAL,
+				      gnc_toolbar_change_cb, recnData);
+    recnData->toolbar_change_cb_id2 =
+      gnc_gconf_add_anon_notification(DESKTOP_GNOME_INTERFACE,
+				      gnc_toolbar_change_cb, recnData);
 
-    gnome_dock_add_item (GNOME_DOCK(dock), GNOME_DOCK_ITEM(dock_item),
-                         GNOME_DOCK_TOP, 1, 0, 0, TRUE);
+    bonobo_dock_add_item (BONOBO_DOCK(dock), BONOBO_DOCK_ITEM(dock_item),
+                          BONOBO_DOCK_TOP, 1, 0, 0, TRUE);
   }
 
   /* The main area */
@@ -1789,7 +1768,7 @@
     GtkWidget *credits_box;
     GtkWidget *popup;
 
-    gnome_dock_set_client_area(GNOME_DOCK(dock), frame);
+    bonobo_dock_set_client_area(BONOBO_DOCK(dock), frame);
 
     /* Force a reasonable starting size */
     gtk_widget_set_usize(GTK_WIDGET(recnData->window), 800, 600);
@@ -1915,10 +1894,6 @@
 
   gnc_reconcile_window_set_titles(recnData);
 
-  recnData->title_change_cb_id =
-    gnc_register_option_change_callback(set_titles_cb, recnData,
-                                        "General", "Use accounting labels");
-
   recnRecalculateBalance(recnData);
 
   gnc_recn_refresh_toolbar(recnData);
@@ -1963,15 +1938,13 @@
 recn_destroy_cb (GtkWidget *w, gpointer data)
 {
   RecnWindow *recnData = data;
-  SCM id;
 
   gnc_unregister_gui_component_by_data (WINDOW_RECONCILE_CM_CLASS, recnData);
 
-  id = recnData->toolbar_change_cb_id;
-  gnc_unregister_option_change_callback_id (id);
-
-  id = recnData->title_change_cb_id;
-  gnc_unregister_option_change_callback_id (id);
+  gnc_gconf_remove_anon_notification(GCONF_GENERAL,
+				     recnData->toolbar_change_cb_id);
+  gnc_gconf_remove_anon_notification(DESKTOP_GNOME_INTERFACE,
+				     recnData->toolbar_change_cb_id2);
 
   if (recnData->delete_refresh)
     gnc_resume_gui_refresh ();
@@ -2076,9 +2049,8 @@
   gnc_reconcile_list_commit(GNC_RECONCILE_LIST(recnData->credit), date);
   gnc_reconcile_list_commit(GNC_RECONCILE_LIST(recnData->debit), date);
 
-  auto_payment = gnc_lookup_boolean_option ("Reconcile",
-                                            "Automatic credit card payments",
-                                            TRUE);
+  auto_payment = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				    "auto_cc_payment", NULL);
 
   account = recn_get_account (recnData);
 
Index: druid-hierarchy.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-hierarchy.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/druid-hierarchy.h -Lsrc/gnome/druid-hierarchy.h -u -r1.2 -r1.3
--- src/gnome/druid-hierarchy.h
+++ src/gnome/druid-hierarchy.h
@@ -25,4 +25,5 @@
 
 void gnc_ui_hierarchy_druid (void);
 GtkWidget* gnc_ui_hierarchy_running (void);
+void gnc_ui_hierarchy_druid_initialize (void);
 #endif
--- src/gnome/tip-of-the-day.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/********************************************************************\
- * tip-of-the-day.c -- C wrappers for scheme "tip of the day" fns   *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.net>               *
-
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <libguile.h>
-#include "guile-mappings.h"
-
-#include "tip-of-the-day.h"
-
-
-/** Implementations ***************************************************/
-
-/********************************************************************\
- * gnc_get_current_tip                                              *
- *    get the current tip                                           *
- *                                                                  *
- * Returns: A freshly malloc string containing the tip              *
-\********************************************************************/
-
-char *
-gnc_get_current_tip(void)
-{
-  SCM tip_scm;
-  tip_scm = scm_c_eval_string("(gnc:get-current-tip)");
-  return gh_scm2newstr(tip_scm, NULL);
-}
-
-/********************************************************************\
- * gnc_increment_tip                                                *
- *    set the current tip to be the next one in the sequence        *
- *                                                                  *
- * Returns: nothing                                                 *
-\********************************************************************/
-
-void
-gnc_increment_tip(void)
-{
-  scm_c_eval_string("(gnc:increment-tip-number)");
-  return;
-}
-
-/********************************************************************\
- * gnc_decrement_tip                                                *
- *    set the current tip to the previous one in the sequence       *
- *                                                                  *
- * Returns: Nothing                                                 *
-\********************************************************************/
-
-void
-gnc_decrement_tip(void)
-{
-  scm_c_eval_string("(gnc:decrement-tip-number)");
-  return;
-}
-
-/********************** END OF FILE *********************************\
-\********************************************************************/
Index: window-main-summarybar.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/window-main-summarybar.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/gnome/window-main-summarybar.c -Lsrc/gnome/window-main-summarybar.c -u -r1.14 -r1.15
--- src/gnome/window-main-summarybar.c
+++ src/gnome/window-main-summarybar.c
@@ -3,6 +3,7 @@
  * Copyright (C) 1998,1999 Jeremy Collins	                    *
  * Copyright (C) 1998,1999,2000 Linas Vepstas                       *
  * Copyright (C) 2001 Bill Gribble                                  *
+ * Copyright (C) 2005 Joshua Sled <jsled at asynchronous.org>          *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -30,36 +31,50 @@
 #include "Account.h"
 #include "Group.h"
 #include "dialog-utils.h"
-#include "global-options.h"
+#include "gnc-accounting-period.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
 #include "gnc-euro.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
-#include "gtkselect.h"
 #include "messages.h"
 #include "option-util.h"
+#include "qofbook.h"
 #include "top-level.h"
 #include "window-main-summarybar.h"
-#include "window-main.h"
 
 typedef struct {
   GtkWidget * hbox;
   GtkWidget * totals_combo;
-  GList     * totals_list; 
+  GtkListStore *datamodel;
   int       component_id;
-  SCM       callback_id;
+  int       cnxn_id;
 } GNCMainSummary;
 
 #define WINDOW_SUMMARYBAR_CM_CLASS "summary-bar"
 
-/* An accumulator for a given currency.
+#define GCONF_SECTION    "window/pages/account_tree/summary"
+#define KEY_GRAND_TOTAL  "grand_total"
+#define KEY_NON_CURRENCY "non_currency"
+#define KEY_START_CHOICE "start_choice"
+#define KEY_START_DATE   "start_date"
+#define KEY_START_PERIOD "start_period"
+#define KEY_END_CHOICE 	 "end_choice"
+#define KEY_END_DATE   	 "end_date"
+#define KEY_END_PERIOD 	 "end_period"
+
+/**
+ * An accumulator for a given currency.
  *
  * This is used during the update to the status bar to contain the
  * accumulation for a single currency. These are placed in a GList and
  * kept around for the duration of the calculation. There may, in fact
- * be better ways to do this, but none occurred. */
-
+ * be better ways to do this, but none occurred.
+ *
+ * @todo This structure and the non-GUI code that computes it's values
+ * should move into the engine.
+ **/
 typedef struct {
   gnc_commodity * currency;
   gnc_numeric assets;
@@ -68,34 +83,14 @@
 } GNCCurrencyAcc;
 
 
-/* An item to appear in the selector box in the status bar.
- *
- * This is maintained for the duration, where there is one per
- * currency, plus (eventually) one for the default currency
- * accumulation (like the EURO) or grand total or non currency
- * commodities total. */
-
-typedef struct  {
-  char *namespace;
-  char *mnemonic;
-  GtkWidget *listitem;
-  GtkWidget *assets_label;
-  GtkWidget *profits_label;
-  gint touched : 1;
-  gint total_mode;
-} GNCCurrencyItem;
-
-
 /* defines for total_mode in GNCCurrencyAcc and GNCCurrencyItem */
-
 #define TOTAL_SINGLE           0
 #define TOTAL_CURR_TOTAL       1
 #define TOTAL_NON_CURR_TOTAL   2
 #define TOTAL_GRAND_TOTAL      3
 
 
-/* options for summarybar */
-
+/** options for summarybar **/
 typedef struct {
   gnc_commodity *default_currency;
   gboolean euro;
@@ -105,156 +100,20 @@
   time_t end_date;
 } GNCSummarybarOptions;
 
-
-/* Build a single currency item.
- *
- * This function handles the building of a single currency item for
- * the selector. It looks like the old code in the update function,
- * but now only handles a single currency.  */
-
-static GNCCurrencyItem *
-gnc_ui_build_currency_item(gnc_commodity * currency, gint total_mode)
-{
-  GtkWidget *label;
-  GtkWidget *topbox;
-  GtkWidget *hbox;
-  GtkWidget *listitem;
-  GNCCurrencyItem *item;
-  const char *mnemonic;
-  char *label_str;
-  struct lconv *lc;
-
-  lc = gnc_localeconv();
-
-  item = g_new0 (GNCCurrencyItem, 1);
-
-  item->namespace = g_strdup (gnc_commodity_get_namespace (currency));
-  item->mnemonic = g_strdup (gnc_commodity_get_mnemonic (currency));
-
-  item->total_mode = total_mode;
-
-  listitem = gtk_list_item_new();
-  item->listitem = listitem;
-
-  topbox = gtk_hbox_new(FALSE, 2);
-  gtk_widget_show(topbox);
-  gtk_container_add(GTK_CONTAINER(listitem), topbox);
-
-  if (gnc_commodity_equiv (currency, gnc_locale_default_currency ()))
-    mnemonic = lc->currency_symbol;
-  else
-    mnemonic = gnc_commodity_get_mnemonic (currency);
-
-  if (mnemonic == NULL)
-    mnemonic = "";
-
-  hbox = gtk_hbox_new(FALSE, 2);
-  gtk_widget_show(hbox);
-  gtk_box_pack_start(GTK_BOX(topbox), hbox, FALSE, FALSE, 5);
-
-  switch(total_mode)
-  {
-  case TOTAL_CURR_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Net Assets total"),
-                                 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_NON_CURR_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Net Assets non currency commodities total"),
-                                 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_GRAND_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Net Assets grand total"),
-                                 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_SINGLE:
-  default:
-    label_str = g_strdup_printf ("%s (%s):", _("Net Assets"),
-                                 mnemonic ? mnemonic : "");
-    break;
-  }
-  label = gtk_label_new(label_str);
-  gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-  gtk_widget_show(label);
-  gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-  g_free (label_str);
-
-  label = gtk_label_new("");
-  gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-  gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show(label);
-  item->assets_label = label;
-
-  hbox = gtk_hbox_new(FALSE, 2);
-  gtk_widget_show(hbox);
-  gtk_box_pack_start(GTK_BOX(topbox), hbox, FALSE, FALSE, 5);
-
-  switch(total_mode)
-  {
-  case TOTAL_CURR_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Profits total"),
-				 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_NON_CURR_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Profits non currency commodities total"),
-				 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_GRAND_TOTAL:
-    label_str = g_strdup_printf ("%s (%s):", _("Profits grand total"),
-				 mnemonic ? mnemonic : "");
-    break;
-  case TOTAL_SINGLE:
-  default:
-    label_str = g_strdup_printf ("%s (%s):", _("Profits"),
-				 mnemonic ? mnemonic : "");
-    break;
-  }
-  label = gtk_label_new(label_str);
-  gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-  gtk_widget_show(label);
-  gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-  g_free (label_str);
-
-  label = gtk_label_new("");
-  gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5);
-  gtk_widget_show(label);
-  gtk_box_pack_end(GTK_BOX(hbox), label, FALSE, FALSE, 0);
-  item->profits_label = label;
-
-  gtk_widget_show(item->listitem);
-
-  return item;
-}
-
-static void
-gnc_ui_currency_item_destroy (GNCCurrencyItem *item)
-{
-  if (!item) return;
-
-  g_free (item->namespace);
-  g_free (item->mnemonic);
-
-  item->namespace = NULL;
-  item->mnemonic = NULL;
-
-  g_free (item);
-}
-
-/* Get a currency accumulator.
- *
- * This will search the given list, and if no accumulator is found,
- * will allocate a fresh one. */
+/**
+ * Get the existing currency accumulator matching the given currency and
+ * total-mode, or create a new one.
+ **/
 static GNCCurrencyAcc *
-gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency,
-				gint total_mode)
+gnc_ui_get_currency_accumulator(GList **list, gnc_commodity * currency, gint total_mode)
 {
   GList *current;
   GNCCurrencyAcc *found;
 
-  for (current = g_list_first(*list); current;
-       current = g_list_next(current)) {
+  for (current = g_list_first(*list); current; current = g_list_next(current)) {
     found = current->data;
-    if ((gnc_commodity_equiv(currency, found->currency)) &&
-        (found->total_mode == total_mode)) {
+    if ((gnc_commodity_equiv(currency, found->currency))
+        && (found->total_mode == total_mode)) {
       return found;
     }
   }
@@ -269,57 +128,9 @@
   return found;
 }
 
-static gboolean
-gnc_ui_currency_item_match (const GNCCurrencyItem *item,
-                            const gnc_commodity *commodity,
-			    gint total_mode)
-{
-  if (!item || !commodity) return FALSE;
-
-  return
-    (safe_strcmp (item->namespace,
-                  gnc_commodity_get_namespace (commodity)) == 0) &&
-    (safe_strcmp (item->mnemonic,
-                  gnc_commodity_get_mnemonic (commodity)) == 0) &&
-    (item->total_mode == total_mode);
-
-}
-
-/* Get a currency item.
- *
- * This will search the given list, and if no accumulator is found, will
- * create a fresh one.
- *
- * It looks just like the function above, with some extra stuff to get
- * the item into the list. */
-
-static GNCCurrencyItem *
-gnc_ui_get_currency_item (GList **list,
-                          gnc_commodity * currency,
-                          gint total_mode,
-                          GtkWidget *holder)
-{
-  GList *current;
-  GNCCurrencyItem *found;
-
-  for (current = g_list_first(*list); current;
-       current = g_list_next(current))
-  {
-    found = current->data;
-
-    if (gnc_ui_currency_item_match (found, currency, total_mode))
-      return found;
-  }
-
-  found = gnc_ui_build_currency_item(currency, total_mode);
-  *list = g_list_append(*list, found);
-
-  current = g_list_append(NULL, found->listitem);
-  gtk_select_append_items(GTK_SELECT(holder), current);
-
-  return found;
-}
-
+/**
+ * @fixme Move this non-GUI code into the engine.
+ **/
 static void
 gnc_ui_accounts_recurse (AccountGroup *group, GList **currency_list,
                          GNCSummarybarOptions options)
@@ -499,6 +310,85 @@
   }
 }
 
+static char*
+get_total_mode_label(const char *mnemonic, int total_mode)
+{
+  char *label_str;
+  // i.e., "$, grand total," [profits: $12,345.67, assets: $23,456.78]
+  switch(total_mode)
+  {
+  case TOTAL_CURR_TOTAL:
+    label_str = g_strdup_printf( _("%s, total:"), mnemonic );
+    break;
+  case TOTAL_NON_CURR_TOTAL:
+    label_str = g_strdup_printf( _("%s, non currency commodities total:"), mnemonic );
+    break;
+  case TOTAL_GRAND_TOTAL:
+    label_str = g_strdup_printf( _("%s, grand total:"), mnemonic );
+    break;
+  case TOTAL_SINGLE:
+  default:
+    label_str = g_strdup_printf( _("%s:"), mnemonic );
+    break;
+  }
+  return label_str;
+}
+
+enum {
+  COLUMN_MNEMONIC_TYPE,
+  COLUMN_ASSETS,
+  COLUMN_ASSETS_VALUE,
+  COLUMN_PROFITS,
+  COLUMN_PROFITS_VALUE,
+  N_COLUMNS,
+};
+
+static time_t
+lookup_start_date_option(const gchar *section,
+			 const gchar *key_choice,
+			 const gchar *key_absolute,
+			 const gchar *key_relative,
+			 GDate *fy_end)
+{
+  const gchar *choice;
+  time_t time;
+  int which;
+
+  choice = gnc_gconf_get_string(section, key_choice, NULL);
+  if (choice && strcmp(choice, "absolute") == 0) {
+    time = gnc_gconf_get_int(section, key_absolute, NULL);
+  } else {
+    which = gnc_gconf_get_int(section, key_relative, NULL);
+    time = gnc_accounting_period_start_timet(which, fy_end, NULL);
+  }
+  return time;
+}
+
+
+static time_t
+lookup_end_date_option(const gchar *section,
+		       const gchar *key_choice,
+		       const gchar *key_absolute,
+		       const gchar *key_relative,
+		       GDate *fy_end)
+{
+  const gchar *choice;
+  time_t time;
+  int which;
+
+  choice = gnc_gconf_get_string(section, key_choice, NULL);
+  if (choice && strcmp(choice, "absolute") == 0) {
+    time = gnc_gconf_get_int(section, key_absolute, NULL);
+  } else {
+    which = gnc_gconf_get_int(section, key_relative, NULL);
+    time = gnc_accounting_period_end_timet(which, fy_end, NULL);
+  }
+  if (time == 0)
+    time = -1;
+  return time;
+}
+
+
 /* The gnc_main_window_summary_refresh() subroutine redraws summary
  * information. The statusbar includes two fields, titled 'profits'
  * and 'assets'. The total assets equal the sum of all of the
@@ -523,29 +413,38 @@
   char asset_string[256];
   char profit_string[256];
   GNCCurrencyAcc *currency_accum;
-  GNCCurrencyItem *currency_item;
   GList *currency_list;
   GList *current;
   GNCSummarybarOptions options;
-
+  QofBook *book;
+  KvpFrame *book_frame;
+  gint64 month, day;
+  GDate *fy_end = NULL;
+
+  book = gnc_get_current_book();
+  book_frame = qof_book_get_slots(book);
+  month = kvp_frame_get_gint64(book_frame, "/book/fyear_end/month");
+  day = kvp_frame_get_gint64(book_frame, "/book/fyear_end/day");
+  if (g_date_valid_dmy(day, month, 2005 /* not leap year */))
+    fy_end = g_date_new_dmy(day, month, G_DATE_BAD_YEAR);
 
   options.default_currency = gnc_default_report_currency ();
 
-  options.euro = gnc_lookup_boolean_option("International",
-					   "Enable EURO support",
-					   FALSE);
-  options.grand_total = gnc_lookup_boolean_option("Summarybar",
-						  "Show grand total",
-						  TRUE);
-  options.non_currency = gnc_lookup_boolean_option("Summarybar",
-						   "Show non currency commodities",
-						   TRUE);
+  options.euro = gnc_gconf_get_bool(GCONF_GENERAL, KEY_ENABLE_EURO, NULL);
+  options.grand_total =
+    gnc_gconf_get_bool(GCONF_SECTION, KEY_GRAND_TOTAL, NULL);
+  options.non_currency =
+    gnc_gconf_get_bool(GCONF_SECTION, KEY_NON_CURRENCY, NULL);
   /* we will need the balance of the last transaction before the start
      date, so subtract 1 from start date */
-  options.start_date = gnc_lookup_date_option("Summarybar", "Start date", NULL,
-					      NULL, NULL, NULL) - 1;
-  options.end_date = gnc_lookup_date_option("Summarybar", "End date", NULL,
-					    NULL, NULL, NULL);
+  options.start_date =
+    lookup_start_date_option(GCONF_SECTION, KEY_START_CHOICE,
+			     KEY_START_DATE, KEY_START_PERIOD, fy_end);
+  options.end_date =
+    lookup_end_date_option(GCONF_SECTION, KEY_END_CHOICE,
+			   KEY_END_DATE, KEY_END_PERIOD, fy_end);
+  if (fy_end)
+    g_date_free(fy_end);
 
   currency_list = NULL;
 
@@ -561,126 +460,125 @@
   group = gnc_get_current_group ();
   gnc_ui_accounts_recurse(group, &currency_list, options);
 
-  for (current = g_list_first(summary->totals_list); current;
-       current = g_list_next(current)) {
-    currency_item = current->data;
-    currency_item->touched = 0;
-  }
-  
-  for (current = g_list_first(currency_list); current;
-       current = g_list_next(current)) {
-    currency_accum = current->data;
-    currency_item = gnc_ui_get_currency_item(&summary->totals_list,
-       					     currency_accum->currency,
-					     currency_accum->total_mode,
-					     summary->totals_combo);
-    currency_item->touched = 1;
-    
-    *asset_string= '\0';
-    xaccSPrintAmount(asset_string, currency_accum->assets,
-                     gnc_commodity_print_info(currency_accum->currency, TRUE));
-    gtk_label_set_text(GTK_LABEL(currency_item->assets_label), asset_string);
-    gnc_set_label_color(currency_item->assets_label, currency_accum->assets);
-
-    *profit_string= '\0';
-    xaccSPrintAmount(profit_string, currency_accum->profits,
-                     gnc_commodity_print_info(currency_accum->currency, TRUE));
-    gtk_label_set_text(GTK_LABEL(currency_item->profits_label), profit_string);
-    gnc_set_label_color(currency_item->profits_label, currency_accum->profits);
-
-    g_free(currency_accum);
-    current->data = NULL;
-  }
-
-  g_list_free(currency_list);
-  currency_list = NULL;
-  
-  current = g_list_first(summary->totals_list);
-  while (current) {
-    GList *next = current->next;
-    
-    currency_item = current->data;
-    if (currency_item->touched == 0 &&
-        !gnc_ui_currency_item_match(currency_item, options.default_currency,
-				    TOTAL_SINGLE)) {
-      currency_list = g_list_prepend(currency_list, currency_item->listitem);
-      summary->totals_list = g_list_remove_link(summary->totals_list,
-                                                current);
-      gnc_ui_currency_item_destroy(currency_item);
-      current->data = NULL;
-      g_list_free_1(current);
+  {
+    GtkTreeIter iter;
+    char asset_amount_string[256], profit_amount_string[256];
+    struct lconv *lc;
+
+    lc = gnc_localeconv();
+
+    gtk_list_store_clear(summary->datamodel);
+    for (current = g_list_first(currency_list); current; current = g_list_next(current)) {
+      const char *mnemonic;
+
+      currency_accum = current->data;
+
+      if (gnc_commodity_equiv (currency_accum->currency, gnc_locale_default_currency ()))
+        mnemonic = lc->currency_symbol;
+      else
+        mnemonic = gnc_commodity_get_mnemonic (currency_accum->currency);
+      
+      if (mnemonic == NULL)
+        mnemonic = "";
+
+      *asset_string= '\0';
+      xaccSPrintAmount(asset_amount_string,
+                       currency_accum->assets,
+                       gnc_commodity_print_info(currency_accum->currency, TRUE));
+
+      *profit_string= '\0';
+      xaccSPrintAmount(profit_amount_string,
+                       currency_accum->profits,
+                       gnc_commodity_print_info(currency_accum->currency, TRUE));
+
+      gtk_list_store_append(summary->datamodel, &iter);
+      gtk_list_store_set(summary->datamodel, &iter,
+                         COLUMN_MNEMONIC_TYPE, get_total_mode_label(mnemonic, currency_accum->total_mode),
+                         COLUMN_ASSETS,        _("Assets:"),
+                         COLUMN_ASSETS_VALUE,  asset_amount_string,
+                         COLUMN_PROFITS,       _("Profits:"),
+                         COLUMN_PROFITS_VALUE, profit_amount_string,
+                         -1);
     }
-    
-    current = next;
-  }
-  
-  if (currency_list) {
-    gtk_select_remove_items(GTK_SELECT(summary->totals_combo),
-                            currency_list);
-    g_list_free(currency_list);
+
+    gtk_combo_box_set_active( GTK_COMBO_BOX(summary->totals_combo), 0 );
   }
 }
 
 static void
-gnc_main_window_summary_destroy_cb(GtkObject * obj, gpointer data) {
+gnc_main_window_summary_destroy_cb(GtkObject * obj, gpointer data)
+{
   GNCMainSummary * summary = data;
-  gnc_unregister_option_change_callback_id(summary->callback_id);
+  gnc_gconf_remove_anon_notification(GCONF_SECTION, summary->cnxn_id);
   gnc_unregister_gui_component(summary->component_id);
-  g_list_free(summary->totals_list);
   g_free(summary);
 }
 
 static void
-summarybar_refresh_handler(GHashTable * changes, gpointer user_data) {
+summarybar_refresh_handler(GHashTable * changes, gpointer user_data)
+{
   GNCMainSummary * summary = user_data;
   gnc_main_window_summary_refresh(summary);
 }
 
 static void
-summarybar_option_change_handler(gpointer user_data) {
+gconf_client_notify_cb (GConfClient *client,
+			guint cnxn_id,
+			GConfEntry *entry,
+			gpointer user_data)
+{
   GNCMainSummary * summary = user_data;
   gnc_main_window_summary_refresh(summary);
 }
 
 GtkWidget *
-gnc_main_window_summary_new (void) {
+gnc_main_window_summary_new (void)
+{
   GNCMainSummary  * retval = g_new0(GNCMainSummary, 1);
-  GNCCurrencyItem * def_item;
-  gnc_commodity   * default_currency = gnc_default_report_currency ();
+  GtkCellRenderer *textRenderer;
+  int i;
+  // These options lead to a better looking layout for the combo-box, where
+  // the "Assets: $####.##" and "Profit: $####.##" values are visually next
+  // to each other.
+  gboolean expandOptions[] = { TRUE, FALSE, TRUE, FALSE, TRUE };
   
-  retval->hbox         = gtk_hbox_new (FALSE, 5);  
-  retval->totals_combo = gtk_select_new ();
-  retval->totals_list  = NULL;
+  retval->datamodel = gtk_list_store_new( N_COLUMNS,
+                                          G_TYPE_STRING,
+                                          G_TYPE_STRING,
+                                          G_TYPE_STRING,
+                                          G_TYPE_STRING,
+                                          G_TYPE_STRING );
+
+  retval->hbox         = gtk_hbox_new (FALSE, 5);
+  retval->totals_combo = gtk_combo_box_new_with_model( GTK_TREE_MODEL(retval->datamodel) );
   retval->component_id = gnc_register_gui_component(WINDOW_SUMMARYBAR_CM_CLASS,
                                                     summarybar_refresh_handler,
                                                     NULL, retval);
-  retval->callback_id  = gnc_register_option_change_callback(summarybar_option_change_handler,
-							     retval,
-							     "Summarybar",
-							     NULL);
   gnc_gui_component_watch_entity_type (retval->component_id,
                                        GNC_ID_ACCOUNT,
                                        GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
 
-  def_item = gnc_ui_get_currency_item (&retval->totals_list,
-                                       default_currency,
-				       TOTAL_SINGLE,
-                                       retval->totals_combo);
-  
-  
+  for ( i = 0; i < N_COLUMNS; i++ )
+  {
+    textRenderer = GTK_CELL_RENDERER(gtk_cell_renderer_text_new());
+    gtk_cell_layout_pack_start( GTK_CELL_LAYOUT(retval->totals_combo), textRenderer, expandOptions[i] );
+    gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(retval->totals_combo), textRenderer, "text", i );
+  }
+
   gtk_container_set_border_width (GTK_CONTAINER (retval->hbox), 2);
-  gtk_select_select_child (GTK_SELECT(retval->totals_combo), 
-                           def_item->listitem);
-  gtk_box_pack_start (GTK_BOX(retval->hbox), retval->totals_combo, 
-                      FALSE, FALSE, 5);
+  gtk_box_pack_start (GTK_BOX(retval->hbox), retval->totals_combo, TRUE, TRUE, 5);
   gtk_widget_show (retval->totals_combo);
   gtk_widget_show (retval->hbox);
 
-  gtk_signal_connect(GTK_OBJECT(retval->hbox), "destroy",
-                     gnc_main_window_summary_destroy_cb, retval);
+  g_signal_connect(G_OBJECT(retval->hbox), "destroy",
+                   G_CALLBACK(gnc_main_window_summary_destroy_cb), retval);
 
   gnc_main_window_summary_refresh(retval);
 
+  retval->cnxn_id =  gnc_gconf_add_anon_notification(GCONF_SECTION,
+						     gconf_client_notify_cb,
+						     retval);
+
   return retval->hbox;
 }
 
Index: gnucash.desktop.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/gnucash.desktop.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome/gnucash.desktop.in -Lsrc/gnome/gnucash.desktop.in -u -r1.3 -r1.4
--- src/gnome/gnucash.desktop.in
+++ src/gnome/gnucash.desktop.in
@@ -5,5 +5,8 @@
 TryExec=gnucash
 Exec=gnucash
 Icon=gnucash/gnucash-icon.png
-Terminal=0
+StartupNotify=true
+Terminal=false
 Type=Application
+Categories=GNOME;Application;Office;
+X-Desktop-File-Install-Version=0.3
Index: dialog-tax-info.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-tax-info.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/gnome/dialog-tax-info.c -Lsrc/gnome/dialog-tax-info.c -u -r1.20 -r1.21
--- src/gnome/dialog-tax-info.c
+++ src/gnome/dialog-tax-info.c
@@ -26,8 +26,10 @@
 #include <gnome.h>
 #include <libguile.h>
 
+#include "Account.h"
+#include "gnc-ui-util.h"
 #include "dialog-utils.h"
-#include "gnc-account-tree.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
 #include "gnc-ui.h"
@@ -35,6 +37,7 @@
 
 
 #define DIALOG_TAX_INFO_CM_CLASS "dialog-tax-info"
+#define GCONF_SECTION "dialogs/tax_info"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 /* static short module = MOD_GUI; */
@@ -62,7 +65,8 @@
 {
   GtkWidget * dialog;
 
-  GtkWidget * account_tree;
+  GtkWidget * account_treeview;
+  GtkWidget * select_button;
 
   GtkWidget * tax_related_button;
   GtkWidget * txf_category_clist;
@@ -75,12 +79,12 @@
 
   gboolean income;
   gboolean changed;
+
+  GNCAccountType account_type;
 } TaxInfoDialog;
 
 
 static gboolean getters_initialized = FALSE;
-static gint last_width = 0;
-static gint last_height = 0;
 
 
 static void
@@ -132,11 +136,6 @@
 static void
 gnc_tax_info_set_changed (TaxInfoDialog *ti_dialog, gboolean changed)
 {
-  GtkWidget *button;
-
-  button = gnc_glade_lookup_widget (ti_dialog->dialog, "apply_button");
-  gtk_widget_set_sensitive (button, changed);
-
   ti_dialog->changed = changed;
 }
 
@@ -169,17 +168,16 @@
   {
     TXFInfo *txf_info;
     SCM code_scm;
-    char *str;
+    const gchar *str;
     SCM scm;
 
     code_scm  = SCM_CAR (codes);
     codes     = SCM_CDR (codes);
 
     scm = scm_call_2 (getters.payer_name_source, category, code_scm);
-    str = gh_symbol2newstr (scm, NULL);
+    str = SCM_SYMBOL_CHARS (scm);
     if (safe_strcmp (str, "not-impl") == 0)
     {
-      free (str);
       continue;
     }
 
@@ -189,26 +187,21 @@
       txf_info->payer_name_source = NULL;
     else
       txf_info->payer_name_source = g_strdup (str);
-    free (str);
 
-    str = gh_symbol2newstr (code_scm, NULL);
+    str = SCM_SYMBOLP(code_scm) ? SCM_SYMBOL_CHARS(code_scm) : "";
     txf_info->code = g_strdup (str);
-    free (str);
 
     scm = scm_call_2 (getters.form, category, code_scm);
-    str = gh_scm2newstr (scm, NULL);
+    str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
     txf_info->form = g_strdup (str);
-    free (str);
 
     scm = scm_call_2 (getters.description, category, code_scm);
-    str = gh_scm2newstr (scm, NULL);
+    str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
     txf_info->description = g_strdup (str);
-    free (str);
 
     scm = scm_call_2 (getters.help, category, code_scm);
-    str = gh_scm2newstr (scm, NULL);
+    str = SCM_STRINGP(scm) ? SCM_STRING_CHARS(scm) : "";
     txf_info->help = g_strdup (str);
-    free (str);
 
     infos = g_list_prepend (infos, txf_info);
   }
@@ -261,6 +254,15 @@
     (GTK_TOGGLE_BUTTON (ti_dialog->current_account_button), TRUE);
 }
 
+static gboolean
+gnc_tax_info_dialog_account_filter_func (Account *account,
+					 gpointer data)
+{
+  TaxInfoDialog *dialog = data;
+
+  return xaccAccountGetType (account) == dialog->account_type;
+}
+
 static TXFInfo *
 txf_infos_find_code (GList *infos, const char *code)
 {
@@ -354,8 +356,8 @@
   else
     pns = NULL;
 
-  accounts = gnc_account_tree_get_current_accounts
-    (GNC_ACCOUNT_TREE (ti_dialog->account_tree));
+  accounts = gnc_tree_view_account_get_selected_accounts
+    (GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview));
 
   for (node = accounts; node; node = node->next)
   {
@@ -388,89 +390,89 @@
 }
 
 static void
-select_subaccounts_clicked (GtkWidget *widget, gpointer data)
+cursor_changed_cb (GtkWidget *widget, gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
-  GNCAccountTree *tree;
+  GncTreeViewAccount *account_tree;
   Account *account;
+  gint num_children;
 
-  tree = GNC_ACCOUNT_TREE (ti_dialog->account_tree);
-
-  account = gnc_account_tree_get_focus_account (tree);
-  if (!account)
+  account_tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
+  account = gnc_tree_view_account_get_cursor_account (account_tree);
+  if (!account) {
+    gtk_widget_set_sensitive(ti_dialog->select_button, FALSE);
     return;
+  }
 
-  gnc_account_tree_select_subaccounts (tree, account, FALSE);
-
-  gtk_widget_grab_focus (ti_dialog->account_tree);
+  num_children = gnc_tree_view_account_count_children(account_tree, account);
+  gtk_widget_set_sensitive(ti_dialog->select_button, num_children > 0);
 }
 
 static void
-tax_info_ok_clicked (GtkWidget *widget, gpointer data)
+select_subaccounts_clicked (GtkWidget *widget, gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
+  GncTreeViewAccount *account_tree;
+  Account *account;
 
-  if (ti_dialog->changed)
-    gui_to_accounts (ti_dialog);
-
-  gnc_close_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
-}
+  account_tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
+  account = gnc_tree_view_account_get_cursor_account (account_tree);
+  if (!account)
+    return;
 
-static void
-tax_info_apply_clicked (GtkWidget *widget, gpointer data)
-{
-  TaxInfoDialog *ti_dialog = data;
+  gnc_tree_view_account_select_subaccounts (account_tree, account);
 
-  gui_to_accounts (ti_dialog);
-  gnc_tax_info_set_changed (ti_dialog, FALSE);
+  gtk_widget_grab_focus (ti_dialog->account_treeview);
 }
 
 static void
-tax_info_cancel_clicked (GtkWidget *widget, gpointer data)
+gnc_tax_info_dialog_response (GtkDialog *dialog, gint response, gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
 
+  if (response == GTK_RESPONSE_OK && ti_dialog->changed)
+      gui_to_accounts (ti_dialog);
+
   gnc_close_gui_component_by_data (DIALOG_TAX_INFO_CM_CLASS, ti_dialog);
 }
 
 static void
 tax_info_show_income_accounts (TaxInfoDialog *ti_dialog, gboolean show_income)
 {
-  GNCAccountTree *tree;
+  GncTreeViewAccount *tree;
   AccountViewInfo info;
   GNCAccountType type;
   GNCAccountType show_type;
 
   ti_dialog->income = show_income;
 
-  tree = GNC_ACCOUNT_TREE (ti_dialog->account_tree);
+  tree = GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview);
   show_type = show_income ? INCOME : EXPENSE;
 
-  gnc_account_tree_get_view_info (tree, &info);
+  gnc_tree_view_account_get_view_info (tree, &info);
 
   for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
     info.include_type[type] = (type == show_type);
 
-  gnc_account_tree_set_view_info (tree, &info);
+  gnc_tree_view_account_set_view_info (tree, &info);
 
   load_category_list (ti_dialog);
+  cursor_changed_cb(GTK_WIDGET(tree), ti_dialog);
 }
 
 static int
 gnc_tax_info_update_accounts (TaxInfoDialog *ti_dialog)
 {
-  GNCAccountTree *tree;
+  GncTreeViewAccount *tree;
+  GtkTreeSelection* selection;
   GtkWidget *label;
   GtkWidget *frame;
   int num_accounts;
-  GList *accounts;
   char *string;
 
-  tree = GNC_ACCOUNT_TREE (ti_dialog->account_tree);
-
-  accounts = gnc_account_tree_get_current_accounts (tree);
-
-  num_accounts = g_list_length (accounts);
+  tree = GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview);
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(tree));
+  num_accounts = gtk_tree_selection_count_selected_rows (selection);
 
   label = gnc_glade_lookup_widget (ti_dialog->dialog, "num_accounts_label");
   frame = gnc_glade_lookup_widget (ti_dialog->dialog, "tax_info_frame");
@@ -494,8 +496,8 @@
 
   tax_info_show_income_accounts (ti_dialog, show_income);
 
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (ti_dialog->account_tree));
-  gnc_account_tree_expand_all (GNC_ACCOUNT_TREE (ti_dialog->account_tree));
+  ti_dialog->account_type = show_income ? INCOME : EXPENSE;
+  gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT (ti_dialog->account_treeview));
 
   gnc_tax_info_update_accounts (ti_dialog);
 
@@ -503,35 +505,38 @@
 }
 
 static void
-gnc_tax_info_select_account_cb (GNCAccountTree *tree,
-                                Account *account, gpointer data)
+gnc_tax_info_account_changed_cb (GtkTreeSelection *selection,
+				 gpointer data)
 {
   TaxInfoDialog *ti_dialog = data;
+  GncTreeViewAccount *view;
+  GList *accounts;
+  int num_accounts;
 
-  if (gnc_tax_info_update_accounts (ti_dialog) != 1)
-  {
-    gnc_tax_info_set_changed (ti_dialog, TRUE);
-    return;
-  }
+  g_return_if_fail(GTK_IS_TREE_SELECTION(selection));
 
-  account_to_gui (ti_dialog, account);
-  gnc_tax_info_set_changed (ti_dialog, FALSE);
-}
+  num_accounts = gnc_tax_info_update_accounts (ti_dialog);
+  switch (num_accounts) {
+   case 0:
+    clear_gui (ti_dialog);
+    gnc_tax_info_set_changed (ti_dialog, FALSE);
+    return;
 
-static void
-gnc_tax_info_unselect_account_cb (GNCAccountTree *tree,
-                                  Account *account, gpointer data)
-{
-  TaxInfoDialog *ti_dialog = data;
-  GList *accounts;
+   case 1:
+    /* Get the account. This view is set for multiple selection, so we
+       can only get a list of accounts. */
+    view = GNC_TREE_VIEW_ACCOUNT(ti_dialog->account_treeview);
+    accounts = gnc_tree_view_account_get_selected_accounts (view);
+    account_to_gui (ti_dialog, accounts->data);
+    g_list_free(accounts);
 
-  accounts = gnc_account_tree_get_current_accounts (tree);
+    gnc_tax_info_set_changed (ti_dialog, FALSE);
+    break;
 
-  if (gnc_tax_info_update_accounts (ti_dialog) != 0)
+   default:
+    gnc_tax_info_set_changed (ti_dialog, TRUE);
     return;
-
-  clear_gui (ti_dialog);
-  gnc_tax_info_set_changed (ti_dialog, FALSE);
+  }
 }
 
 static void
@@ -546,18 +551,15 @@
   GtkAdjustment *adj;
   GtkWidget *scroll;
   GtkWidget *frame;
-  GtkEditable *ge;
+  GtkTextBuffer *tb;
   const char *text;
-  gint pos = 0;
 
   txf_info = g_list_nth_data (tax_infos (ti_dialog), row);
 
-  ge = GTK_EDITABLE (ti_dialog->txf_help_text);
+  tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ti_dialog->txf_help_text));
 
   text = (txf_info && txf_info->help) ? txf_info->help : "";
-
-  gtk_editable_delete_text (ge, 0, -1);
-  gtk_editable_insert_text (ge, text, strlen (text), &pos);
+  gtk_text_buffer_set_text (tb, text, -1);
 
   scroll = gnc_glade_lookup_widget (GTK_WIDGET (clist), "help_scroll");
 
@@ -631,30 +633,22 @@
   ti_dialog->dialog = dialog;
   tido = GTK_OBJECT (dialog);
 
+  ti_dialog->account_type = EXPENSE;
   ti_dialog->income_txf_infos = load_txf_info (TRUE);
   ti_dialog->expense_txf_infos = load_txf_info (FALSE);
 
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0,
-                               GTK_SIGNAL_FUNC (tax_info_ok_clicked),
-                               ti_dialog);
-
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1,
-                               GTK_SIGNAL_FUNC (tax_info_apply_clicked),
-                               ti_dialog);
-
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 2,
-                               GTK_SIGNAL_FUNC (tax_info_cancel_clicked),
-                               ti_dialog);
+  g_signal_connect (G_OBJECT (dialog), "response",
+                    G_CALLBACK (gnc_tax_info_dialog_response), ti_dialog);
 
-  gtk_signal_connect (tido, "destroy",
-                      GTK_SIGNAL_FUNC (window_destroy_cb), ti_dialog);
+  g_signal_connect (G_OBJECT (dialog), "destroy",
+                    G_CALLBACK (window_destroy_cb), ti_dialog);
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   /* default to ok */
-  gnome_dialog_set_default (GNOME_DIALOG(dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
 
   /* tax information */
   {
@@ -665,11 +659,11 @@
     button = glade_xml_get_widget (xml, "tax_related_button");
     ti_dialog->tax_related_button = button;
 
-    gtk_signal_connect (GTK_OBJECT (button), "toggled",
-                        GTK_SIGNAL_FUNC (tax_related_toggled_cb), ti_dialog);
+    g_signal_connect (G_OBJECT (button), "toggled",
+                      G_CALLBACK  (tax_related_toggled_cb), ti_dialog);
 
     text = glade_xml_get_widget (xml, "txf_help_text");
-    gtk_text_set_word_wrap (GTK_TEXT (text), TRUE);
+    gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(text), GTK_WRAP_WORD);
     ti_dialog->txf_help_text = text;
 
     /* set text height */
@@ -678,7 +672,7 @@
       GdkFont *font = NULL;
 
       if (style != NULL)
-        font = style->font;
+        font = gdk_font_from_description (style->font_desc);
 
       if (font)
         gtk_widget_set_usize (text, 0, (font->ascent + font->descent) * 5 + 6);
@@ -688,8 +682,8 @@
     gtk_clist_column_titles_passive (GTK_CLIST (clist));
     ti_dialog->txf_category_clist = clist;
 
-    gtk_signal_connect (GTK_OBJECT (clist), "select-row",
-                        GTK_SIGNAL_FUNC (txf_code_select_row_cb), ti_dialog);
+    g_signal_connect (G_OBJECT (clist), "select-row",
+                      G_CALLBACK  (txf_code_select_row_cb), ti_dialog);
 
     button = glade_xml_get_widget (xml, "current_account_button");
     ti_dialog->current_account_button = button;
@@ -697,74 +691,63 @@
     button = glade_xml_get_widget (xml, "parent_account_button");
     ti_dialog->parent_account_button = button;
 
-    gtk_signal_connect (GTK_OBJECT (button), "toggled",
-                        GTK_SIGNAL_FUNC (current_account_toggled_cb),
+    g_signal_connect (G_OBJECT (button), "toggled",
+                      G_CALLBACK  (current_account_toggled_cb),
                         ti_dialog);
   }
 
   /* account tree */
   {
-    GtkWidget *income_radio;
-    GNCAccountTree *tree;
-    GtkWidget *scroll;
-
-    ti_dialog->account_tree = gnc_account_tree_new ();
-    tree = GNC_ACCOUNT_TREE (ti_dialog->account_tree);
-
-    gtk_clist_column_titles_hide (GTK_CLIST (ti_dialog->account_tree));
-    gtk_clist_set_selection_mode (GTK_CLIST (ti_dialog->account_tree),
-                                  GTK_SELECTION_EXTENDED);
-    gnc_account_tree_hide_all_but_name (tree);
+    GtkWidget *income_radio, *expense_radio, *box;
+    GtkTreeView *tree_view;
+    GtkTreeSelection *selection;
+
+    box = glade_xml_get_widget (xml, "account_hbox");
+    tree_view = gnc_tree_view_account_new (FALSE);
+    gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT(tree_view), 
+				      gnc_tax_info_dialog_account_filter_func,
+				      ti_dialog, NULL);
+    ti_dialog->account_treeview = GTK_WIDGET(tree_view);
+
+    selection = gtk_tree_view_get_selection (tree_view);
+    gtk_tree_selection_set_mode (selection, GTK_SELECTION_EXTENDED);
+    g_signal_connect (G_OBJECT (selection), "changed",
+                      G_CALLBACK (gnc_tax_info_account_changed_cb),
+                      ti_dialog);
 
-    tax_info_show_income_accounts (ti_dialog, FALSE);
-
-    gnc_account_tree_refresh (tree);
-    gnc_account_tree_expand_all (tree);
-
-    gtk_signal_connect (GTK_OBJECT(tree), "select_account",
-                        GTK_SIGNAL_FUNC(gnc_tax_info_select_account_cb),
-                        ti_dialog);
-
-    gtk_signal_connect (GTK_OBJECT(tree), "unselect_account",
-                        GTK_SIGNAL_FUNC(gnc_tax_info_unselect_account_cb),
-                        ti_dialog);
-
-    gtk_widget_show (ti_dialog->account_tree);
-
-    scroll = glade_xml_get_widget (xml, "account_scroll");
-    gtk_container_add (GTK_CONTAINER (scroll), ti_dialog->account_tree);
+    gtk_widget_show (ti_dialog->account_treeview);
+    gtk_container_add (GTK_CONTAINER (box), ti_dialog->account_treeview);
 
     income_radio = glade_xml_get_widget (xml, "income_radio");
-    gtk_signal_connect (GTK_OBJECT (income_radio), "toggled",
-                        GTK_SIGNAL_FUNC (gnc_tax_info_income_cb),
+    expense_radio = glade_xml_get_widget (xml, "expense_radio");
+    gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(expense_radio), TRUE);
+    g_signal_connect (G_OBJECT (income_radio), "toggled",
+                      G_CALLBACK  (gnc_tax_info_income_cb),
                         ti_dialog);
-  }
+    //   gtk_button_clicked (GtkButton *button);
+ }
 
   /* select subaccounts button */
   {
     GtkWidget *button;
 
     button = glade_xml_get_widget (xml, "select_subaccounts_button");
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (select_subaccounts_clicked),
-                        ti_dialog);
+    ti_dialog->select_button = button;
+
+    g_signal_connect (G_OBJECT (button), "clicked",
+                      G_CALLBACK  (select_subaccounts_clicked),
+		      ti_dialog);
+    g_signal_connect (G_OBJECT (ti_dialog->account_treeview), "cursor_changed",
+                      G_CALLBACK  (cursor_changed_cb),
+		      ti_dialog);
   }
 
+  tax_info_show_income_accounts (ti_dialog, FALSE);
   gnc_tax_info_update_accounts (ti_dialog);
   clear_gui (ti_dialog);
   gnc_tax_info_set_changed (ti_dialog, FALSE);
 
-  if (last_width == 0)
-    gnc_get_window_size ("tax_info_win", &last_width, &last_height);
-
-  if (last_height == 0)
-  {
-    last_height = 400;
-    last_width = 500;
-  }
-
-  gtk_window_set_default_size (GTK_WINDOW(ti_dialog->dialog),
-                               last_width, last_height);
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
 }
 
 static void
@@ -772,12 +755,8 @@
 {
   TaxInfoDialog *ti_dialog = user_data;
 
-  gdk_window_get_geometry (GTK_WIDGET(ti_dialog->dialog)->window,
-                           NULL, NULL, &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("tax_info_win", last_width, last_height);
-
-  gnome_dialog_close (GNOME_DIALOG (ti_dialog->dialog));
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(ti_dialog->dialog));
+  gtk_widget_destroy (ti_dialog->dialog);
 }
 
 static void
@@ -785,7 +764,7 @@
 {
   TaxInfoDialog *ti_dialog = user_data;
 
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (ti_dialog->account_tree));
+/*  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (ti_dialog->account_tree));*/
 
   gnc_tax_info_update_accounts (ti_dialog);
 }
@@ -815,7 +794,7 @@
                                        GNC_ID_ACCOUNT,
                                        GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
 
-  gtk_widget_grab_focus (ti_dialog->account_tree);
+  gtk_widget_grab_focus (ti_dialog->account_treeview);
 
   gtk_widget_show (ti_dialog->dialog);
 }
Index: dialog-sxsincelast.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-sxsincelast.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome/dialog-sxsincelast.h -Lsrc/gnome/dialog-sxsincelast.h -u -r1.4 -r1.5
--- src/gnome/dialog-sxsincelast.h
+++ src/gnome/dialog-sxsincelast.h
@@ -38,7 +38,7 @@
  *  dialog stating there's nothing to do.]
  **/
 gint gnc_ui_sxsincelast_dialog_create( void );
-void gnc_ui_sxsincelast_guile_wrapper( char* );
+void gnc_sx_sxsincelast_book_opened (void);
 
 /**
  * Returns the varaibles from the Splits of the given SchedXaction as the
Index: reconcile-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/reconcile-list.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -Lsrc/gnome/reconcile-list.c -Lsrc/gnome/reconcile-list.c -u -r1.67 -r1.68
--- src/gnome/reconcile-list.c
+++ src/gnome/reconcile-list.c
@@ -32,8 +32,8 @@
 #include "Transaction.h"
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "messages.h"
 #include "reconcile-list.h"
 #include "search-param.h"
@@ -56,7 +56,7 @@
 /** Static function declarations **************************************/
 static void gnc_reconcile_list_init(GNCReconcileList *list);
 static void gnc_reconcile_list_class_init(GNCReconcileListClass *klass);
-static void gnc_reconcile_list_destroy(GtkObject *object);
+static void gnc_reconcile_list_finalize (GObject *object);
 static gpointer gnc_reconcile_list_is_reconciled(gpointer item, gpointer user_data);
 static void gnc_reconcile_list_line_toggled (GNCQueryList *list, gpointer item,
 					     gpointer user_data);
@@ -65,27 +65,28 @@
 						   gpointer user_data);
 
 
-GtkType
+GType
 gnc_reconcile_list_get_type (void)
 {
-  static GtkType gnc_reconcile_list_type = 0;
+  static GType gnc_reconcile_list_type = 0;
 
-  if (!gnc_reconcile_list_type)
+  if (gnc_reconcile_list_type == 0)
   {
-    static const GtkTypeInfo gnc_reconcile_list_info =
-    {
-      "GNCReconcileList",
-      sizeof (GNCReconcileList),
+    static const GTypeInfo gnc_reconcile_list_info = {
       sizeof (GNCReconcileListClass),
-      (GtkClassInitFunc) gnc_reconcile_list_class_init,
-      (GtkObjectInitFunc) gnc_reconcile_list_init,
-      /* reserved_1 */ NULL,
-      /* reserved_2 */ NULL,
-      (GtkClassInitFunc) NULL
+      NULL,
+      NULL,
+      (GClassInitFunc) gnc_reconcile_list_class_init,
+      NULL,
+      NULL,
+      sizeof (GNCReconcileList),
+      0,
+      (GInstanceInitFunc) gnc_reconcile_list_init
     };
 
-    gnc_reconcile_list_type = gtk_type_unique(GTK_TYPE_GNC_QUERY_LIST,
-					      &gnc_reconcile_list_info);
+    gnc_reconcile_list_type = g_type_register_static (GTK_TYPE_GNC_QUERY_LIST,
+						      "GncReconcileList",
+						      &gnc_reconcile_list_info, 0);
   }
 
   return gnc_reconcile_list_type;
@@ -113,10 +114,10 @@
   gnc_query_list_set_numerics (qlist, TRUE, inv_sort);
 
   /* Now set up the signals for the QueryList */
-  gtk_signal_connect (GTK_OBJECT (qlist), "line_toggled",
-		      gnc_reconcile_list_line_toggled, list);
-  gtk_signal_connect (GTK_OBJECT (qlist), "double_click_entry",
-		      gnc_reconcile_list_double_click_entry, list);
+  g_signal_connect (G_OBJECT (qlist), "line_toggled",
+		    G_CALLBACK(gnc_reconcile_list_line_toggled), list);
+  g_signal_connect (G_OBJECT (qlist), "double_click_entry",
+		    G_CALLBACK(gnc_reconcile_list_double_click_entry), list);
 }
 
 GtkWidget *
@@ -132,7 +133,9 @@
   g_return_val_if_fail((type == RECLIST_DEBIT) ||
                        (type == RECLIST_CREDIT), NULL);
 
-  list = GNC_RECONCILE_LIST(gtk_type_new(gnc_reconcile_list_get_type()));
+  list = g_object_new (GNC_TYPE_RECONCILE_LIST,
+		       "n-columns", 5,
+		       NULL);
 
   list->account = account;
   list->list_type = type;
@@ -168,9 +171,8 @@
   gnc_reconcile_list_construct (list, query);
 
   /* find the list of splits to auto-reconcile */
-  auto_check = gnc_lookup_boolean_option ("Reconcile",
-                                          "Check off cleared transactions",
-                                          TRUE);
+  auto_check = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				  "check_cleared", NULL);
 
   if (auto_check) {
     for (splits = xaccQueryGetSplits(query); splits; splits = splits->next) {
@@ -230,41 +232,37 @@
 static void
 gnc_reconcile_list_class_init (GNCReconcileListClass *klass)
 {
-  GtkObjectClass    *object_class;
-  GtkWidgetClass    *widget_class;
-  GtkContainerClass *container_class;
-
-  object_class =    (GtkObjectClass*) klass;
-  widget_class =    (GtkWidgetClass*) klass;
-  container_class = (GtkContainerClass*) klass;
+  GObjectClass    *object_class;
+  GtkCListClass   *clist_class;
 
-  parent_class = gtk_type_class(GTK_TYPE_GNC_QUERY_LIST);
+  object_class =  G_OBJECT_CLASS (klass);
+  clist_class = GTK_CLIST_CLASS (klass);
+
+  parent_class = g_type_class_peek_parent (klass);
 
   reconcile_list_signals[TOGGLE_RECONCILED] =
-    gtk_signal_new("toggle_reconciled",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCReconcileListClass,
-				     toggle_reconciled),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
+    g_signal_new("toggle_reconciled",
+		 G_OBJECT_CLASS_TYPE (object_class),
+		 G_SIGNAL_RUN_FIRST,
+		 G_STRUCT_OFFSET (GNCReconcileListClass,
+				  toggle_reconciled),
+		 NULL, NULL,
+		 g_cclosure_marshal_VOID__POINTER,
+		 G_TYPE_NONE, 1,
+		 G_TYPE_POINTER);
 
   reconcile_list_signals[DOUBLE_CLICK_SPLIT] =
-    gtk_signal_new("double_click_split",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCReconcileListClass,
-				     double_click_split),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  gtk_object_class_add_signals(object_class,
-			       reconcile_list_signals,
-			       LAST_SIGNAL);
+    g_signal_new("double_click_split",
+		 G_OBJECT_CLASS_TYPE (object_class),
+		 G_SIGNAL_RUN_FIRST,
+		 G_STRUCT_OFFSET (GNCReconcileListClass,
+				  double_click_split),
+		 NULL, NULL,
+		 g_cclosure_marshal_VOID__POINTER,
+		 G_TYPE_NONE, 1,
+		 G_TYPE_POINTER);
 
-  object_class->destroy = gnc_reconcile_list_destroy;
+  object_class->finalize = gnc_reconcile_list_finalize;
 
   klass->toggle_reconciled = NULL;
   klass->double_click_split = NULL;
@@ -275,7 +273,7 @@
 {
   Split *current;
 
-  g_return_if_fail (IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail (GNC_IS_RECONCILE_LIST(list));
   g_return_if_fail (list->reconciled != NULL);
 
   current = g_hash_table_lookup (list->reconciled, split);
@@ -339,7 +337,7 @@
 {
   gboolean include_children;
 
-  g_return_if_fail (IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail (GNC_IS_RECONCILE_LIST(list));
   g_return_if_fail (list->reconciled != NULL);
 
   gnc_reconcile_list_toggle_split(list, split);
@@ -348,8 +346,8 @@
   if(include_children)
     gnc_reconcile_list_toggle_children(list->account, list, split);
 
-  gtk_signal_emit (GTK_OBJECT (list),
-                   reconcile_list_signals[TOGGLE_RECONCILED], split);
+  g_signal_emit (G_OBJECT (list),
+                 reconcile_list_signals[TOGGLE_RECONCILED], 0, split);
 }
 
 static void
@@ -360,7 +358,7 @@
 
   g_return_if_fail(item);
   g_return_if_fail(user_data);
-  g_return_if_fail(IS_GNC_RECONCILE_LIST(rlist));
+  g_return_if_fail(GNC_IS_RECONCILE_LIST(rlist));
 
   gnc_reconcile_list_toggle (rlist, item);
 }
@@ -373,44 +371,30 @@
 
   g_return_if_fail(item);
   g_return_if_fail(user_data);
-  g_return_if_fail(IS_GNC_RECONCILE_LIST(rlist));
+  g_return_if_fail(GNC_IS_RECONCILE_LIST(rlist));
 
-  gtk_signal_emit(GTK_OBJECT(rlist),
-		  reconcile_list_signals[DOUBLE_CLICK_SPLIT], item);
+  g_signal_emit(G_OBJECT(rlist),
+		reconcile_list_signals[DOUBLE_CLICK_SPLIT], 0, item);
 }
 
 static void
-gnc_reconcile_list_destroy (GtkObject *object)
+gnc_reconcile_list_finalize (GObject *object)
 {
   GNCReconcileList *list = GNC_RECONCILE_LIST(object);
 
-  if (list->column_list)
-  {
-    GList *node;
-    for (node = list->column_list; node; node = node->next)
-    {
-      GNCSearchParam *param = node->data;
-      gtk_object_destroy (GTK_OBJECT(param));
-    }
-    g_list_free(list->column_list);
-    list->column_list = NULL;
-  }
-
-  if (list->reconciled != NULL)
-  {
+  if (list->reconciled != NULL) {
     g_hash_table_destroy(list->reconciled);
     list->reconciled = NULL;
   }
 
-  if (GTK_OBJECT_CLASS(parent_class)->destroy)
-    GTK_OBJECT_CLASS(parent_class)->destroy (object);
+  G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 gint
 gnc_reconcile_list_get_needed_height (GNCReconcileList *list, gint num_rows)
 {
   g_return_val_if_fail (list != NULL, 0);
-  g_return_val_if_fail (IS_GNC_RECONCILE_LIST(list), 0);
+  g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), 0);
 
   if (!GTK_WIDGET_REALIZED (list))
     return 0;
@@ -422,7 +406,7 @@
 gnc_reconcile_list_get_num_splits (GNCReconcileList *list)
 {
   g_return_val_if_fail (list != NULL, 0);
-  g_return_val_if_fail (IS_GNC_RECONCILE_LIST(list), 0);
+  g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), 0);
 
   return gnc_query_list_get_num_entries(GNC_QUERY_LIST(list));
 }
@@ -431,7 +415,7 @@
 gnc_reconcile_list_get_current_split (GNCReconcileList *list)
 {
   g_return_val_if_fail (list != NULL, NULL);
-  g_return_val_if_fail (IS_GNC_RECONCILE_LIST(list), NULL);
+  g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), NULL);
 
   return gnc_query_list_get_current_entry(GNC_QUERY_LIST(list));
 }
@@ -452,7 +436,7 @@
 
   g_return_val_if_fail(item, NULL);
   g_return_val_if_fail(list, NULL);
-  g_return_val_if_fail(IS_GNC_RECONCILE_LIST(list), NULL);
+  g_return_val_if_fail(GNC_IS_RECONCILE_LIST(list), NULL);
 
   if (!list->reconciled)
     return NULL;
@@ -484,7 +468,7 @@
   GNCQueryList *qlist;
 
   g_return_if_fail (list != NULL);
-  g_return_if_fail (IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail (GNC_IS_RECONCILE_LIST(list));
 
   qlist = GNC_QUERY_LIST(list);
   gnc_query_list_refresh(qlist);
@@ -517,7 +501,7 @@
   gnc_numeric total = gnc_numeric_zero ();
 
   g_return_val_if_fail (list != NULL, total);
-  g_return_val_if_fail (IS_GNC_RECONCILE_LIST(list), total);
+  g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), total);
 
   if (list->reconciled == NULL)
     return total;
@@ -556,7 +540,7 @@
 gnc_reconcile_list_commit (GNCReconcileList *list, time_t date)
 {
   g_return_if_fail (list != NULL);
-  g_return_if_fail (IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail (GNC_IS_RECONCILE_LIST(list));
 
   if (list->reconciled == NULL)
     return;
@@ -585,7 +569,7 @@
   int i;
 
   g_return_if_fail(list != NULL);
-  g_return_if_fail(IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail(GNC_IS_RECONCILE_LIST(list));
 
   if (list->reconciled == NULL)
     return;
@@ -620,7 +604,7 @@
 gnc_reconcile_list_unselect_all(GNCReconcileList *list)
 {
   g_return_if_fail (list != NULL);
-  g_return_if_fail (IS_GNC_RECONCILE_LIST(list));
+  g_return_if_fail (GNC_IS_RECONCILE_LIST(list));
 
   gnc_query_list_unselect_all (GNC_QUERY_LIST(list));
 }
@@ -637,7 +621,7 @@
 gnc_reconcile_list_changed (GNCReconcileList *list)
 {
   g_return_val_if_fail (list != NULL, FALSE);
-  g_return_val_if_fail (IS_GNC_RECONCILE_LIST(list), FALSE);
+  g_return_val_if_fail (GNC_IS_RECONCILE_LIST(list), FALSE);
 
   return g_hash_table_size (list->reconciled) != 0;
 }
@@ -653,9 +637,8 @@
   GList *splits;
   Split *split;
 
-  auto_check = gnc_lookup_boolean_option ("Reconcile",
-                                          "Check off cleared transactions",
-                                          TRUE);
+  auto_check = gnc_gconf_get_bool(GCONF_RECONCILE_SECTION,
+				  "check_cleared", NULL);
 
   strings[5] = NULL;
 
--- src/gnome/mainwindow-account-tree.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/********************************************************************\
- * mainwindow-account-tree.h -- composite account selection widget  *
- *                              wrapped up for the main window      * 
- *                  and callback functions for GnuCash              *
- * Copyright (C) 2000 Gnumatic, Inc.                                *
- * Written by Robert Merkel <rgmerk at mira.net>                       *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_MAINWIN_ACCOUNT_TREE_H
-#define GNC_MAINWIN_ACCOUNT_TREE_H
-
-#include <gnome.h>
-
-#include "gnc-account-tree.h"
-#include "Account.h"
-
-#define GNC_MAINWIN_ACCOUNT_TREE(obj)          GTK_CHECK_CAST (obj, gnc_mainwin_account_tree_get_type (), GNCMainWinAccountTree)
-#define GNC_MAINWIN_ACCOUNT_TREE_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_mainwin_account_tree_get_type(), GNCMainWinAccountTreeClass)
-#define IS_GNC_MAINWIN_ACCOUNT_TREE(obj)       GTK_CHECK_TYPE (obj, gnc_mainwin_account_tree_get_type ())
-
-
-typedef struct _GNCMainWinAccountTree       GNCMainWinAccountTree;
-typedef struct _GNCMainWinAccountTreeClass  GNCMainWinAccountTreeClass;
-
-struct _GNCMainWinAccountTree
-{ 
-  GtkVBox vbox;
-  GtkScrolledWindow *scrolled_window;
-  GNCAccountTree *acc_tree; 
-};
-
-struct _GNCMainWinAccountTreeClass
-{
-  GtkVBoxClass parent_class;  
-
-  void (*select_account)   (GNCMainWinAccountTree *tree,
-                            Account        *account);
-
-  void (*unselect_account) (GNCMainWinAccountTree *tree,
-                            Account        *account);
-
-  void (*activate_account) (GNCMainWinAccountTree *tree,
-                            Account        *account);
-};
-
-guint          gnc_mainwin_account_tree_get_type(void);
-GtkWidget*     gnc_mainwin_account_tree_new(void);
-
-GtkWidget* 
-gnc_mainwin_account_tree_attach_popup(GNCMainWinAccountTree *tree,
-                                      GnomeUIInfo *popup_info,
-                                      gpointer user_data);
-
-void
-gnc_mainwin_account_tree_set_view_info(GNCMainWinAccountTree *tree,
-                                       AccountViewInfo new_info);
-Account *
-gnc_mainwin_account_tree_get_current_account(GNCMainWinAccountTree *tree);
-GList *
-gnc_mainwin_account_tree_get_current_accounts(GNCMainWinAccountTree *tree);
-
-void
-gnc_mainwin_account_tree_toggle_account_expansion (GNCMainWinAccountTree *tree,
-                                                   Account *account);
-
-#endif /* __GNC_MAINWINDOW_ACCOUNT_TREE_H */
Index: dialog-commodities.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-commodities.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/gnome/dialog-commodities.c -Lsrc/gnome/dialog-commodities.c -u -r1.18 -r1.19
--- src/gnome/dialog-commodities.c
+++ src/gnome/dialog-commodities.c
@@ -2,6 +2,7 @@
  * dialog-commodities.c -- commodities dialog                       *
  * Copyright (C) 2001 Gnumatic, Inc.                                *
  * Author: Dave Peticolas <dave at krondo.com>                         *
+ * Copyright (C) 2003,2005 David Hampton                            *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -30,13 +31,16 @@
 #include "gnc-commodity.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
+#include "gnc-tree-view-commodity.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-gnome-utils.h"
 #include "messages.h"
-#include "global-options.h"
 
 
 #define DIALOG_COMMODITIES_CM_CLASS "dialog-commodities"
+#define GCONF_SECTION "dialogs/edit_commodities"
 
 /* This static indicates the debugging module that this .o belongs to.  */
 /* static short module = MOD_GUI; */
@@ -45,186 +49,44 @@
 {
   GtkWidget * dialog;
 
-  GtkWidget * commodity_list;
+  GncTreeViewCommodity * commodity_tree;
   GtkWidget * edit_button;
   GtkWidget * remove_button;
-  GtkWidget * show_currencies;
+  gboolean    show_currencies;
 
-  gnc_commodity *commodity;
   gboolean new;
 } CommoditiesDialog;
 
 
-static gint last_width = 0;
-static gint last_height = 0;
-
-
-static int
-commodity_compare (gconstpointer a, gconstpointer b)
-{
-  gnc_commodity *comm_a = (gnc_commodity *) a;
-  gnc_commodity *comm_b = (gnc_commodity *) b;
-  gint fraction_a;
-  gint fraction_b;
-
-  SAFE_STRCMP (gnc_commodity_get_namespace (comm_a),
-               gnc_commodity_get_namespace (comm_b));
-
-  SAFE_STRCMP (gnc_commodity_get_mnemonic (comm_a),
-               gnc_commodity_get_mnemonic (comm_b));
-
-  SAFE_STRCMP (gnc_commodity_get_fullname (comm_a),
-               gnc_commodity_get_fullname (comm_b));
-
-  SAFE_STRCMP (gnc_commodity_get_exchange_code (comm_a),
-               gnc_commodity_get_exchange_code (comm_b));
-
-  fraction_a = gnc_commodity_get_fraction (comm_a);
-  fraction_b = gnc_commodity_get_fraction (comm_b);
-
-  if (fraction_a < fraction_b)
-    return -1;
-
-  if (fraction_b < fraction_a)
-    return 1;
-
-  return 0;
-}
-
-static int
-namespace_compare (gconstpointer a, gconstpointer b)
-{
-  return safe_strcmp (a, b);
-}
-
-static void
-gnc_load_namespace (gpointer data, gpointer user_data)
-{
-  const char *namespace = data;
-  CommoditiesDialog *cd = user_data;
-  gnc_commodity_table *ct;
-  GList *commodities;
-  GList *node;
-
-  if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cd->show_currencies)) &&
-      gnc_commodity_namespace_is_iso (namespace))
-    return;
-
-  ct = gnc_get_current_commodities ();
-
-  commodities = gnc_commodity_table_get_commodities (ct, namespace);
-
-  commodities = g_list_sort (commodities, commodity_compare);
-
-  for (node = commodities; node; node = node->next)
-  {
-    gnc_commodity *commodity = node->data;
-    const char *text[5];
-    gint row;
-
-    text[0] = gnc_commodity_get_namespace (commodity);
-    text[1] = gnc_commodity_get_mnemonic (commodity);
-    text[2] = gnc_commodity_get_fullname (commodity);
-    text[3] = gnc_commodity_get_exchange_code (commodity);
-    text[4] = g_strdup_printf ("%d", gnc_commodity_get_fraction (commodity));
-
-    row = gtk_clist_append (GTK_CLIST (cd->commodity_list), (char **)text);
-
-    g_free ((char *) text[4]);
-
-    gtk_clist_set_row_data (GTK_CLIST (cd->commodity_list), row, commodity);
-  }
-
-  g_list_free (commodities);
-}
-
-static void
-gnc_commodities_set_sensitives (CommoditiesDialog *cd)
-{
-  gboolean sensitive;
-
-  if (cd->commodity && !gnc_commodity_is_iso (cd->commodity))
-    sensitive = TRUE;
-  else
-    sensitive = FALSE;
-
-  gtk_widget_set_sensitive (cd->edit_button, sensitive);
-  gtk_widget_set_sensitive (cd->remove_button, sensitive);
-}
-
-static void
-gnc_commodities_load_commodities (CommoditiesDialog *cd)
-{
-  gnc_commodity_table *ct;
-  GList *namespaces;
-  int new_row;
-
-  ct = gnc_get_current_commodities ();
-
-  namespaces = gnc_commodity_table_get_namespaces (ct);
-  namespaces = g_list_sort (namespaces, namespace_compare);
-
-  gtk_clist_freeze (GTK_CLIST (cd->commodity_list));
-
-  gtk_clist_clear (GTK_CLIST (cd->commodity_list));
-
-  g_list_foreach (namespaces, gnc_load_namespace, cd);
-
-  gtk_clist_thaw (GTK_CLIST (cd->commodity_list));
-
-  gtk_clist_columns_autosize (GTK_CLIST (cd->commodity_list));
-
-  new_row = gtk_clist_find_row_from_data (GTK_CLIST (cd->commodity_list),
-                                          cd->commodity);
-  if (new_row < 0)
-    new_row = 0;
-
-  gtk_clist_select_row (GTK_CLIST (cd->commodity_list), new_row, 0);
-  if (gtk_clist_row_is_visible (GTK_CLIST (cd->commodity_list), new_row)
-      != GTK_VISIBILITY_FULL)
-    gtk_clist_moveto (GTK_CLIST (cd->commodity_list),
-                      new_row, 0, 0.5, 0.0);
+void gnc_commodities_window_destroy_cb (GtkObject *object, CommoditiesDialog *cd);
+void gnc_commodities_dialog_response (GtkDialog *dialog, gint response, CommoditiesDialog *cd);
+void gnc_commodities_show_currencies_toggled (GtkToggleButton *toggle, CommoditiesDialog *cd);
 
-  g_list_free (namespaces);
 
-  gnc_commodities_set_sensitives (cd);
-}
 
-static void
-window_destroy_cb (GtkObject *object, gpointer data)
+void
+gnc_commodities_window_destroy_cb (GtkObject *object,   CommoditiesDialog *cd)
 {
-  CommoditiesDialog *cd = data;
-
   gnc_unregister_gui_component_by_data (DIALOG_COMMODITIES_CM_CLASS, cd);
 
   g_free (cd);
 }
 
 static void
-close_clicked (GtkWidget *widget, gpointer data)
-{
-  CommoditiesDialog *cd = data;
-  gboolean active;
-
-  active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(cd->show_currencies));
-  gnc_set_boolean_option ("__gui", "commodity_include_iso", active);
-  gnc_close_gui_component_by_data (DIALOG_COMMODITIES_CM_CLASS, cd);
-}
-
-static void
-edit_clicked (GtkWidget *widget, gpointer data)
+edit_clicked (CommoditiesDialog *cd)
 {
-  CommoditiesDialog *cd = data;
+	gnc_commodity *commodity;
 
-  if (!cd->commodity)
-    return;
+	commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
+	if (commodity == NULL)
+		return;
 
-  if (gnc_ui_edit_commodity_modal (cd->commodity, cd->dialog))
-    gnc_gui_refresh_all ();
+	if (gnc_ui_edit_commodity_modal (commodity, cd->dialog))
+		gnc_gui_refresh_all ();
 }
 
 static void
-remove_clicked (GtkWidget *widget, gpointer data)
+remove_clicked (CommoditiesDialog *cd)
 {
   QofBook *book;
   GNCPriceDB *pdb;
@@ -233,9 +95,10 @@
   GList *accounts;
   gboolean do_delete;
   gboolean can_delete;
-  CommoditiesDialog *cd = data;
-
-  if (!cd->commodity)
+  gnc_commodity *commodity;
+  
+  commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
+  if (commodity == NULL)
     return;
 
   accounts = xaccGroupGetSubAccounts (gnc_get_current_group ());
@@ -246,7 +109,7 @@
   {
     Account *account = node->data;
 
-    if (cd->commodity == xaccAccountGetCommodity (account))
+    if (commodity == xaccAccountGetCommodity (account))
     {
       can_delete = FALSE;
       break;
@@ -268,7 +131,7 @@
 
   book = xaccGroupGetBook (xaccAccountGetRoot (accounts->data));
   pdb = gnc_pricedb_get_db (book);
-  prices = gnc_pricedb_get_prices(pdb, cd->commodity, NULL);
+  prices = gnc_pricedb_get_prices(pdb, commodity, NULL);
   if (prices)
   {
     const char *message = _("This commodity has price quotes. Are\n"
@@ -287,16 +150,15 @@
 
   if (do_delete)
   {
-    gnc_commodity_table *ct = gnc_get_current_commodities ();
+    gnc_commodity_table *ct;
 
+    ct = gnc_get_current_commodities ();
     for (node = prices; node; node = node->next)
       gnc_pricedb_remove_price(pdb, node->data);
 
-    gnc_commodity_table_remove (ct, cd->commodity);
-    gnc_commodity_destroy (cd->commodity);
-    cd->commodity = NULL;
-
-    gnc_commodities_load_commodities (cd);
+    gnc_commodity_table_remove (ct, commodity);
+    gnc_commodity_destroy (commodity);
+    commodity = NULL;
   }
 
   gnc_price_list_destroy(prices);
@@ -305,162 +167,150 @@
 }
 
 static void
-add_clicked (GtkWidget *widget, gpointer data)
+add_clicked (CommoditiesDialog *cd)
 {
-  CommoditiesDialog *cd = data;
   gnc_commodity *commodity;
   const char *namespace;
 
-  if (cd->commodity)
-    namespace = gnc_commodity_get_namespace (cd->commodity);
+  commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
+  if (commodity)
+    namespace = gnc_commodity_get_namespace (commodity);
   else
     namespace = NULL;
 
   commodity = gnc_ui_new_commodity_modal (namespace, cd->dialog);
-  if (commodity)
-  {
-    cd->commodity = commodity;
-    gnc_commodities_load_commodities (cd);
-  }
 }
 
-static void
-select_commodity_cb (GtkCList *clist, gint row, gint col,
-                     GdkEventButton *event, gpointer data)
+void
+gnc_commodities_dialog_response (GtkDialog *dialog,
+				 gint response,
+				 CommoditiesDialog *cd)
 {
-  CommoditiesDialog *cd = data;
+	switch (response) {
+	 case GNC_RESPONSE_NEW:
+	  add_clicked (cd);
+	  return;
+
+	 case GNC_RESPONSE_DELETE:
+	  remove_clicked (cd);
+	  return;
 
-  cd->commodity = gtk_clist_get_row_data (clist, row);
-  cd->new = FALSE;
+	 case GNC_RESPONSE_EDIT:
+	  edit_clicked (cd);
+	  return;
 
-  gnc_commodities_set_sensitives (cd);
+	 case GTK_RESPONSE_CLOSE:
+	 default:
+	  gnc_close_gui_component_by_data (DIALOG_COMMODITIES_CM_CLASS, cd);
+	  return;
+	}
 }
 
 static void
-unselect_commodity_cb (GtkCTree *ctre, gint row, gint col,
-                       GdkEventButton *event, gpointer data)
+gnc_commodities_dialog_selection_changed (GtkTreeSelection *selection,
+					  CommoditiesDialog *cd)
 {
-  CommoditiesDialog *cd = data;
-
-  cd->commodity = NULL;
-  cd->new = FALSE;
+	gboolean sensitive = FALSE;
+	gnc_commodity *commodity;
 
-  gnc_commodities_set_sensitives (cd);
+	commodity = gnc_tree_view_commodity_get_selected_commodity (cd->commodity_tree);
+	sensitive = commodity && !gnc_commodity_is_iso(commodity);
+	gtk_widget_set_sensitive (cd->edit_button, sensitive);
+	gtk_widget_set_sensitive (cd->remove_button, sensitive);
 }
 
-static void
-commodities_set_min_widths (CommoditiesDialog *cd)
+void
+gnc_commodities_show_currencies_toggled (GtkToggleButton *toggle,
+					 CommoditiesDialog *cd)
 {
-  const char *titles[] = { _("Type"),
-                           _("Symbol"),
-                           _("Name"),
-                           _("Code"),
-                           _("Fraction") };
-
-  GtkStyle *style = gtk_widget_get_style (cd->commodity_list);
-  GdkFont *font = NULL;
-  gint width;
-  gint i;
 
-  if (style != NULL)
-    font = style->font;
+	cd->show_currencies = gtk_toggle_button_get_active (toggle);
+	gnc_tree_view_commodity_refilter (cd->commodity_tree);
+}
 
-  if (font != NULL)
-    for (i = 0; i < 5; i++)
-    {
-      width = gdk_string_width (font, titles[i]);
-      gtk_clist_set_column_min_width (GTK_CLIST (cd->commodity_list),
-                                      i, width + 5);
-    }
+static gboolean
+gnc_commodities_dialog_filter_ns_func (gnc_commodity_namespace *namespace,
+				       gpointer data)
+{
+	CommoditiesDialog *cd = data;
+	const gchar *name;
+	GList *list;
+
+	/* Never show the template list */
+	name = gnc_commodity_namespace_get_name (namespace);
+	if (safe_strcmp (name, "template") == 0)
+	  return FALSE;
+
+	/* Check whether or not to show commodities */
+	if (!cd->show_currencies && gnc_commodity_namespace_is_iso(name))
+	  return FALSE;
+
+	/* Show any other namespace that has commodities */
+	list = gnc_commodity_namespace_get_commodity_list(namespace);
+	return (list != NULL);
 }
 
-static void
-show_currencies_toggled (GtkToggleButton *toggle, gpointer data)
+static gboolean
+gnc_commodities_dialog_filter_cm_func (gnc_commodity *commodity,
+				       gpointer data)
 {
-  CommoditiesDialog *cd = data;
+	CommoditiesDialog *cd = data;
 
-  gnc_commodities_load_commodities (cd);
+	if (cd->show_currencies)
+	  return TRUE;
+	return !gnc_commodity_is_iso(commodity);
 }
 
 static void
 gnc_commodities_dialog_create (GtkWidget * parent, CommoditiesDialog *cd)
 {
   GtkWidget *dialog;
+  GtkWidget *button;
+  GtkWidget *scrolled_window;
   GladeXML *xml;
-  gboolean active;
-
+  GtkTreeView *view;
+  GtkTreeSelection *selection;
+ 
   xml = gnc_glade_xml_new ("commodities.glade", "Commodities Dialog");
-
   dialog = glade_xml_get_widget (xml, "Commodities Dialog");
-  cd->dialog = dialog;
-
-  gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0,
-                               GTK_SIGNAL_FUNC (close_clicked), cd);
 
-  gtk_signal_connect (GTK_OBJECT (dialog), "destroy",
-                      GTK_SIGNAL_FUNC (window_destroy_cb), cd);
+  cd->dialog = dialog;
+  cd->show_currencies = gnc_gconf_get_bool(GCONF_SECTION, "include_iso", NULL);
+  
+  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, cd);
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
-
-  /* default to ok */
-  gnome_dialog_set_default (GNOME_DIALOG(dialog), 0);
-
-  /* commodity tree */
-  {
-    GtkWidget *list;
-
-    list = glade_xml_get_widget (xml, "commodity_list");
-    cd->commodity_list = list;
-
-    gtk_signal_connect (GTK_OBJECT(list), "select_row",
-                        GTK_SIGNAL_FUNC(select_commodity_cb), cd);
-
-    gtk_signal_connect (GTK_OBJECT(list), "unselect_row",
-                        GTK_SIGNAL_FUNC(unselect_commodity_cb), cd);
-  }
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   /* buttons */
-  {
-    GtkWidget *button;
-
-    button = glade_xml_get_widget (xml, "edit_button");
-    cd->edit_button = button;
-
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (edit_clicked), cd);
-
-    button = glade_xml_get_widget (xml, "remove_button");
-    cd->remove_button = button;
-
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (remove_clicked), cd);
+  cd->remove_button = glade_xml_get_widget (xml, "remove_button");
+  cd->edit_button = glade_xml_get_widget (xml, "edit_button");
 
-    button = glade_xml_get_widget (xml, "add_button");
+  /* commodity tree */
+    
+    scrolled_window = glade_xml_get_widget (xml, "commodity_list_window");
+    view = gnc_tree_view_commodity_new(gnc_get_current_book (),
+				       "gconf-section", GCONF_SECTION,
+				       "show-column-menu", TRUE,
+				       NULL);
+    cd->commodity_tree = GNC_TREE_VIEW_COMMODITY(view);
+    gtk_container_add (GTK_CONTAINER (scrolled_window), GTK_WIDGET(view));
+    gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(cd->commodity_tree), TRUE);
+    gnc_tree_view_commodity_set_filter (cd->commodity_tree,
+					gnc_commodities_dialog_filter_ns_func,
+					gnc_commodities_dialog_filter_cm_func,
+					cd, NULL);
+    selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+    g_signal_connect (G_OBJECT (selection), "changed",
+		      G_CALLBACK (gnc_commodities_dialog_selection_changed), cd);
 
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-                        GTK_SIGNAL_FUNC (add_clicked), cd);
 
+    /* Show currency button */
     button = glade_xml_get_widget (xml, "show_currencies_button");
-    cd->show_currencies = button;
-    active = gnc_lookup_boolean_option ("__gui", "commodity_include_iso", FALSE);
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), active);
-    gtk_signal_connect (GTK_OBJECT (button), "toggled",
-                        GTK_SIGNAL_FUNC (show_currencies_toggled), cd);
-  }
-
-  gnc_commodities_load_commodities (cd);
-  commodities_set_min_widths (cd);
+    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(button), cd->show_currencies);
 
-  if (last_width == 0)
-    gnc_get_window_size ("commodities_win", &last_width, &last_height);
-
-  if (last_height == 0)
-    last_height = 400;
-
-  gtk_window_set_default_size (GTK_WINDOW(cd->dialog),
-                               last_width, last_height);
+  gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(cd->dialog));
 }
 
 static void
@@ -468,12 +318,11 @@
 {
   CommoditiesDialog *cd = user_data;
 
-  gdk_window_get_geometry (GTK_WIDGET(cd->dialog)->window,
-                           NULL, NULL, &last_width, &last_height, NULL);
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(cd->dialog));
 
-  gnc_save_window_size ("commodities_win", last_width, last_height);
+  gnc_gconf_set_bool(GCONF_SECTION, "include_iso", cd->show_currencies, NULL);
 
-  gnome_dialog_close (GNOME_DIALOG (cd->dialog));
+  gtk_widget_destroy(cd->dialog);
 }
 
 static void
@@ -481,7 +330,9 @@
 {
   CommoditiesDialog *cd = user_data;
 
-  gnc_commodities_load_commodities (cd);
+  g_return_if_fail(cd != NULL);
+
+  gnc_tree_view_commodity_refilter (cd->commodity_tree);
 }
 
 static gboolean
@@ -521,7 +372,7 @@
                                              refresh_handler, close_handler,
                                              cd);
 
-  gtk_widget_grab_focus (cd->commodity_list);
+  gtk_widget_grab_focus (GTK_WIDGET(cd->commodity_tree));
 
   gtk_widget_show (cd->dialog);
 }
Index: dialog-fincalc.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-fincalc.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/gnome/dialog-fincalc.c -Lsrc/gnome/dialog-fincalc.c -u -r1.28 -r1.29
--- src/gnome/dialog-fincalc.c
+++ src/gnome/dialog-fincalc.c
@@ -30,12 +30,11 @@
 #include "dialog-utils.h"
 #include "finproto.h"
 #include "finvar.h"
-#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-commodity.h"
 #include "gnc-component-manager.h"
 #include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-gui-query.h"
 #include "messages.h"
 
@@ -89,7 +88,7 @@
 };
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 
 /** Prototypes **********************************************************/
@@ -265,8 +264,8 @@
 static void
 connect_fincalc_menu_item(GtkWidget *item, gpointer data)
 {
-  gtk_signal_connect(GTK_OBJECT(item), "activate",
-                     GTK_SIGNAL_FUNC(fincalc_menu_changed), data);
+  g_signal_connect (G_OBJECT (item), "activate",
+                    G_CALLBACK (fincalc_menu_changed), data);
 }
 
 static void
@@ -497,7 +496,7 @@
 {
   FinCalcDialog *fcd = user_data;
 
-  gnome_dialog_close (GNOME_DIALOG (fcd->dialog));
+  gtk_widget_destroy (fcd->dialog);
 }
 
 static gboolean
@@ -518,7 +517,6 @@
   gnc_commodity *commodity;
   GNCPrintAmountInfo print_info;
   FinCalcDialog *fcd;
-  GtkObject *fcdo;
   GtkWidget *button;
   GtkWidget *menu;
   GtkWidget *hbox;
@@ -536,13 +534,12 @@
   xml = gnc_glade_xml_new ("fincalc.glade", "Financial Calculator Dialog");
 
   fcd->dialog = glade_xml_get_widget (xml, "Financial Calculator Dialog");
-  fcdo = GTK_OBJECT(fcd->dialog);
 
   gnc_register_gui_component (DIALOG_FINCALC_CM_CLASS,
                               NULL, close_handler, fcd);
 
-  gtk_signal_connect(fcdo, "destroy",
-                     GTK_SIGNAL_FUNC(fincalc_dialog_destroy), fcd);
+  g_signal_connect (G_OBJECT (fcd->dialog), "destroy",
+                    G_CALLBACK (fincalc_dialog_destroy), fcd);
 
 
   edit = gnc_amount_edit_new();
@@ -556,8 +553,8 @@
   hbox = glade_xml_get_widget (xml, "payment_periods_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(edit), "changed",
-                     GTK_SIGNAL_FUNC(fincalc_entry_changed), fcd);
+  g_signal_connect (G_OBJECT (edit), "changed",
+                    G_CALLBACK (fincalc_entry_changed), fcd);
 
 
   edit = gnc_amount_edit_new();
@@ -571,8 +568,8 @@
   hbox = glade_xml_get_widget (xml, "interest_rate_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(edit), "changed",
-                     GTK_SIGNAL_FUNC(fincalc_entry_changed), fcd);
+  g_signal_connect (G_OBJECT (edit), "changed",
+                    G_CALLBACK (fincalc_entry_changed), fcd);
 
 
   print_info = gnc_commodity_print_info (commodity, FALSE);
@@ -588,8 +585,8 @@
   hbox = glade_xml_get_widget (xml, "present_value_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(edit), "changed",
-                     GTK_SIGNAL_FUNC(fincalc_entry_changed), fcd);
+  g_signal_connect (G_OBJECT (edit), "changed",
+                    G_CALLBACK (fincalc_entry_changed), fcd);
 
 
   edit = gnc_amount_edit_new();
@@ -603,8 +600,8 @@
   hbox = glade_xml_get_widget (xml, "periodic_payment_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(edit), "changed",
-                     GTK_SIGNAL_FUNC(fincalc_entry_changed), fcd);
+  g_signal_connect (G_OBJECT (edit), "changed",
+                    G_CALLBACK (fincalc_entry_changed), fcd);
 
 
   edit = gnc_amount_edit_new();
@@ -618,58 +615,58 @@
   hbox = glade_xml_get_widget (xml, "future_value_hbox");
   gtk_box_pack_start (GTK_BOX (hbox), edit, TRUE, TRUE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(edit), "changed",
-                     GTK_SIGNAL_FUNC(fincalc_entry_changed), fcd);
+  g_signal_connect (G_OBJECT (edit), "changed",
+                    G_CALLBACK (fincalc_entry_changed), fcd);
 
 
   button = glade_xml_get_widget (xml, "payment_periods_calc_button");
   fcd->calc_buttons = g_list_prepend(fcd->calc_buttons, button);
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(calc_payment_periods), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (calc_payment_periods), fcd);
 
   button = glade_xml_get_widget (xml, "interest_rate_calc_button");
   fcd->calc_buttons = g_list_prepend(fcd->calc_buttons, button);
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(calc_interest_rate), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (calc_interest_rate), fcd);
 
   button = glade_xml_get_widget (xml, "present_value_calc_button");
   fcd->calc_buttons = g_list_prepend(fcd->calc_buttons, button);
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(calc_present_value), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (calc_present_value), fcd);
 
   button = glade_xml_get_widget (xml, "periodic_payment_calc_button");
   fcd->calc_buttons = g_list_prepend(fcd->calc_buttons, button);
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(calc_periodic_payment), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (calc_periodic_payment), fcd);
 
   button = glade_xml_get_widget (xml, "future_value_calc_button");
   fcd->calc_buttons = g_list_prepend(fcd->calc_buttons, button);
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(calc_future_value), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (calc_future_value), fcd);
 
   button = glade_xml_get_widget (xml, "payment_periods_clear_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(fincalc_amount_clear_clicked),
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (fincalc_amount_clear_clicked),
                      fcd->amounts[PAYMENT_PERIODS]);
 
   button = glade_xml_get_widget (xml, "interest_rate_clear_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(fincalc_amount_clear_clicked),
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (fincalc_amount_clear_clicked),
                      fcd->amounts[INTEREST_RATE]);
 
   button = glade_xml_get_widget (xml, "present_value_clear_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(fincalc_amount_clear_clicked),
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (fincalc_amount_clear_clicked),
                      fcd->amounts[PRESENT_VALUE]);
 
   button = glade_xml_get_widget (xml, "periodic_payment_clear_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(fincalc_amount_clear_clicked),
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (fincalc_amount_clear_clicked),
                      fcd->amounts[PERIODIC_PAYMENT]);
 
   button = glade_xml_get_widget (xml, "future_value_clear_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(fincalc_amount_clear_clicked),
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (fincalc_amount_clear_clicked),
                      fcd->amounts[FUTURE_VALUE]);
 
   menu = glade_xml_get_widget (xml, "compounding_menu");
@@ -686,17 +683,17 @@
 
   button = glade_xml_get_widget (xml, "period_payment_radio");
   fcd->end_of_period_radio = button;
-  gtk_signal_connect(GTK_OBJECT(button), "toggled",
-                     GTK_SIGNAL_FUNC(fincalc_radio_toggled), fcd);
+  g_signal_connect (G_OBJECT (button), "toggled",
+                    G_CALLBACK (fincalc_radio_toggled), fcd);
 
   button = glade_xml_get_widget (xml, "discrete_compounding_radio");
   fcd->discrete_compounding_radio = button;
-  gtk_signal_connect(GTK_OBJECT(button), "toggled",
-                     GTK_SIGNAL_FUNC(fincalc_compounding_radio_toggled), fcd);
+  g_signal_connect (G_OBJECT (button), "toggled",
+                    G_CALLBACK (fincalc_compounding_radio_toggled), fcd);
 
   button = glade_xml_get_widget (xml, "close_button");
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(close_button_clicked), fcd);
+  g_signal_connect (G_OBJECT (button), "clicked",
+                    G_CALLBACK (close_button_clicked), fcd);
   fcd->payment_total_label = glade_xml_get_widget (xml, "payment_total_label");
 
   button = glade_xml_get_widget (xml, "schedule_button");
Index: dialog-totd.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-totd.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/gnome/dialog-totd.c -Lsrc/gnome/dialog-totd.c -u -r1.13 -r1.14
--- src/gnome/dialog-totd.c
+++ src/gnome/dialog-totd.c
@@ -1,310 +1,213 @@
-/********************************************************************\
- * dialog-totd.c -- Dialog to display a "tip of the day"            *
- * Copyright (C) 2000 Robert Merkel <rgmerk at mira.net>               *
- * Large fractions borrowed from gnome-hint (Copyright (C) 2000)    *
- * Free Software Foundation                                         *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
+/*
+ * dialog-totd.c : dialog to display a "tip of the day"
+ *
+ * Copyright (c) 2005 David Hampton <hampton at employees.org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, contact:
+ *
+ * Free Software Foundation           Voice:  +1-617-542-5942
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
+ * Boston, MA  02111-1307,  USA       gnu at gnu.org
+ */ 
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
+#include <glade/glade-xml.h>
 
 #include "dialog-totd.h"
-#include "dialog-utils.h"	/* remove with GTK 2.0 */
-#include "global-options.h"
-#include "gnc-gui-query.h"
-#include "gnc-ui.h"
+#include "dialog-utils.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-gnome-utils.h"
+#include "gnc-engine.h"
 #include "messages.h"
-#include "tip-of-the-day.h"
 
 
+#define GCONF_SECTION   "dialogs/tip_of_the_day"
+#define KEY_CURRENT_TIP "current_tip"
+#define KEY_SHOW_TIPS   "show_at_startup"
+
+
+/* Callbacks */
+void gnc_totd_dialog_close(GtkButton *button, gpointer user_data);
+void gnc_totd_dialog_next(GtkButton *button, gpointer user_data);
+void gnc_totd_dialog_previous(GtkButton *button, gpointer user_data);
+void gnc_totd_dialog_startup_toggled (GtkToggleButton *button, gpointer user_data);
+
+/* The Tips */
+static gchar **tip_list;
+static gint tip_count = -1;
+static gint current_tip_number = -1;
+
 /* This static indicates the debugging module that this .o belongs to.  */
-/* static short module = MOD_GUI; */
+static QofLogModule log_module = GNC_MOD_GUI;
 
-static GtkWidget *win = NULL;
-static GtkWidget *disable_cb = NULL;
-static GtkWidget *canvas = NULL;
-static GtkWidget *scrollwin = NULL;
-
-static GnomeCanvasItem *hint_item;
-static GnomeCanvasItem *blue_background;
-static GnomeCanvasItem *white_background;
-static gboolean old_enabled;
-
-static int width = 400, height = 200;
-
-
-/** Prototypes *********************************************************/
-static void draw_on_canvas(GtkWidget *canvas, char *hint);
-static void grow_text_if_necessary(void);
-static GtkWidget *gnc_ui_totd_dialog_create(void);
-static void totd_previous_cb(GtkWidget *widget, gpointer data);
-static void totd_next_cb(GtkWidget * widget, gpointer data);
-static void totd_close_cb(GtkWidget *widget, gpointer data);
-
-/** Implementations ***************************************************/
-
-/************************************************************************\
- * gnc_ui_totd_dialog_create_and_run                                    *
- *   display and run the "Tip of the Day" dialog                        *
- *                                                                      *
- * Returns: nothing                                                     *
-\************************************************************************/
 
-void gnc_ui_totd_dialog_create_and_run(void)
+/*********************/
+/* Utility Functions */
+/*********************/
+
+/** This function should be called to change the tip number.  It
+ *  handles clamping the number to the range of tips available, saving
+ *  the number in the GConf database, and updating the dialog window
+ *  with the text of the newly selected tip.
+ *
+ *  @param widget A pointer to any widget in the dialog.  This widget
+ *  is used as a starting point to find the GtkTextView widget that
+ *  holds the text of the tip.
+ *
+ *  @param offset Which tip to show.  If the value is zero then the
+ *  current tip will be shown.  If the value is negative the previous
+ *  tip will be shown.  If the value is positive the next tip will be
+ *  shown.
+ */
+static void
+gnc_new_tip_number (GtkWidget *widget,
+		    gint offset)
 {
-  if(win == NULL)
-  {
-    gnc_ui_totd_dialog_create();
-    gtk_widget_show_all(win);
-  }
-  else
-  {
-    gtk_window_present(GTK_WINDOW(win));
-  }
-  return;
+  GtkWidget *textview;
+
+  ENTER("widget %p, offset %d", widget, offset);
+  current_tip_number += offset;
+  DEBUG("clamp %d to '0 <= x < %d'", current_tip_number, tip_count);
+  if (current_tip_number < 0)
+    current_tip_number = tip_count - 1;
+  if (current_tip_number >= tip_count)
+    current_tip_number = 0;
+  gnc_gconf_set_int(GCONF_SECTION, KEY_CURRENT_TIP, current_tip_number, NULL);
+
+  textview = gnc_glade_lookup_widget(widget, "tip_textview");
+  gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)),
+			   _(tip_list[current_tip_number]), -1);
+  LEAVE("");
 }
 
-static GtkWidget *
-gnc_ui_totd_dialog_create(void)
-{
-  char *new_hint;
 
-  win = gnome_dialog_new(_("Tip of the Day"), 
-			 GNOME_STOCK_BUTTON_PREV, 
-			 GNOME_STOCK_BUTTON_NEXT, 
-			 GNOME_STOCK_BUTTON_CLOSE, 
-			 NULL);	
-
-  gnome_dialog_set_default(GNOME_DIALOG(win), 2);
-  gnome_dialog_close_hides(GNOME_DIALOG(win), FALSE);
-			   
-  scrollwin = gtk_scrolled_window_new(NULL, NULL);
-  gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
-				 GTK_POLICY_NEVER,
-				 GTK_POLICY_NEVER);
-  gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(win)->vbox),
-                     scrollwin, TRUE, TRUE, 0);
-  canvas = gnome_canvas_new();
-  gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas),
-  				 0.0,0.0,width,height);
-  gtk_widget_set_usize(canvas,width,height);
-  gtk_widget_ensure_style(canvas);
-  gtk_container_add(GTK_CONTAINER(scrollwin), canvas);
-  new_hint = gnc_get_current_tip();
-  draw_on_canvas(canvas, new_hint);
-  free(new_hint);
-  gtk_widget_show_all(scrollwin);
-
-  old_enabled = gnc_lookup_boolean_option("General",
-					  "Display \"Tip of the Day\"",
-					  TRUE);
-  {
-    const char *message = _("Display this dialog next time");
-    disable_cb = gtk_check_button_new_with_label(message);
-  }
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (disable_cb), old_enabled);
+/********************/
+/*    Callbacks     */
+/********************/
 
-  gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(win)->vbox),
-                     disable_cb, TRUE, TRUE, 0);
-  gtk_widget_show(disable_cb);
-
-  gnome_dialog_button_connect(GNOME_DIALOG(win), 0,
-			      GTK_SIGNAL_FUNC(totd_previous_cb), NULL);
-  gnome_dialog_button_connect(GNOME_DIALOG(win), 1,
-			      GTK_SIGNAL_FUNC(totd_next_cb), NULL);
-  gnome_dialog_button_connect(GNOME_DIALOG(win), 2,
-			      GTK_SIGNAL_FUNC(totd_close_cb), NULL);
-  gtk_signal_connect(GTK_OBJECT(win), "close",
-		     GTK_SIGNAL_FUNC(totd_close_cb), NULL);
+void
+gnc_totd_dialog_close (GtkButton *button,
+		       gpointer user_data)
+{
+  GtkWidget *dialog;
 
-  return win;
+  ENTER("button %p, dialog %p", button, user_data);
+  dialog = GTK_WIDGET(user_data);
+  gnc_save_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+  gtk_widget_destroy(dialog);
+  LEAVE("");
 }
 
-static void
-totd_previous_cb(GtkWidget *widget, gpointer data)
+void
+gnc_totd_dialog_next (GtkButton *button,
+		      gpointer user_data)
 {
-  char *new_hint;
-  gnc_decrement_tip();
-  new_hint = gnc_get_current_tip();
-  gnome_canvas_item_set(hint_item,
-			"text",new_hint,
-			NULL);
-  grow_text_if_necessary();
-  free(new_hint);
-  return;
+  gnc_new_tip_number(GTK_WIDGET(button), 1);
 }
 
-static void
-totd_next_cb(GtkWidget * widget, gpointer data)
+void
+gnc_totd_dialog_previous (GtkButton *button,
+			  gpointer user_data)
 {
-  char *new_hint;
-  gnc_increment_tip();
-  new_hint = gnc_get_current_tip();
-  gnome_canvas_item_set(hint_item,
-			"text", new_hint, NULL);
-  grow_text_if_necessary();
-  free(new_hint);
-  return;
+  gnc_new_tip_number(GTK_WIDGET(button), -1);
 }
 
-static void
-totd_close_cb(GtkWidget *widget, gpointer data)
+void
+gnc_totd_dialog_startup_toggled (GtkToggleButton *button,
+				 gpointer user_data)
 {
-  gboolean new_enabled =
-    gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(disable_cb));
+  gboolean active;
 
-  gnc_increment_tip();
-
-  gtk_widget_destroy(GTK_WIDGET(win));
-  win = NULL;
-  if (new_enabled != old_enabled)
-  {
-    gnc_set_boolean_option("General", 
-			   "Display \"Tip of the Day\"",
-			   new_enabled);
-    gnc_option_refresh_ui_by_name("General", "Display \"Tip of the Day\"");
-  }
-  return;
+  active = gtk_toggle_button_get_active(button);
+  gnc_gconf_set_bool(GCONF_SECTION, KEY_SHOW_TIPS, active, NULL);
 }
 
+/********************/
+/*     Parser       */
+/********************/
 
-/* increases the size of the canvas and enables scrolling if the text
-   gets big enough */
-
-static void
-grow_text_if_necessary(void)
+static gboolean
+gnc_totd_initialize (void)
 {
-  double w,h;
-  int ww,hh;
-  int changed = FALSE;
-
-  gtk_object_get(GTK_OBJECT(hint_item),
-		 "text_width",&w,
-		 "text_height",&h,
-		 NULL);
-  /*add border, and 10 pixels around*/
-  w+=75+10;
-  h+=50+10;
-  /*some sanity limits*/
-  /*if(w>800) w = 800;
-    if(h>600) h = 600;*/
-
-  if(w>width) {
-    width = w;
-    changed = TRUE;
-  }
-  if(h>height) {
-    height = h;
-    changed = TRUE;
+  gchar *filename, *contents, *new;
+  gsize length;
+  GError *error;
+
+  /* Find the file */
+  filename = gnc_gnome_locate_data_file("tip_of_the_day.list");
+  if (!filename)
+    return FALSE;
+
+  /* Read it */
+  if (!g_file_get_contents(filename, &contents, &length, &error)) {
+    printf("Unable to read file: %s\n", error->message);
+    g_error_free(error);
+    g_free(filename);
+    return FALSE;
   }
 
-  if(!changed)
-    return;
+  /* Split into multiple strings */
+  tip_list = g_strsplit(contents, "\n\n", 0);
+
+  /* Convert any escaped characters while counting the strings */
+  for (tip_count = 0; tip_list[tip_count] != NULL; tip_count++) {
+
+//  new = g_strdelimit(string, "\n", ' ');
+    new = g_strcompress(g_strdelimit(tip_list[tip_count], "\n", ' '));
+    g_free(tip_list[tip_count]);
+    tip_list[tip_count] = new;
+  }
 
-  /*limits on size*/
-  ww = width; hh = height;
-  if(ww>720) ww = 720;
-  if(hh>450) hh = 450;
-
-  if(ww != width || hh != height)
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
-				   GTK_POLICY_AUTOMATIC,
-				   GTK_POLICY_AUTOMATIC);
-  else
-    gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
-				   GTK_POLICY_NEVER,
-				   GTK_POLICY_NEVER);
-
-  /*here we grow the canvas*/
-  gtk_widget_set_usize(canvas,ww,hh);
-  gnome_canvas_set_scroll_region(GNOME_CANVAS(canvas),
-				 0.0,0.0,width,height);
-
-  gnome_canvas_item_set(blue_background,
-			"x2",(double)width,
-			"y2",(double)height,
-			NULL);
-  gnome_canvas_item_set(white_background,
-			"x2",(double)width,
-			"y2",(double)height,
-			NULL);
-  gnome_canvas_item_set(hint_item,
-			"x",(double)(((width-75)/2)+75),
-			"y",(double)(((height-50)/2)+50),
-			"clip_width",(double)(width-75),
-			"clip_height",(double)(height-50),
-			NULL);
+  g_free(contents);
+  g_free(filename);
+  return TRUE;
 }
 
-/* places items on the canvas to make up the tip of the day */
+/********************/
+/*      Main        */
+/********************/
 
-static void
-draw_on_canvas(GtkWidget *canvas, char *hint)
+void
+gnc_totd_dialog (GtkWindow *parent, gboolean startup)
 {
-  GnomeCanvasItem *item;
+  GladeXML *xml;
+  GtkWidget *dialog, *button;
+  gboolean show_tips;
+
+  show_tips = gnc_gconf_get_bool(GCONF_SECTION, KEY_SHOW_TIPS, NULL);
+  if (startup && !show_tips)
+    return;
+
+  if (tip_count == -1) {
+    if (!gnc_totd_initialize())
+      return;
+    current_tip_number =  gnc_gconf_get_int(GCONF_SECTION, KEY_CURRENT_TIP, NULL);
+  }
+
+  xml = gnc_glade_xml_new ("totd.glade", "totd_dialog");
+  dialog  = glade_xml_get_widget (xml, "totd_dialog");
+  gtk_window_set_transient_for(GTK_WINDOW (dialog), parent);
+  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
+				    dialog);
+
+  gnc_new_tip_number(dialog, 0);
 
-  blue_background = gnome_canvas_item_new(
-    gnome_canvas_root(GNOME_CANVAS(canvas)),
-    gnome_canvas_rect_get_type(),
-    "x1",(double)0.0,
-    "y1",(double)0.0,
-    "x2",(double)400.0,
-    "y2",(double)200.0,
-    "fill_color","sea green",
-    NULL);
-
-  white_background = gnome_canvas_item_new(
-    gnome_canvas_root(GNOME_CANVAS(canvas)),
-    gnome_canvas_rect_get_type(),
-    "x1",(double)75.0,
-    "y1",(double)50.0,
-    "x2",(double)400.0,
-    "y2",(double)200.0,
-    "fill_color","white",
-    NULL);
-
-  hint_item = gnome_canvas_item_new(
-    gnome_canvas_root(GNOME_CANVAS(canvas)),
-    gnome_canvas_text_get_type(),
-    "x",(double)237.5,
-    "y",(double)125.0,
-    "fill_color","black",
-    "font_gdk",canvas->style->font,
-    "clip_width",(double)325.0,
-    "clip_height",(double)150.0,
-    "clip",TRUE,
-    "text",hint,
-    NULL);
-
-  item = gnome_canvas_item_new(
-    gnome_canvas_root(GNOME_CANVAS(canvas)),
-    gnome_canvas_text_get_type(),
-    "x",(double)200.0,
-    "y",(double)25.0,
-    "fill_color","white",
-    "font",_("-*-helvetica-bold-r-normal-*-*-180-*-*-p-*-*-*"),
-    "text",_("Tip of the Day:"),
-    NULL);
+  button = glade_xml_get_widget(xml, "show_checkbutton");
+  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (button), show_tips);
 
-  grow_text_if_necessary();
+  gnc_restore_window_size(GCONF_SECTION, GTK_WINDOW(dialog));
+  gtk_widget_show(GTK_WIDGET (dialog));
 }
-/********************** END OF FILE *********************************\
-\********************************************************************/
Index: druid-merge.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/druid-merge.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome/druid-merge.c -Lsrc/gnome/druid-merge.c -u -r1.4 -r1.5
--- src/gnome/druid-merge.c
+++ src/gnome/druid-merge.c
@@ -34,16 +34,15 @@
 #include "druid-utils.h"
 #include "gnc-component-manager.h"
 #include "gnc-gui-query.h"
-#include "qof_book_merge.h"
+#include "qof.h"
 #include "druid-hierarchy.h"
 #include "gnc-ui-util.h"
 #include "Account.h"
-#include "global-options.h"
-#include "gnc-trace.h"
 #include "Group.h"
 
 static GtkWidget			*qof_book_merge_window = NULL;
 GtkWidget			*druid_hierarchy_window = NULL;
+static GtkWidget	*qsf_import_merge_window = NULL;
 QofSession			*previous_session = NULL;
 gint					count = 0;
 qof_book_mergeData	*mergeData = NULL;
@@ -52,7 +51,9 @@
 QofBook				*targetBook = NULL;
 gchar 				*buffer = "";
 
-void collision_rule_loop	( qof_book_mergeData*, qof_book_mergeRule*, 	guint );
+static QofLogModule log_module = GNC_MOD_GUI;
+
+void collision_rule_loop ( qof_book_mergeData*, qof_book_mergeRule*, guint );
 
 static GtkWidget*
 merge_get_widget (const char *name)
@@ -65,10 +66,10 @@
 static void
 delete_merge_window (void)
 {
-  if (!qof_book_merge_window) return;
-
-  gtk_widget_destroy (qof_book_merge_window);
-  qof_book_merge_window = NULL;
+	if (!qof_book_merge_window) return;
+	
+	gtk_widget_destroy (qof_book_merge_window);
+	qof_book_merge_window = NULL;
 }
 
 static void
@@ -77,6 +78,17 @@
 }
 
 static gboolean
+on_import_start_page_next(GnomeDruidPage  *gnomedruidpage,
+                       gpointer         arg1,
+                       gpointer         user_data)
+{
+
+	return FALSE;
+}
+
+
+
+static gboolean
 on_qof_start_page_next(GnomeDruidPage  *gnomedruidpage,
                        gpointer         arg1,
                        gpointer         user_data)
@@ -91,6 +103,7 @@
               		    gpointer         user_data)
 {
 	g_return_if_fail(mergeData != NULL);
+	ENTER (" ");
 	mergeData = qof_book_mergeUpdateResult(mergeData, MERGE_UPDATE); 
 	count = 0;
  	qof_book_mergeRuleForeach(mergeData, collision_rule_loop, MERGE_REPORT);
@@ -103,6 +116,7 @@
 	qof_book_mergeRule *currentRule;
 	
 	g_return_if_fail(mergeData != NULL);
+	ENTER (" ");
 	currentRule = mergeData->currentRule;
 	if(currentRule->mergeAbsolute == FALSE) { 
 		mergeData = qof_book_mergeUpdateResult(mergeData, MERGE_DUPLICATE); 
@@ -120,7 +134,8 @@
               		gpointer         user_data)
 {
 	qof_book_mergeRule *currentRule;
-	
+
+	ENTER (" ");
 	g_return_if_fail(mergeData != NULL);
 	currentRule = mergeData->currentRule;
 	g_return_if_fail(currentRule != NULL);
@@ -132,30 +147,34 @@
 }
 
 static gboolean
+on_import_next (GnomeDruidPage  *gnomedruidpage,
+                       gpointer         arg1,
+                       gpointer         user_data)
+{
+	return FALSE;
+}
+
+static gboolean
 on_qof_book_merge_next (GnomeDruidPage  *gnomedruidpage,
                        gpointer         arg1,
                        gpointer         user_data)
 {
     GtkWidget *top;
-	GtkLabel *output;
     const char *message = _("You must resolve all collisions.");
 
+	ENTER (" count=%d", count);
 	if(count > 0) {
 		top = gtk_widget_get_toplevel (GTK_WIDGET (gnomedruidpage));
 	    gnc_error_dialog(top, message);
 		return TRUE;
 	}
 	buffer = "";
-	gnc_suspend_gui_refresh ();
-	output = GTK_LABEL(merge_get_widget("OutPut"));
-	gtk_label_set_text(output, buffer);
-	gtk_widget_show(GTK_WIDGET(output));
-	gnc_resume_gui_refresh ();
+	LEAVE (" ");
 	return FALSE;
 }
 
 static void
-on_cancel (	GnomeDruid      *gnomedruid,
+on_merge_cancel (	GnomeDruid      *gnomedruid,
 			gpointer         user_data)
 {
 	gnc_suspend_gui_refresh ();
@@ -184,7 +203,7 @@
 }
 
 static void
-on_finish (GnomeDruidPage  *gnomedruidpage,
+on_merge_finish (GnomeDruidPage  *gnomedruidpage,
            gpointer         arg1,
            gpointer         user_data)
 {
@@ -192,6 +211,7 @@
     GtkWidget *top;
     const char *message;
 
+	ENTER (" ");
 	message = _("Error: the Commit operation failed.");
 	g_return_if_fail(mergeData != NULL);
 	gnc_suspend_gui_refresh ();
@@ -211,13 +231,14 @@
 }
 
 static void
-on_qof_book_merge_prepare (GnomeDruidPage  *gnomedruidpage,
+on_merge_prepare (GnomeDruidPage  *gnomedruidpage,
                             gpointer         arg1,
                             gpointer         user_data)
 {
 	GtkLabel *progress;
 
-    gnc_suspend_gui_refresh ();
+	gnc_suspend_gui_refresh ();
+	ENTER (" ");
 	progress = GTK_LABEL (merge_get_widget("ResultsBox"));
 	/* blank out old data */
 	gtk_label_set_text(progress, "");
@@ -230,6 +251,50 @@
 }
 
 static GtkWidget *
+gnc_create_import_druid ( void )
+{
+  GtkWidget *dialog;
+  GtkWidget *druid;
+  GladeXML *xml;
+
+	xml = gnc_glade_xml_new ("merge.glade", "Merge Druid");
+
+	glade_xml_signal_connect(xml, "on_start_page_next",
+		GTK_SIGNAL_FUNC (on_import_start_page_next));
+	
+	glade_xml_signal_connect(xml, "on_qof_book_merge_prepare",
+		GTK_SIGNAL_FUNC (on_merge_prepare));
+
+	glade_xml_signal_connect(xml, "on_qof_book_merge_next",
+		GTK_SIGNAL_FUNC (on_import_next));
+
+	glade_xml_signal_connect (xml, "on_finish", 
+		GTK_SIGNAL_FUNC (on_merge_finish));
+
+	glade_xml_signal_connect (xml, "on_cancel", 
+		GTK_SIGNAL_FUNC (on_merge_cancel));
+	
+	glade_xml_signal_connect (xml, "on_MergeUpdate_clicked",
+		GTK_SIGNAL_FUNC (on_MergeUpdate_clicked));
+		
+	glade_xml_signal_connect (xml, "on_MergeDuplicate_clicked",
+		GTK_SIGNAL_FUNC (on_MergeDuplicate_clicked));
+		
+	glade_xml_signal_connect (xml, "on_MergeNew_clicked",
+		GTK_SIGNAL_FUNC (on_MergeNew_clicked));
+
+	dialog = glade_xml_get_widget (xml, "Merge Druid");
+	gnome_window_icon_set_from_default (GTK_WINDOW (dialog));
+
+	druid = glade_xml_get_widget (xml, "merge_druid");
+	gnc_druid_set_colors (GNOME_DRUID (druid));
+
+	gtk_signal_connect (GTK_OBJECT(dialog), "destroy",
+                      GTK_SIGNAL_FUNC(qof_book_merge_destroy_cb), NULL);
+	return dialog;
+}
+
+static GtkWidget *
 gnc_create_merge_druid ( void )
 {
   GtkWidget *dialog;
@@ -242,16 +307,16 @@
 		GTK_SIGNAL_FUNC (on_qof_start_page_next));
 	
 	glade_xml_signal_connect(xml, "on_qof_book_merge_prepare",
-		GTK_SIGNAL_FUNC (on_qof_book_merge_prepare));
+		GTK_SIGNAL_FUNC (on_merge_prepare));
 
 	glade_xml_signal_connect(xml, "on_qof_book_merge_next",
 		GTK_SIGNAL_FUNC (on_qof_book_merge_next));
 
 	glade_xml_signal_connect (xml, "on_finish", 
-		GTK_SIGNAL_FUNC (on_finish));
+		GTK_SIGNAL_FUNC (on_merge_finish));
 
 	glade_xml_signal_connect (xml, "on_cancel", 
-		GTK_SIGNAL_FUNC (on_cancel));
+		GTK_SIGNAL_FUNC (on_merge_cancel));
 	
 	glade_xml_signal_connect (xml, "on_MergeUpdate_clicked",
 		GTK_SIGNAL_FUNC (on_MergeUpdate_clicked));
@@ -281,6 +346,7 @@
 	GtkLabel *output;
 	
 	g_return_if_fail(rule != NULL);
+	ENTER (" count=%d", count);
 	buffer = "";
 	/* there is a rule awaiting resolution, don't print any more */
 	if(count > 0) return;
@@ -328,13 +394,26 @@
 	return NULL;
 }
 
+void
+gnc_ui_qsf_import_merge_druid (QofSession *original, QofSession *import)
+{
+	if (qsf_import_merge_window) { return; }
+	gnc_engine_suspend_events ();
+	qsf_import_merge_window = gnc_create_import_druid();
+	g_return_if_fail(qsf_import_merge_window != NULL);
+	previous_session = original;
+	targetBook = qof_session_get_book(previous_session);
+	merge_session = import;
+	mergeBook = qof_session_get_book(merge_session);
+	gtk_widget_show(qsf_import_merge_window);
+}
 
 void
 gnc_ui_qof_book_merge_druid (void)
 {
 	if (qof_book_merge_window) return;
 	/*	QofSession changes to avoid using current book */
-    gnc_engine_suspend_events ();
+	gnc_engine_suspend_events ();
 	previous_session = qof_session_get_current_session();
 	targetBook = qof_session_get_book(previous_session);
 	merge_session = qof_session_new();
@@ -350,7 +429,7 @@
 	druid_hierarchy_window = gnc_ui_hierarchy_running();
 	gtk_widget_hide (druid_hierarchy_window);
 	gtk_object_set_data (GTK_OBJECT (druid_hierarchy_window), "Merge Druid", qof_book_merge_window);
-	gtk_widget_show (qof_book_merge_window);
+	gtk_widget_show_all (qof_book_merge_window);
 	g_return_if_fail(targetBook != NULL);
 	g_return_if_fail(mergeBook != NULL);
 	g_return_if_fail(merge_session != NULL);
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/.cvsignore,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/gnome/.cvsignore -Lsrc/gnome/.cvsignore -u -r1.19 -r1.20
--- src/gnome/.cvsignore
+++ src/gnome/.cvsignore
@@ -16,5 +16,5 @@
 gw-gnc.html
 i18n.h
 gnc-version.h
-
+.DS_Store
 
--- src/gnome/window-acct-tree.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/********************************************************************
- * window-acct-tree.h -- public account-tree-window functions       *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- * Copyright (C) 2001 Bill Gribble <grib at gnumatic.com>              *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#ifndef WINDOW_ACCT_TREE_H
-#define WINDOW_ACCT_TREE_H
-
-#include "mainwindow-account-tree.h"
-#include "window-main.h"
-
-typedef struct GNCAcctTreeWin_p GNCAcctTreeWin;
-
-GNCAcctTreeWin * gnc_acct_tree_window_new(const gchar * url);
-void             gnc_acct_tree_window_destroy(GNCAcctTreeWin * win);
-GtkWidget      * gnc_acct_tree_window_get_widget(GNCAcctTreeWin * win);
-void             gnc_acct_tree_window_create_menu(GNCAcctTreeWin * win,
-                                                  GNCMDIChildInfo * child);
-void             gnc_acct_tree_window_create_toolbar(GNCAcctTreeWin * win,
-                                                     GNCMDIChildInfo * child);
-Account        * gnc_acct_tree_window_get_current_account(GNCAcctTreeWin * w);
-GnomeMDIChild  * gnc_acct_tree_window_create_child(const gchar * url);
-void             gnc_main_window_open_accounts(gboolean toplevel); 
-SCM              gnc_acct_tree_window_get_options(GNCAcctTreeWin * win);
-int              gnc_acct_tree_window_get_id(GNCAcctTreeWin * win);
-
-#endif
--- src/gnome/window-main.c
+++ /dev/null
@@ -1,1081 +0,0 @@
-/********************************************************************
- * window-main.c -- open/close/configure GNOME MDI main window      *
- * Copyright (C) 1998,1999 Jeremy Collins	                          *
- * Copyright (C) 1998,1999,2000 Linas Vepstas <linas at linas.org>     *
- * Copyright (C) 2001 Bill Gribble                                  *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- ********************************************************************/
-
-#include "config.h"
-
-#include <errno.h>
-#include <gnome.h>
-#include <libguile.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "dialog-account.h"
-#include "dialog-fincalc.h"
-#include "dialog-find-transactions.h"
-#include "dialog-options.h"
-#include "dialog-scheduledxaction.h"
-#include "dialog-sxsincelast.h"
-#include "dialog-totd.h"
-#include "dialog-transfer.h"
-#include "dialog-utils.h"
-#include "druid-acct-period.h"
-#include "druid-loan.h"
-#include "druid-merge.h"
-#include "gfec.h"
-#include "global-options.h"
-#include "gnc-engine.h"
-#include "gnc-engine-util.h"
-#include "gnc-file-dialog.h"
-#include "gnc-file-history.h"
-#include "gnc-file-history-gnome.h"
-#include "gnc-file.h"
-#include "gnc-gui-query.h"
-#include "gnc-menu-extensions.h"
-#include "gnc-split-reg.h"
-#include "gnc-ui.h"
-#include "gnc-version.h"
-#include "guile-util.h"
-#include "mainwindow-account-tree.h"
-#include "option-util.h"
-#include "top-level.h"
-#include "window-acct-tree.h"
-#include "window-help.h"
-#include "window-main-summarybar.h"
-#include "window-main.h"
-#include "window-reconcile.h"
-#include "window-register.h"
-#include "window-report.h"
-#include "messages.h"
-#include "guile-mappings.h"
-
-static short module = MOD_GUI;
-
-static void gnc_main_window_create_menus(GNCMDIInfo * maininfo);
-static GnomeUIInfo * gnc_main_window_toolbar_prefix (void);
-static GnomeUIInfo * gnc_main_window_toolbar_suffix (void);
-
-/**
- * gnc_main_window_get_mdi_child
- *
- * This routine grovels through the mdi data structures and finds the
- * GNCMDIChildInfo data structure for the view currently at the top of
- * the stack.
- *
- * returns: A pointer to the GNCMDIChildInfo data structure for the
- * current view, or NULL in cast of error.
- */
-static GNCMDIChildInfo *
-gnc_main_window_get_mdi_child (void)
-{
-  GNCMDIChildInfo *child_info;
-  GNCMDIInfo *main_info;
-  GnomeMDIChild *child;
-  GnomeMDI *mdi;
-  GnomeApp *app;
-  GtkWidget *view;
-
-  ENTER(" ");
-  main_info = gnc_mdi_get_current ();
-  if (!main_info) {
-    LEAVE("main_info is NULL");
-    return(NULL);
-  }
-
-  mdi = main_info->mdi;
-  if (!mdi) {
-    LEAVE("null mdi");
-    return NULL;
-  }
-
-  child = gnome_mdi_get_active_child(mdi);
-  if (child) {
-    child_info = gtk_object_get_user_data(GTK_OBJECT(child));
-    LEAVE("child=%p", child_info);
-    return(child_info);
-  }
-
-  /* Grrr. There should have been an active child but the MDI code has
-   * some rough edges, to put it politely.  If we hit this case and
-   * the user has more than one child window, this code may or may not
-   * select the right child.  There's absolutely no way to tell from
-   * the available data which view is in front. */
-  DEBUG("mdi=%p, mdi->active_child=%p", mdi, child);
-  app = gnome_mdi_get_active_window(mdi);
-  if (app) {
-    /* Force the MDI to have a valid view. */
-    view = gnome_mdi_get_view_from_window (mdi, app);
-    gnome_mdi_set_active_view (mdi, view);
-
-    child_info = gnc_mdi_child_find_by_app(app);
-    LEAVE("child=%p", child_info);
-    return(child_info);
-  }
-
-  LEAVE("oops. No valid no child or app");
-  return(NULL);
-}
-
-/********************************************************************
- * gnc_shutdown
- * close down gnucash from the C side...
- ********************************************************************/
-void
-gnc_shutdown (int exit_status)
-{
-  /*SCM scm_shutdown = gnc_scm_lookup("gnucash bootstrap", "gnc:shutdown");*/
-  SCM scm_shutdown = scm_c_eval_string("gnc:shutdown");
-
-  if(scm_procedure_p(scm_shutdown) != SCM_BOOL_F)
-  {
-    SCM scm_exit_code = scm_long2num(exit_status);    
-    scm_call_1(scm_shutdown, scm_exit_code);
-  }
-  else
-  {
-    /* Either guile is not running, or for some reason we
-       can't find gnc:shutdown. Either way, just exit. */
-    g_warning("couldn't find gnc:shutdown -- exiting anyway.");
-    exit(exit_status);
-  }
-}
-
-/********************************************************************
- * gnc_main_window_app_created_cb()
- * called when a new top-level GnomeApp is created.  
- ********************************************************************/
-
-static void
-gnc_main_window_app_created_cb(GnomeMDI * mdi, GnomeApp * app, 
-                               gpointer data) {
-  GtkWidget * summarybar;
-  GtkWidget * statusbar;
-
-  /* add the summarybar */
-  ENTER(" ");
-  summarybar = gnc_main_window_summary_new();
-
-  {
-    GnomeDockItemBehavior behavior;
-    GtkWidget *item;
-
-    /* This is essentially gnome_app_add_docked, but without using
-     * gnome_app_add_dock_item because it emits the layout_changed
-     * signal which creates a new layout and writes it over the saved
-     * layout config before we've had a chance to read it.
-     */
-
-    behavior = (GNOME_DOCK_ITEM_BEH_EXCLUSIVE |
-                GNOME_DOCK_ITEM_BEH_NEVER_VERTICAL);
-    if (!gnome_preferences_get_toolbar_detachable ())
-      behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
-
-    item = gnome_dock_item_new("Summary Bar", behavior);
-    gtk_container_add( GTK_CONTAINER (item), summarybar );
-
-    if (app->layout) {
-      gnome_dock_layout_add_item( app->layout,
-                                  GNOME_DOCK_ITEM(item),
-                                  GNOME_DOCK_TOP,
-                                  2, 0, 0 );
-    }
-    else {
-      gnome_dock_add_item( GNOME_DOCK(app->dock),
-                           GNOME_DOCK_ITEM(item),
-                           GNOME_DOCK_TOP,
-                           2, 0, 0, FALSE );
-    }
-  }
-
-  /* add the statusbar */ 
-  statusbar = gnome_appbar_new(TRUE, TRUE, GNOME_PREFERENCES_USER);
-  gnome_app_set_statusbar(app, statusbar);
-
-  /* set up extensions menu and hints */
-  gnc_extensions_menu_setup (app, WINDOW_NAME_MAIN);
-
-  /* make sure the file history is shown */ 
-  gnc_history_update_menu (GTK_WIDGET (app));
-  LEAVE(" ");
-}
-
-static void
-gnc_refresh_main_window_info (void)
-{
-  GList *containers = gtk_container_get_toplevels ();
-
-  ENTER(" ");
-  while (containers)
-  {
-    GtkWidget *w = containers->data;
-
-    if (GNOME_IS_APP (w))
-    {
-      gnc_app_set_title (GNOME_APP (w));
-      gnc_history_update_menu (w);
-    }
-
-    containers = containers->next;
-  }
-  LEAVE(" ");
-}
-
-
-/********************************************************************
- * gnc_main_window_create_child()
- * open an MDI child given a config string (URL).  This is used at 
- * MDI session restore time 
- ********************************************************************/
-
-static GnomeMDIChild * 
-gnc_main_window_create_child(const gchar * configstring)
-{
-  GnomeMDIChild *child;
-  URLType type;
-  char * location;
-  char * label;
-
-  ENTER(" ");
-  if (!configstring)
-  {
-    gnc_main_window_open_accounts (FALSE);
-    LEAVE("no configstring");
-    return NULL;
-  }
-
-  type = gnc_html_parse_url(NULL, configstring, &location, &label);
-  g_free(location);
-  g_free(label);
-
-  if (!safe_strcmp (type, URL_TYPE_REPORT)) {
-    child = gnc_report_window_create_child(configstring);
-
-  } else if (!safe_strcmp (type, URL_TYPE_ACCTTREE)) {
-    child = gnc_acct_tree_window_create_child(configstring);
-
-  } else {
-    child = NULL;
-  }
-
-  LEAVE(" ");
-  return child;
-}
-
-/********************************************************************
- * gnc_main_window_can_*()
- ********************************************************************/
-
-static gboolean
-gnc_main_window_can_restore_cb (const char * filename)
-{
-  return !gnc_commodity_table_has_namespace (gnc_get_current_commodities (),
-                                             GNC_COMMODITY_NS_LEGACY);
-}
-
-/**
- * gnc_main_window_flip_toolbar_cb
- *
- * @widget: A pointer to the menu item selected. (ignored)
- * @data: The user data for this menu item. This is a pointer to a
- * GNCMDIInfo data structure. (ignored)
- *
- * This routine flips the state of the toolbar, hiding it if currently
- * visible, and showing it if not.  This routine has to grovel through
- * the mdi related data structures to find the current child data
- * structure (because there are potentially many windows).  The
- * callback data should point to the right mdi child data structure,
- * but doesn't appear to.
- */
-static void
-gnc_main_window_flip_toolbar_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIChildInfo * mc;
-  gboolean toolbar_visibility = !gnc_mdi_get_toolbar_visibility();
-
-  ENTER("widget=%p, data=%p", widget, data);
-  mc = gnc_main_window_get_mdi_child();
-  if (!mc) {
-    LEAVE("oops");
-    return;
-  }
-  gnc_mdi_set_toolbar_visibility(toolbar_visibility);
-  gnc_mdi_show_toolbar(mc);
-  LEAVE("flipped");
-}
-
-/**
- * gnc_main_window_flip_status_bar_cb
- *
- * @widget: A pointer to the menu item selected. (ignored)
- * @data: The user data for this menu item. (ignored)
- *
- * This routine flips the state of the status bar, hiding it if
- * currently visible, and showing it if not.  This routine has to
- * grovel through the mdi related data structures to find the current
- * child data structure (because there are potentially many windows).
- * The callback data should point to the right mdi child data
- * structure, but doesn't appear to.
- */
-static void
-gnc_main_window_flip_status_bar_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIChildInfo * mc;
-  gboolean statusbar_visibility = !gnc_mdi_get_statusbar_visibility();
-
-  ENTER(" ");
-  mc = gnc_main_window_get_mdi_child();
-  if (!mc) {
-    LEAVE("oops");
-    return;
-  }
-  gnc_mdi_set_statusbar_visibility(statusbar_visibility);
-  gnc_mdi_show_statusbar(mc);
-  LEAVE("flipped");
-}
-
-/**
- * gnc_main_window_flip_summary_bar_cb
- *
- * @widget: A pointer to the menu item selected. (ignored)
- * @data: The user data for this menu item. (ignored)
- *
- * This routine flips the state of the summary bar, hiding it if
- * currently visible, and showing it if not.  This routine has to
- * grovel through the mdi related data structures to find the current
- * child data structure (because there are potentially many windows).
- * The callback data should point to the right mdi child data
- * structure, but doesn't appear to.
- */
-static void
-gnc_main_window_flip_summary_bar_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIChildInfo * mc;
-  gboolean summarybar_visibility = !gnc_mdi_get_summarybar_visibility();
-
-  ENTER(" ");
-  mc = gnc_main_window_get_mdi_child();
-  if (!mc) {
-    LEAVE("oops");
-    return;
-  }
-  gnc_mdi_set_summarybar_visibility(summarybar_visibility);
-  gnc_mdi_show_summarybar(mc);
-  LEAVE("flipped");
-}
-
-/********************************************************************
- * gnc_main_window_new()
- * initialize the Gnome MDI system
- ********************************************************************/
-
-GNCMDIInfo * 
-gnc_main_window_new (void)
-{
-  GNCMDIInfo * retval;
-
-  ENTER(" ");
-  retval = gnc_mdi_new ("GnuCash", "GnuCash",
-                        gnc_main_window_toolbar_prefix (),
-                        gnc_main_window_toolbar_suffix (),
-                        gnc_shutdown,
-                        gnc_main_window_can_restore_cb,
-                        gnc_main_window_create_child);
-
-  g_return_val_if_fail (retval != NULL, NULL);
-
-  /* these menu and toolbar options are the ones that are always 
-   * available */ 
-  gnc_main_window_create_menus (retval);
-
-  /* set up the position where the child menus/toolbars will be 
-   * inserted  */
-  gnome_mdi_set_child_menu_path(GNOME_MDI(retval->mdi),
-                                "_Edit");
-  gnome_mdi_set_child_list_path(GNOME_MDI(retval->mdi),
-                                "_Windows/");
-
-  /* handle top-level signals */
-  gtk_signal_connect(GTK_OBJECT(retval->mdi), "app_created",
-                     GTK_SIGNAL_FUNC(gnc_main_window_app_created_cb),
-                     retval);
-
-  LEAVE(" ");
-  return retval;
-}
-
-/********************************************************************
- * menu/toolbar data structures and callbacks 
- * these are the "templates" that are installed in every top level
- * MDI window
- ********************************************************************/
-
-static void
-gnc_main_window_options_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_show_options_dialog();
-}
-
-static void
-gnc_main_window_file_new_file_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_file_new ();
-  gnc_refresh_main_window_info ();
-}
-
-static void
-gnc_main_window_file_new_window_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIInfo *main_info;
-  GnomeMDI *mdi;
-
-  main_info = gnc_mdi_get_current ();
-  if (!main_info) return;
-
-  mdi = main_info->mdi;
-  if (!mdi) return;
-
-  if (mdi->active_child && mdi->active_view)
-  {
-    if (!strcmp(mdi->active_child->name, _("Accounts")))
-    {
-      gnc_main_window_open_accounts (TRUE);
-    }
-    else
-    {
-      GnomeMDIChild * child = mdi->active_child;
-      gnome_mdi_remove_view(mdi, mdi->active_view, FALSE);
-      gnome_mdi_add_toplevel_view(mdi, child);
-    }
-  }
-}
-
-static void
-gnc_main_window_file_open_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_file_open ();
-  gnc_refresh_main_window_info ();
-}
-
-void
-gnc_main_window_file_save_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_file_save ();
-  gnc_refresh_main_window_info ();
-}
-
-void
-gnc_main_window_file_save_as_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_file_save_as ();
-  gnc_refresh_main_window_info ();
-}
-
-static void
-gnc_main_window_file_export_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_file_export_file(NULL);
-  gnc_refresh_main_window_info ();
-}
-
-static void
-gnc_main_window_file_shutdown_cb(GtkWidget * widget, gpointer data)
-{
-  gnc_shutdown (0);
-}
-
-/**
- * gnc_main_window_dispatch_cb
- *
- * @widget: A pointer to the menu item selected. (ignored)
- * @data: The user data for this menu item. (ignored)
- *
- * The main menubar has several items that must react differently
- * depending upon what window is in front when they are selected.
- * These menus all point to this dispatch routine, which uses the user
- * data associated with the menu item to determine which function was
- * requested. If then calls the appropriate dispatch function (and
- * data) registered for this item and saved in the GNCMDIChildInfo
- * data structure.
- *
- * Again, this routine has to grovel through the mdi related data
- * structures to find the current child data structure (because there
- * are potentially many windows).  The callback data should point to
- * the right mdi child data structure, but doesn't appear to.
- */
-static void
-gnc_main_window_dispatch_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIChildInfo *mc;
-  GNCMDIDispatchType type;
-  gpointer *uidata;
-
-  /* How annoying. MDI overrides the user data. Get it the hard way. */
-  uidata = gtk_object_get_data(GTK_OBJECT(widget), GNOMEUIINFO_KEY_UIDATA);
-  type = (GNCMDIDispatchType)GPOINTER_TO_UINT(uidata);
-  g_return_if_fail(type < GNC_DISP_LAST);
-
-  mc = gnc_main_window_get_mdi_child();
-  if (mc && mc->dispatch_callback[type])
-    mc->dispatch_callback[type](widget, mc->dispatch_data[type]);
-}
-
-/**
- * gnc_main_window_tax_info_cb
- *
- * @widget: A pointer to the menu item selected. (ignored)
- * @unused: The user data for this menu item. (ignored)
- *
- * Bring up the window for editing tax data.
- */
-static void
-gnc_main_window_tax_info_cb (GtkWidget * widget, gpointer unused) {
-  GNCMDIChildInfo * mc;
-
-  mc = gnc_main_window_get_mdi_child();
-  if (!mc || !mc->app)
-    return;
-  gnc_tax_info_dialog(GTK_WIDGET(mc->app));
-}
-
-static void
-gnc_main_window_file_close_cb(GtkWidget * widget, gpointer data)
-{
-  GNCMDIInfo *main_info;
-  GnomeMDI *mdi;
-  GNCMDIChildInfo * inf;
-
-  main_info = gnc_mdi_get_current ();
-  if (!main_info) return;
-
-  mdi = main_info->mdi;
-  if (!mdi) return;
-
-  inf = gtk_object_get_user_data(GTK_OBJECT(mdi->active_child));
-
-  if (mdi->active_child)
-  {
-    if (inf->toolbar)
-    {
-      gtk_widget_destroy (GTK_WIDGET(inf->toolbar)->parent);
-      inf->toolbar = NULL;
-    }
-
-    gnome_mdi_remove_child (mdi, mdi->active_child, FALSE);
-  }  
-  else
-  {
-    gnc_warning_dialog (GTK_WIDGET(inf->app),
-			_("Select \"Exit\" to exit GnuCash."));
-  }
-}
-
-void
-gnc_main_window_fincalc_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_ui_fincalc_dialog_create();
-}
-
-static void
-gnc_main_window_books_druid_cb(GtkWidget *widget, gpointer data)
-{
-	gnc_acct_period_dialog();
-}
-
-void
-gnc_main_window_gl_cb(GtkWidget *widget, gpointer data)
-{
-  GNCLedgerDisplay *ld;
-  GNCSplitReg *gsr;
-  RegWindow *regData;
-
-  ld = gnc_ledger_display_gl ();
-  gsr = gnc_ledger_display_get_user_data( ld );
-  if ( ! gsr ) {
-    regData = regWindowLedger (ld);
-    gnc_register_raise (regData);
-  } else {
-    gnc_split_reg_raise( gsr );
-  }
-}
-
-void
-gnc_main_window_prices_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_prices_dialog (NULL);
-}
-
-
-void
-gnc_main_window_find_transactions_cb (GtkWidget *widget, gpointer data)
-{
-  gnc_ui_find_transactions_dialog_create(NULL);
-}
-
-void
-gnc_main_window_sched_xaction_cb (GtkWidget *widget, gpointer data)
-{
-  gnc_ui_scheduled_xaction_dialog_create();
-}
-
-static
-void
-gnc_main_window_sched_xaction_slr_cb (GtkWidget *widget, gpointer data)
-{
-  gint ret;
-  
-  const char *nothing_to_do_msg =
-    _( "There are no Scheduled Transactions to be entered at this time." );
-
-  ret = gnc_ui_sxsincelast_dialog_create();
-  if ( ret == 0 ) {
-    gnc_info_dialog(NULL, nothing_to_do_msg );
-  } else if ( ret < 0 ) {
-    gnc_info_dialog
-      (NULL, ngettext 
-       /* Translators: %d is the number of transactions. This is a
-	  ngettext(3) message. */
-       ("There are no Scheduled Transactions to be entered at this time.\n"
-	"(%d transaction automatically created)",
-	"There are no Scheduled Transactions to be entered at this time.\n"
-	"(%d transactions automatically created)",
-	-(ret)),
-       -(ret));
-  } /* else { this else [>0 means dialog was created] intentionally left
-     * blank. } */
-}
-
-static
-void
-gnc_main_window_sx_loan_druid_cb( GtkWidget *widget, gpointer data)
-{
-  gnc_ui_sx_loan_druid_create();
-}
-
-void
-gnc_main_window_about_cb (GtkWidget *widget, gpointer data)
-{
-  GtkWidget *about;
-  const gchar *message = _("The GnuCash personal finance manager.\n"
-                           "The GNU way to manage your money!\n"
-                           "http://www.gnucash.org/");
-  const gchar *copyright = "(C) 1998-2002 Linas Vepstas";
-  const gchar *authors[] = {
-    "Derek Atkins <derek at ihtfp.com>",
-    "Rob Browning <rlb at cs.utexas.edu>",
-    "Bill Gribble <grib at billgribble.com>",
-    "David Hampton <hampton at employees.org>",
-    "James LewisMoss <dres at debian.org>",
-    "Robert Graham Merkel <rgmerk at mira.net>",
-    "Dave Peticolas <dave at krondo.com>",
-    "Joshua Sled <jsled at asynchronous.org>",
-    "Christian Stimming <stimming at tuhh.de>",
-    "Linas Vepstas <linas at linas.org>",
-    NULL
-  };
-  gchar *ver_string;
-
-#ifdef GNUCASH_CVS
-  ver_string = g_strdup_printf("%s cvs (built %s)", VERSION, GNUCASH_BUILD_DATE);
-#else
-  ver_string = strdup(VERSION);
-#endif
-  about = gnome_about_new ("GnuCash", ver_string, copyright,
-                           authors, message, NULL);
-  g_free(ver_string);
-
-  gnome_dialog_set_parent (GNOME_DIALOG(about),
-                           GTK_WINDOW(gnc_ui_get_toplevel()));
-
-  gnome_dialog_run_and_close (GNOME_DIALOG(about));
-}
-
-void
-gnc_main_window_commodities_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_commodities_dialog (NULL);
-}
-
-
-void
-gnc_main_window_tutorial_cb (GtkWidget *widget, gpointer data)
-{
-  helpWindow(NULL, NULL, HH_MAIN);
-}
-
-void
-gnc_main_window_totd_cb (GtkWidget *widget, gpointer data)
-
-{
-  gnc_ui_totd_dialog_create_and_run();
-  return;
-}
-
-void
-gnc_main_window_help_cb (GtkWidget *widget, gpointer data)
-{
-  helpWindow(NULL, NULL, HH_HELP);
-}
-
-void
-gnc_main_window_exit_cb (GtkWidget *widget, gpointer data)
-{
-  gnc_shutdown(0);
-}
-
-static void
-gnc_main_window_file_hierarchy_merge_cb(GtkWidget *w, gpointer data)
-{
-	gnc_ui_qof_book_merge_druid();
-}
-
-static void
-gnc_main_window_file_new_account_tree_cb(GtkWidget * w, gpointer data)
-{
-  gnc_main_window_open_accounts(FALSE);
-}
-
-static void
-gnc_main_window_create_menus(GNCMDIInfo * maininfo)
-{
-  static GnomeUIInfo gnc_file_recent_files_submenu_template[] =
-  {
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_file_import_submenu_template[] =
-  {
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_file_export_submenu_template[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Export _Accounts..."),
-      N_("Export the account hierarchy to a new file"),
-      gnc_main_window_file_export_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_file_menu_template[] = 
-  {
-    GNOMEUIINFO_MENU_NEW_ITEM(N_("_New File"),
-                              N_("Create a new file"),
-                              gnc_main_window_file_new_file_cb, NULL),
-    {
-      GNOME_APP_UI_ITEM,
-      N_("New Account _Tree"),
-      N_("Open a new account tree view"),
-      gnc_main_window_file_new_account_tree_cb, NULL, NULL, 
-      GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL
-    },    
-	{
-		GNOME_APP_UI_ITEM,
-		N_("Add New Account Hierarchy"),
-		N_("Extend the current book by merging with new account type categories"),
-		gnc_main_window_file_hierarchy_merge_cb, NULL, NULL,
-		GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL
-	},
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_MENU_OPEN_ITEM(gnc_main_window_file_open_cb, NULL),
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Open in a New Window"),
-      N_("Open a new top-level GnuCash window for the current view"),
-      gnc_main_window_file_new_window_cb, NULL, NULL, 
-      GNOME_APP_PIXMAP_NONE, NULL, 0, 0, NULL
-    },    
-    GNOMEUIINFO_SUBTREE( N_("Open _Recent"),
-                         gnc_file_recent_files_submenu_template ),
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_MENU_SAVE_ITEM(gnc_main_window_file_save_cb, NULL),
-    GNOMEUIINFO_MENU_SAVE_AS_ITEM(gnc_main_window_file_save_as_cb, NULL),
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_SUBTREE( N_("_Import"),
-                         gnc_file_import_submenu_template ),
-    GNOMEUIINFO_SUBTREE( N_("_Export"),
-                         gnc_file_export_submenu_template ),
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_MENU_PRINT_ITEM(gnc_main_window_dispatch_cb,
-				GUINT_TO_POINTER(GNC_DISP_PRINT)),
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_MENU_CLOSE_ITEM(gnc_main_window_file_close_cb, NULL),
-    GNOMEUIINFO_MENU_EXIT_ITEM(gnc_main_window_file_shutdown_cb, NULL),
-    GNOMEUIINFO_END
-  };
-  
-  static GnomeUIInfo gnc_edit_menu_template[] = 
-  {
-    GNOMEUIINFO_MENU_CUT_ITEM(gnc_main_window_dispatch_cb,
-				GUINT_TO_POINTER(GNC_DISP_CUT)),
-    GNOMEUIINFO_MENU_COPY_ITEM(gnc_main_window_dispatch_cb,
-				GUINT_TO_POINTER(GNC_DISP_COPY)),
-    GNOMEUIINFO_MENU_PASTE_ITEM(gnc_main_window_dispatch_cb,
-				GUINT_TO_POINTER(GNC_DISP_PASTE)),
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_MENU_PREFERENCES_ITEM(gnc_main_window_options_cb, NULL),
-    { GNOME_APP_UI_ITEM,
-      N_("Ta_x Options"),
-      N_("Setup tax information for all income and expense accounts"),
-      gnc_main_window_tax_info_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_view_menu_template[] = 
-  {
-    { GNOME_APP_UI_ITEM,
-      N_("_Refresh"),
-      N_("Refresh this window"),
-      gnc_main_window_dispatch_cb, GUINT_TO_POINTER(GNC_DISP_REFRESH), NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_TOGGLEITEM,
-      N_("_Toolbar"),
-      N_("Show/hide the toolbar on this window"),
-      gnc_main_window_flip_toolbar_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_TOGGLEITEM,
-      N_("S_ummary Bar"),
-      N_("Show/hide the summary bar on this window"),
-      gnc_main_window_flip_summary_bar_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_TOGGLEITEM,
-      N_("_Status Bar"),
-      N_("Show/Hide the status bar on this window"),
-      gnc_main_window_flip_status_bar_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_sched_xaction_tools_submenu_template[] = 
-  {
-    { GNOME_APP_UI_ITEM,
-      N_("_Scheduled Transaction Editor"),
-      N_("The list of Scheduled Transactions"),
-      gnc_main_window_sched_xaction_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("_Since Last Run..."),
-      N_("Create Scheduled Transactions since the last time run."),
-      gnc_main_window_sched_xaction_slr_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_( "_Mortgage & Loan Repayment..." ),
-      N_( "Setup scheduled transactions for repayment of a loan" ),
-      gnc_main_window_sx_loan_druid_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-  
-  static GnomeUIInfo gnc_actions_menu_template[] =
-  {
-    GNOMEUIINFO_SUBTREE( N_("_Scheduled Transactions"),
-                         gnc_sched_xaction_tools_submenu_template ),
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Close Books"),
-      N_("Archive old data using accounting periods"),
-      gnc_main_window_books_druid_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-  static GnomeUIInfo gnc_tools_menu_template[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_General Ledger"),
-      N_("Open a general ledger window"),
-      gnc_main_window_gl_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Price Editor"),
-      N_("View and edit the prices for stocks and mutual funds"),
-      gnc_main_window_prices_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Commodity _Editor"),
-      N_("View and edit the commodities for stocks and mutual funds"),
-      gnc_main_window_commodities_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Financial _Calculator"),
-      N_("Use the financial calculator"),
-      gnc_main_window_fincalc_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("_Find Transactions"),
-      N_("Find transactions with a search"),
-      gnc_main_window_find_transactions_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      'f', GDK_CONTROL_MASK, NULL
-    },
-    GNOMEUIINFO_END
-  };
-  
-  static GnomeUIInfo gnc_help_menu_template[] =
-  {
-    {
-      GNOME_APP_UI_ITEM,
-      N_("Tutorial and Concepts _Guide"),
-      N_("Open the GnuCash Tutorial"),
-      gnc_main_window_tutorial_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Tips Of The Day"),
-      N_("View the Tips of the Day"),
-      gnc_main_window_totd_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    {
-      GNOME_APP_UI_ITEM,
-      N_("_Help"),
-      N_("Open the GnuCash Help"),
-      gnc_main_window_help_cb, NULL, NULL,
-      GNOME_APP_PIXMAP_NONE, NULL,
-      0, 0, NULL
-    },
-    
-    GNOMEUIINFO_MENU_ABOUT_ITEM(gnc_main_window_about_cb, NULL),
-
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_windows_menu_template[] =
-  {
-    GNOMEUIINFO_END
-  };
-
-  static GnomeUIInfo gnc_main_menu_template[] =
-  {
-    GNOMEUIINFO_MENU_FILE_TREE(gnc_file_menu_template),
-    GNOMEUIINFO_MENU_EDIT_TREE(gnc_edit_menu_template),
-    GNOMEUIINFO_MENU_VIEW_TREE(gnc_view_menu_template),
-    GNOMEUIINFO_SUBTREE(N_("_Actions"), gnc_actions_menu_template),
-    GNOMEUIINFO_SUBTREE(N_("_Tools"), gnc_tools_menu_template),
-    GNOMEUIINFO_SUBTREE(N_("_Windows"), gnc_windows_menu_template),    
-    GNOMEUIINFO_MENU_HELP_TREE(gnc_help_menu_template),
-    GNOMEUIINFO_END
-  };
-
-  ENTER(" ");
-  gnome_mdi_set_menubar_template(GNOME_MDI(maininfo->mdi),
-                                 gnc_main_menu_template);
-
-  gnc_file_history_add_after ("Open _Recent/");
-  LEAVE(" ");
-}
-
-static GnomeUIInfo *
-gnc_main_window_toolbar_prefix (void)
-{
-  static GnomeUIInfo prefix[] = 
-  {
-    { GNOME_APP_UI_ITEM,
-      N_("Save"),
-      N_("Save the file to disk"),
-      gnc_main_window_file_save_cb,
-      NULL,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_SAVE,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Close"),
-      N_("Close the current notebook page"),
-      gnc_main_window_file_close_cb,
-      NULL,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_CLOSE,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    GNOMEUIINFO_END
-  };
-
-  return prefix;
-}
-
-static GnomeUIInfo *
-gnc_main_window_toolbar_suffix (void)
-{
-  static GnomeUIInfo suffix[] = 
-  {
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("Exit"),
-      N_("Exit GnuCash"),
-      gnc_main_window_exit_cb, 
-      NULL,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK,
-      GNOME_STOCK_PIXMAP_QUIT,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-
-  return suffix;
-}
--- src/gnome/window-register.c
+++ /dev/null
@@ -1,1820 +0,0 @@
-/*******************************************************************\
- * window-register.c -- the register window for GnuCash             *
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (C) 1997-1998 Linas Vepstas <linas at linas.org>          *
- * Copyright (C) 1998 Rob Browning <rlb at cs.utexas.edu>              *
- * Copyright (C) 1999-2000 Dave Peticolas <dave at krondo.com>         *
- * Copyright (C) 2001 Gnumatic, Inc.                                *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#define _GNU_SOURCE
-
-#include "config.h"
-
-#include <gnome.h>
-#include <time.h>
-#include <g-wrap-wct.h>
-
-#include "Scrub.h"
-#include "dialog-account.h"
-#include "dialog-fincalc.h"
-#include "dialog-find-transactions.h"
-#include "dialog-transfer.h"
-#include "dialog-utils.h"
-#include "druid-stock-split.h"
-#include "global-options.h"
-#include "gnc-component-manager.h"
-#include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
-#include "gnc-euro.h"
-#include "gnc-gui-query.h"
-#include "gnc-ledger-display.h"
-#include "gnc-menu-extensions.h"
-#include "gnc-pricedb.h"
-#include "gnc-split-reg.h"
-#include "gnc-ui-util.h"
-#include "gnc-ui.h"
-#include "gnucash-sheet.h"
-#include "lot-viewer.h"
-#include "messages.h"
-#include "table-allgui.h"
-#include "window-help.h"
-#include "window-main.h"
-#include "window-reconcile.h"
-#include "window-register.h"
-#include "window-report.h"
-#include "top-level.h"
-#include "dialog-print-check.h"
-#include "guile-mappings.h"
-
-typedef struct _RegDateWindow RegDateWindow;
-struct _RegDateWindow
-{
-  GtkWidget * window;
-
-  GtkWidget * show_earliest;
-  GtkWidget * start_date;
-
-  GtkWidget * show_latest;
-  GtkWidget * end_date;
-  GtkWidget * today_button;
-
-  GtkWidget * set_button;
-};
-
-/* The RegWindow struct contains info needed by an instance of an open 
- * register.  Any state info for the regWindow goes here. */
-struct _RegWindow
-{
-  gint width;
-
-  GtkWidget *window;
-  GtkWidget *toolbar_dock;
-  GtkWidget *summarybar_dock;
-  GtkWidget *statusbar;
-
-  GNCLedgerDisplay *ledger;
-  GNCSplitReg *gsr;
-
-  RegDateWindow *date_window;
-  /* pcd = "print check dialog" */
-  gpointer pcd;
-  gboolean read_only;
-
-  GtkWidget *reconciled_menu_item;
-  GtkWidget *cleared_menu_item;
-  GtkWidget *voided_menu_item;
-  GtkWidget *frozen_menu_item;
-  GtkWidget *unreconciled_menu_item;
-  gint component_id;
-};
-
-GtkWidget *gnc_RegWindow_window (RegWindow *data)
-{
-  g_assert(data);
-  return data->window;
-}
-
-GNCLedgerDisplay *gnc_RegWindow_ledger (RegWindow *data)
-{
-  g_assert(data);
-  return data->ledger;
-}
-
-gpointer
-gnc_RegWindow_get_pcd (RegWindow *data)
-{
-  return data->pcd;
-}
-
-void
-gnc_RegWindow_set_pcd (RegWindow *data, gpointer pcd)
-{
-  data->pcd = pcd;
-}
-
-
-/* This static indicates the debugging module that this .o belongs to.   */
-/* static short module = MOD_GUI; */
-//static short module = MOD_SX; /* for the moment... */
-
-static int last_width = 0;
-static int last_stock_width = 0;
-
-/** PROTOTYPES ******************************************************/
-
-static void gnc_register_help_changed_cb( GNCSplitReg *gsr, gpointer data );
-
-void gnc_register_start_recn_cb(GtkWidget *w, gpointer data);
-void gnc_register_xfer_cb(GtkWidget *w, gpointer data);
-void gnc_register_stock_split_cb (GtkWidget * w, gpointer data);
-void gnc_register_lots_cb(GtkWidget *w, gpointer data);
-void gnc_register_edit_cb(GtkWidget *w, gpointer data);
-void gnc_register_new_account_cb(GtkWidget * w, gpointer data);
-
-void gnc_register_void_trans_cb(GtkWidget *w, gpointer data);
-void gnc_register_unvoid_trans_cb(GtkWidget *w, gpointer data);
-void gnc_register_close_cb(GtkWidget *w, gpointer data);
-void gnc_register_exit_cb(GtkWidget *w, gpointer data);
-void gnc_register_report_account_cb(GtkWidget *w, gpointer data);
-void gnc_register_report_trans_cb(GtkWidget *w, gpointer data);
-void gnc_register_print_cb(GtkWidget *w, gpointer data);
-void gnc_register_show_all_status_cb(GtkWidget *widget, gpointer data);
-void gnc_register_show_one_status_cb(GtkWidget *widget, gpointer data);
-void gnc_register_date_cb(GtkWidget *widget, gpointer data);
-void gnc_register_date_show_all_cb(GtkWidget *w, gpointer data);
-void gnc_register_today_cb(GtkWidget *w, gpointer data);
-void gnc_register_date_toggle_cb(GtkToggleButton *toggle, gpointer data);
-void gnc_register_date_range_cb(GtkWidget *w, gpointer data);
-
-void gnc_register_print_check_cb(GtkWidget * widget, gpointer data);
-void gnc_ui_find_transactions_cb (GtkWidget *widget, gpointer data);
-
-void gnc_register_toolbar_cb(GtkWidget *widget, gpointer data);
-void gnc_register_summarybar_cb(GtkWidget *widget, gpointer data);
-void gnc_register_statusbar_cb(GtkWidget *widget, gpointer data);
-
-void gnc_register_gl_cb(GtkWidget *widget, gpointer data);
-void gnc_register_prices_cb(GtkWidget *widget, gpointer data);
-void gnc_register_commodities_cb(GtkWidget *widget, gpointer data);
-void gnc_register_fincalc_cb(GtkWidget *widget, gpointer data);
-
-void gnc_register_scrub_all_cb (GtkWidget *widget, gpointer data);
-void gnc_register_scrub_current_cb (GtkWidget *widget, gpointer data);
-
-gboolean gnc_register_delete_cb(GtkWidget *widget, GdkEvent *event, gpointer data);
-void gnc_register_destroy_cb(GtkWidget *widget, gpointer data);
-void gnc_register_size_allocate (GtkWidget *widget, GtkAllocation *allocation, gpointer user_data);
-
-static void gnc_register_setup_menu_widgets( RegWindow *regData, GladeXML *xml );
-static GtkWidget* gnc_register_setup_toolbar( RegWindow *regData );
-
-static void gnc_register_insert_cloned_toolbar_elt( GtkToolbar *dstToolbar,
-                                                    GtkToolbar *srcToolbar,
-                                                    GtkWidget *srcWidget,
-                                                    gchar *tooltip,
-                                                    gpointer callback,
-                                                    gpointer user_data,
-                                                    gint idx );
-
-static gboolean gnc_register_include_date(RegWindow *regData, time_t date);
-static void gnc_register_include_date_adapter( GNCSplitReg *gsr,
-                                               time_t date,
-                                               gpointer user_data );
-
-static void gnc_register_set_read_only( RegWindow *regData );
-
-static void gnc_reg_save_size (RegWindow *regData);
-
-
-/********************************************************************\
- * regWindowSimple                                                  *
- *   opens up a register window for Account account                 *
- *                                                                  *
- * Args:   account - the account associated with this register      *
- * Return: regData - the register window instance                   *
-\********************************************************************/
-GNCSplitReg*
-regWindowSimple (Account *account)
-{
-  GNCSplitReg *gsr;
-  GNCLedgerDisplay * ledger = gnc_ledger_display_simple( account );
-
-  if (ledger == NULL)
-    return NULL;
-
-  gsr = gnc_ledger_display_get_user_data( ledger ); 
-  if ( !gsr ) {
-    RegWindow *rw = regWindowLedger( ledger );
-    gsr = rw->gsr;
-  }
-
-  return gsr;
-}
-
-
-/********************************************************************\
- * regWindowAccGroup                                                *
- *   opens up a register window for a group of Accounts             *
- *                                                                  *
- * Args:   account - the account associated with this register      *
- * Return: regData - the register window instance                   *
-\********************************************************************/
-GNCSplitReg*
-regWindowAccGroup (Account *account)
-{
-  GNCSplitReg *gsr;
-  GNCLedgerDisplay * ledger = gnc_ledger_display_subaccounts (account);
-
-  if (ledger == NULL)
-    return NULL;
-
-  gsr = gnc_ledger_display_get_user_data( ledger );
-  if ( !gsr ) {
-    RegWindow *rw;
-    rw = regWindowLedger (ledger);
-    gsr = rw->gsr;
-  }
-
-  return gsr;
-}
-
-/**
- * Raise an existing register window to the front.
- **/
-void
-gnc_register_raise (RegWindow *regData)
-{
-  if (regData == NULL)
-    return;
-
-  if (regData->window == NULL)
-    return;
-
-  gtk_window_present( GTK_WINDOW(regData->window) );
-}
-
-static void
-gnc_date_range_set_sensitivities(RegWindow *regData)
-{
-  RegDateWindow *regDateData;
-  GtkToggleButton *toggle;
-  Query *query;
-
-  if (!regData)
-    return;
-
-  if (!regData->ledger)
-    return;
-
-  query = gnc_ledger_display_get_query (regData->ledger);
-  if (!query)
-    return;
-
-  regDateData = regData->date_window;
-  if (regDateData == NULL)
-    return;
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_earliest);
-  if (gtk_toggle_button_get_active(toggle))
-    gtk_widget_set_sensitive(regDateData->start_date, FALSE);
-  else
-    gtk_widget_set_sensitive(regDateData->start_date, TRUE);
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_latest);
-  if (gtk_toggle_button_get_active(toggle))
-  {
-    gtk_widget_set_sensitive(regDateData->end_date, FALSE);
-    gtk_widget_set_sensitive(regDateData->today_button, FALSE);
-  }
-  else
-  {
-    gtk_widget_set_sensitive(regDateData->end_date, TRUE);
-    gtk_widget_set_sensitive(regDateData->today_button, TRUE);
-  }
-}
-
-static void
-gnc_register_show_status(RegWindow *regData)
-{
-  RegDateWindow *regDateData;
-  GSList *param_list = NULL;
-  cleared_match_t how = 0;
-  Query *query;
-
-  if (!regData)
-    return;
-
-  if (!regData->ledger)
-    return;
-
-  if (GTK_CHECK_MENU_ITEM(regData->reconciled_menu_item)->active)
-    how |= CLEARED_RECONCILED;
-  if (GTK_CHECK_MENU_ITEM(regData->cleared_menu_item)->active)
-    how |= CLEARED_CLEARED;
-  if (GTK_CHECK_MENU_ITEM(regData->voided_menu_item)->active)
-    how |= CLEARED_VOIDED;
-  if (GTK_CHECK_MENU_ITEM(regData->frozen_menu_item)->active)
-    how |= CLEARED_FROZEN;
-  if (GTK_CHECK_MENU_ITEM(regData->unreconciled_menu_item)->active)
-    how |= CLEARED_NO;
-
-  query = gnc_ledger_display_get_query( regData->ledger );
-  if (!query)
-    return;
-
-  regDateData = regData->date_window;
-  if (regDateData == NULL)
-    return;
-
-  param_list = gncQueryBuildParamList (SPLIT_RECONCILE, NULL);
-  gncQueryPurgeTerms (query, param_list);
-  if (how == CLEARED_ALL)
-    return;
-
-  xaccQueryAddClearedMatch(query, how, QUERY_AND);
-}
-
-void
-gnc_register_show_one_status_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_register_show_status(regData);
-
-  gnc_ledger_display_refresh (regData->ledger);
-}
-
-void
-gnc_register_show_all_status_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  /* 
-   * Don't call gtk_check_menu_item_set_active() because this would
-   * just generate a callback that would then need to be blocked. Set
-   * the bit directly so the menu items will be displayed correctly
-   * next time around.
-   */
-  GTK_CHECK_MENU_ITEM(regData->reconciled_menu_item)->active = TRUE;
-  GTK_CHECK_MENU_ITEM(regData->cleared_menu_item)->active = TRUE;
-  GTK_CHECK_MENU_ITEM(regData->voided_menu_item)->active = TRUE;
-  GTK_CHECK_MENU_ITEM(regData->frozen_menu_item)->active = TRUE;
-  GTK_CHECK_MENU_ITEM(regData->unreconciled_menu_item)->active = TRUE;
-  gnc_register_show_status(regData);
-
-  gnc_ledger_display_refresh (regData->ledger);
-}
-
-static void
-gnc_register_set_date_range(RegWindow *regData)
-{
-  RegDateWindow *regDateData;
-  GtkToggleButton *toggle;
-  GSList *date_param;
-  Query *query;
-
-  if (!regData)
-    return;
-
-  if (!regData->ledger)
-    return;
-
-  query = gnc_ledger_display_get_query( regData->ledger );
-  if (!query)
-    return;
-
-  regDateData = regData->date_window;
-  if (regDateData == NULL)
-    return;
-
-  gtk_widget_set_sensitive(regDateData->set_button, FALSE);
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_earliest);
-
-  date_param = gncQueryBuildParamList(SPLIT_TRANS, TRANS_DATE_POSTED, NULL);
-  gncQueryPurgeTerms (query, date_param);
-  g_slist_free(date_param);
-
-  if (!gtk_toggle_button_get_active(toggle))
-  {
-    time_t start;
-
-    start = gnc_date_edit_get_date(GNC_DATE_EDIT(regDateData->start_date));
-    start = gnc_timet_get_day_start(start);
-
-    xaccQueryAddDateMatchTT(query, 
-                            TRUE, start, 
-                            FALSE, 0, 
-                            QUERY_AND);
-  }
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_latest);
-  if (!gtk_toggle_button_get_active(toggle))
-  {
-    time_t end;
-
-    end = gnc_date_edit_get_date(GNC_DATE_EDIT(regDateData->end_date));
-    end = gnc_timet_get_day_end(end);
-
-    xaccQueryAddDateMatchTT(query, 
-                            FALSE, 0,
-                            TRUE, end,                            
-                            QUERY_AND);
-  }
-
-  gnc_date_range_set_sensitivities(regData);
-}
-
-void
-gnc_register_date_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_register_set_date_range(regData);
-
-  gnc_ledger_display_refresh (regData->ledger);
-}
-
-void
-gnc_register_date_show_all_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  RegDateWindow *regDateData;
-  GtkToggleButton *toggle;
-
-  g_return_if_fail(regData != NULL);
-
-  regDateData = regData->date_window;
-  if (regDateData == NULL)
-    return;
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_earliest);
-  gtk_toggle_button_set_active(toggle, TRUE);
-
-  toggle = GTK_TOGGLE_BUTTON(regDateData->show_latest);
-  gtk_toggle_button_set_active(toggle, TRUE);
-
-  gnc_register_date_cb(widget, data);
-}
-
-void
-gnc_register_today_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  RegDateWindow *regDateData;
-
-  g_return_if_fail(regData != NULL);
-
-  regDateData = regData->date_window;
-  gnc_date_edit_set_time(GNC_DATE_EDIT(regDateData->end_date), time(NULL));
-
-  gtk_widget_set_sensitive(regData->date_window->set_button, TRUE);
-}
-
-void
-gnc_register_date_toggle_cb(GtkToggleButton *toggle, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gtk_widget_set_sensitive(regData->date_window->set_button, TRUE);
-
-  gnc_date_range_set_sensitivities(regData);
-}
-
-static void
-gnc_register_date_changed_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gtk_widget_set_sensitive(regData->date_window->set_button, TRUE);
-}
-
-static void
-gnc_register_show_date_window(RegWindow *regData)
-{
-  RegDateWindow *regDateData;
-
-  if (regData == NULL)
-    return;
-
-  regDateData = regData->date_window;
-  if (regDateData == NULL)
-    return;
-
-  if (regDateData->window == NULL)
-    return;
-
-  gtk_window_present(GTK_WINDOW(regDateData->window));
-}
-
-static RegDateWindow *
-gnc_register_date_window (RegWindow *regData, gboolean show_all)
-{
-  RegDateWindow *regDateData;
-  GtkWidget *dialog;
-  GladeXML *xml;
-
-  regDateData = g_new0(RegDateWindow, 1);
-  regData->date_window = regDateData;
-
-  xml = gnc_glade_xml_new ("register.glade", "Date Range");
-  dialog = glade_xml_get_widget (xml, "Date Range");
-  regDateData->window = dialog;
-
-  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
-				    regData);
-  gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(regData->window));
-
-  /*
-   * Get/create all the widgets up front to prevent callback errors
-   * when opening the General Ledger.
-   */
-  regDateData->show_earliest = glade_xml_get_widget(xml, "start_earliest");
-  regDateData->show_latest = glade_xml_get_widget(xml, "end_latest");
-  regDateData->today_button = glade_xml_get_widget(xml, "today");
-  regDateData->set_button = glade_xml_get_widget(xml, "set_range");
-  regDateData->start_date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
-  regDateData->end_date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
-
-  {
-    GtkWidget *calendar;
-    GtkWidget *entry;
-    GtkWidget *radio;
-    GtkWidget *date;
-    GtkWidget *hbox;
-    time_t time_val;
-
-    /* Starting Date */
-    radio = regDateData->show_earliest;
-    if (show_all)
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), TRUE);
-
-    radio = glade_xml_get_widget(xml, "start_date");
-    if (!show_all)
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), TRUE);
-
-    hbox = glade_xml_get_widget(xml, "start_date_entry");
-    date = regDateData->start_date;
-    gtk_box_pack_start(GTK_BOX(hbox), date, FALSE, FALSE, 0);
-
-    time_val = xaccQueryGetEarliestDateFound
-      (gnc_ledger_display_get_query (regData->ledger));
-    if (time_val < time(NULL))
-      gnc_date_edit_set_time(GNC_DATE_EDIT(date), time_val);
-
-    gtk_signal_connect(GTK_OBJECT(date), "date-changed",
-                       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-
-    calendar = GNC_DATE_EDIT(date)->calendar;
-    gtk_signal_connect(GTK_OBJECT(calendar), "day_selected_double_click",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-
-    entry = GNC_DATE_EDIT(date)->date_entry;
-    gtk_signal_connect(GTK_OBJECT(entry), "activate",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-    gtk_signal_connect(GTK_OBJECT(entry), "changed",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-
-
-    /* Ending Date */
-
-    radio = regDateData->show_latest;
-    if (show_all)
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), TRUE);
-
-    radio = glade_xml_get_widget(xml, "end_date");
-    if (!show_all)
-      gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), TRUE);
-
-    hbox = glade_xml_get_widget(xml, "end_date_entry");
-    date = regDateData->end_date;
-    gtk_box_pack_start(GTK_BOX(hbox), date, FALSE, FALSE, 0);
-
-    gtk_signal_connect(GTK_OBJECT(date), "date-changed",
-                       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-
-    calendar = GNC_DATE_EDIT(date)->calendar;
-    gtk_signal_connect(GTK_OBJECT(calendar), "day_selected_double_click",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-
-    entry = GNC_DATE_EDIT(date)->date_entry;
-    gtk_signal_connect(GTK_OBJECT(entry), "activate",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-    gtk_signal_connect(GTK_OBJECT(entry), "changed",
-		       GTK_SIGNAL_FUNC(gnc_register_date_changed_cb), regData);
-  }
-  gtk_widget_show_all(glade_xml_get_widget(xml, "main_frame"));
-
-  return regDateData;
-}
-
-void
-gnc_ui_find_transactions_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow * regData = data;
-  SplitRegister *reg;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-
-  if (reg->type == SEARCH_LEDGER)
-    gnc_ui_find_transactions_dialog_create (regData->ledger);
-  else
-    gnc_ui_find_transactions_dialog_create (NULL);
-}
-
-void
-gnc_register_print_check_cb(GtkWidget * widget, gpointer data)
-{
-  RegWindow     * reg_data = data;
-  SplitRegister * reg      =
-    gnc_ledger_display_get_split_register (reg_data->ledger);
-  Split         * split    = gnc_split_register_get_current_split(reg);
-  Transaction   * trans    = xaccSplitGetParent(split);
-
-  const char    * payee;
-  const char    * memo;
-  gnc_numeric   amount;
-  time_t        date;
-
-  if(split && trans)
-  {
-    payee  = xaccTransGetDescription(trans);
-    memo   = xaccTransGetNotes(trans);
-    if (memo == NULL)
-      memo = "";
-    amount = xaccSplitGetAmount(split);
-    amount = gnc_numeric_abs (amount);
-    date   = xaccTransGetDate(trans);
-
-    gnc_ui_print_check_dialog_create(reg_data, payee, amount, date, memo);
-  }
-}
-
-void
-gnc_register_scrub_all_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  Query *query = gnc_ledger_display_get_query (regData->ledger);
-  AccountGroup *root;
-  GList *node;
-
-  if (query == NULL)
-    return;
-
-  gnc_suspend_gui_refresh ();
-  root = gnc_get_current_group ();
-
-  for (node = xaccQueryGetSplits (query); node; node = node->next)
-  {
-    Split *split = node->data;
-    Transaction *trans = xaccSplitGetParent (split);
-
-    xaccTransScrubOrphans (trans);
-    xaccTransScrubImbalance (trans, root, NULL);
-  }
-
-  gnc_resume_gui_refresh ();
-}
-
-void
-gnc_register_scrub_current_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  SplitRegister *reg;
-  Transaction *trans;
-  AccountGroup *root;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-  trans = gnc_split_register_get_current_trans (reg);
-
-  if (!trans)
-    return;
-
-  gnc_suspend_gui_refresh ();
-  root = gnc_get_current_group ();
-  xaccTransScrubOrphans (trans);
-  xaccTransScrubImbalance (trans, root, NULL);
-  gnc_resume_gui_refresh ();
-}
-
-gboolean
-gnc_register_delete_cb(GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-  RegWindow *regData = data;
-
-  if ( NULL == regData )  return TRUE;
-
-  gnc_reg_save_size( regData );
-
-  if (gnc_split_reg_check_close(regData->gsr) != FALSE) 
-  {
-    gnc_ledger_display_close (regData->ledger);
-    return FALSE;
-  }
-
-  return TRUE; /* don't close */
-}
-
-void
-gnc_register_destroy_cb(GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_unregister_gui_component (regData->component_id);
-
-  if (regData->date_window != NULL)
-  {
-    if (regData->date_window->window != NULL)
-      gtk_widget_destroy(regData->date_window->window);
-
-    g_free(regData->date_window);
-    regData->date_window = NULL;
-  }
-
-  if (regData->pcd)
-    gnc_ui_print_check_dialog_destroy(regData->pcd);
-
-  gtk_widget_destroy( regData->window );
-
-  g_free(regData);
-}
-
-static char *
-gnc_reg_get_name (RegWindow *regData, gboolean for_window)
-{
-  Account *leader;
-  SplitRegister *reg;
-  gchar *account_name;
-  gchar *reg_name;
-  gchar *name;
-  GNCLedgerDisplayType ledger_type;
-
-  if (regData == NULL)
-    return NULL;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-  ledger_type = gnc_ledger_display_type (regData->ledger);
-
-  switch (reg->type)
-  {
-    case GENERAL_LEDGER:
-    case INCOME_LEDGER:
-      if (for_window)
-        reg_name = _("General Ledger");
-      else
-        reg_name = _("General Ledger Report");
-      break;
-    case PORTFOLIO_LEDGER:
-      if (for_window)
-        reg_name = _("Portfolio");
-      else
-        reg_name = _("Portfolio Report");
-      break;
-    case SEARCH_LEDGER:
-      if (for_window)
-        reg_name = _("Search Results");
-      else
-        reg_name = _("Search Results Report");
-      break;
-    default:
-      if (for_window)
-        reg_name = _("Register");
-      else
-        reg_name = _("Register Report");
-      break;
-  }
-
-  leader = gnc_ledger_display_leader (regData->ledger);
-
-  if ((leader != NULL) && (ledger_type != LD_GL))
-  {
-    account_name = xaccAccountGetFullName (leader,
-                                           gnc_get_account_separator ());
-
-    if (ledger_type == LD_SINGLE)
-    {
-      name = g_strconcat (account_name, " - ", reg_name, NULL);
-    }
-    else 
-    {
-      name = g_strconcat (account_name, " ", _("and subaccounts"), " - ", reg_name, NULL);
-    }
-    g_free(account_name);
-  }
-  else
-    name = g_strdup (reg_name);
-
-  return name;
-}
-
-static void
-gnc_reg_set_window_name (RegWindow *regData)
-{
-  gchar *windowname;
-
-  if (regData == NULL)
-    return;
-
-  windowname = gnc_reg_get_name( regData, TRUE );
-  gtk_window_set_title( GTK_WINDOW(regData->window), windowname );
-  g_free( windowname );
-}
-
-void
-gnc_register_size_allocate (GtkWidget *widget,
-			    GtkAllocation *allocation,
-			    gpointer user_data)
-{
-  RegWindow *regData = user_data;
-
-  /* HACK ALERT. this seems to be the only thing to get the
-   * freekin register window to stop freekin resizing itself
-   * all the freekin time. */
-
-  if (regData->width == allocation->width)
-    return;
-
-  regData->width = allocation->width;
-  gtk_window_set_default_size( GTK_WINDOW(regData->window), regData->width, 0 );
-}
-
-static void
-refresh_handler (GHashTable *changes, gpointer user_data)
-{
-  RegWindow *regData = user_data;
-
-  gnc_reg_set_window_name (regData);
-}
-
-static void
-close_handler (gpointer user_data)
-{
-  RegWindow *regData = user_data;
-
-  if (!regData)
-    return;
-
-  gnc_register_delete_cb(NULL, NULL, regData);
-  gnc_register_destroy_cb(NULL, regData);
-}
-
-/********************************************************************\
- * regWindowLedger                                                  *
- *   opens up a ledger window for the account list                  *
- *                                                                  *
- * Args:   ledger - ledger data structure                           *
- * Return: regData - the register window instance                   *
-\********************************************************************/
-RegWindow *
-regWindowLedger( GNCLedgerDisplay *ledger )
-{
-  SplitRegister *reg;
-  RegWindow *regData;
-  GtkWidget *gsr;
-  GtkWidget *register_window;
-  GtkWidget *table_frame;
-  gboolean show_all;
-  gboolean has_date;
-  GladeXML *xml;
-  gint numRows;
-
-  /* FIXME: This no longer holds, but something like it [attaching the window
-   * as user_data to the split_reg] should exist. */
-  reg = gnc_ledger_display_get_split_register (ledger);
-
-  regData = g_new0( RegWindow, 1 );
-  regData->ledger = ledger;
-
-  xml = gnc_glade_xml_new( "register.glade", "Check Register" );
-  register_window = glade_xml_get_widget( xml, "Check Register" );
-  regData->window = register_window;
-
-  glade_xml_signal_autoconnect_full( xml,
-                                     gnc_glade_autoconnect_full_func,
-                                     regData );
-
-  numRows = (guint)gnc_lookup_number_option ( "_+Advanced",
-                                              "Number of Rows", 20.0 );
-
-  gsr = gnc_split_reg_new( ledger,
-                           GTK_WINDOW(register_window),
-                           numRows,
-                           ( CREATE_TOOLBAR
-                             | CREATE_MENUS
-                             | CREATE_POPUP
-                             | CREATE_SUMMARYBAR ),
-                           0 );
-  regData->gsr = GNC_SPLIT_REG(gsr);
-
-  /* libglade should do this next line */
-  GNOME_APP(register_window)->menubar = glade_xml_get_widget( xml, "gnc_register_menubar" );
-
-  gnc_reg_set_window_name( regData );
-  if ( gnc_split_reg_get_read_only( regData->gsr ) ) {
-    gnc_register_set_read_only( regData );
-  }
-
-  show_all = gnc_lookup_boolean_option( "_+Advanced",
-                                        "Show All Transactions",
-                                        TRUE );
-
-  {
-    GSList *date_param = gncQueryBuildParamList(SPLIT_TRANS, TRANS_DATE_POSTED,
-						NULL);
-    Query *q = gnc_ledger_display_get_query (regData->ledger);
-    has_date = gncQueryHasTermType (q, date_param);
-    g_slist_free(date_param);
-  }
-
-  if (has_date)
-    show_all = FALSE;
-
-  regData->date_window = gnc_register_date_window( regData, show_all );
-
-  if (reg->type != SEARCH_LEDGER && !has_date)
-    gnc_register_set_date_range( regData );
-
-  /* Now that we have a date range, remove any existing
-   * maximum on the number of splits returned. */
-  xaccQuerySetMaxSplits( gnc_ledger_display_get_query(regData->ledger), -1 );
-
-  /* The status bar */
-  regData->statusbar = glade_xml_get_widget( xml, "appbar" );
-  gtk_signal_connect( GTK_OBJECT(regData->gsr), "help-changed",
-                      GTK_SIGNAL_FUNC( gnc_register_help_changed_cb ),
-                      regData );
-  gtk_signal_connect(GTK_OBJECT(regData->gsr), "void_txn",
-		     GTK_SIGNAL_FUNC(gnc_register_void_trans_cb), regData);
-
-  gtk_signal_connect(GTK_OBJECT(regData->gsr), "unvoid_txn",
-		     GTK_SIGNAL_FUNC(gnc_register_unvoid_trans_cb), regData);
-
-  /* The "include-date" and "read-only" signals. */
-  gtk_signal_connect( GTK_OBJECT(regData->gsr), "include-date",
-                      GTK_SIGNAL_FUNC( gnc_register_include_date_adapter ),
-                      regData );
-
-  regData->reconciled_menu_item = glade_xml_get_widget( xml, "show_reconciled" );
-  regData->cleared_menu_item = glade_xml_get_widget( xml, "show_cleared" );
-  regData->voided_menu_item = glade_xml_get_widget( xml, "show_voided" );
-  regData->frozen_menu_item = glade_xml_get_widget( xml, "show_frozen" );
-  regData->unreconciled_menu_item = glade_xml_get_widget( xml, "show_unreconciled" );
-
-  /* The menu bar. Menu extension setup needs to come *after* that. */
-  gnc_register_setup_menu_widgets( regData, xml );
-  gnc_extensions_menu_setup_with_data( GNOME_APP(register_window),
-                                       WINDOW_NAME_REGISTER, regData );
-
-  /* The tool bar */
-  {
-    GtkWidget *toolbar = gnc_register_setup_toolbar( regData );
-    regData->toolbar_dock = glade_xml_get_widget( xml, "toolbar_dock" );
-    if ( toolbar ) {
-      /*
-       * Don't call gtk_widget_show_all() here. It overrides the users
-       * toolbar preference setting.
-       */
-      gtk_widget_show( toolbar );
-      gtk_container_add( GTK_CONTAINER(regData->toolbar_dock), toolbar );
-    }
-  }
-
-  /* The summary bar */
-  {
-    GtkWidget *summarybar = gnc_split_reg_get_summarybar( GNC_SPLIT_REG(gsr) );
-    regData->summarybar_dock = glade_xml_get_widget( xml, "summarybar_dock" );
-    if ( summarybar ) {
-      gtk_widget_show_all(summarybar);
-      gtk_container_add( GTK_CONTAINER(regData->summarybar_dock), summarybar );
-    }
-  }
-
-  /* The GNCSplitReg is a widget unto itself. */
-  table_frame = glade_xml_get_widget(xml, "table_frame");
-  gtk_container_add( GTK_CONTAINER(table_frame), GTK_WIDGET(regData->gsr) );
-
-  {
-    int *width;
-    char *prefix;
-
-    switch (reg->type)
-    {
-      case STOCK_REGISTER:
-      case PORTFOLIO_LEDGER:
-      case CURRENCY_REGISTER:
-        prefix = "reg_stock_win";
-        width = &last_stock_width;
-        break;
-
-      default:
-        prefix = "reg_win";
-        width = &last_width;
-        break;
-    }
-
-    if (*width == 0)
-      gnc_get_window_size (prefix, width, NULL);
-
-    gtk_window_set_default_size (GTK_WINDOW(regData->window), *width, 0);
-  }
-
-  gtk_widget_show_all( GTK_WIDGET(regData->window) );
-  gtk_widget_hide(regData->frozen_menu_item); // Is this state supported?
-  gnc_window_adjust_for_screen( GTK_WINDOW(regData->window) );
-
-  {
-    SplitRegister *sr = gnc_ledger_display_get_split_register( regData->ledger );
-    gnc_split_register_config( sr, sr->type, sr->style, sr->use_double_line );
-    gnc_ledger_display_refresh( regData->ledger );
-  }
-
-  /* Get event updates so we can check the window title */
-  regData->component_id = gnc_register_gui_component ("register-window",
-						      refresh_handler,
-						      close_handler, regData);
-
-  gnc_gui_component_watch_entity_type (regData->component_id,
-                                       GNC_ID_ACCOUNT,
-                                       GNC_EVENT_MODIFY);
-  return regData;
-}
-
-static
-void
-gnc_register_setup_menu_widgets( RegWindow *regData, GladeXML *xml )
-{
-  int adj = 0;
-  GtkWidget *mbar, *menu, *regMenu, *regMenuItem, *tmpMi;
-
-  /* Get our menu bar from glade. */
-  mbar = glade_xml_get_widget( xml, "gnc_register_menubar" );
-
-  /* General plan:
-   * . get the GNCSplitReg menu
-   * . get the RegWindow menu
-   * . get, remove the additional menu[item] from the RegWindow's menu
-   * . insert into the GNCSplitReg's menu.
-   * . remove the RegWindow menu from the menu bar, saving it's index.
-   * . insert the GNCSplitReg menu at the same index.
-   * . destroy now-unused widgets. */
-
-  if ( gnome_preferences_get_menus_have_tearoff() ) {
-    /* offset by one for the tearoff menu item. */
-    adj = 1;
-  }
-
-  /* Edit menu. */
-  menu = gnc_split_reg_get_edit_menu( regData->gsr );
-  regMenuItem = glade_xml_get_widget( xml, "gnc_register_edit_menu" );
-  regMenu = glade_xml_get_widget( xml, "gnc_register_edit_menu_menu" );
-  gtk_menu_shell_insert( GTK_MENU_SHELL(menu), gtk_menu_item_new(), (3 + adj));
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_edit_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_shell_insert( GTK_MENU_SHELL(menu), tmpMi, (4 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_find_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_shell_append( GTK_MENU_SHELL(menu), tmpMi );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  gtk_menu_item_remove_submenu( GTK_MENU_ITEM(regMenuItem) );
-  gtk_menu_item_set_submenu( GTK_MENU_ITEM(regMenuItem), menu );
-
-  /* View menu */
-  menu = gnc_split_reg_get_view_menu( regData->gsr );
-  regMenuItem = glade_xml_get_widget( xml, "gnc_register_view_menu" );
-  regMenu = glade_xml_get_widget( xml, "gnc_register_view_menu_menu" );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_toolbar_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (0 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_summary_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (1 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_statusbar_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (2 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  gtk_menu_insert( GTK_MENU(menu), gtk_menu_item_new(), (3 + adj) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_select_trans_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (4 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  gtk_menu_item_remove_submenu( GTK_MENU_ITEM(regMenuItem) );
-  gtk_menu_item_set_submenu( GTK_MENU_ITEM(regMenuItem), menu );
-
-  /* Actions menu */
-  menu = gnc_split_reg_get_action_menu( regData->gsr );
-  regMenuItem = glade_xml_get_widget( xml, "gnc_register_actions_menu" );
-  regMenu = glade_xml_get_widget( xml, "gnc_register_actions_menu_menu" );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_xfer_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (0 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_recn_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (1 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_stock_split_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (2 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_lots_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_insert( GTK_MENU(menu), tmpMi, (3 + adj) );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-
-  gtk_menu_insert( GTK_MENU(menu), gtk_menu_item_new(), (4 + adj) );
-  /* Base this off the end of the list for a bit more flexibility. */
-  gtk_menu_append( GTK_MENU(menu), gtk_menu_item_new() );
-  tmpMi = glade_xml_get_widget( xml, "gnc_register_scrub_mi" );
-  gtk_object_ref( GTK_OBJECT(tmpMi) );
-  gtk_container_remove( GTK_CONTAINER(regMenu), tmpMi );
-  gtk_menu_append( GTK_MENU(menu), tmpMi );
-  gtk_object_unref( GTK_OBJECT(tmpMi) );
-  gtk_menu_item_remove_submenu( GTK_MENU_ITEM(regMenuItem) );
-  gtk_menu_item_set_submenu( GTK_MENU_ITEM(regMenuItem), menu );
-
-  gtk_widget_show_all( mbar );
-}
-
-/**
- * Custom g_list_find_custom fn; returns 0 when the match is found.
- **/
-static
-gint
-gnc_register_find_toolbarchild( gconstpointer listEltData, gconstpointer data )
-{
-  return !( ((GtkToolbarChild*)listEltData)->widget == data );
-}
-
-/**
- * @param srcWidget A toolbar widget to clone [label, icon, button] and insert.
- * @param idx The index to insert at, or -1 for 'append to end'.
- **/
-static
-void
-gnc_register_insert_cloned_toolbar_elt( GtkToolbar *dstToolbar,
-                                        GtkToolbar *srcToolbar,
-                                        GtkWidget *srcWidget,
-                                        gchar *tooltip,
-                                        gpointer callback,
-                                        gpointer user_data,
-                                        gint idx )
-{
-  GtkToolbarChild *tchild;
-  GList *elt;
-  GtkWidget *iconCopy;
-  gchar *label, *labelCopy;
-
-  elt = g_list_find_custom( GTK_TOOLBAR(srcToolbar)->children,
-                            srcWidget,
-                            gnc_register_find_toolbarchild );
-  g_assert( elt );
-  tchild = (GtkToolbarChild*)(elt->data);
-  gtk_label_get( GTK_LABEL(tchild->label), &label );
-  labelCopy = g_strdup( label );
-  iconCopy = gnome_pixmap_new_from_gnome_pixmap( GNOME_PIXMAP( tchild->icon ) );
-  if ( idx == -1 ) {
-    gtk_toolbar_append_element( dstToolbar,
-                                tchild->type,
-                                ( tchild->type == GTK_TOOLBAR_CHILD_RADIOBUTTON
-                                  ? tchild->widget : NULL ),
-                                labelCopy, tooltip, NULL, iconCopy,
-                                callback, user_data );
-  } else {
-    gtk_toolbar_insert_element( dstToolbar,
-                                tchild->type,
-                                ( tchild->type == GTK_TOOLBAR_CHILD_RADIOBUTTON
-                                  ? tchild->widget : NULL ),
-                                labelCopy, tooltip, NULL, iconCopy,
-                                callback, user_data, idx );
-  }
-}
-
-static
-GtkWidget*
-gnc_register_setup_toolbar( RegWindow *regData )
-{
-  GladeXML *xml;
-  GtkWidget *button;
-  GtkToolbar *tbar, *regTbar;
-
-#define CLOSE_TOOLBAR_TOOLTIP "Close this register window"
-#define XFER_TOOLBAR_TOOLTIP "Transfer funds from one account to another"
-#define FIND_TOOLBAR_TOOLTIP "Find transactions with a search"
-#define REPORT_TOOLBAR_TOOLTIP "Open a report window for this register"
-#define PRINT_TOOLBAR_TOOLTIP "Print a report for this register"
-
-  xml = gnc_glade_xml_new( "register.glade", "gnc_register_toolbar" );
-  g_assert( xml );
-  regTbar = GTK_TOOLBAR(glade_xml_get_widget( xml, "gnc_register_toolbar" ));
-  gtk_widget_hide( GTK_WIDGET(regTbar) );
-  g_assert( regTbar );
-  tbar = GTK_TOOLBAR(gnc_split_reg_get_toolbar( regData->gsr ));
-  g_assert( tbar );
-
-  /* General plan:
-   * . get the GNCSplitReg toolbar
-   * . get the gnc_register toolbar
-   * . pull buttons from the register toolbar
-   * . insert into GSR toolbar
-   * . destroy [now-]unused gnc_register_toolbar */
-
-  button = glade_xml_get_widget( xml, "gnc_register_close_b" );
-  gnc_register_insert_cloned_toolbar_elt( tbar, regTbar, button,
-                                          _(CLOSE_TOOLBAR_TOOLTIP),
-                                          gnc_register_close_cb, regData, 0 );
-  gtk_toolbar_append_space( tbar );
-  button = glade_xml_get_widget( xml, "gnc_register_xfer_b" );
-  gnc_register_insert_cloned_toolbar_elt( tbar, regTbar, button,
-                                          _(XFER_TOOLBAR_TOOLTIP),
-                                          gnc_register_xfer_cb, regData, -1 );
-  gtk_toolbar_append_space( tbar );
-  button = glade_xml_get_widget( xml, "gnc_register_find_b" );
-  gnc_register_insert_cloned_toolbar_elt( tbar, regTbar, button,
-                                          _(FIND_TOOLBAR_TOOLTIP),
-                                          gnc_ui_find_transactions_cb,
-                                          regData, -1 );
-  button = glade_xml_get_widget( xml, "gnc_register_report_b" );
-  gnc_register_insert_cloned_toolbar_elt( tbar, regTbar, button,
-                                          _(REPORT_TOOLBAR_TOOLTIP),
-                                          gnc_register_report_account_cb,
-                                          regData, -1 );
-  button = glade_xml_get_widget( xml, "gnc_register_print_b" );
-  gnc_register_insert_cloned_toolbar_elt( tbar, regTbar, button,
-                                          _(PRINT_TOOLBAR_TOOLTIP),
-                                          gnc_register_print_cb, regData, -1 );
-
-  gtk_widget_destroy( GTK_WIDGET(regTbar) );
-
-  /*
-   * Don't call gtk_widget_show_all() here. It overrides the users
-   * toolbar preference setting.
-   */
-  gtk_widget_show( GTK_WIDGET(tbar) );
-
-  return GTK_WIDGET(tbar);
-}
-
-static void
-gnc_register_help_changed_cb( GNCSplitReg *gsr, gpointer data )
-{
-  RegWindow *regData = data;
-  SplitRegister *reg;
-  const char *status;
-  char *help;
-
-  if (!regData)
-    return;
-
-  /* Get the text from the ledger */
-  reg = gnc_ledger_display_get_split_register( regData->ledger );
-  help = gnc_table_get_help( reg->table );
-  status = help ? help : "";
-  gnome_appbar_set_default( GNOME_APPBAR(regData->statusbar), status );
-  g_free( help );
-}
-
-static void
-gnc_reg_save_size (RegWindow *regData)
-{
-  SplitRegister *reg;
-  int *width;
-  char *prefix;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-
-  switch (reg->type)
-  {
-    case STOCK_REGISTER:
-    case PORTFOLIO_LEDGER:
-    case CURRENCY_REGISTER:
-      prefix = "reg_stock_win";
-      width = &last_stock_width;
-      break;
-    default:
-      prefix = "reg_win";
-      width = &last_width;
-      break;
-  }
-
-  gdk_window_get_geometry (regData->window->window, NULL, NULL,
-                           width, NULL, NULL);
-
-  gnc_save_window_size (prefix, *width, 0);
-}
-
-void 
-gnc_register_new_account_cb (GtkWidget * w, gpointer data)
-{
-  gnc_ui_new_account_window (NULL);
-}
-
-/********************************************************************\
- * gnc_register_xfer_cb -- open up the transfer window              *
- *                                                                  *
- * Args:   w    - the widget that called us                         *
- *         data - the data struct for this register                 *
- * Return: none                                                     *
-\********************************************************************/
-void 
-gnc_register_xfer_cb (GtkWidget * w, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_xfer_dialog (regData->window,
-                   gnc_ledger_display_leader (regData->ledger));
-}
-
-
-/********************************************************************\
- * gnc_register_stock_split_cb -- open up the stock split druid     *
- *                                                                  *
- * Args:   w    - the widget that called us                         *
- *         data - the data struct for this register                 *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_stock_split_cb (GtkWidget * w, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_stock_split_dialog (gnc_ledger_display_leader (regData->ledger));
-}
-
-
-/********************************************************************\
- * gnc_register_lots_cb -- open up the lot viewer window            *
- *                                                                  *
- * Args:   w    - the widget that called us                         *
- *         data - the data struct for this register                 *
- * Return: none                                                     *
-\********************************************************************/
-void 
-gnc_register_lots_cb (GtkWidget * w, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_lot_viewer_dialog (gnc_ledger_display_leader (regData->ledger));
-}
-
-/********************************************************************\
- * gnc_register_edit_cb -- open up the account edit window          *
- *                                                                  *
- * Args:   w    - the widget that called us                         *
- *         data - the data struct for this register                 *
- * Return: none                                                     *
-\********************************************************************/
-void 
-gnc_register_edit_cb(GtkWidget * w, gpointer data)
-{
-  RegWindow *regData = data;
-  Account *account = gnc_ledger_display_leader (regData->ledger);
-
-  if (account == NULL)
-    return;
-
-  gnc_ui_edit_account_window(account);
-}
-
-
-/********************************************************************\
- * gnc_register_start_recn_cb -- open up the reconcile window...    *
- *                               called from menubar.               *
- *                                                                  *
- * Args:   w    - the widget that called us                         *
- *         data - the data struct for this register                 *
- * Return: none                                                     *
-\********************************************************************/
-void 
-gnc_register_start_recn_cb(GtkWidget * w, gpointer data)
-{
-  RegWindow *regData = data;
-  Account *account = gnc_ledger_display_leader (regData->ledger);
-
-  if (account == NULL)
-    return;
-
-  recnWindow(regData->window, account);
-}
-
-static
-void
-gnc_register_include_date_adapter( GNCSplitReg *gsr, time_t date, gpointer user_data )
-{
-  RegWindow *regData;
-  regData = (RegWindow*) user_data;
-  if ( gnc_register_include_date( regData, date ) ) {
-    gnc_ledger_display_refresh( gsr->ledger );
-  }
-}
-
-static gboolean
-gnc_register_include_date(RegWindow *regData, time_t date)
-{
-  RegDateWindow *regDateData;
-  time_t start, end;
-  gboolean changed = FALSE;
-
-  regDateData = regData->date_window;
-
-  start = gnc_date_edit_get_date(GNC_DATE_EDIT(regDateData->start_date));
-  end   = gnc_date_edit_get_date(GNC_DATE_EDIT(regDateData->end_date));
-
-  if (date < start)
-  {
-    gnc_date_edit_set_time(GNC_DATE_EDIT(regDateData->start_date), date);
-    changed = TRUE;
-  }
-
-  if (date > end)
-  {
-    gnc_date_edit_set_time(GNC_DATE_EDIT(regDateData->end_date), date);
-    changed = TRUE;
-  }
-
-  if (changed)
-    gnc_register_set_date_range(regData);
-
-  return changed;
-}
-
-static
-void
-gnc_register_set_read_only( RegWindow *regData )
-{
-  gchar *old_title, *new_title;
-  GtkArg objarg;
-
-  objarg.name = "GtkWindow::title";
-  gtk_object_arg_get(GTK_OBJECT(regData->window), &objarg, NULL);
-  old_title = GTK_VALUE_STRING(objarg);
-  new_title = g_strdup_printf(_("%s [Read-Only]"), old_title);
-  gtk_window_set_title( GTK_WINDOW(regData->window), new_title );
-  g_free(old_title);
-  g_free(new_title);
-
-  regData->read_only = TRUE;
-}
-
-/********************************************************************\
- * gnc_register_void_trans_cb                                       *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data   - the data struct for this register               *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_void_trans_cb(GtkWidget *w, gpointer data)
-{
-  RegWindow *regData = data;
-  SplitRegister *reg;
-  GtkWidget *dialog, *entry;
-  Transaction *trans;
-  GladeXML *xml;
-  char *reason;
-  gint result;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-  trans = gnc_split_register_get_current_trans (reg);
-  if (trans == NULL)
-    return;
-  if (xaccTransHasSplitsInState(trans, VREC)) {
-    gnc_error_dialog(NULL, _("This transaction has already been voided."));
-    return;
-  }
-  if (xaccTransHasReconciledSplits(trans) || xaccTransHasSplitsInState(trans, CREC)) {
-    gnc_error_dialog(NULL, _("You cannot void a transaction with reconciled or cleared splits."));
-    return;
-  }
-
-  xml = gnc_glade_xml_new ("register.glade", "Void Transaction");
-  dialog = glade_xml_get_widget (xml, "Void Transaction");
-  entry = glade_xml_get_widget (xml, "reason");
-  gnome_dialog_editable_enters(GNOME_DIALOG(dialog),
-			       GTK_EDITABLE(entry));
-
-  /* Keep around after closing so we can get the user's text out. */
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-  result = gnome_dialog_run_and_close(GNOME_DIALOG(dialog));
-  if (result == 0)
-    return;
-
-  reason = gtk_entry_get_text(GTK_ENTRY(entry));
-  if (reason == NULL)
-    reason = "";
-  gnc_split_register_void_current_trans
-    (gnc_ledger_display_get_split_register (regData->ledger), reason);
-
-  /* All done. Get rid of it. */
-  gtk_widget_destroy(dialog);
-  g_free(xml);
-}
-
-
-/********************************************************************\
- * gnc_register_unvoid_trans_cb                                     *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data   - the data struct for this register               *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_unvoid_trans_cb(GtkWidget *w, gpointer data)
-{
-  RegWindow *regData = data;
-  SplitRegister *reg;
-  Transaction *trans;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-  trans = gnc_split_register_get_current_trans (reg);
-  if (!xaccTransHasSplitsInState(trans, VREC)) {
-    gnc_error_dialog(NULL, _("This transaction is not voided."));
-    return;
-  }
-  gnc_split_register_unvoid_current_trans
-    (gnc_ledger_display_get_split_register (regData->ledger));
-}
-
-
-/********************************************************************\
- * gnc_register_close_cb                                            *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data - regData - the data struct for this register       *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_close_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  if (gnc_split_reg_check_close(regData->gsr) != FALSE)
-    gnc_ledger_display_close( regData->ledger );
-}
-
-static int
-report_helper (RegWindow *regData, Split *split, Query *query)
-{
-  SplitRegister *reg = gnc_ledger_display_get_split_register (regData->ledger);
-  Account *account;
-  char *str;
-  SCM qtype;
-  SCM args;
-  SCM func;
-  SCM arg;
-
-  args = SCM_EOL;
-
-  func = scm_c_eval_string ("gnc:register-report-create");
-  g_return_val_if_fail (SCM_PROCEDUREP (func), -1);
-
-  arg = scm_makfrom0str (gnc_split_register_get_credit_string (reg));
-  args = scm_cons (arg, args);
-
-  arg = scm_makfrom0str (gnc_split_register_get_debit_string (reg));
-  args = scm_cons (arg, args);
-
-  str = gnc_reg_get_name (regData, FALSE);
-  arg = scm_makfrom0str (str);
-  args = scm_cons (arg, args);
-  g_free (str);
-
-  arg = SCM_BOOL (reg->use_double_line);
-  args = scm_cons (arg, args);
-
-  arg = SCM_BOOL (reg->style == REG_STYLE_JOURNAL);
-  args = scm_cons (arg, args);
-
-  if (!query)
-  {
-    query = gnc_ledger_display_get_query (regData->ledger);
-    g_return_val_if_fail (query != NULL, -1);
-  }
-
-  qtype = scm_c_eval_string("<gnc:Query*>");
-  g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
-
-  arg = gw_wcp_assimilate_ptr (query, qtype);
-  args = scm_cons (arg, args);
-  g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
-
-
-  if (split)
-  {
-    qtype = scm_c_eval_string("<gnc:Split*>");
-    g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
-    arg = gw_wcp_assimilate_ptr (split, qtype);
-  }
-  else
-  {
-    arg = SCM_BOOL_F;
-  }
-  args = scm_cons (arg, args);
-  g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
-
-
-  qtype = scm_c_eval_string("<gnc:Account*>");
-  g_return_val_if_fail (qtype != SCM_UNDEFINED, -1);
-
-  account = gnc_ledger_display_leader (regData->ledger);
-  arg = gw_wcp_assimilate_ptr (account, qtype);
-  args = scm_cons (arg, args);
-  g_return_val_if_fail (arg != SCM_UNDEFINED, -1);
-
-
-  /* Apply the function to the args */
-  arg = scm_apply (func, args, SCM_EOL);
-  g_return_val_if_fail (SCM_EXACTP (arg), -1);
-
-  return scm_num2int (arg, SCM_ARG1, __FUNCTION__);
-}
-
-/********************************************************************\
- * gnc_register_report_account_cb                                   *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data - regData - the data struct for this register       *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_report_account_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  int id;
-
-  id = report_helper (regData, NULL, NULL);
-  if (id >= 0)
-    reportWindow (id);
-}
-
-/********************************************************************\
- * gnc_register_report_trans_cb                                     *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data - regData - the data struct for this register       *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_report_trans_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  SplitRegister *reg;
-  Split *split;
-  Query *query;
-  int id;
-
-  reg = gnc_ledger_display_get_split_register (regData->ledger);
-
-  split = gnc_split_register_get_current_split (reg);
-  if (!split)
-    return;
-
-  query = xaccMallocQuery ();
-
-  xaccQuerySetBook (query, gnc_get_current_book ());
-
-  xaccQueryAddGUIDMatch (query, xaccSplitGetGUID (split),
-                         GNC_ID_SPLIT, QUERY_AND);
-
-  id = report_helper (regData, split, query);
-  if (id >= 0)
-    reportWindow (id);
-}
-
-/********************************************************************\
- * gnc_register_print_cb                                            *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data - regData - the data struct for this register       *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_print_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-  int id;
-
-  id = report_helper (regData, NULL, NULL);
-  if (id >= 0)
-    gnc_print_report (id);
-}
-
-/********************************************************************\
- * gnc_register_date_range_cb                                       *
- *                                                                  *
- * Args:   widget - the widget that called us                       *
- *         data - regData - the data struct for this register       *
- * Return: none                                                     *
-\********************************************************************/
-void
-gnc_register_date_range_cb (GtkWidget *widget, gpointer data)
-{
-  RegWindow *regData = data;
-
-  gnc_register_show_date_window(regData);
-}
-
-void
-gnc_register_gl_cb(GtkWidget *widget, gpointer data)
-{
-  GNCLedgerDisplay *ld;
-  RegWindow *regData;
-
-  ld = gnc_ledger_display_gl();
-  regData = regWindowLedger( ld );
-  gnc_split_reg_raise( regData->gsr );
-}
-
-void
-gnc_register_prices_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_prices_dialog (NULL);
-}
-
-void
-gnc_register_commodities_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_commodities_dialog (NULL);
-}
-
-void
-gnc_register_fincalc_cb(GtkWidget *widget, gpointer data)
-{
-  gnc_ui_fincalc_dialog_create();
-}
-
-void
-gnc_register_toolbar_cb( GtkWidget *widget, gpointer data )
-{
-  RegWindow *rw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show( rw->toolbar_dock );
-  } else {
-    gtk_widget_hide( rw->toolbar_dock );
-    gtk_widget_queue_resize( rw->toolbar_dock );
-  }
-}
-
-void
-gnc_register_summarybar_cb( GtkWidget *widget, gpointer data )
-{
-  RegWindow *rw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show( rw->summarybar_dock );
-  } else {
-    gtk_widget_hide( rw->summarybar_dock );
-    gtk_widget_queue_resize( rw->summarybar_dock );
-  }
-}
-
-void
-gnc_register_statusbar_cb( GtkWidget *widget, gpointer data )
-{
-  RegWindow *rw = data;
-  GtkCheckMenuItem *checkmenu = GTK_CHECK_MENU_ITEM(widget);
-
-  if (checkmenu->active) {
-    gtk_widget_show( rw->statusbar );
-  } else {
-    gtk_widget_hide( rw->statusbar );
-    gtk_widget_queue_resize( rw->statusbar );
-  }
-}
-
-
-/************************** END OF FILE **************************/
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/Makefile.am,v
retrieving revision 1.111
retrieving revision 1.112
diff -Lsrc/gnome/Makefile.am -Lsrc/gnome/Makefile.am -u -r1.111 -r1.112
--- src/gnome/Makefile.am
+++ src/gnome/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = glade
+SUBDIRS = glade schemas ui
 
 lib_LTLIBRARIES = libgncgnome.la libgw-gnc.la 
 
@@ -6,23 +6,22 @@
 gwmod_DATA = gw-gnc-spec.scm gw-gnc.scm
 #nodist_gwmod_DATA = gw-gnc.scm
 
-libgncgnome_la_LDFLAGS = -module
 libgncgnome_la_LIBADD = \
   ${top_builddir}/src/engine/libgncmod-engine.la \
-  ${top_builddir}/src/app-file/libgncmod-app-file.la \
-  ${top_builddir}/src/backend/file/libgncmod-backend-file.la \
   ${top_builddir}/src/report/report-system/libgncmod-report-system.la \
   ${top_builddir}/src/report/report-gnome/libgncmod-report-gnome.la \
   ${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \
   ${top_builddir}/src/gnome-search/libgncmod-gnome-search.la \
-  ${GUILE_LIBS} ${GNOME_LIBDIR} ${GNOMEUI_LIBS} ${GLIB_LIBS}
+  ${GUILE_LIBS} ${GNOME_LIBS} ${GLIB_LIBS} ${QOF_LIBS}
 
 libgw_gnc_la_SOURCES = gw-gnc.c
-libgw_gnc_la_LDFLAGS = -module \
+
+libgw_gnc_la_LDFLAGS =  \
   ${G_WRAP_LINK_ARGS} ${GLIB_LIBS}
 libgw_gnc_la_LIBADD = libgncgnome.la
 
 libgncgnome_la_SOURCES = \
+  dialog-chart-export.c  \
   dialog-commodities.c \
   dialog-fincalc.c \
   dialog-find-transactions.c \
@@ -42,17 +41,40 @@
   druid-merge.c \
   druid-loan.c \
   druid-stock-split.c \
+  gnc-plugin-account-tree.c \
+  gnc-plugin-basic-commands.c \
+  gnc-plugin-budget.c \
+  gnc-plugin-register.c \
+  gnc-plugin-page-account-tree.c \
+  gnc-plugin-page-budget.c \
+  gnc-plugin-page-register.c \
   gnc-split-reg.c \
   lot-viewer.c \
-  mainwindow-account-tree.c \
   reconcile-list.c \
-  tip-of-the-day.c \
   top-level.c \
-  window-acct-tree.c \
-  window-main.c \
   window-main-summarybar.c \
   window-reconcile.c \
-  window-register.c
+  ${top_srcdir}/src/backend/file/sixtp-dom-parsers.c \
+  ${top_srcdir}/src/backend/file/sixtp-dom-generators.c \
+  ${top_srcdir}/src/backend/file/sixtp-utils.c \
+  ${top_srcdir}/src/backend/file/sixtp.c \
+  ${top_srcdir}/src/backend/file/sixtp-stack.c \
+  ${top_srcdir}/src/backend/file/sixtp-to-dom-parser.c \
+  ${top_srcdir}/src/backend/file/io-example-account.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-gen.c \
+  ${top_srcdir}/src/backend/file/io-gncxml-v2.c \
+  ${top_srcdir}/src/backend/file/io-utils.c \
+  ${top_srcdir}/src/backend/file/gnc-account-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-budget-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-lot-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-recurrence-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-schedxaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-freqspec-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-transaction-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-commodity-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-book-xml-v2.c \
+  ${top_srcdir}/src/backend/file/gnc-pricedb-xml-v2.c
+
 
 gnomeappdir = ${datadir}/gnome/apps/Applications
 
@@ -66,6 +88,7 @@
 mime_DATA = gnucash.keys gnucash.mime
 
 noinst_HEADERS = \
+  dialog-chart-export.h \
   dialog-fincalc.h \
   dialog-find-transactions.h \
   dialog-new-user.h \
@@ -80,19 +103,20 @@
   druid-merge.h \
   druid-loan.h \
   druid-stock-split.h \
-  gnc-network.h \
+  gnc-plugin-account-tree.h \
+  gnc-plugin-basic-commands.h \
+  gnc-plugin-budget.h \
+  gnc-plugin-register.h \
+  gnc-plugin-page-account-tree.h \
+  gnc-plugin-page-budget.h \
+  gnc-plugin-page-register.h \
   gnc-split-reg.h \
   gw-gnc.h \
   lot-viewer.h \
-  mainwindow-account-tree.h \
   reconcile-list.h \
-  tip-of-the-day.h \
   top-level.h \
-  window-acct-tree.h \
-  window-main.h \
   window-main-summarybar.h \
   window-reconcile.h \
-  window-register.h \
   gw-gnc.h
 
 EXTRA_DIST = \
@@ -100,7 +124,6 @@
   gnucash.desktop.in \
   gnucash.keys.in \
   gnucash.mime \
-  gnc-network.c \
   ${gwmod_DATA}
 
 
@@ -111,8 +134,6 @@
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/network-utils \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
-  -I${top_srcdir}/src/app-file/gnome \
   -I${top_srcdir}/src/backend/file \
   -I${top_srcdir}/src/g-wrap \
   -I${top_srcdir}/src/gnome-utils \
@@ -124,12 +145,12 @@
   -I${top_srcdir}/src/report/report-gnome \
   ${GUILE_INCS} \
   ${G_WRAP_COMPILE_ARGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GNOME_PRINT_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GTKHTML_CFLAGS} \
-  ${GHTTP_CFLAGS} \
   ${GLADE_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GUPPI_CFLAGS} 
 
 # We build this in an earlier directory.
Index: dialog-scheduledxaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/dialog-scheduledxaction.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome/dialog-scheduledxaction.h -Lsrc/gnome/dialog-scheduledxaction.h -u -r1.6 -r1.7
--- src/gnome/dialog-scheduledxaction.h
+++ src/gnome/dialog-scheduledxaction.h
@@ -30,6 +30,12 @@
 #define DIALOG_SCHEDXACTION_CM_CLASS "dialog-scheduledtransactions"
 #define DIALOG_SCHEDXACTION_EDITOR_CM_CLASS "dialog-scheduledtransaction-editor"
 
+#define SXED_GCONF_SECTION "dialogs/scheduled_trans/transaction_editor"
+#define KEY_CREATE_AUTO	"create_auto"
+#define KEY_NOTIFY	"notify"
+#define KEY_CREATE_DAYS	"create_days"
+#define KEY_REMIND_DAYS	"remind_days"
+
 struct _SchedXactionDialog;
 struct _SchedXactionEditorDialog;
 
@@ -50,4 +56,10 @@
 
 void gnc_ui_scheduled_xaction_editor_dialog_destroy( SchedXactionEditorDialog *sxd );
 
+/**
+ * Sets up a book opened hook.  The function called may open a "since
+ * last run" dialog based upon the user's preferences.
+ **/
+void gnc_ui_sx_initialize (void);
+
 #endif
Index: fincalc.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/fincalc.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/glade/fincalc.glade -Lsrc/gnome/glade/fincalc.glade -u -r1.2 -r1.3
--- src/gnome/glade/fincalc.glade
+++ src/gnome/glade/fincalc.glade
@@ -1,1066 +1,1586 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Financial Calculator Dialog</name>
-  <title>Financial Calculator</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox10</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area10</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>schedule_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Schedule</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox54</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame26</name>
-	<border_width>3</border_width>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox62</name>
-	  <border_width>5</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>6</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox66</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox46</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>6</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+<widget class="GtkDialog" id="Financial Calculator Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Financial Calculator</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox10">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area10">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label790</name>
-		<label>Payment Periods</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.75</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>payment_periods_clear_button</name>
-		<tooltip>Clear the entry</tooltip>
-		<can_focus>True</can_focus>
-		<label>Clear</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>payment_periods_calc_button</name>
-		<can_focus>True</can_focus>
-		<label>Calculate</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>payment_periods_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkButton" id="schedule_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox67</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox55</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>6</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox77">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-ok</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label807">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_Schedule</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label799</name>
-		<label>Interest Rate</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.75</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>interest_rate_clear_button</name>
-		<tooltip>Clear the entry</tooltip>
-		<can_focus>True</can_focus>
-		<label>Clear</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>interest_rate_calc_button</name>
-		<can_focus>True</can_focus>
-		<label>Calculate</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>interest_rate_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+      <child>
+	<widget class="GtkHBox" id="hbox54">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame26">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox68</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox56</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>6</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkVBox" id="vbox62">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox66">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox46">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label790">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payment Periods</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.75</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="payment_periods_clear_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Clear the entry</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="payment_periods_calc_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Calculate</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="payment_periods_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox67">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox55">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label799">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Interest Rate</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.75</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="interest_rate_clear_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Clear the entry</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="interest_rate_calc_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Calculate</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="interest_rate_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox68">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox56">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label800">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Present Value</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.75</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="present_value_clear_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Clear the entry</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="present_value_calc_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Calculate</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="present_value_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox69">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox57">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label801">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Periodic Payment</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.75</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="periodic_payment_clear_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Clear the entry</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="periodic_payment_calc_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Calculate</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="periodic_payment_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox70">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox58">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">6</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label802">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Future Value</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.75</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="future_value_clear_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Clear the entry</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="future_value_calc_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Calculate</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			      <property name="pack_type">GTK_PACK_END</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="future_value_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label800</name>
-		<label>Present Value</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.75</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>present_value_clear_button</name>
-		<tooltip>Clear the entry</tooltip>
-		<can_focus>True</can_focus>
-		<label>Clear</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>present_value_calc_button</name>
-		<can_focus>True</can_focus>
-		<label>Calculate</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>present_value_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame27">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox69</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox57</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>6</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkVBox" id="vbox65">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">10</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox51">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox63">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label797">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Compounding:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label798">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payments:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox64">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="compounding_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget1">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget2">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget3">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Semi-annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget4">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Tri-annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget5">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Quarterly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget6">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Bi-monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget7">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget8">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Semi-monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget9">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Bi-weekly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget10">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Weekly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget11">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Daily (360)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget12">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Daily (365)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="payment_menu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget13">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget14">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget15">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Semi-annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget16">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Tri-annual</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget17">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Quarterly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget18">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Bi-monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget19">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget20">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Semi-monthly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget21">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Bi-weekly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget22">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Weekly</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget23">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Daily (360)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget24">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Daily (365)</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox71">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="period_payment_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">End of Period Payments</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton4">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Beginning of Period Payments</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">period_payment_radio</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox72">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="discrete_compounding_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Discrete Compounding</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton6">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Continuous Compounding</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">discrete_compounding_radio</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox76">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<widget class="GtkLabel" id="some_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Payment Total:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="payment_total_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">total</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label801</name>
-		<label>Periodic Payment</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.75</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>periodic_payment_clear_button</name>
-		<tooltip>Clear the entry</tooltip>
-		<can_focus>True</can_focus>
-		<label>Clear</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>periodic_payment_calc_button</name>
-		<can_focus>True</can_focus>
-		<label>Calculate</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>periodic_payment_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+<widget class="GtkDialog" id="Amortization Schedule Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Account Information</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox11">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area11">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="button60">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox70</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox58</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>6</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label802</name>
-		<label>Future Value</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.75</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>future_value_clear_button</name>
-		<tooltip>Clear the entry</tooltip>
-		<can_focus>True</can_focus>
-		<label>Clear</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>future_value_calc_button</name>
-		<can_focus>True</can_focus>
-		<label>Calculate</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="button61">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>future_value_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="button62">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame27</name>
-	<border_width>3</border_width>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox65</name>
-	  <border_width>5</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>10</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox51</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>3</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox63</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>2</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+      <child>
+	<widget class="GtkHBox" id="hbox59">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label797</name>
-		<label>Compounding:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label798</name>
-		<label>Payments:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkVBox" id="vbox73">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">2</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox64</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>2</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label803">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Effective Date:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">1</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>compounding_menu</name>
-		<can_focus>True</can_focus>
-		<items>Annual
-Semi-annual
-Tri-annual
-Quarterly
-Bi-monthly
-Monthly
-Semi-monthly
-Bi-weekly
-Weekly
-Daily (360)
-Daily (365)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>payment_menu</name>
-		<can_focus>True</can_focus>
-		<items>Annual
-Semi-annual
-Tri-annual
-Quarterly
-Bi-monthly
-Monthly
-Semi-monthly
-Bi-weekly
-Weekly
-Daily (360)
-Daily (365)
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
+	      <child>
+		<widget class="GtkLabel" id="label804">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Initial Payment:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">1</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox71</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>period_payment_radio</name>
-	      <can_focus>True</can_focus>
-	      <label>End of Period Payments</label>
-	      <active>True</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>period_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label805">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Compounding:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">1</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>radiobutton4</name>
-	      <can_focus>True</can_focus>
-	      <label>Beginning of Period Payments</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>period_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label806">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Payments:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">1</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox74">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">2</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox72</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>discrete_compounding_radio</name>
-	      <can_focus>True</can_focus>
-	      <label>Discrete Compounding</label>
-	      <active>True</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>compouding_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox60">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>radiobutton6</name>
-	      <can_focus>True</can_focus>
-	      <label>Continuous Compounding</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>compouding_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox61">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox76</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>3</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>some_label</name>
-	      <label>Payment Total:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkOptionMenu" id="optionmenu1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="history">0</property>
+
+		  <child internal-child="menu">
+		    <widget class="GtkMenu" id="convertwidget25">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget26">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget27">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Semi-annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget28">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Tri-annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget29">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Quarterly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget30">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Bi-monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget31">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget32">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Semi-monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget33">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Bi-weekly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget34">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Weekly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget35">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Daily (360)</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget36">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Daily (365)</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>payment_total_label</name>
-	      <label>total</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkOptionMenu" id="optionmenu2">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="history">0</property>
+
+		  <child internal-child="menu">
+		    <widget class="GtkMenu" id="convertwidget37">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget38">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget39">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Semi-annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget40">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Tri-annual</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget41">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Quarterly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget42">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Bi-monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget43">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget44">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Semi-monthly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget45">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Bi-weekly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget46">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Weekly</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget47">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Daily (360)</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget48">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Daily (365)</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Amortization Schedule Dialog</name>
-  <title>Account Information</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox11</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area11</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button60</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button61</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button62</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox59</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox73</name>
-	<homogeneous>True</homogeneous>
-	<spacing>2</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label803</name>
-	  <label>Effective Date:</label>
-	  <justify>GTK_JUSTIFY_RIGHT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>1</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label804</name>
-	  <label>Initial Payment:</label>
-	  <justify>GTK_JUSTIFY_RIGHT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>1</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label805</name>
-	  <label>Compounding:</label>
-	  <justify>GTK_JUSTIFY_RIGHT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>1</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label806</name>
-	  <label>Payments:</label>
-	  <justify>GTK_JUSTIFY_RIGHT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>1</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox74</name>
-	<homogeneous>True</homogeneous>
-	<spacing>2</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox60</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox61</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkOptionMenu</class>
-	  <name>optionmenu1</name>
-	  <can_focus>True</can_focus>
-	  <items>Annual
-Semi-annual
-Tri-annual
-Quarterly
-Bi-monthly
-Monthly
-Semi-monthly
-Bi-weekly
-Weekly
-Daily (360)
-Daily (365)
-</items>
-	  <initial_choice>0</initial_choice>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
 	</widget>
-
-	<widget>
-	  <class>GtkOptionMenu</class>
-	  <name>optionmenu2</name>
-	  <can_focus>True</can_focus>
-	  <items>Annual
-Semi-annual
-Tri-annual
-Quarterly
-Bi-monthly
-Monthly
-Semi-monthly
-Bi-weekly
-Weekly
-Daily (360)
-Daily (365)
-</items>
-	  <initial_choice>0</initial_choice>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: print.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/print.glade,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/gnome/glade/print.glade -Lsrc/gnome/glade/print.glade -u -r1.9 -r1.10
--- src/gnome/glade/print.glade
+++ src/gnome/glade/print.glade
@@ -1,882 +1,1002 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Print Check Dialog</name>
-  <title>Print Check</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox6</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area6</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button21</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_print_check_dialog_ok_cb</handler>
-	  <last_modification_time>Fri, 11 Oct 2002 00:26:43 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button22</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_print_check_dialog_cancel_cb</handler>
-	  <last_modification_time>Fri, 11 Oct 2002 00:26:56 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button23</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_print_check_dialog_help_cb</handler>
-	  <last_modification_time>Fri, 11 Oct 2002 00:27:08 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>notebook4</name>
-      <can_focus>True</can_focus>
-      <show_tabs>True</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>False</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Print Check Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Print Check</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox6">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area6">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkTable</class>
-	<name>options_table</name>
-	<border_width>5</border_width>
-	<rows>8</rows>
-	<columns>4</columns>
-	<homogeneous>True</homogeneous>
-	<row_spacing>0</row_spacing>
-	<column_spacing>5</column_spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847677</name>
-	  <label>Check format:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="helpbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_ui_print_check_dialog_help_cb"/>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847678</name>
-	  <label>Check position:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_ui_print_check_dialog_cancel_cb"/>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkOptionMenu</class>
-	  <name>check_format_picker</name>
-	  <can_focus>True</can_focus>
-	  <items>Quicken/QuickBooks (tm) US-Letter
-Deluxe(tm) Personal Checks US-Letter
-Quicken(tm) Wallet Checks w/ side stub
-Custom
-</items>
-	  <initial_choice>0</initial_choice>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>4</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_ui_print_check_dialog_ok_cb"/>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkOptionMenu</class>
-	  <name>check_position_picker</name>
-	  <can_focus>True</can_focus>
-	  <items>Top
-Middle
-Bottom
-Custom
-</items>
-	  <initial_choice>0</initial_choice>
-	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>4</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+      <child>
+	<widget class="GtkNotebook" id="notebook4">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847679</name>
-	  <label>Date format:</label>
-	  <justify>GTK_JUSTIFY_RIGHT</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>2</top_attach>
-	    <bottom_attach>3</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
-      </widget>
+	    <widget class="GtkTable" id="options_table">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="n_rows">8</property>
+	      <property name="n_columns">4</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">5</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847675</name>
-	<label>Options</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame5</name>
-	<label>Custom check format</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox1x6</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox16</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox13</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>2</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label847677">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Check format:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label702</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label701</name>
-		<label>Payee:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label705</name>
-		<label>Date:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label706</name>
-		<label>Amount (words):</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label707</name>
-		<label>Amount (numbers):</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label708</name>
-		<label>Memo:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label711</name>
-		<label>Check position:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label714</name>
-		<label>Date format:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label709</name>
-		<label>Units:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label847678">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Check position:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox14</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>2</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label847679">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Date format:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label703</name>
-		<label>x</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>payee_x_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>date_x_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>amount_words_x_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>amount_numbers_x_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>memo_x_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>check_position_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>date_format_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>units_picker</name>
-		<can_focus>True</can_focus>
-		<items>Inches
-Centimeters
-Millimeters
-Points
-</items>
-		<initial_choice>1</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkOptionMenu" id="check_position_picker">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="history">0</property>
+
+		  <child internal-child="menu">
+		    <widget class="GtkMenu" id="convertwidget4">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget5">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Top</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget6">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Middle</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget7">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Bottom</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget8">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Custom</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkOptionMenu" id="check_format_picker">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="history">0</property>
+
+		  <child internal-child="menu">
+		    <widget class="GtkMenu" id="convertwidget1">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Quicken/QuickBooks (tm) US-Letter</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="buyand1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Deluxe(tm) Personal Checks US-Letter</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="buyand2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Quicken(tm) Wallet Checks w/ side stub
+</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="convertwidget3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Custom</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="tab_expand">True</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847675">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Options</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame5">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox38</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>2</padding>
-		<expand>False</expand>
-		<fill>True</fill>
+		<widget class="GtkVBox" id="vbox1x6">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox16">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox13">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label702">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label701">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payee:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label705">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label706">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Amount (words):</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label707">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Amount (numbers):</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label708">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Memo:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label711">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Check position:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label714">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date format:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label709">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Units:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">2</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox14">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label703">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">x</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="payee_x_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="date_x_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="amount_words_x_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="amount_numbers_x_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="memo_x_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="check_position_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="date_format_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="units_picker">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget16">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget17">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Inches</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget18">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Centimeters</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget19">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Millimeters</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget20">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Points</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">2</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox38">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label744">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">y</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="payee_y_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="date_y_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="amount_words_y_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="amount_numbers_y_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="memo_y_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">False</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100000 0.1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label745">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label746">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">                                  </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label747">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">                    </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">2</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label744</name>
-		<label>y</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>payee_y_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>date_y_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>amount_words_y_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>amount_numbers_y_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>memo_y_entry</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>False</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100000</upper>
-		<step>0.1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label745</name>
-		<label></label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label746</name>
-		<label>                                  </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label747</name>
-		<label>                    </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label847681">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Custom check format</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847676</name>
-	<label>Custom format</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label847676">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Custom format</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: lots.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/lots.glade,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/gnome/glade/lots.glade -Lsrc/gnome/glade/lots.glade -u -r1.8 -r1.9
--- src/gnome/glade/lots.glade
+++ src/gnome/glade/lots.glade
@@ -1,434 +1,790 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>lots</name>
-  <program_name>lots</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Lot Viewer Window</name>
-  <title>Lot Viewer</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkVBox</class>
-    <name>vbox1</name>
-    <border_width>3</border_width>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-
-    <widget>
-      <class>GtkToolbar</class>
-      <name>toolbar1</name>
-      <border_width>3</border_width>
-      <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
-      <type>GTK_TOOLBAR_BOTH</type>
-      <space_size>5</space_size>
-      <space_style>GTK_TOOLBAR_SPACE_EMPTY</space_style>
-      <relief>GTK_RELIEF_NORMAL</relief>
-      <tooltips>True</tooltips>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<child_name>Toolbar:button</child_name>
-	<name>regview button</name>
-	<border_width>3</border_width>
-	<tooltip>Open a register showing the transactions in this lot</tooltip>
-	<label>View Lot
-in Register</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<child_name>Toolbar:button</child_name>
-	<name>delete button</name>
-	<border_width>3</border_width>
-	<tooltip>Delete the highlighted lot</tooltip>
-	<label>Delete
-Lot</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<child_name>Toolbar:button</child_name>
-	<name>scrub lot button</name>
-	<border_width>3</border_width>
-	<tooltip>Scrub the highlighted lot</tooltip>
-	<label>Scrub
-Lot</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<child_name>Toolbar:button</child_name>
-	<name>scrub account button</name>
-	<border_width>3</border_width>
-	<label>Scrub
-Account</label>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkVPaned</class>
-      <name>lot vpaned</name>
-      <handle_size>10</handle_size>
-      <gutter_size>6</gutter_size>
-      <position>0</position>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Lot Viewer Window">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Lot Viewer</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">600</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="lv_response_cb" last_modification_time="Sun, 22 May 2005 21:32:09 GMT"/>
+  <signal name="destroy" handler="lv_window_destroy_cb" last_modification_time="Sun, 22 May 2005 21:17:37 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkHPaned</class>
-	<name>lot hpaned</name>
-	<border_width>3</border_width>
-	<handle_size>10</handle_size>
-	<gutter_size>6</gutter_size>
-	<position>0</position>
-	<child>
-	  <shrink>True</shrink>
-	  <resize>True</resize>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>notes frame</name>
-	  <border_width>3</border_width>
-	  <label>Lot Title and Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <shrink>False</shrink>
-	    <resize>True</resize>
-	  </child>
+	    <widget class="GtkButton" id="scrub account button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">4</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox2</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox1</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-clear</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label16">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Scrub _Account</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
 	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8</name>
-		<label>Title:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>3</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>lot title entry</name>
-		<tooltip>Enter a name for the highlighted lot.</tooltip>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>3</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
 	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="scrub lot button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="tooltip" translatable="yes">Scrub the highlighted lot</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">3</property>
 
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow2</name>
-	      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_NEVER</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkAlignment" id="alignment2">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image2">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-clear</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label17">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_Scrub</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
 	      </child>
-
-	      <widget>
-		<class>GtkText</class>
-		<name>lot notes text</name>
-		<tooltip>Enter any notes you want to make about this lot.</tooltip>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text></text>
-	      </widget>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>lot list frame</name>
-	  <border_width>3</border_width>
-	  <label>Listing of Lots in This Account</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <shrink>True</shrink>
-	    <resize>True</resize>
 	  </child>
 
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>lot clist</name>
-	    <tooltip>A list of all of the lots in this account.</tooltip>
-	    <can_focus>True</can_focus>
-	    <columns>5</columns>
-	    <column_widths>80,80,80,80,80</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label3</name>
-	      <label>Opened</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label4</name>
-	      <label>Closed</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkButton" id="delete button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="tooltip" translatable="yes">Delete the highlighted lot</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-delete</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label5</name>
-	      <label>Title</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	  <child>
+	    <widget class="GtkButton" id="regview button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="tooltip" translatable="yes">Open a register showing the transactions in this lot</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label6</name>
-	      <label>Balance</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	      <child>
+		<widget class="GtkAlignment" id="alignment3">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox4">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image3">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-jump-to</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label18">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_View</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label7</name>
-	      <label>Gains</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkButton" id="button5">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-7</property>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>mini frame</name>
-	<border_width>3</border_width>
-	<label>Lot Mini-View</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <shrink>True</shrink>
-	  <resize>True</resize>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow4</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>mini clist</name>
-	    <tooltip>A summary of all of the transactions in the selected lot</tooltip>
-	    <columns>7</columns>
-	    <column_widths>80,80,80,80,80,80,80</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label9</name>
-	      <label>Date</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+      <child>
+	<widget class="GtkVPaned" id="lot vpaned">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="position">200</property>
+	  <signal name="notify" handler="lv_paned_notify_cb" last_modification_time="Sun, 22 May 2005 23:43:20 GMT"/>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label10</name>
-	      <label>Num</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	  <child>
+	    <widget class="GtkHPaned" id="lot hpaned">
+	      <property name="border_width">3</property>
+	      <property name="width_request">300</property>
+	      <property name="height_request">100</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="position">200</property>
+	      <signal name="notify" handler="lv_paned_notify_cb" last_modification_time="Sun, 22 May 2005 23:43:11 GMT"/>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label11</name>
-	      <label>Description</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	      <child>
+		<widget class="GtkTable" id="table1">
+		  <property name="visible">True</property>
+		  <property name="n_rows">5</property>
+		  <property name="n_columns">1</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkEntry" id="lot title entry">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Enter a name for the highlighted lot.</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		      <signal name="changed" handler="lv_title_entry_changed_cb" last_modification_time="Sun, 22 May 2005 21:25:12 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">12</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label19">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;_Notes&lt;/b&gt;</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow2">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTextView" id="lot notes text">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Enter any notes you want to make about this lot.</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="overwrite">False</property>
+			  <property name="accepts_tab">True</property>
+			  <property name="justification">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap_mode">GTK_WRAP_WORD</property>
+			  <property name="cursor_visible">True</property>
+			  <property name="pixels_above_lines">0</property>
+			  <property name="pixels_below_lines">0</property>
+			  <property name="pixels_inside_wrap">0</property>
+			  <property name="left_margin">0</property>
+			  <property name="right_margin">0</property>
+			  <property name="indent">0</property>
+			  <property name="text" translatable="yes"></property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_padding">12</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label20">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;_Title&lt;/b&gt;</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="shrink">True</property>
+		  <property name="resize">False</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label12</name>
-	      <label>Amount</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	      <child>
+		<widget class="GtkTable" id="table2">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">1</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label9">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">&lt;b&gt;_Lots in This Account&lt;/b&gt;</property>
+		      <property name="use_underline">True</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow5">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="lot clist">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">A list of all of the lots in this account.</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">5</property>
+			  <property name="column_widths">80,80,80,80,80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <signal name="select_row" handler="lv_select_row_cb" last_modification_time="Sun, 22 May 2005 21:25:47 GMT"/>
+			  <signal name="unselect_row" handler="lv_unselect_row_cb" last_modification_time="Sun, 22 May 2005 21:26:02 GMT"/>
+
+			  <child>
+			    <widget class="GtkLabel" id="label3">
+			      <property name="label" translatable="yes">Opened</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label4">
+			      <property name="label" translatable="yes">Closed</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label5">
+			      <property name="label" translatable="yes">Title</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label6">
+			      <property name="label" translatable="yes">Balance</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label7">
+			      <property name="label" translatable="yes">Gains</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">12</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="shrink">True</property>
+		  <property name="resize">True</property>
+		</packing>
+	      </child>
 	    </widget>
+	    <packing>
+	      <property name="shrink">True</property>
+	      <property name="resize">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label13</name>
-	      <label>Value</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	  <child>
+	    <widget class="GtkTable" id="table3">
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">1</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label14</name>
-	      <label>Gain/Loss</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label10">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;_Mini-Viewer&lt;/b&gt;</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label15</name>
-	      <label>Balance</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow4">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCList" id="mini clist">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">A summary of all of the transactions in the selected lot</property>
+		      <property name="n_columns">7</property>
+		      <property name="column_widths">80,80,80,80,80,80,80</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label9">
+			  <property name="label" translatable="yes">Date</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label10">
+			  <property name="label" translatable="yes">Num</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label11">
+			  <property name="label" translatable="yes">Description</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label12">
+			  <property name="label" translatable="yes">Amount</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label13">
+			  <property name="label" translatable="yes">Value</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label14">
+			  <property name="label" translatable="yes">Gain/Loss</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label15">
+			  <property name="label" translatable="yes">Balance</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_padding">12</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="shrink">True</property>
+	      <property name="resize">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkStatusbar</class>
-      <name>lot statusbar</name>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: commodities.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/commodities.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome/glade/commodities.glade -Lsrc/gnome/glade/commodities.glade -u -r1.3 -r1.4
--- src/gnome/glade/commodities.glade
+++ src/gnome/glade/commodities.glade
@@ -1,257 +1,284 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Commodities Dialog</name>
-  <title>Commodities</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox127</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox6</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox107</name>
-      <homogeneous>False</homogeneous>
-      <spacing>2</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Commodities Dialog">
+  <property name="title" translatable="yes">Commodities</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">400</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="gnc_commodities_dialog_response" last_modification_time="Wed, 23 Jul 2003 02:18:14 GMT"/>
+  <signal name="destroy" handler="gnc_commodities_window_destroy_cb" last_modification_time="Wed, 23 Jul 2003 02:20:32 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox127">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox6">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="add_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Add a new commodity.</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-add</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame51</name>
-	<border_width>3</border_width>
-	<label>Commodities</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox128</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>show_currencies_button</name>
-	    <border_width>3</border_width>
-	    <can_focus>True</can_focus>
-	    <label>Show National Currencies</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow33</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>commodity_list</name>
-	      <can_focus>True</can_focus>
-	      <columns>5</columns>
-	      <column_widths>80,80,80,80,80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>True</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477426</name>
-		<label>Type</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477427</name>
-		<label>Symbol</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477428</name>
-		<label>Name</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477429</name>
-		<label>Code</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477430</name>
-		<label>Fraction</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="remove_button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="tooltip" translatable="yes">Remove the current commodity.</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-remove</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
 	    </widget>
-	  </widget>
+	  </child>
 
-	  <widget>
-	    <class>GtkHButtonBox</class>
-	    <name>hbuttonbox7</name>
-	    <border_width>3</border_width>
-	    <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-	    <spacing>30</spacing>
-	    <child_min_width>85</child_min_width>
-	    <child_min_height>27</child_min_height>
-	    <child_ipad_x>7</child_ipad_x>
-	    <child_ipad_y>0</child_ipad_y>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>add_button</name>
-	      <tooltip>Add a new commodity.</tooltip>
-	      <can_default>True</can_default>
-	      <can_focus>True</can_focus>
-	      <label>Add</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
+	  <child>
+	    <widget class="GtkButton" id="edit_button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">3</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox2">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-properties</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Edit</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>remove_button</name>
-	      <tooltip>Remove the current commodity.</tooltip>
-	      <can_default>True</can_default>
-	      <can_focus>True</can_focus>
-	      <label>Remove</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-7</property>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>edit_button</name>
-	      <can_default>True</can_default>
-	      <can_focus>True</can_focus>
-	      <label>Edit</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
+      <child>
+	<widget class="GtkVBox" id="commodities_vbox">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot;&gt;Commodities&lt;/span&gt;</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox128">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">6</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="commodity_list_window">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="show_currencies_button">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Show National Currencies</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="gnc_commodities_show_currencies_toggled" last_modification_time="Thu, 20 Nov 2003 02:00:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: merge.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/merge.glade,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome/glade/merge.glade -Lsrc/gnome/glade/merge.glade -u -r1.1 -r1.2
--- src/gnome/glade/merge.glade
+++ src/gnome/glade/merge.glade
@@ -1,52 +1,36 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Merge Druid</name>
-  <height>560</height>
-  <title>Merge Account Hierarchy Setup</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>merge_druid</name>
-    <signal>
-      <name>cancel</name>
-      <handler>on_cancel</handler>
-      <last_modification_time>Sat, 16 Jun 2001 23:54:54 GMT</last_modification_time>
-    </signal>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start_page</name>
-      <signal>
-	<name>next</name>
-	<handler>on_start_page_next</handler>
-	<last_modification_time>Mon, 20 Sep 2004 11:46:19 GMT</last_modification_time>
-      </signal>
-      <title>Merge Account Hierarchy Setup</title>
-      <text>This druid will merge your new hierarchy into the currently open 
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="Merge Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Merge Account Hierarchy Setup</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="merge_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+      <signal name="cancel" handler="on_cancel"/>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Merge Account Hierarchy Setup</property>
+	  <property name="text" translatable="yes">This druid will merge your new hierarchy into the currently open 
 GnuCash file.
 
 You will be asked how to proceed if some accounts clash with the
@@ -63,279 +47,284 @@
  or you can change the currency after the merge is complete.
 
 Click 'Cancel'  if you do not wish to merge your new 
-account types now.</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>summary_page</name>
-      <title>Your new accounts are ready to merge</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox7</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label2</name>
-	  <label>The next screen will allow you to resolve
-any conflicts in merging your new account
-tree into your current GnuCash file.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>False</fill>
-	  </child>
+account types now.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#191919197070</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="next" handler="on_start_page_next"/>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>qof_book_merge</name>
-      <signal>
-	<name>prepare</name>
-	<handler>on_qof_book_merge_prepare</handler>
-	<last_modification_time>Tue, 14 Sep 2004 10:06:26 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>on_qof_book_merge_next</handler>
-	<last_modification_time>Tue, 14 Sep 2004 14:19:07 GMT</last_modification_time>
-      </signal>
-      <title>Please resolve any conflicts in the merge</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox6</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox105</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="summary_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Your new accounts are ready to merge</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#191919197070</property>
+	  <property name="logo_background">#ffffffffffff</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox7">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox121</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>ResultsBox</name>
-	      <label>Number of reports still to be reconciled.</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox106</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>scrolledwindow27</name>
-		<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>GtkViewport</class>
-		  <name>viewport1</name>
-		  <border_width>5</border_width>
-		  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>OutPut</name>
-		    <label></label>
-		    <justify>GTK_JUSTIFY_LEFT</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <focus_target>MergeUpdate</focus_target>
-		  </widget>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The next screen will allow you to resolve
+any conflicts in merging your new account
+tree into your current GnuCash file.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>Static</name>
-	      <label>You have three choices for each collision.
-The import object can be allowed to overwrite the target - use this to update your existing book.
-The import object can be ignored - use this if the import is a duplicate of an object in the existing book.
-The import object can be created as a new object in the existing book.</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 	    </widget>
+	  </child>
+	</widget>
+      </child>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>MergeUpdate</name>
-	      <border_width>5</border_width>
-	      <tooltip>overwrite the original with the import data</tooltip>
-	      <can_focus>True</can_focus>
-	      <has_focus>True</has_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>on_MergeUpdate_clicked</handler>
-		<last_modification_time>Wed, 22 Sep 2004 09:42:48 GMT</last_modification_time>
-	      </signal>
-	      <label>1. Update your existing book with the import data</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="qof_book_merge">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Please resolve any conflicts in the merge</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#191919197070</property>
+	  <property name="logo_background">#ffffffffffff</property>
+	  <signal name="prepare" handler="on_qof_book_merge_prepare"/>
+	  <signal name="next" handler="on_qof_book_merge_next"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox6">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>MergeDuplicate</name>
-	      <border_width>5</border_width>
-	      <tooltip>ignore the import, leave the original untouched</tooltip>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>on_MergeDuplicate_clicked</handler>
-		<last_modification_time>Wed, 22 Sep 2004 09:43:50 GMT</last_modification_time>
-	      </signal>
-	      <label>2. Ignore the import data, leave original unchanged</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>MergeNew</name>
-	      <border_width>5</border_width>
-	      <tooltip>Add the import as a new object, leave original in place</tooltip>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>on_MergeNew_clicked</handler>
-		<last_modification_time>Wed, 22 Sep 2004 09:44:59 GMT</last_modification_time>
-	      </signal>
-	      <label>3.  Import the data as a NEW object</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox105">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox121">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="ResultsBox">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Number of reports still to be reconciled.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox106">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="scrolledwindow27">
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="shadow_type">GTK_SHADOW_NONE</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkViewport" id="viewport1">
+				  <property name="border_width">5</property>
+				  <property name="visible">True</property>
+				  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="OutPut">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes"></property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				      <property name="mnemonic_widget">MergeUpdate</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="Static">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">You have three choices for each collision.
+The import object can be allowed to overwrite the target - use this to update your existing book.
+The import object can be ignored - use this if the import is a duplicate of an object in the existing book.
+The import object can be created as a new object in the existing book.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="MergeUpdate">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">overwrite the original with the import data</property>
+			  <property name="can_focus">True</property>
+			  <property name="has_focus">True</property>
+			  <property name="label" translatable="yes">1. Update your existing book with the import data</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_MergeUpdate_clicked"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="MergeDuplicate">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">ignore the import, leave the original untouched</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">2. Ignore the import data, leave original unchanged</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_MergeDuplicate_clicked"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="MergeNew">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Add the import as a new object, leave original in place</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">3.  Import the data as a NEW object</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_MergeNew_clicked"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>MergeDruidFinishPage</name>
-      <signal>
-	<name>finish</name>
-	<handler>on_finish</handler>
-	<last_modification_time>Sat, 16 Jun 2001 23:41:40 GMT</last_modification_time>
-      </signal>
-      <title>Commit Merged Account Hierachy to data file</title>
-      <text>Press `Finish' to merge your new accounts into the current GnuCash file.
+      <child>
+	<widget class="GnomeDruidPageEdge" id="MergeDruidFinishPage">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">Commit Merged Account Hierachy to data file</property>
+	  <property name="text" translatable="yes">Press `Finish' to merge your new accounts into the current GnuCash file.
 
 Press `Back' to review your selections.
 
 Press `Cancel' to close this dialog without creating any new accounts.
 
 REMEMBER: There is no way to undo this final operation!
-Make sure you have a backup before clicking Finish.</text>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
+Make sure you have a backup before clicking Finish.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#191919197070</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="finish" handler="on_finish"/>
+	</widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: price.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/price.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome/glade/price.glade -Lsrc/gnome/glade/price.glade -u -r1.3 -r1.4
--- src/gnome/glade/price.glade
+++ src/gnome/glade/price.glade
@@ -1,646 +1,762 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-  <output_translatable_strings>True</output_translatable_strings>
-  <translatable_strings_file>price_strings.c</translatable_strings_file>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Prices Dialog</name>
-  <title>Price Editor</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox121</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox4</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame50</name>
-      <border_width>3</border_width>
-      <label>Prices</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Prices Dialog">
+  <property name="title" translatable="yes">Price Editor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">400</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="gnc_prices_dialog_response" last_modification_time="Tue, 25 Nov 2003 06:49:39 GMT"/>
+  <signal name="destroy" handler="gnc_prices_dialog_window_destroy_cb" last_modification_time="Tue, 25 Nov 2003 07:56:53 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox121">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox122</name>
-	<homogeneous>False</homogeneous>
-	<spacing>5</spacing>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow32</name>
-	  <border_width>3</border_width>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>price_list</name>
-	    <can_focus>True</can_focus>
-	    <columns>6</columns>
-	    <column_widths>117,80,80,80,80,80</column_widths>
-	    <selection_mode>GTK_SELECTION_BROWSE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <child_name>CList:title</child_name>
-	      <name>hbox109</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477415</name>
-		<label>Commodity</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkArrow</class>
-		<name>commodity_arrow</name>
-		<arrow_type>GTK_ARROW_DOWN</arrow_type>
-		<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label8477416</name>
-	      <label>Currency</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <child_name>CList:title</child_name>
-	      <name>hbox110</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label8477417</name>
-		<label>Date</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkArrow</class>
-		<name>date_arrow</name>
-		<arrow_type>GTK_ARROW_DOWN</arrow_type>
-		<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		  <pack>GTK_PACK_END</pack>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label8477418</name>
-	      <label>Source</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label8477419</name>
-	      <label>Type</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label8477420</name>
-	      <label>Price</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHButtonBox</class>
-	  <name>hbuttonbox5</name>
-	  <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-	  <spacing>20</spacing>
-	  <child_min_width>50</child_min_width>
-	  <child_min_height>27</child_min_height>
-	  <child_ipad_x>7</child_ipad_x>
-	  <child_ipad_y>0</child_ipad_y>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>add_button</name>
-	    <tooltip>Add a new price.</tooltip>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Add</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>remove_button</name>
-	    <tooltip>Remove the current price</tooltip>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Remove</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>remove_old_button</name>
-	    <tooltip>Remove prices older than a user-entered date</tooltip>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Remove Old...</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>edit_button</name>
-	    <tooltip>Edit the current price.</tooltip>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Edit</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>get_quotes_button</name>
-	    <tooltip>Get new online quotes for stock accounts.</tooltip>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Get Quotes</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Price Dialog</name>
-  <visible>False</visible>
-  <title>Price Editor</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox18</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area18</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>price_info_frame</name>
-      <label>Price Information</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkFrame" id="frame50">
+	  <property name="border_width">3</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox126</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox106</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox125</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477399</name>
-	      <label>Commodity:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	  <child>
+	    <widget class="GtkVBox" id="vbox122">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="price_list_window">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHButtonBox" id="hbuttonbox5">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+		  <property name="spacing">20</property>
+
+		  <child>
+		    <widget class="GtkButton" id="add_button">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Add a new price.</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label">gtk-add</property>
+		      <property name="use_stock">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_prices_dialog_add_clicked" last_modification_time="Tue, 25 Nov 2003 06:46:11 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="remove_button">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Remove the current price</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label">gtk-remove</property>
+		      <property name="use_stock">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_prices_dialog_remove_clicked" last_modification_time="Tue, 25 Nov 2003 06:48:02 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="remove_old_button">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Remove prices older than a user-entered date</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_prices_dialog_remove_old_clicked" last_modification_time="Tue, 25 Nov 2003 06:48:20 GMT"/>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment6">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">0</property>
+			  <property name="yscale">0</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox116">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">2</property>
+
+			      <child>
+				<widget class="GtkImage" id="image6">
+				  <property name="visible">True</property>
+				  <property name="stock">gtk-remove</property>
+				  <property name="icon_size">4</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477427">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Remove _Old</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="edit_button">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Edit the current price.</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_prices_dialog_edit_clicked" last_modification_time="Tue, 25 Nov 2003 06:48:50 GMT"/>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment5">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">0</property>
+			  <property name="yscale">0</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox115">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">2</property>
+
+			      <child>
+				<widget class="GtkImage" id="image5">
+				  <property name="visible">True</property>
+				  <property name="stock">gtk-properties</property>
+				  <property name="icon_size">4</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477426">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">_Edit</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="get_quotes_button">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Get new online quotes for stock accounts.</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_prices_dialog_get_quotes_clicked" last_modification_time="Tue, 25 Nov 2003 06:49:09 GMT"/>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment7">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">0</property>
+			  <property name="yscale">0</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox117">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">2</property>
+
+			      <child>
+				<widget class="GtkImage" id="image7">
+				  <property name="visible">True</property>
+				  <property name="stock">gtk-execute</property>
+				  <property name="icon_size">4</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477428">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Get _Quotes</property>
+				  <property name="use_underline">True</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477400</name>
-	      <label>Currency:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Prices</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477401</name>
-	      <label>Date:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+<widget class="GtkDialog" id="Price Dialog">
+  <property name="title" translatable="yes">Price Editor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox18">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area18">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477402</name>
-	      <visible>False</visible>
-	      <label>Source:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477403</name>
-	      <label>Type:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8477404</name>
-	      <label>Price:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="visible">True</property>
+	  <property name="n_rows">6</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">6</property>
+	  <property name="column_spacing">12</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox126zz</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>commodity_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkLabel" id="label8477399">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Commodity:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label8477400">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Currency:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>currency_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkLabel" id="label8477401">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Date:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label8477402">
+	      <property name="label" translatable="yes">Source:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>date_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkLabel" id="label8477403">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label8477404">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Price:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>source_entry</name>
-	      <visible>False</visible>
-	      <can_focus>True</can_focus>
-	      <editable>False</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkHBox" id="commodity_box">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>type_option</name>
-	      <can_focus>True</can_focus>
-	      <items>Bid
-Ask
-Last
-Net Asset Value
-Unknown
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+	  <child>
+	    <widget class="GtkHBox" id="currency_box">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>price_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkHBox" id="date_box">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkEntry" id="source_entry">
+	      <property name="can_focus">True</property>
+	      <property name="editable">False</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char" translatable="yes">*</property>
+	      <property name="activates_default">False</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">3</property>
+	      <property name="bottom_attach">4</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkOptionMenu" id="type_option">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="history">0</property>
+
+	      <child internal-child="menu">
+		<widget class="GtkMenu" id="convertwidget3">
+		  <property name="visible">True</property>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget4">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Bid</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget5">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Ask</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget6">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Last</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget7">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Net Asset Value</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget8">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Unknown</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">4</property>
+	      <property name="bottom_attach">5</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="price_box">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">5</property>
+	      <property name="bottom_attach">6</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: register.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/register.glade,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/gnome/glade/register.glade -Lsrc/gnome/glade/register.glade -u -r1.20 -r1.21
--- src/gnome/glade/register.glade
+++ src/gnome/glade/register.glade
@@ -1,2559 +1,2615 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeApp</class>
-  <name>Check Register</name>
-  <visible>False</visible>
-  <signal>
-    <name>destroy</name>
-    <handler>gnc_register_destroy_cb</handler>
-    <last_modification_time>Sat, 15 Jun 2002 22:04:14 GMT</last_modification_time>
-  </signal>
-  <signal>
-    <name>delete_event</name>
-    <handler>gnc_register_delete_cb</handler>
-    <last_modification_time>Sat, 15 Jun 2002 22:04:40 GMT</last_modification_time>
-  </signal>
-  <signal>
-    <name>size_allocate</name>
-    <handler>gnc_register_size_allocate</handler>
-    <last_modification_time>Sun, 16 Jun 2002 00:13:44 GMT</last_modification_time>
-  </signal>
-  <title>Check Register</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <enable_layout_config>True</enable_layout_config>
-
-  <widget>
-    <class>GnomeDock</class>
-    <child_name>GnomeApp:dock</child_name>
-    <name>dock</name>
-    <allow_floating>True</allow_floating>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>menu_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>0</band>
-      <position>0</position>
-      <offset>26</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>True</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>GtkMenuBar</class>
-	<name>gnc_register_menubar</name>
-	<shadow_type>GTK_SHADOW_NONE</shadow_type>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menuitem1</name>
-	  <stock_item>GNOMEUIINFO_MENU_FILE_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menuitem1_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem2</name>
-	      <tooltip>Create a new account</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_new_account_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:41:11 GMT</last_modification_time>
-	      </signal>
-	      <label>New Account</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem3</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem1</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_file_save_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_SAVE_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem2</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_file_save_as_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_SAVE_AS_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem4</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem3</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_print_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:07:26 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_PRINT_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem5</name>
-	      <tooltip>Print a check using a standard format</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_print_check_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:03:51 GMT</last_modification_time>
-	      </signal>
-	      <label>Print _Check</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem6</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem4</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_close_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 01:59:32 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_CLOSE_ITEM</stock_item>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem5</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_exit_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 05:55:04 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>gnc_register_edit_menu</name>
-	  <label>_Edit</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>gnc_register_edit_menu_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_edit_mi</name>
-	      <accelerator>
-		<modifiers>0</modifiers>
-		<key>GDK_F6</key>
-		<signal>activate</signal>
-	      </accelerator>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_edit_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Edit Account</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>gnc_register_find_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_ui_find_transactions_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Find</label>
-	      <right_justify>False</right_justify>
-	      <stock_icon>GNOME_STOCK_MENU_SEARCH</stock_icon>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>gnc_register_view_menu</name>
-	  <label>_View</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>gnc_register_view_menu_menu</name>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>gnc_register_toolbar_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_toolbar_cb</handler>
-		<last_modification_time>Mon, 04 Nov 2002 02:53:04 GMT</last_modification_time>
-	      </signal>
-	      <label>_Toolbar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>gnc_register_summary_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_summarybar_cb</handler>
-		<last_modification_time>Mon, 04 Nov 2002 02:53:04 GMT</last_modification_time>
-	      </signal>
-	      <label>S_ummary Bar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>gnc_register_statusbar_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_statusbar_cb</handler>
-		<last_modification_time>Mon, 04 Nov 2002 02:53:04 GMT</last_modification_time>
-	      </signal>
-	      <label>_Status Bar</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator14</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_select_trans_mi</name>
-	      <label>S_elect Transactions</label>
-	      <right_justify>False</right_justify>
-
-	      <widget>
-		<class>GtkMenu</class>
-		<name>gnc_register_select_trans_mi_menu</name>
-
-		<widget>
-		  <class>GtkMenuItem</class>
-		  <name>gnc_register_date_range_mi</name>
-		  <label>Date _Range</label>
-		  <right_justify>False</right_justify>
-
-		  <widget>
-		    <class>GtkMenu</class>
-		    <name>gnc_register_date_range_mi_menu</name>
-
-		    <widget>
-		      <class>GtkMenuItem</class>
-		      <name>show_all1</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_date_show_all_cb</handler>
-			<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-		      </signal>
-		      <label>Show _All</label>
-		      <right_justify>False</right_justify>
-		    </widget>
-
-		    <widget>
-		      <class>GtkMenuItem</class>
-		      <name>set_range1</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_date_range_cb</handler>
-			<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-		      </signal>
-		      <label>Set _Range...</label>
-		      <right_justify>False</right_justify>
-		    </widget>
-		  </widget>
-		</widget>
-
-		<widget>
-		  <class>GtkMenuItem</class>
-		  <name>gnc_register_date_range_mi</name>
-		  <label>Status</label>
-		  <right_justify>False</right_justify>
-
-		  <widget>
-		    <class>GtkMenu</class>
-		    <name>gnc_register_date_range_mi_menu</name>
-
-		    <widget>
-		      <class>GtkMenuItem</class>
-		      <name>show_all_status</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_all_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_All</label>
-		      <right_justify>False</right_justify>
-		    </widget>
-
-		    <widget>
-		      <class>GtkMenuItem</class>
-		      <name>separator15</name>
-		      <right_justify>False</right_justify>
-		    </widget>
-
-		    <widget>
-		      <class>GtkCheckMenuItem</class>
-		      <name>show_reconciled</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_one_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_Reconciled</label>
-		      <active>True</active>
-		      <always_show_toggle>True</always_show_toggle>
-		    </widget>
-
-		    <widget>
-		      <class>GtkCheckMenuItem</class>
-		      <name>show_cleared</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_one_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_Cleared</label>
-		      <active>True</active>
-		      <always_show_toggle>True</always_show_toggle>
-		    </widget>
-
-		    <widget>
-		      <class>GtkCheckMenuItem</class>
-		      <name>show_voided</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_one_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_Voided</label>
-		      <active>True</active>
-		      <always_show_toggle>True</always_show_toggle>
-		    </widget>
-
-		    <widget>
-		      <class>GtkCheckMenuItem</class>
-		      <name>show_frozen</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_one_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_Frozen</label>
-		      <active>True</active>
-		      <always_show_toggle>True</always_show_toggle>
-		    </widget>
-
-		    <widget>
-		      <class>GtkCheckMenuItem</class>
-		      <name>show_unreconciled</name>
-		      <signal>
-			<name>activate</name>
-			<handler>gnc_register_show_one_status_cb</handler>
-			<last_modification_time>Sun, 15 Dec 2002 07:13:43 GMT</last_modification_time>
-		      </signal>
-		      <label>_Unreconciled</label>
-		      <active>True</active>
-		      <always_show_toggle>True</always_show_toggle>
-		    </widget>
-		  </widget>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>gnc_register_actions_menu</name>
-	  <label>_Actions</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>gnc_register_actions_menu_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_xfer_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_xfer_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Transfer...</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_recn_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_start_recn_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Reconcile...</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_stock_split_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_stock_split_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Stock Split...</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_lots_mi</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_lots_cb</handler>
-		<last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Lot Viewer...</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>gnc_register_scrub_mi</name>
-	      <label>Chec_k &amp; Repair</label>
-	      <right_justify>False</right_justify>
-
-	      <widget>
-		<class>GtkMenu</class>
-		<name>gnc_register_scrub_mi_menu</name>
-
-		<widget>
-		  <class>GtkMenuItem</class>
-		  <name>all_transactions1</name>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_register_scrub_all_cb</handler>
-		    <last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-		  </signal>
-		  <label>_All transactions</label>
-		  <right_justify>False</right_justify>
-		</widget>
-
-		<widget>
-		  <class>GtkMenuItem</class>
-		  <name>this_transaction1</name>
-		  <signal>
-		    <name>activate</name>
-		    <handler>gnc_register_scrub_current_cb</handler>
-		    <last_modification_time>Tue, 29 Oct 2002 04:51:17 GMT</last_modification_time>
-		  </signal>
-		  <label>_This transaction</label>
-		  <right_justify>False</right_justify>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menuitem41</name>
-	  <label>_Reports</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menuitem41_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem42</name>
-	      <tooltip>Open a register report window for this transaction</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_report_account_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:31:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Account Report</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem43</name>
-	      <tooltip>Open a register report window for this transaction</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_report_trans_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 17:31:17 GMT</last_modification_time>
-	      </signal>
-	      <label>_Transaction Report</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menuitem44</name>
-	  <label>_Tools</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menuitem44_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem45</name>
-	      <tooltip>Open a general ledger window</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_gl_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_General Ledger</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem46</name>
-	      <tooltip>View and edit the prices for stocks and mutual funds</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_prices_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Price Editor</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem47</name>
-	      <tooltip>View and edit the commodities for stocks and mutual funds</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_commodities_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Commodity Editor</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem48</name>
-	      <tooltip>Use the financial calculator</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_register_fincalc_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 06:22:56 GMT</last_modification_time>
-	      </signal>
-	      <label>_Financial Calculator</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menuitem49</name>
-	  <stock_item>GNOMEUIINFO_MENU_HELP_TREE</stock_item>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menuitem49_menu</name>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem50</name>
-	      <tooltip>Open the GnuCash Tutorial</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_tutorial_cb</handler>
-		<last_modification_time>Sat, 23 Nov 2002 19:16:04 GMT</last_modification_time>
-	      </signal>
-	      <label>Tutorial and Concepts _Guide</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem51</name>
-	      <tooltip>View the Tips of the Day</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_totd_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 01:57:06 GMT</last_modification_time>
-	      </signal>
-	      <label>_Tip Of The Day</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>help1</name>
-	      <tooltip>Open the GnuCash Help</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_help_cb</handler>
-		<last_modification_time>Sat, 23 Nov 2002 19:16:04 GMT</last_modification_time>
-	      </signal>
-	      <label>_Help</label>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>menuitem52</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkPixmapMenuItem</class>
-	      <name>pixmapmenuitem10</name>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_main_window_about_cb</handler>
-		<last_modification_time>Sun, 16 Jun 2002 01:12:45 GMT</last_modification_time>
-	      </signal>
-	      <stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>toolbar_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>1</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>False</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDockItem</class>
-      <name>summarybar_dock</name>
-      <border_width>2</border_width>
-      <placement>GNOME_DOCK_TOP</placement>
-      <band>2</band>
-      <position>0</position>
-      <offset>0</offset>
-      <locked>False</locked>
-      <exclusive>True</exclusive>
-      <never_floating>False</never_floating>
-      <never_vertical>False</never_vertical>
-      <never_horizontal>False</never_horizontal>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <child_name>GnomeDock:contents</child_name>
-      <name>table_frame</name>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
-  </widget>
-
-  <widget>
-    <class>GnomeAppBar</class>
-    <child_name>GnomeApp:appbar</child_name>
-    <name>appbar</name>
-    <has_progress>False</has_progress>
-    <has_status>True</has_status>
-    <child>
-      <padding>0</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-  </widget>
+<glade-interface>
+<requires lib="gnome"/>
+<requires lib="bonobo"/>
+
+<widget class="GnomeApp" id="Check Register">
+  <property name="title" translatable="yes">Check Register</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="enable_layout_config">True</property>
+  <signal name="destroy" handler="gnc_register_destroy_cb"/>
+  <signal name="delete_event" handler="gnc_register_delete_cb"/>
+  <signal name="size_allocate" handler="gnc_register_size_allocate"/>
+
+  <child internal-child="dock">
+    <widget class="BonoboDock" id="dock">
+      <property name="visible">True</property>
+      <property name="allow_floating">True</property>
+
+      <child>
+	<widget class="BonoboDockItem" id="menu_dock">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="shadow_type">GTK_SHADOW_OUT</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="placement">BONOBO_DOCK_TOP</property>
+	  <property name="band">0</property>
+	  <property name="position">0</property>
+	  <property name="offset">26</property>
+	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE|BONOBO_DOCK_ITEM_BEH_NEVER_VERTICAL</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="BonoboDockItem" id="toolbar_dock">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="shadow_type">GTK_SHADOW_OUT</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="placement">BONOBO_DOCK_TOP</property>
+	  <property name="band">1</property>
+	  <property name="position">0</property>
+	  <property name="offset">0</property>
+	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="BonoboDockItem" id="summarybar_dock">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="shadow_type">GTK_SHADOW_OUT</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="placement">BONOBO_DOCK_TOP</property>
+	  <property name="band">2</property>
+	  <property name="position">0</property>
+	  <property name="offset">0</property>
+	  <property name="behavior">BONOBO_DOCK_ITEM_BEH_EXCLUSIVE</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="table_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+	</widget>
+      </child>
+    </widget>
+    <packing>
+      <property name="padding">0</property>
+      <property name="expand">True</property>
+      <property name="fill">True</property>
+    </packing>
+  </child>
+
+  <child internal-child="appbar">
+    <widget class="GnomeAppBar" id="appbar">
+      <property name="visible">True</property>
+      <property name="has_progress">False</property>
+      <property name="has_status">True</property>
+    </widget>
+    <packing>
+      <property name="padding">0</property>
+      <property name="expand">True</property>
+      <property name="fill">True</property>
+    </packing>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkMenu</class>
-  <name>Check Register Popup Menu</name>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_transfer</name>
-    <tooltip>Transfer funds from one account to another</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_xfer_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 05:38:43 GMT</last_modification_time>
-    </signal>
-    <label>_Transfer...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_reconcile</name>
-    <tooltip>Reconcile the main account for this register</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_start_recn_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:15:14 GMT</last_modification_time>
-    </signal>
-    <label>_Reconcile...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_stock_split</name>
-    <tooltip>Record a stock split or a stock merger</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_stock_split_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:15:14 GMT</last_modification_time>
-    </signal>
-    <label>_Stock Split...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_separator1</name>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_enter</name>
-    <tooltip>Record the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_record_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 07:55:17 GMT</last_modification_time>
-    </signal>
-    <label>_Enter</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_cancel</name>
-    <tooltip>Cancel the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_cancel_trans_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:10:40 GMT</last_modification_time>
-    </signal>
-    <label>_Cancel</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_delete</name>
-    <tooltip>Delete the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_delete_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 20:29:44 GMT</last_modification_time>
-    </signal>
-    <label>_Delete</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_blank</name>
-    <tooltip>Move to the blank transaction at the bottom of the register</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_new_trans_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>_Blank</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_separator2</name>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_duplicate</name>
-    <tooltip>Make a copy of the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_duplicate_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 07:55:17 GMT</last_modification_time>
-    </signal>
-    <label>Dup_licate Transaction...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_reinitialize</name>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_reinitialize_trans_cb</handler>
-      <last_modification_time>Wed, 16 Oct 2002 06:27:31 GMT</last_modification_time>
-    </signal>
-    <label>Remove Transaction Splits</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkCheckMenuItem</class>
-    <name>popup_splits</name>
-    <tooltip>Show all splits in the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_expand_trans_menu_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>S_plit Transaction</label>
-    <active>False</active>
-    <always_show_toggle>True</always_show_toggle>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_schedule</name>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_recur_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:39:42 GMT</last_modification_time>
-    </signal>
-    <label>Schedule...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>popup_jump</name>
-    <tooltip>Jump to the corresponding transaction in the other account</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_register_jump_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>_Jump</label>
-    <right_justify>False</right_justify>
-  </widget>
+<widget class="GtkMenu" id="Check Register Popup Menu">
+  <property name="visible">True</property>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_transfer">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Transfer funds from one account to another</property>
+      <property name="label" translatable="yes">_Transfer...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_xfer_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_reconcile">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Reconcile the main account for this register</property>
+      <property name="label" translatable="yes">_Reconcile...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_start_recn_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_stock_split">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Record a stock split or a stock merger</property>
+      <property name="label" translatable="yes">_Stock Split...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_stock_split_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_separator1">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_enter">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Record the current transaction</property>
+      <property name="label" translatable="yes">_Enter</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_record_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_cancel">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Cancel the current transaction</property>
+      <property name="label" translatable="yes">_Cancel</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_cancel_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_delete">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Delete the current transaction</property>
+      <property name="label" translatable="yes">_Delete</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_delete_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_blank">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</property>
+      <property name="label" translatable="yes">_Blank</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_new_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_separator2">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_duplicate">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Make a copy of the current transaction</property>
+      <property name="label" translatable="yes">Dup_licate Transaction...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_duplicate_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_reinitialize">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Remove Transaction Splits</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_reinitialize_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkCheckMenuItem" id="popup_splits">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Show all splits in the current transaction</property>
+      <property name="label" translatable="yes">S_plit Transaction</property>
+      <property name="use_underline">True</property>
+      <property name="active">False</property>
+      <signal name="activate" handler="gnc_register_expand_trans_menu_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_schedule">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Schedule...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_recur_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="popup_jump">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Jump to the corresponding transaction in the other account</property>
+      <property name="label" translatable="yes">_Jump</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_register_jump_cb"/>
+    </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Duplicate Transaction Dialog</name>
-  <title>Duplicate this Transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox15</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area15</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button76</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button77</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame41</name>
-      <label>Transaction Information</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox84</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>2</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox94</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>5</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847669</name>
-	    <label>Date:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847670</name>
-	    <label>Num:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox95</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>5</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>date_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>num_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>1000000000</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+<widget class="GtkDialog" id="Duplicate Transaction Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Duplicate this Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox15">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area15">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button76">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button77">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame41">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox84">
+	      <property name="border_width">3</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">2</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox94">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847669">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Date:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847670">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Num:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox95">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="date_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="num_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 1e+09 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label1">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Transaction Information</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Date Range</name>
-  <visible>False</visible>
-  <title>Register date ranges</title>
-  <type>GTK_WINDOW_DIALOG</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>True</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox42</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area16</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>set_range</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_register_date_cb</handler>
-	  <last_modification_time>Sun, 08 Dec 2002 03:23:17 GMT</last_modification_time>
-	</signal>
-	<label>Set Date Range</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button80</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>main_frame</name>
-      <border_width>5</border_width>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox97</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkRadioButton</class>
-	  <name>start_earliest</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>toggled</name>
-	    <handler>gnc_register_date_toggle_cb</handler>
-	    <last_modification_time>Sun, 16 Jun 2002 23:55:04 GMT</last_modification_time>
-	  </signal>
-	  <label>Show Earliest</label>
-	  <active>True</active>
-	  <draw_indicator>True</draw_indicator>
-	  <group>start</group>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox85</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>start_date</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>gnc_register_date_toggle_cb</handler>
-	      <last_modification_time>Sun, 16 Jun 2002 23:54:45 GMT</last_modification_time>
-	    </signal>
-	    <label>Start date:</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>start</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>start_date_entry</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator1</name>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkRadioButton</class>
-	  <name>end_latest</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>toggled</name>
-	    <handler>gnc_register_date_toggle_cb</handler>
-	    <last_modification_time>Sun, 16 Jun 2002 23:54:23 GMT</last_modification_time>
-	  </signal>
-	  <label>Show Latest</label>
-	  <active>True</active>
-	  <draw_indicator>True</draw_indicator>
-	  <group>end</group>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox86</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>end_date</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>gnc_register_date_toggle_cb</handler>
-	      <last_modification_time>Sun, 16 Jun 2002 23:53:30 GMT</last_modification_time>
-	    </signal>
-	    <label>End date:</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>end</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>end_date_entry</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>today</name>
-	    <sensitive>False</sensitive>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>clicked</name>
-	      <handler>gnc_register_today_cb</handler>
-	      <last_modification_time>Sun, 16 Jun 2002 23:56:10 GMT</last_modification_time>
-	    </signal>
-	    <label>Today</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+<widget class="GtkDialog" id="Delete Transaction">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Delete Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area17">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button83">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button81">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="main_vbox">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame43">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox99">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="delete_all">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Delete the whole transaction</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="delete_other">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Delete all the other splits</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">delete_all</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkTextView" id="text">
+		  <property name="visible">True</property>
+		  <property name="editable">False</property>
+		  <property name="overwrite">False</property>
+		  <property name="accepts_tab">True</property>
+		  <property name="justification">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap_mode">GTK_WRAP_WORD</property>
+		  <property name="cursor_visible">True</property>
+		  <property name="pixels_above_lines">0</property>
+		  <property name="pixels_below_lines">0</property>
+		  <property name="pixels_inside_wrap">0</property>
+		  <property name="left_margin">0</property>
+		  <property name="right_margin">0</property>
+		  <property name="indent">0</property>
+		  <property name="text" translatable="yes"></property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Delete Transaction</name>
-  <title>Delete Transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area17</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button81</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button83</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>main_vbox</name>
-      <border_width>5</border_width>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame43</name>
-	<border_width>5</border_width>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox99</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>delete_all</name>
-	    <can_focus>True</can_focus>
-	    <label>Delete the whole transaction</label>
-	    <active>True</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>group</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>delete_other</name>
-	    <can_focus>True</can_focus>
-	    <label>Delete all the other splits</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>group</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow1</name>
-	<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkText</class>
-	  <name>text</name>
-	  <width>226</width>
-	  <height>198</height>
-	  <editable>False</editable>
-	  <text></text>
+<widget class="GtkWindow" id="register_toolbar_win">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">[rtw] THIS WINDOW SHOULD NOT BE CREATED</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkToolbar" id="toolbar">
+      <property name="border_width">2</property>
+      <property name="visible">True</property>
+      <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+      <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+      <property name="tooltips">True</property>
+      <property name="show_arrow">True</property>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_enter">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Record the current transaction</property>
+	  <property name="label" translatable="yes">Enter</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-add</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_record_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_cancel">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Cancel the current transaction</property>
+	  <property name="label" translatable="yes">Cancel</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-undelete</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_cancel_trans_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_delete">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Delete the current transaction</property>
+	  <property name="label" translatable="yes">Delete</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gnome-stock-trash</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_delete_trans_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSeparatorToolItem" id="separatortoolitem1">
+	  <property name="visible">True</property>
+	  <property name="draw">True</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_duplicate">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Make a copy of the current transaction</property>
+	  <property name="label" translatable="yes">Duplicate</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-copy</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_duplicate_trans_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_schedule">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Create a Scheduled Transaction with the current transaction as a template</property>
+	  <property name="label" translatable="yes">Schedule</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gnome-stock-line-in</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_recur_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSeparatorToolItem" id="separatortoolitem2">
+	  <property name="visible">True</property>
+	  <property name="draw">True</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToggleToolButton" id="toolbar_split">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Split</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gnome-stock-book-open</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <property name="active">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_expand_trans_toolbar_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_blank">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</property>
+	  <property name="label" translatable="yes">Blank</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-new</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_new_trans_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="toolbar_jump">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Jump to the corresponding transaction in the other account</property>
+	  <property name="label" translatable="yes">Jump</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-jump-to</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_split_reg_jump_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="register_menubar_win">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">[rmw] THIS WINDOW SHOULD NOT BE CREATED</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkMenuBar" id="register_menubar">
+      <property name="visible">True</property>
+
+      <child>
+	<widget class="GtkMenuItem" id="menu_edit">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">_Edit</property>
+	  <property name="use_underline">True</property>
+
+	  <child>
+	    <widget class="GtkMenu" id="menu_edit_menu">
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_cut">
+		  <property name="visible">True</property>
+		  <property name="stock_item">GNOMEUIINFO_MENU_CUT_ITEM</property>
+		  <signal name="activate" handler="gnc_split_reg_cut_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_copy">
+		  <property name="visible">True</property>
+		  <property name="stock_item">GNOMEUIINFO_MENU_COPY_ITEM</property>
+		  <signal name="activate" handler="gnc_split_reg_copy_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_paste">
+		  <property name="visible">True</property>
+		  <property name="stock_item">GNOMEUIINFO_MENU_PASTE_ITEM</property>
+		  <signal name="activate" handler="gnc_split_reg_paste_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_cut_trans">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Cut the selected transaction</property>
+		  <property name="label" translatable="yes">Cut Transaction</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_cut_trans_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_copy_trans">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Copy the selected transaction</property>
+		  <property name="label" translatable="yes">Copy Transaction</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_copy_trans_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_paste_trans">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Paste the transaction from the clipboard</property>
+		  <property name="label" translatable="yes">Paste Transaction</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_paste_trans_cb"/>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
+
+      <child>
+	<widget class="GtkMenuItem" id="menu_view">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">_View</property>
+	  <property name="use_underline">True</property>
+
+	  <child>
+	    <widget class="GtkMenu" id="menu_view_menu">
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_sort_order">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Sort _Order</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menu_sort_order_menu">
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_standard">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Keep normal account order</property>
+			  <property name="label" translatable="yes">_Standard</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_standard_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="separator5">
+			  <property name="visible">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_date">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by Date</property>
+			  <property name="label" translatable="yes">_Date</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_date_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_date_of_entry">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by the date of entry</property>
+			  <property name="label" translatable="yes">Date of _Entry</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_date_entered_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_statement_date">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by the statement date (unreconciled items last)</property>
+			  <property name="label" translatable="yes">_Statement Date</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_date_reconciled_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_number">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by Number</property>
+			  <property name="label" translatable="yes">_Number</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_num_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_amount">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by Amount</property>
+			  <property name="label" translatable="yes">_Amount</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_amount_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_memo">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by Memo</property>
+			  <property name="label" translatable="yes">_Memo</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_memo_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_sort_description">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Sort by Description</property>
+			  <property name="label" translatable="yes">Descri_ption</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <property name="group">menu_sort_standard</property>
+			  <signal name="activate" handler="gnc_split_reg_sort_desc_cb"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_style">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">St_yle</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menu_style_menu">
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_style_basic_ledger">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Show transactions on one or two lines</property>
+			  <property name="label" translatable="yes">_Basic Ledger</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="gnc_split_reg_style_ledger_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_style_auto_split_ledger">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Show transactions on one or two lines and expand the current transaction</property>
+			  <property name="label" translatable="yes">_Auto-Split Ledger</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <property name="group">menu_style_basic_ledger</property>
+			  <signal name="activate" handler="gnc_split_reg_style_auto_ledger_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioMenuItem" id="menu_style_transaction_journal">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Show expanded transactions with all splits</property>
+			  <property name="label" translatable="yes">_Transaction Journal</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <property name="group">menu_style_basic_ledger</property>
+			  <signal name="activate" handler="gnc_split_reg_style_journal_cb"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="separator6">
+			  <property name="visible">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="menu_style_double_line">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Show two lines of information for each transaction</property>
+			  <property name="label" translatable="yes">_Double Line</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="gnc_split_reg_double_line_cb"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
+      </child>
+
+      <child>
+	<widget class="GtkMenuItem" id="menu_actions">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">_Actions</property>
+	  <property name="use_underline">True</property>
+
+	  <child>
+	    <widget class="GtkMenu" id="menu_actions_menu">
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_enter">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Record the current transaction</property>
+		  <property name="label" translatable="yes">_Enter</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_record_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_cancel">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Cancel the current transaction</property>
+		  <property name="label" translatable="yes">_Cancel</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_cancel_trans_cb"/>
+
+		  <child internal-child="image">
+		    <widget class="GtkImage" id="image11">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-cancel</property>
+		      <property name="icon_size">1</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_delete">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Delete the current transaction</property>
+		  <property name="label" translatable="yes">_Delete</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_delete_trans_cb"/>
+
+		  <child internal-child="image">
+		    <widget class="GtkImage" id="image12">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-delete</property>
+		      <property name="icon_size">1</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_blank">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</property>
+		  <property name="label" translatable="yes">_Blank</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_new_trans_cb"/>
+
+		  <child internal-child="image">
+		    <widget class="GtkImage" id="image13">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-clear</property>
+		      <property name="icon_size">1</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="separator8">
+		  <property name="visible">True</property>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_duplicate">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Make a copy of the current transaction</property>
+		  <property name="label" translatable="yes">Dup_licate Transaction...</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_duplicate_trans_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_reinitialize">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Erase all splits except the one for this account.</property>
+		  <property name="label" translatable="yes">Remove Transaction Splits</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_reinitialize_trans_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckMenuItem" id="menu_splits">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Show all splits in the current transaction</property>
+		  <property name="label" translatable="yes">S_plit Transaction</property>
+		  <property name="use_underline">True</property>
+		  <property name="active">False</property>
+		  <signal name="activate" handler="gnc_split_reg_expand_trans_menu_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_exchange">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Edit Exchange Rate</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_handle_exchange_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menu_schedule">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Schedule...</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_recur_cb"/>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkImageMenuItem" id="menu_jump">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Jump to the corresponding transaction in the other account</property>
+		  <property name="label" translatable="yes">_Jump</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="gnc_split_reg_jump_cb"/>
+
+		  <child internal-child="image">
+		    <widget class="GtkImage" id="image14">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-jump-to</property>
+		      <property name="icon_size">1</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>register_toolbar_win</name>
-  <title>[rtw] THIS WINDOW SHOULD NOT BE CREATED</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkToolbar</class>
-    <name>toolbar</name>
-    <border_width>2</border_width>
-    <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
-    <type>GTK_TOOLBAR_BOTH</type>
-    <space_size>10</space_size>
-    <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
-    <relief>GTK_RELIEF_NONE</relief>
-    <tooltips>True</tooltips>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_enter</name>
-      <tooltip>Record the current transaction</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_record_cb</handler>
-	<last_modification_time>Wed, 12 Jun 2002 02:02:11 GMT</last_modification_time>
-      </signal>
-      <label>Enter</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_ADD</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_cancel</name>
-      <tooltip>Cancel the current transaction</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_cancel_trans_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:12:49 GMT</last_modification_time>
-      </signal>
-      <label>Cancel</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_UNDELETE</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_delete</name>
-      <tooltip>Delete the current transaction</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_delete_trans_cb</handler>
-	<last_modification_time>Tue, 18 Jun 2002 07:59:46 GMT</last_modification_time>
-      </signal>
-      <label>Delete</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_TRASH</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_duplicate</name>
-      <tooltip>Make a copy of the current transaction</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_duplicate_trans_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:09:03 GMT</last_modification_time>
-      </signal>
-      <label>Duplicate</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_COPY</stock_pixmap>
-      <child>
-	<new_group>True</new_group>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_schedule</name>
-      <tooltip>Create a Scheduled Transaction with the current transaction as a template</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_recur_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:08:53 GMT</last_modification_time>
-      </signal>
-      <label>Schedule</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_LINE_IN</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkToggleButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_split</name>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_expand_trans_toolbar_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 23:02:08 GMT</last_modification_time>
-      </signal>
-      <label>Split</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_BOOK_OPEN</stock_pixmap>
-      <active>False</active>
-      <child>
-	<new_group>True</new_group>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_blank</name>
-      <tooltip>Move to the blank transaction at the bottom of the register</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_new_trans_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:09:31 GMT</last_modification_time>
-      </signal>
-      <label>Blank</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_NEW</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>toolbar_jump</name>
-      <tooltip>Jump to the corresponding transaction in the other account</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_split_reg_jump_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:09:46 GMT</last_modification_time>
-      </signal>
-      <label>Jump</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_JUMP_TO</stock_pixmap>
+<widget class="GtkWindow" id="win_register_toolbar_win">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">[wrtw] THIS WINDOW SHOULD NOT BE CREATED</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkToolbar" id="gnc_register_toolbar">
+      <property name="border_width">2</property>
+      <property name="visible">True</property>
+      <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
+      <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
+      <property name="tooltips">True</property>
+      <property name="show_arrow">True</property>
+
+      <child>
+	<widget class="GtkToolButton" id="gnc_register_close_b">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">NOTUSED: Defined in src/gnome/window-register.c</property>
+	  <property name="label" translatable="yes">Close</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-close</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_register_close_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSeparatorToolItem" id="separatortoolitem3">
+	  <property name="visible">True</property>
+	  <property name="draw">True</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="gnc_register_xfer_b">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">NOTUSED: Defined in src/gnome/window-register.c</property>
+	  <property name="label" translatable="yes">Transfer</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-convert</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_register_xfer_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSeparatorToolItem" id="separatortoolitem4">
+	  <property name="visible">True</property>
+	  <property name="draw">True</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="gnc_register_find_b">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">NOTUSED: Defined in src/gnome/window-register.c</property>
+	  <property name="label" translatable="yes">Find</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-find</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_ui_find_transactions_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="gnc_register_report_b">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">NOTUSED: Defined in src/gnome/window-register.c</property>
+	  <property name="label" translatable="yes">Report</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gnome-stock-book-green</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_register_report_account_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkToolButton" id="gnc_register_print_b">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">NOTUSED: Defined in src/gnome/window-register.c</property>
+	  <property name="label" translatable="yes">Print</property>
+	  <property name="use_underline">True</property>
+	  <property name="stock_id">gtk-print</property>
+	  <property name="visible_horizontal">True</property>
+	  <property name="visible_vertical">True</property>
+	  <property name="is_important">False</property>
+	  <signal name="clicked" handler="gnc_register_print_cb"/>
+	</widget>
+	<packing>
+	  <property name="expand">False</property>
+	  <property name="homogeneous">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>register_menubar_win</name>
-  <title>[rmw] THIS WINDOW SHOULD NOT BE CREATED</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkMenuBar</class>
-    <name>register_menubar</name>
-    <shadow_type>GTK_SHADOW_NONE</shadow_type>
-
-    <widget>
-      <class>GtkMenuItem</class>
-      <name>menu_edit</name>
-      <stock_item>GNOMEUIINFO_MENU_EDIT_TREE</stock_item>
-
-      <widget>
-	<class>GtkMenu</class>
-	<name>menu_edit_menu</name>
-
-	<widget>
-	  <class>GtkPixmapMenuItem</class>
-	  <name>menu_cut</name>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_cut_cb</handler>
-	    <last_modification_time>Mon, 28 Oct 2002 01:31:01 GMT</last_modification_time>
-	  </signal>
-	  <stock_item>GNOMEUIINFO_MENU_CUT_ITEM</stock_item>
-	</widget>
-
-	<widget>
-	  <class>GtkPixmapMenuItem</class>
-	  <name>menu_copy</name>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_copy_cb</handler>
-	    <last_modification_time>Mon, 28 Oct 2002 01:31:01 GMT</last_modification_time>
-	  </signal>
-	  <stock_item>GNOMEUIINFO_MENU_COPY_ITEM</stock_item>
-	</widget>
-
-	<widget>
-	  <class>GtkPixmapMenuItem</class>
-	  <name>menu_paste</name>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_paste_cb</handler>
-	    <last_modification_time>Sun, 16 Jun 2002 17:35:28 GMT</last_modification_time>
-	  </signal>
-	  <stock_item>GNOMEUIINFO_MENU_PASTE_ITEM</stock_item>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>separator13</name>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_cut_trans</name>
-	  <tooltip>Cut the selected transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_cut_trans_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 05:28:33 GMT</last_modification_time>
-	  </signal>
-	  <label>Cut Transaction</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_copy_trans</name>
-	  <tooltip>Copy the selected transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_copy_trans_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 05:28:33 GMT</last_modification_time>
-	  </signal>
-	  <label>Copy Transaction</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_paste_trans</name>
-	  <tooltip>Paste the transaction from the clipboard</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_paste_trans_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 05:28:33 GMT</last_modification_time>
-	  </signal>
-	  <label>Paste Transaction</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>separator16</name>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_void_trans</name>
-	  <tooltip>Void the selected transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_void_trans_cb</handler>
-	    <last_modification_time>Tue, 19 Nov 2002 03:25:59 GMT</last_modification_time>
-	  </signal>
-	  <label>Void Transaction...</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_unvoid_trans</name>
-	  <tooltip>Restore a voided transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_unvoid_trans_cb</handler>
-	    <last_modification_time>Fri, 13 Jun 2003 03:56:55 GMT</last_modification_time>
-	  </signal>
-	  <label>Unvoid Transaction</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>reverse_transaction</name>
-	  <tooltip>Create a new transaction that cancels out the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_reverse_trans_cb</handler>
-	    <last_modification_time>Fri, 13 Jun 2003 06:37:26 GMT</last_modification_time>
-	  </signal>
-	  <label>Reverse Transaction</label>
-	  <right_justify>False</right_justify>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkMenuItem</class>
-      <name>menu_view</name>
-      <stock_item>GNOMEUIINFO_MENU_VIEW_TREE</stock_item>
-
-      <widget>
-	<class>GtkMenu</class>
-	<name>menu_view_menu</name>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_sort_order</name>
-	  <label>Sort _Order</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_sort_order_menu</name>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_standard</name>
-	      <tooltip>Keep normal account order</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_standard_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Standard</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator5</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_date</name>
-	      <tooltip>Sort by Date</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_date_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Date</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_date_of_entry</name>
-	      <tooltip>Sort by the date of entry</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_date_entered_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>Date of _Entry</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_statement_date</name>
-	      <tooltip>Sort by the statement date (unreconciled items last)</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_date_reconciled_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Statement Date</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_number</name>
-	      <tooltip>Sort by Number</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_num_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Number</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_amount</name>
-	      <tooltip>Sort by Amount</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_amount_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Amount</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_memo</name>
-	      <tooltip>Sort by Memo</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_memo_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>_Memo</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_description</name>
-	      <tooltip>Sort by Description</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_desc_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:13:24 GMT</last_modification_time>
-	      </signal>
-	      <label>Descri_ption</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_action</name>
-	      <tooltip>Sort by Action</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_action_cb</handler>
-		<last_modification_time>Fri, 30 May 2003 00:03:32 GMT</last_modification_time>
-	      </signal>
-	      <label>A_ction</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_sort_notes</name>
-	      <tooltip>Sort by Notes</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_sort_notes_cb</handler>
-		<last_modification_time>Fri, 30 May 2003 00:05:06 GMT</last_modification_time>
-	      </signal>
-	      <label>N_otes</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>sort</group>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_style</name>
-	  <label>St_yle</label>
-	  <right_justify>False</right_justify>
-
-	  <widget>
-	    <class>GtkMenu</class>
-	    <name>menu_style_menu</name>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_style_basic_ledger</name>
-	      <tooltip>Show transactions on one or two lines</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_style_ledger_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:11:59 GMT</last_modification_time>
-	      </signal>
-	      <label>_Basic Ledger</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>ledger</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_style_auto_split_ledger</name>
-	      <tooltip>Show transactions on one or two lines and expand the current transaction</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_style_auto_ledger_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:11:59 GMT</last_modification_time>
-	      </signal>
-	      <label>_Auto-Split Ledger</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>ledger</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioMenuItem</class>
-	      <name>menu_style_transaction_journal</name>
-	      <tooltip>Show expanded transactions with all splits</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_style_journal_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:11:59 GMT</last_modification_time>
-	      </signal>
-	      <label>_Transaction Journal</label>
-	      <active>True</active>
-	      <always_show_toggle>True</always_show_toggle>
-	      <group>ledger</group>
-	    </widget>
-
-	    <widget>
-	      <class>GtkMenuItem</class>
-	      <name>separator6</name>
-	      <right_justify>False</right_justify>
-	    </widget>
-
-	    <widget>
-	      <class>GtkCheckMenuItem</class>
-	      <name>menu_style_double_line</name>
-	      <tooltip>Show two lines of information for each transaction</tooltip>
-	      <signal>
-		<name>activate</name>
-		<handler>gnc_split_reg_double_line_cb</handler>
-		<last_modification_time>Wed, 12 Jun 2002 02:11:59 GMT</last_modification_time>
-	      </signal>
-	      <label>_Double Line</label>
-	      <active>False</active>
-	      <always_show_toggle>True</always_show_toggle>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkMenuItem</class>
-      <name>menu_actions</name>
-      <label>_Actions</label>
-      <right_justify>False</right_justify>
-
-      <widget>
-	<class>GtkMenu</class>
-	<name>menu_actions_menu</name>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_enter</name>
-	  <tooltip>Record the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_record_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 02:01:51 GMT</last_modification_time>
-	  </signal>
-	  <label>_Enter</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_cancel</name>
-	  <tooltip>Cancel the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_cancel_trans_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 06:10:40 GMT</last_modification_time>
-	  </signal>
-	  <label>_Cancel</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_delete</name>
-	  <tooltip>Delete the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_delete_trans_cb</handler>
-	    <last_modification_time>Tue, 18 Jun 2002 07:59:59 GMT</last_modification_time>
-	  </signal>
-	  <label>_Delete</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_blank</name>
-	  <tooltip>Move to the blank transaction at the bottom of the register</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_new_trans_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-	  </signal>
-	  <label>_Blank</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>separator8</name>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_duplicate</name>
-	  <tooltip>Make a copy of the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_duplicate_trans_cb</handler>
-	    <last_modification_time>Sun, 16 Jun 2002 00:14:37 GMT</last_modification_time>
-	  </signal>
-	  <label>Dup_licate Transaction...</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_reinitialize</name>
-	  <tooltip>Erase all splits except the one for this account.</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_reinitialize_trans_cb</handler>
-	    <last_modification_time>Wed, 16 Oct 2002 06:27:58 GMT</last_modification_time>
-	  </signal>
-	  <label>Remove Transaction Splits</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkCheckMenuItem</class>
-	  <name>menu_splits</name>
-	  <tooltip>Show all splits in the current transaction</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_expand_trans_menu_cb</handler>
-	    <last_modification_time>Sun, 16 Jun 2002 23:02:33 GMT</last_modification_time>
-	  </signal>
-	  <label>S_plit Transaction</label>
-	  <active>False</active>
-	  <always_show_toggle>True</always_show_toggle>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_exchange</name>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_handle_exchange_cb</handler>
-	    <last_modification_time>Thu, 05 Dec 2002 23:25:35 GMT</last_modification_time>
-	  </signal>
-	  <label>Edit Exchange Rate</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_schedule</name>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_recur_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 06:39:42 GMT</last_modification_time>
-	  </signal>
-	  <label>Schedule...</label>
-	  <right_justify>False</right_justify>
-	</widget>
-
-	<widget>
-	  <class>GtkMenuItem</class>
-	  <name>menu_jump</name>
-	  <tooltip>Jump to the corresponding transaction in the other account</tooltip>
-	  <signal>
-	    <name>activate</name>
-	    <handler>gnc_split_reg_jump_cb</handler>
-	    <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-	  </signal>
-	  <label>_Jump</label>
-	  <right_justify>False</right_justify>
-	</widget>
-      </widget>
+<widget class="GtkMenu" id="register_popup">
+  <property name="visible">True</property>
+
+  <child>
+    <widget class="GtkMenuItem" id="menuitem57">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Record the current transaction</property>
+      <property name="label" translatable="yes">_Enter</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_record_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="menuitem58">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Cancel the current transaction</property>
+      <property name="label" translatable="yes">_Cancel</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_cancel_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_delete">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Delete the current transaction</property>
+      <property name="label" translatable="yes">_Delete</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_delete_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="menuitem60">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Move to the blank transaction at the bottom of the register</property>
+      <property name="label" translatable="yes">_Blank</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_new_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="menuitem61">
+      <property name="visible">True</property>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_duplicate">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Make a copy of the current transaction</property>
+      <property name="label" translatable="yes">Dup_licate Transaction...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_duplicate_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_reinitialize">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Remove Transaction Splits</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_reinitialize_trans_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkCheckMenuItem" id="popup_splits">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Show all splits in the current transaction</property>
+      <property name="label" translatable="yes">S_plit Transaction</property>
+      <property name="use_underline">True</property>
+      <property name="active">False</property>
+      <signal name="activate" handler="gnc_split_reg_expand_trans_menu_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_exchange">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Edit the exchange rate for the current split</property>
+      <property name="label" translatable="yes">Edit Exchange Rate</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_handle_exchange_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_schedule">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Schedule...</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_recur_cb"/>
+    </widget>
+  </child>
+
+  <child>
+    <widget class="GtkMenuItem" id="sr_popup_jump">
+      <property name="visible">True</property>
+      <property name="tooltip" translatable="yes">Jump to the corresponding transaction in the other account</property>
+      <property name="label" translatable="yes">_Jump</property>
+      <property name="use_underline">True</property>
+      <signal name="activate" handler="gnc_split_reg_jump_cb"/>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>win_register_toolbar_win</name>
-  <title>[wrtw] THIS WINDOW SHOULD NOT BE CREATED</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkToolbar</class>
-    <name>gnc_register_toolbar</name>
-    <border_width>2</border_width>
-    <orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
-    <type>GTK_TOOLBAR_BOTH</type>
-    <space_size>10</space_size>
-    <space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
-    <relief>GTK_RELIEF_NONE</relief>
-    <tooltips>True</tooltips>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>gnc_register_close_b</name>
-      <tooltip>NOTUSED: Defined in src/gnome/window-register.c</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_register_close_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:11:38 GMT</last_modification_time>
-      </signal>
-      <label>Close</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_CLOSE</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>gnc_register_xfer_b</name>
-      <tooltip>NOTUSED: Defined in src/gnome/window-register.c</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_register_xfer_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:10:03 GMT</last_modification_time>
-      </signal>
-      <label>Transfer</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_CONVERT</stock_pixmap>
-      <child>
-	<new_group>True</new_group>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>gnc_register_find_b</name>
-      <tooltip>NOTUSED: Defined in src/gnome/window-register.c</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_ui_find_transactions_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:10:19 GMT</last_modification_time>
-      </signal>
-      <label>Find</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_SEARCH</stock_pixmap>
-      <child>
-	<new_group>True</new_group>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>gnc_register_report_b</name>
-      <tooltip>NOTUSED: Defined in src/gnome/window-register.c</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_register_report_account_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:10:38 GMT</last_modification_time>
-      </signal>
-      <label>Report</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_BOOK_GREEN</stock_pixmap>
-    </widget>
-
-    <widget>
-      <class>GtkButton</class>
-      <child_name>Toolbar:button</child_name>
-      <name>gnc_register_print_b</name>
-      <tooltip>NOTUSED: Defined in src/gnome/window-register.c</tooltip>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_register_print_cb</handler>
-	<last_modification_time>Sun, 16 Jun 2002 00:10:58 GMT</last_modification_time>
-      </signal>
-      <label>Print</label>
-      <stock_pixmap>GNOME_STOCK_PIXMAP_PRINT</stock_pixmap>
+<widget class="GtkDialog" id="Void Transaction">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Void Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox16">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area18">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox100">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847671">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Reason for voiding transaction:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="reason">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"></property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char" translatable="yes">*</property>
+	      <property name="activates_default">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkMenu</class>
-  <name>register_popup</name>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>menuitem57</name>
-    <tooltip>Record the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_record_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 07:55:17 GMT</last_modification_time>
-    </signal>
-    <label>_Enter</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>menuitem58</name>
-    <tooltip>Cancel the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_cancel_trans_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:10:40 GMT</last_modification_time>
-    </signal>
-    <label>_Cancel</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_delete</name>
-    <tooltip>Delete the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_delete_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 20:29:44 GMT</last_modification_time>
-    </signal>
-    <label>_Delete</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>menuitem60</name>
-    <tooltip>Move to the blank transaction at the bottom of the register</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_new_trans_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>_Blank</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>menuitem61</name>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_duplicate</name>
-    <tooltip>Make a copy of the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_duplicate_trans_cb</handler>
-      <last_modification_time>Sat, 15 Jun 2002 07:55:17 GMT</last_modification_time>
-    </signal>
-    <label>Dup_licate Transaction...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_reinitialize</name>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_reinitialize_trans_cb</handler>
-      <last_modification_time>Wed, 16 Oct 2002 06:27:31 GMT</last_modification_time>
-    </signal>
-    <label>Remove Transaction Splits</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkCheckMenuItem</class>
-    <name>popup_splits</name>
-    <tooltip>Show all splits in the current transaction</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_expand_trans_menu_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>S_plit Transaction</label>
-    <active>False</active>
-    <always_show_toggle>True</always_show_toggle>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_exchange</name>
-    <tooltip>Edit the exchange rate for the current split</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_handle_exchange_cb</handler>
-      <last_modification_time>Thu, 05 Dec 2002 23:25:34 GMT</last_modification_time>
-    </signal>
-    <label>Edit Exchange Rate</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_schedule</name>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_recur_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:39:42 GMT</last_modification_time>
-    </signal>
-    <label>Schedule...</label>
-    <right_justify>False</right_justify>
-  </widget>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>sr_popup_jump</name>
-    <tooltip>Jump to the corresponding transaction in the other account</tooltip>
-    <signal>
-      <name>activate</name>
-      <handler>gnc_split_reg_jump_cb</handler>
-      <last_modification_time>Wed, 12 Jun 2002 06:13:45 GMT</last_modification_time>
-    </signal>
-    <label>_Jump</label>
-    <right_justify>False</right_justify>
-  </widget>
+<widget class="GtkDialog" id="Sort By">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Sort register by...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="gnc_plugin_page_register_sort_response_cb" last_modification_time="Sun, 12 Jun 2005 01:03:23 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox17">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area19">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox101">
+	  <property name="border_width">12</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_STANDARD">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Keep normal account order</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Standard Order</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHSeparator" id="hseparator2">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_DATE">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by date</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Date</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_DATE_ENTERED">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by the date of entry</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Date of _Entry</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_DATE_RECONDILED">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by the statement date (unreconciled items last)</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Statement Date</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_NUMBER">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by number</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Number</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_AMOUNT">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by amount</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Amount</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_MEMO">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by memo</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">_Memo</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_DESC">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by description</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Descri_ption</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_ACTION">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by action field</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">A_ction</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="BY_NOTES">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Sort by notes field</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">N_otes</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">BY_STANDARD</property>
+	      <signal name="toggled" handler="gnc_plugin_page_register_sort_button_cb" last_modification_time="Sun, 12 Jun 2005 16:37:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Void Transaction</name>
-  <title>Void Transaction</title>
-  <type>GTK_WINDOW_POPUP</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox16</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area18</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button84</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button86</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox100</name>
-      <homogeneous>False</homogeneous>
-      <spacing>5</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847671</name>
-	<label>Reason for voiding transaction:</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkEntry</class>
-	<name>reason</name>
-	<can_focus>True</can_focus>
-	<has_focus>True</has_focus>
-	<editable>True</editable>
-	<text_visible>True</text_visible>
-	<text_max_length>0</text_max_length>
-	<text></text>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
+<widget class="GtkDialog" id="Filter By">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Filter register by...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">True</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="response" handler="gnc_plugin_page_register_filter_response_cb" last_modification_time="Sun, 12 Jun 2005 20:35:52 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox19">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area21">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="notebook1">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox103">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkRadioButton" id="filter_show_all">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Show _All	</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847680">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="filter_show_range">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Select _Range:</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <property name="group">filter_show_all</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_select_range_cb" last_modification_time="Fri, 17 Jun 2005 00:07:15 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkTable" id="select_range_table">
+		  <property name="visible">True</property>
+		  <property name="n_rows">7</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">6</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847682">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_padding">12</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="start_date_earliest">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Earliest</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_start_cb" last_modification_time="Thu, 16 Jun 2005 23:04:52 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="Custom" id="end_date">
+		      <property name="visible">True</property>
+		      <property name="creation_function">gnc_date_edit_new_glade</property>
+		      <property name="int1">0</property>
+		      <property name="int2">0</property>
+		      <property name="last_modification_time">Mon, 13 Jun 2005 22:14:34 GMT</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">6</property>
+		      <property name="bottom_attach">7</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="end_date_choose">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Ch_oose Date:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_end_cb" last_modification_time="Thu, 16 Jun 2005 23:05:16 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">6</property>
+		      <property name="bottom_attach">7</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="end_date_today">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Toda_y</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">end_date_choose</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_end_cb" last_modification_time="Thu, 16 Jun 2005 23:05:09 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="end_date_latest">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Latest	</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">end_date_choose</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_end_cb" last_modification_time="Thu, 16 Jun 2005 23:05:03 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847683">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847684">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_padding">12</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="start_date_choose">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">C_hoose Date:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">start_date_earliest</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_start_cb" last_modification_time="Thu, 16 Jun 2005 23:04:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="Custom" id="start_date">
+		      <property name="visible">True</property>
+		      <property name="creation_function">gnc_date_edit_new_glade</property>
+		      <property name="int1">0</property>
+		      <property name="int2">0</property>
+		      <property name="last_modification_time">Mon, 13 Jun 2005 22:14:34 GMT</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="start_date_today">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">_Today</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">start_date_earliest</property>
+		      <signal name="clicked" handler="gnc_plugin_page_register_filter_start_cb" last_modification_time="Thu, 16 Jun 2005 23:04:36 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847678">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Date</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkTable" id="table1">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="n_rows">7</property>
+	      <property name="n_columns">3</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847688">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847686">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="y_options">expand</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="filter_status_unreconciled">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Unreconciled</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_status_one_cb" last_modification_time="Sun, 12 Jun 2005 21:32:39 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="filter_status_reconciled">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Reconciled</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_status_one_cb" last_modification_time="Sun, 12 Jun 2005 21:32:48 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="filter_status_cleared">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">C_leared</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_status_one_cb" last_modification_time="Sun, 12 Jun 2005 21:33:05 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="filter_status_voided">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Voided</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_status_one_cb" last_modification_time="Sun, 12 Jun 2005 21:33:14 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="filter_status_frozen">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Frozen</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_plugin_page_register_filter_status_one_cb" last_modification_time="Sun, 12 Jun 2005 21:33:22 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="button84">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Select _All</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="gnc_plugin_page_register_filter_status_all_cb" last_modification_time="Sun, 12 Jun 2005 22:33:32 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847679">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Status</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: sched-xact.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/sched-xact.glade,v
retrieving revision 1.45
retrieving revision 1.46
diff -Lsrc/gnome/glade/sched-xact.glade -Lsrc/gnome/glade/sched-xact.glade -u -r1.45 -r1.46
--- src/gnome/glade/sched-xact.glade
+++ src/gnome/glade/sched-xact.glade
@@ -1,5831 +1,9172 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkDialog" id="Scheduled Transaction Editor">
+  <property name="title" translatable="yes">Edit Scheduled Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox17">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area17">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="help_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox105">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox95">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">3</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox106">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox96">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847707">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Name:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">5</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="sxe_name">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">2</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox172">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847964">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Last Occurred: </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">5</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="last_occur_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">YYYY-MM-DD</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame73">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0.5</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox133">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="autocreate_opt">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Conditional on splits not having variables</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Create Automatically</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment2">
+			      <property name="visible">True</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">0.660000026226</property>
+			      <property name="yscale">1</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">0</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="notify_opt">
+				  <property name="visible">True</property>
+				  <property name="sensitive">False</property>
+				  <property name="can_focus">True</property>
+				  <property name="label" translatable="yes">Notify me when created</property>
+				  <property name="use_underline">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox183">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="advance_opt">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+
+				  <child>
+				    <widget class="GtkHBox" id="hbox150">
+				      <property name="visible">True</property>
+				      <property name="homogeneous">False</property>
+				      <property name="spacing">0</property>
+
+				      <child>
+					<widget class="GtkLabel" id="label847807">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Create in advance:</property>
+					  <property name="use_underline">False</property>
+					  <property name="use_markup">False</property>
+					  <property name="justify">GTK_JUSTIFY_CENTER</property>
+					  <property name="wrap">False</property>
+					  <property name="selectable">False</property>
+					  <property name="xalign">0.5</property>
+					  <property name="yalign">0.5</property>
+					  <property name="xpad">0</property>
+					  <property name="ypad">0</property>
+					</widget>
+					<packing>
+					  <property name="padding">0</property>
+					  <property name="expand">False</property>
+					  <property name="fill">False</property>
+					</packing>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkHBox" id="hbox184">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkSpinButton" id="advance_days">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="climb_rate">1</property>
+				      <property name="digits">0</property>
+				      <property name="numeric">True</property>
+				      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				      <property name="snap_to_ticks">True</property>
+				      <property name="wrap">False</property>
+				      <property name="adjustment">0 0 365 1 30 30</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">True</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847808">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes"> days</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="hbox185">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkCheckButton" id="remind_opt">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="relief">GTK_RELIEF_NORMAL</property>
+				  <property name="focus_on_click">True</property>
+				  <property name="active">False</property>
+				  <property name="inconsistent">False</property>
+				  <property name="draw_indicator">True</property>
+
+				  <child>
+				    <widget class="GtkHBox" id="hbox151">
+				      <property name="visible">True</property>
+				      <property name="homogeneous">False</property>
+				      <property name="spacing">0</property>
+
+				      <child>
+					<widget class="GtkLabel" id="label847809">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Remind in advance:</property>
+					  <property name="use_underline">False</property>
+					  <property name="use_markup">False</property>
+					  <property name="justify">GTK_JUSTIFY_CENTER</property>
+					  <property name="wrap">False</property>
+					  <property name="selectable">False</property>
+					  <property name="xalign">0.5</property>
+					  <property name="yalign">0.5</property>
+					  <property name="xpad">0</property>
+					  <property name="ypad">0</property>
+					</widget>
+					<packing>
+					  <property name="padding">0</property>
+					  <property name="expand">False</property>
+					  <property name="fill">False</property>
+					</packing>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkHBox" id="hbox186">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkSpinButton" id="remind_days">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="climb_rate">1</property>
+				      <property name="digits">0</property>
+				      <property name="numeric">True</property>
+				      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+				      <property name="snap_to_ticks">True</property>
+				      <property name="wrap">False</property>
+				      <property name="adjustment">0 0 365 1 30 30</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">True</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847810">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes"> days</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847965">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Options</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame77">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0.5</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox144">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="rb_noend">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">No End</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">2</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="rb_enddate">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">rb_noend</property>
+
+			      <child>
+				<widget class="GtkHBox" id="end_date_hbox">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847840">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">End Date: </property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <placeholder/>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">2</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="rb_num_occur">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">rb_noend</property>
+
+			      <child>
+				<widget class="GtkVBox" id="vbox145">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">3</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847841">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Number of Occurrences:</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="end_nentry">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="editable">True</property>
+				      <property name="visibility">True</property>
+				      <property name="max_length">0</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">*</property>
+				      <property name="activates_default">False</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847876">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Remaining Occurrences:</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkEntry" id="remain_nentry">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="editable">True</property>
+				      <property name="visibility">True</property>
+				      <property name="max_length">0</property>
+				      <property name="text" translatable="yes"></property>
+				      <property name="has_frame">True</property>
+				      <property name="invisible_char">*</property>
+				      <property name="activates_default">False</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">2</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847966">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">End</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="recur_frame">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0.5</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="recur_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkFrame" id="gncfreq_frame">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkFrame" id="example_cal_frame">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847967">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Recurrence Frequency</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">2</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="tempxaction_frame">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0.5</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkVBox" id="register_vbox">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847968">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Template Transaction</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="GNCFrequency widget">
+  <property name="title" translatable="yes">This window should never be realized.</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkVBox" id="gncfreq_vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkTable" id="gncfreq_table">
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="freq label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Frequency:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="startdate label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Start Date:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">5</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkOptionMenu" id="freq_option">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="history">0</property>
+
+	      <child internal-child="menu">
+		<widget class="GtkMenu" id="convertwidget1">
+		  <property name="visible">True</property>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget2">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">None</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget3">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Once</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget4">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Daily</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget5">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Daily [M-F]</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget6">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Weekly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget7">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Bi-Weekly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget8">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Semi-Monthly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget9">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Monthly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget10">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Quarterly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget11">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tri-Yearly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget12">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Semi-Yearly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkMenuItem" id="convertwidget13">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Yearly</property>
+		      <property name="use_underline">True</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkNotebook" id="gncfreq_nb">
+	  <property name="visible">True</property>
+	  <property name="show_tabs">False</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">True</property>
+	  <property name="enable_popup">False</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847767">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Not scheduled</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847753">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">None</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox114">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847776">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select occurrence date above.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847735">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Once</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox108">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox115">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847746">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Every </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">4</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="daily_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 365 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847747">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">days.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847736">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Daily</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox138">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox139">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847772">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Every </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">4</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="dailymf_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 365 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847773">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">weeks.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="daily_mf">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Daily [M-F]</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox113">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox110">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847748">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Every</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="weekly_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847749">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">weeks.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_FILL</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame51">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0.5</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox122">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox114">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_sun">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Sunday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_mon">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Monday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_tue">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Tuesday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox117">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_wed">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Wednesday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_thu">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Thursday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_fri">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Friday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox162">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="wd_check_sat">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Saturday</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847969">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Days</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847738">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Weekly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox111">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">True</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847777">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select initial date, above.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847739">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Bi-Weekly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox112">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox119">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox126">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847757">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Every</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="semimonthly_spin">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">True</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">1 1 100 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847758">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">months.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">5</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox127">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847759">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">First on the:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="semimonthly_first">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget14">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget15">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">1st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget16">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">2nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget17">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">3rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget18">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">4th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget19">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">5th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget20">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">6th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget21">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">7th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget22">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">8th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget23">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">9th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget24">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">10th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget25">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">11th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget26">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">12th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget27">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">13th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget28">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">14th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget29">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">15th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget30">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">16th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget31">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">17th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget32">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">18th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget33">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">19th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget34">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">20th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget35">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">21st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget36">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">22nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget37">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">23rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget38">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">24th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget39">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">25th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget40">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">26th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget41">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">27th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget42">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">28th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget43">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[29th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget44">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[30th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget45">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[31st/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">3</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox128">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847760">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">then on the:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="semimonthly_second">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget46">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget47">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">1st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget48">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">2nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget49">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">3rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget50">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">4th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget51">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">5th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget52">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">6th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget53">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">7th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget54">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">8th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget55">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">9th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget56">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">10th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget57">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">11th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget58">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">12th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget59">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">13th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget60">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">14th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget61">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">15th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget62">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">16th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget63">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">17th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget64">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">18th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget65">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">19th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget66">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">20th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget67">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">21st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget68">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">22nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget69">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">23rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget70">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">24th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget71">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">25th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget72">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">26th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget73">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">27th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget74">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">28th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget75">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[29th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget76">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[30th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget77">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[31st/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">3</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847740">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Semi-Monthly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox113">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox118">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox124">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847754">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Every </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="monthly_spin">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">True</property>
+			  <property name="wrap">True</property>
+			  <property name="adjustment">1 1 100 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847755">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">months.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">5</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox125">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847756">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">On the</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">2</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="monthly_day">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget78">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget79">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">1st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget80">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">2nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget81">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">3rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget82">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">4th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget83">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">5th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget84">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">6th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget85">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">7th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget86">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">8th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget87">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">9th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget88">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">10th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget89">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">11th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget90">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">12th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget91">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">13th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget92">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">14th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget93">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">15th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget94">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">16th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget95">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">17th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget96">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">18th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget97">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">19th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget98">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">20th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget99">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">21st</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget100">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">22nd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget101">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">23rd</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget102">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">24th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget103">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">25th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget104">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">26th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget105">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">27th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget106">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">28th</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget107">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[29th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget108">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[30th/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget109">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">[31st/last]</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">5</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847741">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Monthly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox120">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox134">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847766">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Occuring in</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="quarterly_occur">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget110">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget111">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Jan, Apr, Jul, Oct</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget112">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Feb, May, Aug, Nov</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget113">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Mar, Jun, Sep, Dec</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox129">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847761">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">On the</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="quarterly_day">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget114">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget115">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget116">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">2nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget117">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">3rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget118">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">4th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget119">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">5th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget120">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">6th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget121">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">7th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget122">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">8th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget123">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">9th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget124">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">10th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget125">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">11th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget126">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">12th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget127">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">13th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget128">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">14th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget129">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">15th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget130">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">16th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget131">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">17th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget132">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">18th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget133">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">19th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget134">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">20th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget135">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">21st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget136">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">22nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget137">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">23rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget138">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">24th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget139">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">25th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget140">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">26th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget141">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">27th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget142">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">28th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget143">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[29th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget144">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[30th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget145">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[31st/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847742">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Quarterly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox121">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox133">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847765">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Occuring in</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="triyearly_occur">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget146">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget147">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Jan, May, Sep</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget148">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Feb, Apr, Oct</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget149">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Mar, Jun, Nov</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget150">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Apr, Jul, Dec</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox130">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847762">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">On the</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="triyearly_day">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget151">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget152">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget153">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">2nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget154">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">3rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget155">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">4th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget156">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">5th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget157">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">6th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget158">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">7th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget159">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">8th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget160">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">9th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget161">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">10th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget162">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">11th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget163">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">12th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget164">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">13th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget165">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">14th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget166">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">15th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget167">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">16th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget168">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">17th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget169">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">18th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget170">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">19th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget171">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">20th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget172">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">21st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget173">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">22nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget174">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">23rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget175">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">24th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget176">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">25th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget177">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">26th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget178">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">27th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget179">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">28th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget180">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[29th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget181">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[30th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget182">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[31st/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847743">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Tri-Yearly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox122">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox131">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847763">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Occuring in</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="semiyearly_occur">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget183">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget184">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Jan, Jul</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget185">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Feb, Aug</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget186">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Mar, Sep</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget187">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Apr, Oct</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget188">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">May, Nov</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget189">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Jun, Dec</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox132">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847764">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">On the</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="semiyearly_day">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget190">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget191">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget192">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">2nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget193">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">3rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget194">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">4th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget195">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">5th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget196">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">6th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget197">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">7th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget198">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">8th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget199">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">9th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget200">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">10th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget201">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">11th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget202">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">12th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget203">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">13th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget204">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">14th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget205">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">15th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget206">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">16th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget207">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">17th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget208">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">18th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget209">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">19th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget210">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">20th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget211">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">21st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget212">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">22nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget213">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">23rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget214">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">24th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget215">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">25th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget216">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">26th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget217">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">27th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget218">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">28th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget219">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[29th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget220">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[30th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget221">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[31st/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847744">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Semi-Yearly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox123">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox135">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847768">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Every</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="yearly_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">True</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847769">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">year(s).</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox136">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847770">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Month</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="yearly_month">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget222">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget223">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">January</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget224">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">February</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget225">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">March</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget226">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">April</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget227">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">May</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget228">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">June</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget229">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">July</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget230">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">August</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget231">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">September</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget232">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">October</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget233">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">November</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget234">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">December</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox137">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847771">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Day</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">5</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="yearly_day">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget235">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget236">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">1st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget237">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">2nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget238">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">3rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget239">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">4th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget240">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">5th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget241">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">6th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget242">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">7th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget243">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">8th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget244">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">9th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget245">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">10th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget246">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">11th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget247">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">12th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget248">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">13th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget249">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">14th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget250">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">15th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget251">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">16th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget252">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">17th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget253">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">18th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget254">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">19th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget255">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">20th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget256">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">21st</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget257">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">22nd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget258">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">23rd</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget259">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">24th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget260">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">25th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget261">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">26th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget262">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">27th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget263">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">28th</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget264">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[29th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget265">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[30th/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget266">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">[31st/last]</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847745">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Yearly</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="Scheduled Transaction List">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Scheduled Transactions</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">640</property>
+  <property name="default_height">480</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox18">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area18">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox123">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkCList" id="sched_xact_list">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_columns">3</property>
+		  <property name="column_widths">127,140,80</property>
+		  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847750">
+		      <property name="label" translatable="yes">Name</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847751">
+		      <property name="label" translatable="yes">Frequency</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847752">
+		      <property name="label" translatable="yes">Next Occurrence</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVButtonBox" id="vbuttonbox1">
+	      <property name="visible">True</property>
+	      <property name="layout_style">GTK_BUTTONBOX_START</property>
+	      <property name="spacing">10</property>
+
+	      <child>
+		<widget class="GtkButton" id="new_button">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-new</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="edit_button">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment24">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0</property>
+		      <property name="yscale">0</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox179">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkImage" id="image1">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-properties</property>
+			      <property name="icon_size">4</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847980">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">_Edit</property>
+			      <property name="use_underline">True</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="delete_button">
+		  <property name="visible">True</property>
+		  <property name="can_default">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label">gtk-delete</property>
+		  <property name="use_stock">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="upcoming_cal_frame">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0.5</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847970">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Upcoming</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="Scheduled Transaction Editor, Take 2">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Edit Scheduled Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox21">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area21">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-  <translatable_strings_file>sched-xact_strings.c</translatable_strings_file>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Scheduled Transaction Editor</name>
-  <visible>False</visible>
-  <title>Edit Scheduled Transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox17</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area17</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<widget class="GtkVBox" id="vbox136">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">5</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox153">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847827">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Name:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">5</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="sxe_name">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkNotebook" id="notebook1">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="show_tabs">True</property>
+	      <property name="show_border">True</property>
+	      <property name="tab_pos">GTK_POS_TOP</property>
+	      <property name="scrollable">False</property>
+	      <property name="enable_popup">False</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox137">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="autocreate_opt">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Conditional on splits not having variables</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Create Automatically</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment3">
+		      <property name="visible">True</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0.660000026226</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkCheckButton" id="notify_opt">
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Notify me when created</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="advance_opt">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox154">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847828">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Create </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="advance_days">
+			      <property name="visible">True</property>
+			      <property name="sensitive">False</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">True</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847829">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"> days in advance</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="remind_opt">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox155">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847830">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Remind me </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="remind_days">
+			      <property name="visible">True</property>
+			      <property name="sensitive">False</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">0</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">True</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">0 0 100 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847831">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"> days in advance</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847823">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Creation Options</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox138">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rb_noend">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No End</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">2</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rb_enddate">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">rb_noend</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox156">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847832">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">End Date: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GnomeDateEdit" id="sxe_end_date">
+			      <property name="visible">True</property>
+			      <property name="dateedit_flags">GNOME_DATE_EDIT_24_HR</property>
+			      <property name="lower_hour">7</property>
+			      <property name="upper_hour">19</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">2</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="rb_num_occur">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">rb_noend</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox139">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847833">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Number of Occurences:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">2</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847824">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">End</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="recur_frame">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0.10000000149</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847971">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Recurrence Frequency</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847825">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Recurrence Frequency</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox140">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox157">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="rec_button">
+			  <property name="visible">True</property>
+			  <property name="can_default">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Record</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847834">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">REPLACEME with the Register control box</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="tab_expand">False</property>
+		  <property name="tab_fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847826">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Template Transactions</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">tab</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="sx_from_real_trans">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Make Scheduled transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox23">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area23">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="advanced_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Advanced...</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">100</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox171">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox146">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="param_table">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847842">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Name:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">3</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847843">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Frequency:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">3</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847875">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start Date: </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">3</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkOptionMenu" id="freq_option_menu">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="history">0</property>
+
+		      <child internal-child="menu">
+			<widget class="GtkMenu" id="convertwidget269">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget270">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Daily</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget271">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Weekly</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget272">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Bi-Weekly</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget273">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Monthly</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget274">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Quarterly</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkMenuItem" id="convertwidget275">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Yearly</property>
+			      <property name="use_underline">True</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="name_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkFrame" id="frame78">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0.5</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox147">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="never_end_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Never End</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="end_date_hbox">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="end_on_date_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">End Date:</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">never_end_button</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox164">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="n_occurrences_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Number of Occurrences:</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">never_end_button</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GnomeEntry" id="entry5">
+			      <property name="visible">True</property>
+			      <property name="max_saved">10</property>
+
+			      <child internal-child="entry">
+				<widget class="GtkEntry" id="n_occurrences_entry">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847972">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="ex_cal_frame">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>help_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="Since Last Run Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Since Last Run</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="sincelast_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox105</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	<widget class="GnomeDruidPageEdge" id="start_pg">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="text" translatable="yes">This druid will walk you through any scheduled transactions that should be created.</property>
+	  <property name="background_color">#666666669998</property>
+	  <property name="logo_background_color">#666666669998</property>
+	</widget>
       </child>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox95</name>
-	<homogeneous>False</homogeneous>
-	<spacing>3</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox106</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox96</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>2</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847707</name>
-	      <label>Name:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>5</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>sxe_name</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox172</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847964</name>
-	      <label>Last Occurred: </label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>5</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>last_occur_label</name>
-	      <label>YYYY-MM-DD</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame73</name>
-	    <label>Options</label>
-	    <label_xalign>0.05</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox133</name>
-	      <border_width>2</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>autocreate_opt</name>
-		<tooltip>Conditional on splits not having variables</tooltip>
-		<can_focus>True</can_focus>
-		<label>Create Automatically</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkAlignment</class>
-		<name>alignment2</name>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xscale>0.66</xscale>
-		<yscale>1</yscale>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkCheckButton</class>
-		  <name>notify_opt</name>
-		  <sensitive>False</sensitive>
-		  <can_focus>True</can_focus>
-		  <label>Notify me when created</label>
-		  <active>False</active>
-		  <draw_indicator>True</draw_indicator>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>advance_opt</name>
-		<can_focus>True</can_focus>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkHBox</class>
-		  <name>hbox150</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847807</name>
-		    <label>Create </label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkSpinButton</class>
-		    <name>advance_days</name>
-		    <can_focus>True</can_focus>
-		    <climb_rate>1</climb_rate>
-		    <digits>0</digits>
-		    <numeric>True</numeric>
-		    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		    <snap>True</snap>
-		    <wrap>False</wrap>
-		    <value>0</value>
-		    <lower>0</lower>
-		    <upper>365</upper>
-		    <step>1</step>
-		    <page>30</page>
-		    <page_size>30</page_size>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847808</name>
-		    <label> days in advance</label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>remind_opt</name>
-		<can_focus>True</can_focus>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkHBox</class>
-		  <name>hbox151</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847809</name>
-		    <label>Remind me </label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkSpinButton</class>
-		    <name>remind_days</name>
-		    <can_focus>True</can_focus>
-		    <climb_rate>1</climb_rate>
-		    <digits>0</digits>
-		    <numeric>True</numeric>
-		    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		    <snap>True</snap>
-		    <wrap>False</wrap>
-		    <value>0</value>
-		    <lower>0</lower>
-		    <upper>365</upper>
-		    <step>1</step>
-		    <page>30</page>
-		    <page_size>30</page_size>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847810</name>
-		    <label> days in advance</label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame77</name>
-	    <label>End</label>
-	    <label_xalign>0.05</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox144</name>
-	      <border_width>2</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>rb_noend</name>
-		<can_focus>True</can_focus>
-		<label>No End</label>
-		<active>True</active>
-		<draw_indicator>True</draw_indicator>
-		<group>sx_end_opt</group>
-		<child>
-		  <padding>2</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>rb_enddate</name>
-		<can_focus>True</can_focus>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>sx_end_opt</group>
-		<child>
-		  <padding>2</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkHBox</class>
-		  <name>end_date_hbox</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847840</name>
-		    <label>End Date: </label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>Placeholder</class>
-		  </widget>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>rb_num_occur</name>
-		<can_focus>True</can_focus>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>sx_end_opt</group>
-		<child>
-		  <padding>2</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkVBox</class>
-		  <name>vbox145</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847841</name>
-		    <label>Number of Occurrences:</label>
-		    <justify>GTK_JUSTIFY_LEFT</justify>
-		    <wrap>False</wrap>
-		    <xalign>7.45058e-09</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GnomeNumberEntry</class>
-		    <name>end_gnome_nentry</name>
-		    <sensitive>False</sensitive>
-		    <title>Number of Occurrences</title>
-		    <max_saved>10</max_saved>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-
-		    <widget>
-		      <class>GtkEntry</class>
-		      <child_name>GnomeEntry:entry</child_name>
-		      <name>end_nentry</name>
-		      <can_focus>True</can_focus>
-		      <editable>True</editable>
-		      <text_visible>True</text_visible>
-		      <text_max_length>5</text_max_length>
-		      <text></text>
-		    </widget>
-		  </widget>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847876</name>
-		    <label>Remaining Occurrences:</label>
-		    <justify>GTK_JUSTIFY_LEFT</justify>
-		    <wrap>False</wrap>
-		    <xalign>0</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GnomeNumberEntry</class>
-		    <name>remain_gnome_nentry</name>
-		    <sensitive>False</sensitive>
-		    <title>Remaining Number of Occurrences</title>
-		    <max_saved>10</max_saved>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-
-		    <widget>
-		      <class>GtkEntry</class>
-		      <child_name>GnomeEntry:entry</child_name>
-		      <name>remain_nentry</name>
-		      <can_focus>True</can_focus>
-		      <editable>True</editable>
-		      <text_visible>True</text_visible>
-		      <text_max_length>5</text_max_length>
-		      <text></text>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="what_to_do">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">What to do, what to do?</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="what_to_do_vbox">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkFrame" id="frame82">
+		  <property name="border_width">38</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0.5</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkProgressBar" id="creation_progress">
+		      <property name="visible">True</property>
+		      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+		      <property name="fraction">0</property>
+		      <property name="pulse_step">0.10000000149</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847973">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Creating transactions...</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
 		    </widget>
-		  </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>recur_frame</name>
-	  <label>Recurrence Frequency</label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>2</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="reminders_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Transaction Reminders</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox5">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847862">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The listed Scheduled Transactions are to-be created soon. 
+Select any which you would like to create now, and click
+&quot;Next&quot; to create them.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">11</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow19">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCTree" id="reminders_list">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">3</property>
+		      <property name="column_widths">153,121,80</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847882">
+			  <property name="label" translatable="yes">Scheduled Transaction</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847883">
+			  <property name="label" translatable="yes">Frequency</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847884">
+			  <property name="label" translatable="yes">Days Away</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
+	</widget>
+      </child>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>recur_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="auto_create_notify_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Auto-Created Transactions Notification</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="ac_vbox">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>gncfreq_frame</name>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_NONE</shadow_type>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<placeholder/>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<placeholder/>
+	      </child>
 	    </widget>
+	  </child>
+	</widget>
+      </child>
+
+      <child>
+	<widget class="GnomeDruidPageStandard" id="to_create_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">To-Create Transaction Preparation</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox7">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>example_cal_frame</name>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_NONE</shadow_type>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkHPaned" id="to_create_hpaned">
+		  <property name="visible">True</property>
+		  <property name="position">600</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow16">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCTree" id="to_create_list">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">2</property>
+			  <property name="column_widths">177,80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847893">
+			      <property name="label" translatable="yes">Name</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847894">
+			      <property name="label" translatable="yes">State</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="shrink">True</property>
+		      <property name="resize">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox176">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox173">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847965">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Disposition?</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">3</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="disposition_opt">
+			      <property name="border_width">3</property>
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget280">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget281">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Create as scheduled</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget282">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Ignore</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget283">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Postpone</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkFrame" id="frame81">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0.10000000149</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox176">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkScrolledWindow" id="scrolledwindow17">
+				  <property name="visible">True</property>
+				  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+				  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+				  <property name="shadow_type">GTK_SHADOW_NONE</property>
+				  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+				  <child>
+				    <widget class="GtkViewport" id="viewport2">
+				      <property name="border_width">2</property>
+				      <property name="visible">True</property>
+				      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+				      <child>
+					<widget class="GtkTable" id="variables_table">
+					  <property name="visible">True</property>
+					  <property name="n_rows">1</property>
+					  <property name="n_columns">2</property>
+					  <property name="homogeneous">False</property>
+					  <property name="row_spacing">2</property>
+					  <property name="column_spacing">2</property>
+
+					  <child>
+					    <widget class="GtkLabel" id="label847869">
+					      <property name="visible">True</property>
+					      <property name="label" translatable="yes">Value</property>
+					      <property name="use_underline">False</property>
+					      <property name="use_markup">False</property>
+					      <property name="justify">GTK_JUSTIFY_CENTER</property>
+					      <property name="wrap">False</property>
+					      <property name="selectable">False</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					    </widget>
+					    <packing>
+					      <property name="left_attach">1</property>
+					      <property name="right_attach">2</property>
+					      <property name="top_attach">0</property>
+					      <property name="bottom_attach">1</property>
+					      <property name="y_options"></property>
+					    </packing>
+					  </child>
+
+					  <child>
+					    <widget class="GtkLabel" id="label847870">
+					      <property name="visible">True</property>
+					      <property name="label" translatable="yes">Variable</property>
+					      <property name="use_underline">False</property>
+					      <property name="use_markup">False</property>
+					      <property name="justify">GTK_JUSTIFY_CENTER</property>
+					      <property name="wrap">False</property>
+					      <property name="selectable">False</property>
+					      <property name="xalign">0.5</property>
+					      <property name="yalign">0.5</property>
+					      <property name="xpad">0</property>
+					      <property name="ypad">0</property>
+					    </widget>
+					    <packing>
+					      <property name="left_attach">0</property>
+					      <property name="right_attach">1</property>
+					      <property name="top_attach">0</property>
+					      <property name="bottom_attach">1</property>
+					      <property name="y_options"></property>
+					    </packing>
+					  </child>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkHBox" id="hbox175">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847967">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Value:</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">3</property>
+				      <property name="ypad">3</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkStatusbar" id="to_create_status">
+				      <property name="border_width">3</property>
+				      <property name="visible">True</property>
+				      <property name="has_resize_grip">True</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">True</property>
+				      <property name="fill">True</property>
+				    </packing>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847974">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Variables</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="shrink">True</property>
+		      <property name="resize">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<widget class="GtkFrame" id="to_create_txn_reg_frame">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="to_create_txn_vbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847975">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Template Transaction (Read-Only)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
+      </child>
+
+      <child>
+	<widget class="GnomeDruidPageStandard" id="created_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Created Transaction Review</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="created_vbox">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox108</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>tempxaction_frame</name>
-	  <label>Template Transaction</label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>register_vbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
+	      <child>
+		<placeholder/>
+	      </child>
 
-	    <widget>
-	      <class>Placeholder</class>
+	      <child>
+		<placeholder/>
+	      </child>
 	    </widget>
+	  </child>
+	</widget>
+      </child>
+
+      <child>
+	<widget class="GnomeDruidPageStandard" id="obsolete_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Obsolete Scheduled Transactions</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox9">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847871">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The following scheduled transactions have expired.
+Select those you wish to delete.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">11</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow18">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCList" id="sx_obsolete_clist">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">3</property>
+		      <property name="column_widths">80,80,80</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847872">
+			  <property name="label" translatable="yes">Frequency</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847873">
+			  <property name="label" translatable="yes">Name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847874">
+			  <property name="label" translatable="yes">Ended On</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHButtonBox" id="hbuttonbox8">
+		  <property name="visible">True</property>
+		  <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
+		  <property name="spacing">8</property>
+
+		  <child>
+		    <widget class="GtkButton" id="select_all_button">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Select All</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
 
-	    <widget>
-	      <class>Placeholder</class>
+		  <child>
+		    <widget class="GtkButton" id="unselect_all_button">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Unselect All</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+      </child>
 
-      </widget>
+      <child>
+	<widget class="GnomeDruidPageEdge" id="commit_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="text" translatable="yes">Press apply to create these transactions.</property>
+	  <property name="background_color">#666666669998</property>
+	  <property name="logo_background_color">#666666669998</property>
+	</widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>GNCFrequency widget</name>
-  <visible>False</visible>
-  <title>This window should never be realized.</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkVBox</class>
-    <name>gncfreq_vbox</name>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-
-    <widget>
-      <class>GtkTable</class>
-      <name>gncfreq_table</name>
-      <rows>2</rows>
-      <columns>2</columns>
-      <homogeneous>False</homogeneous>
-      <row_spacing>0</row_spacing>
-      <column_spacing>0</column_spacing>
+<widget class="GtkWindow" id="loan_druid_win">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Mortgage/Loan Druid</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="loan_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
+	<widget class="GnomeDruidPageEdge" id="loan_intro_pg">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Mortgage/Loan Repayment Setup</property>
+	  <property name="text" translatable="yes">This is a step-by-step method of creating a loan repayment setup
+within GnuCash.  In this Druid, you can input the parameters of
+your loan and its repayment and give the details of its payback.
+Using that information, the appropriate Scheduled Transactions
+will be created.
 
-      <widget>
-	<class>GtkLabel</class>
-	<name>freq label</name>
-	<label>Frequency:</label>
-	<justify>GTK_JUSTIFY_RIGHT</justify>
-	<wrap>False</wrap>
-	<xalign>1</xalign>
-	<yalign>0.5</yalign>
-	<xpad>5</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <left_attach>0</left_attach>
-	  <right_attach>1</right_attach>
-	  <top_attach>0</top_attach>
-	  <bottom_attach>1</bottom_attach>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <xexpand>False</xexpand>
-	  <yexpand>False</yexpand>
-	  <xshrink>False</xshrink>
-	  <yshrink>False</yshrink>
-	  <xfill>True</xfill>
-	  <yfill>False</yfill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>startdate label</name>
-	<label>Start Date:</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>1</xalign>
-	<yalign>0.5</yalign>
-	<xpad>5</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <left_attach>0</left_attach>
-	  <right_attach>1</right_attach>
-	  <top_attach>1</top_attach>
-	  <bottom_attach>2</bottom_attach>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <xexpand>False</xexpand>
-	  <yexpand>False</yexpand>
-	  <xshrink>False</xshrink>
-	  <yshrink>False</yshrink>
-	  <xfill>True</xfill>
-	  <yfill>False</yfill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkOptionMenu</class>
-	<name>freq_option</name>
-	<can_focus>True</can_focus>
-	<items>None
-Once
-Daily
-Daily [M-F]
-Weekly
-Bi-Weekly
-Semi-Monthly
-Monthly
-Quarterly
-Tri-Yearly
-Semi-Yearly
-Yearly
-</items>
-	<initial_choice>0</initial_choice>
-	<child>
-	  <left_attach>1</left_attach>
-	  <right_attach>2</right_attach>
-	  <top_attach>0</top_attach>
-	  <bottom_attach>1</bottom_attach>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <xexpand>False</xexpand>
-	  <yexpand>False</yexpand>
-	  <xshrink>False</xshrink>
-	  <yshrink>False</yshrink>
-	  <xfill>True</xfill>
-	  <yfill>False</yfill>
-	</child>
-      </widget>
-    </widget>
+If you make a mistake or want to make changes later, you can edit
+the created Scheduled Transactions directly.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#666666669998</property>
+	  <property name="logo_background_color">#666666669998</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	</widget>
+      </child>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>gncfreq_nb</name>
-      <show_tabs>False</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>True</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
+	<widget class="GnomeDruidPageStandard" id="loan_info_pg">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Loan Information</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox10">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847767</name>
-	<label>Not scheduled</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847753</name>
-	<label>None</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox114</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847776</name>
-	  <label>Select occurrence date above.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-      </widget>
+	      <child>
+		<widget class="GtkTable" id="param_table">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">4</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">5</property>
+		  <property name="column_spacing">5</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847735</name>
-	<label>Once</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox108</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox115</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847746</name>
-	    <label>Every </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>4</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>daily_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>365</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847747</name>
-	    <label>days.</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>7.45058e-09</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847897">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Interest Rate:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847736</name>
-	<label>Daily</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox138</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox139</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847772</name>
-	    <label>Every </label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>4</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>dailymf_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>365</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847773</name>
-	    <label>weeks.</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>7.45058e-09</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847899">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start Date:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>daily_mf</name>
-	<label>Daily [M-F]</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox113</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox110</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847748</name>
-	    <label>Every</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>weekly_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847749</name>
-	    <label>weeks.</label>
-	    <justify>GTK_JUSTIFY_FILL</justify>
-	    <wrap>False</wrap>
-	    <xalign>7.45058e-09</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847900">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Length:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847895">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Amount:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847920">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Loan Account:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="rem_spin">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 100 1 10 10</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox167">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkSpinButton" id="len_spin">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">1</property>
+			  <property name="digits">0</property>
+			  <property name="numeric">False</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">1 0 100 1 10 10</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkOptionMenu" id="len_opt">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="history">0</property>
+
+			  <child internal-child="menu">
+			    <widget class="GtkMenu" id="convertwidget288">
+			      <property name="visible">True</property>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget289">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">months</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="convertwidget290">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">years</property>
+				  <property name="use_underline">True</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment11">
+		      <property name="visible">True</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0.25</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment12">
+		      <property name="visible">True</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0.5</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox170">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkSpinButton" id="irate_spin">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="climb_rate">1</property>
+			      <property name="digits">3</property>
+			      <property name="numeric">True</property>
+			      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			      <property name="snap_to_ticks">True</property>
+			      <property name="wrap">False</property>
+			      <property name="adjustment">1 0 100 1 10 10</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847921">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">%</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame51</name>
-	  <border_width>2</border_width>
-	  <label>Days</label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox122</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox114</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_sun</name>
-		<can_focus>True</can_focus>
-		<label>Sunday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_mon</name>
-		<can_focus>True</can_focus>
-		<label>Monday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_tue</name>
-		<can_focus>True</can_focus>
-		<label>Tuesday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox117</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_wed</name>
-		<can_focus>True</can_focus>
-		<label>Wednesday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_thu</name>
-		<can_focus>True</can_focus>
-		<label>Thursday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_fri</name>
-		<can_focus>True</can_focus>
-		<label>Friday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox162</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>wd_check_sat</name>
-		<can_focus>True</can_focus>
-		<label>Saturday</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847898">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Type:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847901">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Months Remaining:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment23">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0.5</property>
+		      <property name="yscale">0.75</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkFrame" id="type_freq_frame">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0.5</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847976">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Interest Rate Change Frequency</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">expand|shrink|fill</property>
+		      <property name="y_options">expand|shrink|fill</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847738</name>
-	<label>Weekly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox111</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847777</name>
-	  <label>Select initial date, above.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
 	  </child>
 	</widget>
-      </widget>
+      </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847739</name>
-	<label>Bi-Weekly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox112</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox119</name>
-	  <border_width>5</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox126</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>5</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847757</name>
-	      <label>Every</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkSpinButton</class>
-	      <name>semimonthly_spin</name>
-	      <can_focus>True</can_focus>
-	      <climb_rate>1</climb_rate>
-	      <digits>0</digits>
-	      <numeric>False</numeric>
-	      <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	      <snap>True</snap>
-	      <wrap>False</wrap>
-	      <value>1</value>
-	      <lower>1</lower>
-	      <upper>100</upper>
-	      <step>1</step>
-	      <page>10</page>
-	      <page_size>10</page_size>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847758</name>
-	      <label>months.</label>
-	      <justify>GTK_JUSTIFY_LEFT</justify>
-	      <wrap>False</wrap>
-	      <xalign>7.45058e-09</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox127</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>3</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847759</name>
-	      <label>First on the:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>semimonthly_first</name>
-	      <can_focus>True</can_focus>
-	      <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox128</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>3</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847760</name>
-	      <label>then on the:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>semimonthly_second</name>
-	      <can_focus>True</can_focus>
-	      <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="loan_opts_pg">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Options</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="opt_vbox">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847740</name>
-	<label>Semi-Monthly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox113</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox118</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>5</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox124</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>5</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847754</name>
-	      <label>Every </label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkSpinButton</class>
-	      <name>monthly_spin</name>
-	      <can_focus>True</can_focus>
-	      <climb_rate>1</climb_rate>
-	      <digits>0</digits>
-	      <numeric>True</numeric>
-	      <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	      <snap>True</snap>
-	      <wrap>True</wrap>
-	      <value>1</value>
-	      <lower>1</lower>
-	      <upper>100</upper>
-	      <step>1</step>
-	      <page>10</page>
-	      <page_size>10</page_size>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847755</name>
-	      <label>months.</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>7.45058e-09</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox125</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>5</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847756</name>
-	      <label>On the</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>2</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>monthly_day</name>
-	      <can_focus>True</can_focus>
-	      <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label847903">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Do you...</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">10</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847741</name>
-	<label>Monthly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox120</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox134</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847766</name>
-	    <label>Occuring in</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>quarterly_occur</name>
-	    <can_focus>True</can_focus>
-	    <items>Jan, Apr, Jul, Oct
-Feb, May, Aug, Nov
-Mar, Jun, Sep, Dec
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkAlignment" id="alignment18">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0.75</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox129</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847761</name>
-	    <label>On the</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>quarterly_day</name>
-	    <can_focus>True</can_focus>
-	    <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkVBox" id="vbox174">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847742</name>
-	<label>Quarterly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox121</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox133</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847765</name>
-	    <label>Occuring in</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>triyearly_occur</name>
-	    <can_focus>True</can_focus>
-	    <items>Jan, May, Sep
-Feb, Apr, Oct
-Mar, Jun, Nov
-Apr, Jul, Dec
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+		      <child>
+			<widget class="GtkCheckButton" id="opt_escrow_cb">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">... utilize an escrow account for payments?</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox130</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847762</name>
-	    <label>On the</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>triyearly_day</name>
-	    <can_focus>True</can_focus>
-	    <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+		      <child>
+			<widget class="GtkAlignment" id="alignment19">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">0.75</property>
+			  <property name="yscale">1</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="opt_escrow_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label847963">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Escrow Account:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">False</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847743</name>
-	<label>Tri-Yearly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox122</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox131</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847763</name>
-	    <label>Occuring in</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>semiyearly_occur</name>
-	    <can_focus>True</can_focus>
-	    <items>Jan, Jul
-Feb, Aug
-Mar, Sep
-Apr, Oct
-May, Nov
-Jun, Dec
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkAlignment" id="alignment20">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0.899999976158</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox132</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847764</name>
-	    <label>On the</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>semiyearly_day</name>
-	    <can_focus>True</can_focus>
-	    <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator1">
+		      <property name="visible">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
+      </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847744</name>
-	<label>Semi-Yearly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox123</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox135</name>
-	  <border_width>5</border_width>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847768</name>
-	    <label>Every</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>yearly_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>True</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>True</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>1</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847769</name>
-	    <label>year(s).</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>7.45058e-09</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="repayment_pg">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Repayment</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox12">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox136</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847770</name>
-	    <label>Month</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>yearly_month</name>
-	    <can_focus>True</can_focus>
-	    <items>January
-February
-March
-April
-May
-June
-July
-August
-September
-October
-November
-December
-</items>
-	    <initial_choice>1</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkTable" id="repay_table">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="n_rows">5</property>
+		  <property name="n_columns">4</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">5</property>
+		  <property name="column_spacing">5</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox137</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847771</name>
-	    <label>Day</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>5</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>yearly_day</name>
-	    <can_focus>True</can_focus>
-	    <items>1st
-2nd
-3rd
-4th
-5th
-6th
-7th
-8th
-9th
-10th
-11th
-12th
-13th
-14th
-15th
-16th
-17th
-18th
-19th
-20th
-21st
-22nd
-23rd
-24th
-25th
-26th
-27th
-28th
-[29th/last]
-[30th/last]
-[31st/last]
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847910">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Payment From:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847745</name>
-	<label>Yearly</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-    </widget>
-  </widget>
-</widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847911">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Principal To:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Scheduled Transaction List</name>
-  <width>640</width>
-  <height>480</height>
-  <title>Scheduled Transactions</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <default_width>640</default_width>
-  <default_height>480</default_height>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox18</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area18</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+		  <child>
+		    <widget class="GtkLabel" id="label847918">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Name:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label847909">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Amount:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox123</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-      </child>
+		  <child>
+		    <widget class="GtkLabel" id="label847912">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Interest To:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow1</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>sched_xact_list</name>
-	  <can_focus>True</can_focus>
-	  <columns>3</columns>
-	  <column_widths>127,140,80</column_widths>
-	  <selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847750</name>
-	    <label>Name</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847751</name>
-	    <label>Frequency</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847752</name>
-	    <label>Next Occurrence</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-	</widget>
-      </widget>
+		  <child>
+		    <widget class="GtkAlignment" id="alignment13">
+		      <property name="visible">True</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
 
-      <widget>
-	<class>GtkVButtonBox</class>
-	<name>vbuttonbox1</name>
-	<layout_style>GTK_BUTTONBOX_START</layout_style>
-	<spacing>10</spacing>
-	<child_min_width>85</child_min_width>
-	<child_min_height>27</child_min_height>
-	<child_ipad_x>7</child_ipad_x>
-	<child_ipad_y>0</child_ipad_y>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkButton</class>
-	  <name>new_button</name>
-	  <can_default>True</can_default>
-	  <can_focus>True</can_focus>
-	  <label>New</label>
-	  <relief>GTK_RELIEF_NORMAL</relief>
-	</widget>
+		      <child>
+			<widget class="GtkEntry" id="txn_title">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-	<widget>
-	  <class>GtkButton</class>
-	  <name>edit_button</name>
-	  <can_default>True</can_default>
-	  <can_focus>True</can_focus>
-	  <label>Edit</label>
-	  <relief>GTK_RELIEF_NORMAL</relief>
-	</widget>
+		  <child>
+		    <widget class="GtkAlignment" id="alignment14">
+		      <property name="visible">True</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">1</property>
+		      <property name="yscale">1</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
 
-	<widget>
-	  <class>GtkButton</class>
-	  <name>delete_button</name>
-	  <can_default>True</can_default>
-	  <can_focus>True</can_focus>
-	  <label>Delete</label>
-	  <relief>GTK_RELIEF_NORMAL</relief>
-	</widget>
-      </widget>
-    </widget>
+		      <child>
+			<widget class="GtkEntry" id="amount_ent">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>upcoming_cal_frame</name>
-      <border_width>2</border_width>
-      <label>Upcoming</label>
-      <label_xalign>0.05</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+		  <child>
+		    <widget class="GtkAlignment" id="alignment21">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0.5</property>
+		      <property name="yscale">0.899999976158</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
 
-      <widget>
-	<class>Placeholder</class>
-      </widget>
-    </widget>
-  </widget>
-</widget>
+		      <child>
+			<widget class="GtkFrame" id="freq_frame">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0.5</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847977">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Repayment Frequency</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">shrink|fill</property>
+		      <property name="y_options">expand|shrink|fill</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>Scheduled Transaction Editor, Take 2</name>
-  <title>Edit Scheduled Transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox21</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area21</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+	<widget class="GnomeDruidPageStandard" id="payment_pg">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Repayment Type</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox13">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+	      <child>
+		<widget class="GtkEventBox" id="eventbox1">
+		  <property name="visible">True</property>
+		  <property name="visible_window">True</property>
+		  <property name="above_child">False</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox136</name>
-      <homogeneous>False</homogeneous>
-      <spacing>5</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+		  <child>
+		    <widget class="GtkVBox" id="vbox158">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox153</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847827</name>
-	  <label>Name:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>5</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
+		      <child>
+			<widget class="GtkTable" id="pay_table">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="n_rows">6</property>
+			  <property name="n_columns">4</property>
+			  <property name="homogeneous">False</property>
+			  <property name="row_spacing">5</property>
+			  <property name="column_spacing">5</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847916">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Amount:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="pay_from_account_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payment From:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847919">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Name:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="pay_escrow_to_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payment To (Escrow):</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">2</property>
+			      <property name="right_attach">3</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment16">
+			      <property name="visible">True</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">1</property>
+			      <property name="yscale">1</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">0</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkEntry" id="pay_txn_title">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">4</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment17">
+			      <property name="visible">True</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">1</property>
+			      <property name="yscale">1</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">0</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkEntry" id="pay_amt_ent">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="visibility">True</property>
+				  <property name="max_length">0</property>
+				  <property name="text" translatable="yes"></property>
+				  <property name="has_frame">True</property>
+				  <property name="invisible_char">*</property>
+				  <property name="activates_default">False</property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">4</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="pay_escrow_from_label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payment From (Escrow):</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">5</property>
+			      <property name="bottom_attach">6</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847975">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Payment To:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">2</property>
+			      <property name="right_attach">3</property>
+			      <property name="top_attach">5</property>
+			      <property name="bottom_attach">6</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="pay_specify_source">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Specify Source Account</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">4</property>
+			      <property name="top_attach">3</property>
+			      <property name="bottom_attach">4</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="pay_use_escrow">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Use Escrow Account</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">4</property>
+			      <property name="top_attach">2</property>
+			      <property name="bottom_attach">3</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>sxe_name</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+		      <child>
+			<widget class="GtkAlignment" id="alignment22">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">0.5</property>
+			  <property name="yscale">0.75</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">0</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkFrame" id="frame92">
+			      <property name="border_width">5</property>
+			      <property name="visible">True</property>
+			      <property name="label_xalign">0.5</property>
+			      <property name="label_yalign">0.5</property>
+			      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			      <child>
+				<widget class="GtkVBox" id="vbox159">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <widget class="GtkRadioButton" id="pay_txn_part_rb">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="label" translatable="yes">Part of Payment Transaction</property>
+				      <property name="use_underline">True</property>
+				      <property name="relief">GTK_RELIEF_NORMAL</property>
+				      <property name="focus_on_click">True</property>
+				      <property name="active">False</property>
+				      <property name="inconsistent">False</property>
+				      <property name="draw_indicator">True</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkVBox" id="vbox160">
+				      <property name="visible">True</property>
+				      <property name="homogeneous">False</property>
+				      <property name="spacing">0</property>
+
+				      <child>
+					<widget class="GtkRadioButton" id="pay_uniq_freq_rb">
+					  <property name="visible">True</property>
+					  <property name="can_focus">True</property>
+					  <property name="label" translatable="yes">Other</property>
+					  <property name="use_underline">True</property>
+					  <property name="relief">GTK_RELIEF_NORMAL</property>
+					  <property name="focus_on_click">True</property>
+					  <property name="active">False</property>
+					  <property name="inconsistent">False</property>
+					  <property name="draw_indicator">True</property>
+					  <property name="group">pay_txn_part_rb</property>
+					</widget>
+					<packing>
+					  <property name="padding">0</property>
+					  <property name="expand">False</property>
+					  <property name="fill">False</property>
+					</packing>
+				      </child>
+
+				      <child>
+					<widget class="GtkAlignment" id="pay_freq_align">
+					  <property name="visible">True</property>
+					  <property name="xalign">1</property>
+					  <property name="yalign">0.5</property>
+					  <property name="xscale">0.949999988079</property>
+					  <property name="yscale">1</property>
+					  <property name="top_padding">0</property>
+					  <property name="bottom_padding">0</property>
+					  <property name="left_padding">0</property>
+					  <property name="right_padding">0</property>
+
+					  <child>
+					    <placeholder/>
+					  </child>
+					</widget>
+					<packing>
+					  <property name="padding">0</property>
+					  <property name="expand">False</property>
+					  <property name="fill">False</property>
+					</packing>
+				      </child>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847978">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Payment Frequency</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="type">label_item</property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
+      </child>
 
-      <widget>
-	<class>GtkNotebook</class>
-	<name>notebook1</name>
-	<can_focus>True</can_focus>
-	<show_tabs>True</show_tabs>
-	<show_border>True</show_border>
-	<tab_pos>GTK_POS_TOP</tab_pos>
-	<scrollable>False</scrollable>
-	<tab_hborder>2</tab_hborder>
-	<tab_vborder>2</tab_vborder>
-	<popup_enable>False</popup_enable>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox137</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>autocreate_opt</name>
-	    <tooltip>Conditional on splits not having variables</tooltip>
-	    <can_focus>True</can_focus>
-	    <label>Create Automatically</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment3</name>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>0.66</xscale>
-	    <yscale>1</yscale>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCheckButton</class>
-	      <name>notify_opt</name>
-	      <sensitive>False</sensitive>
-	      <can_focus>True</can_focus>
-	      <label>Notify me when created</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>advance_opt</name>
-	    <can_focus>True</can_focus>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox154</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847828</name>
-		<label>Create </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>advance_days</name>
-		<sensitive>False</sensitive>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>0</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>True</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100</upper>
-		<step>1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847829</name>
-		<label> days in advance</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>remind_opt</name>
-	    <can_focus>True</can_focus>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox155</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847830</name>
-		<label>Remind me </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>remind_days</name>
-		<sensitive>False</sensitive>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>0</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>True</snap>
-		<wrap>False</wrap>
-		<value>0</value>
-		<lower>0</lower>
-		<upper>100</upper>
-		<step>1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847831</name>
-		<label> days in advance</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="review_pg">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Review</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox14">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label847823</name>
-	  <label>Creation Options</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
+	      <child>
+		<widget class="GtkVBox" id="vbox177">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox138</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>rb_noend</name>
-	    <can_focus>True</can_focus>
-	    <label>No End</label>
-	    <active>True</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>sx_end_opt</group>
-	    <child>
-	      <padding>2</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>rb_enddate</name>
-	    <can_focus>True</can_focus>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>sx_end_opt</group>
-	    <child>
-	      <padding>2</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox156</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847832</name>
-		<label>End Date: </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeDateEdit</class>
-		<name>sxe_end_date</name>
-		<show_time>False</show_time>
-		<use_24_format>True</use_24_format>
-		<week_start_monday>False</week_start_monday>
-		<lower_hour>7</lower_hour>
-		<upper_hour>19</upper_hour>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>rb_num_occur</name>
-	    <can_focus>True</can_focus>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>sx_end_opt</group>
-	    <child>
-	      <padding>2</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox139</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847833</name>
-		<label>Number of Occurrences:</label>
-		<justify>GTK_JUSTIFY_LEFT</justify>
-		<wrap>False</wrap>
-		<xalign>7.45058e-09</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeNumberEntry</class>
-		<name>end_nentry</name>
-		<max_saved>10</max_saved>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkEntry</class>
-		  <child_name>GnomeEntry:entry</child_name>
-		  <name>entry2</name>
-		  <can_focus>True</can_focus>
-		  <editable>True</editable>
-		  <text_visible>True</text_visible>
-		  <text_max_length>0</text_max_length>
-		  <text></text>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+		  <child>
+		    <widget class="GtkHBox" id="hbox176">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label847824</name>
-	  <label>End</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
+		      <child>
+			<widget class="GtkHBox" id="hbox178">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847973">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Range: </property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">5</property>
+			      <property name="ypad">5</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkVBox" id="vbox178">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GtkOptionMenu" id="rev_range_opt">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="history">0</property>
+
+				  <child internal-child="menu">
+				    <widget class="GtkMenu" id="convertwidget291">
+				      <property name="visible">True</property>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget292">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Current Year</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget293">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Now + 1 Year</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget294">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Whole Loan</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+
+				      <child>
+					<widget class="GtkMenuItem" id="convertwidget295">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Custom</property>
+					  <property name="use_underline">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">False</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>recur_frame</name>
-	  <label>Recurrence Frequency</label>
-	  <label_xalign>0.1</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
+		      <child>
+			<widget class="GtkFrame" id="rev_date_frame">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="label_xalign">0.5</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <widget class="GtkTable" id="rev_date_range_table">
+			      <property name="visible">True</property>
+			      <property name="n_rows">2</property>
+			      <property name="n_columns">1</property>
+			      <property name="homogeneous">False</property>
+			      <property name="row_spacing">0</property>
+			      <property name="column_spacing">0</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label847971">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Start Date:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">1</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">5</property>
+				  <property name="ypad">5</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">0</property>
+				  <property name="bottom_attach">1</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847972">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">End Date:</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">1</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">5</property>
+				  <property name="ypad">5</property>
+				</widget>
+				<packing>
+				  <property name="left_attach">0</property>
+				  <property name="right_attach">1</property>
+				  <property name="top_attach">1</property>
+				  <property name="bottom_attach">2</property>
+				  <property name="x_options">fill</property>
+				  <property name="y_options"></property>
+				</packing>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847979">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date Range</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">2</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label847825</name>
-	  <label>Recurrence Frequency</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
+		  <child>
+		    <widget class="GtkScrolledWindow" id="rev_scrollwin">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox140</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox157</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>rec_button</name>
-	      <can_default>True</can_default>
-	      <can_focus>True</can_focus>
-	      <label>Record</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847834</name>
-	      <label>REPLACEME with the Register control box</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label847826</name>
-	  <label>Template Transactions</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GtkStatusbar</class>
-      <name>ledger_status</name>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GnomeDruidPageEdge" id="commit_pg">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="text" translatable="yes">Press apply to commit these changes.</property>
+	  <property name="background_color">#666666669998</property>
+	  <property name="logo_background_color">#666666669998</property>
+	</widget>
       </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>sx_from_real_trans</name>
-  <title>Make Scheduled transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox23</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area23</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>0</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<widget class="GtkMenu" id="Since Last Run popup">
+  <property name="visible">True</property>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>advanced_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Advanced...</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+  <child>
+    <widget class="GtkMenuItem" id="creation_state">
+      <property name="visible">True</property>
+      <property name="label" translatable="yes">Creation State</property>
+      <property name="use_underline">True</property>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox171</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox146</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkTable</class>
-	  <name>param_table</name>
-	  <rows>3</rows>
-	  <columns>2</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>0</row_spacing>
-	  <column_spacing>0</column_spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847842</name>
-	    <label>Name:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>3</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847843</name>
-	    <label>Frequency:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>3</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847875</name>
-	    <label>Start Date: </label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>3</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>name_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkOptionMenu</class>
-	    <name>freq_option_menu</name>
-	    <can_focus>True</can_focus>
-	    <items>Daily
-Weekly
-Bi-Weekly
-Monthly
-Quarterly
-Yearly
-</items>
-	    <initial_choice>0</initial_choice>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-	</widget>
+	<widget class="GtkMenu" id="creation_state_menu">
+	  <property name="visible">True</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame78</name>
-	  <border_width>2</border_width>
-	  <label>End </label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox147</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>never_end_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Never End</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>end_group</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>end_date_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>end_on_date_button</name>
-		<can_focus>True</can_focus>
-		<label>End Date:</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>end_group</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox164</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>n_occurrences_button</name>
-		<can_focus>True</can_focus>
-		<label>Number of Occurrences:</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>end_group</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GnomeEntry</class>
-		<name>entry5</name>
-		<width>152</width>
-		<max_saved>10</max_saved>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkEntry</class>
-		  <child_name>GnomeEntry:entry</child_name>
-		  <name>n_occurrences_entry</name>
-		  <can_focus>True</can_focus>
-		  <editable>True</editable>
-		  <text_visible>True</text_visible>
-		  <text_max_length>0</text_max_length>
-		  <text></text>
+	  <child>
+	    <widget class="GtkImageMenuItem" id="ignore">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Ignore</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_ignore_activate"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="convertwidget298">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-stop</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>ex_cal_frame</name>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_NONE</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Since Last Run Druid</name>
-  <title>Since Last Run</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>sincelast_druid</name>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>what_to_do</name>
-      <title>What to do, what to do?</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>what_to_do_vbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame82</name>
-	  <border_width>38</border_width>
-	  <label>Creating transactions...</label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkProgressBar</class>
-	    <name>creation_progress</name>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
-	    <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
-	    <activity_mode>False</activity_mode>
-	    <show_text>True</show_text>
-	    <format>%v/%u (%p%%)</format>
-	    <text_xalign>0.5</text_xalign>
-	    <text_yalign>0.5</text_yalign>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+	  </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>reminders_page</name>
-      <title>Transaction Reminders</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox5</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847862</name>
-	  <label>The listed Scheduled Transactions are to-be created soon. 
-Select any which you would like to create now, and click
-&quot;Next&quot; to create them.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>11</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkImageMenuItem" id="postpone">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Postpone</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_postpone_activate"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="convertwidget299">
+		  <property name="visible">True</property>
+		  <property name="stock">gnome-stock-timer-stop</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow19</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCTree</class>
-	    <name>reminders_list</name>
-	    <can_focus>True</can_focus>
-	    <columns>3</columns>
-	    <column_widths>153,121,80</column_widths>
-	    <selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847882</name>
-	      <label>Scheduled Transaction</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847883</name>
-	      <label>Frequency</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847884</name>
-	      <label>Days Away</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkImageMenuItem" id="create">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Create</property>
+	      <property name="use_underline">True</property>
+	      <signal name="activate" handler="on_create_activate"/>
+
+	      <child internal-child="image">
+		<widget class="GtkImage" id="convertwidget300">
+		  <property name="visible">True</property>
+		  <property name="stock">gnome-stock-timer</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
+      </child>
     </widget>
+  </child>
+</widget>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>auto_create_notify_page</name>
-      <title>Auto-Created Transactions Notification</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>ac_vbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-    </widget>
+<widget class="GtkWindow" id="Preferences">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Preferences</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkTable" id="sx_prefs">
+      <property name="visible">True</property>
+      <property name="n_rows">12</property>
+      <property name="n_columns">4</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">12</property>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>to_create_page</name>
-      <title>To-Create Transaction Preparation</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox7</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHPaned</class>
-	  <name>to_create_hpaned</name>
-	  <handle_size>10</handle_size>
-	  <gutter_size>10</gutter_size>
-	  <position>600</position>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow16</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <shrink>True</shrink>
-	      <resize>False</resize>
-	    </child>
-
-	    <widget>
-	      <class>GtkCTree</class>
-	      <name>to_create_list</name>
-	      <can_focus>True</can_focus>
-	      <columns>2</columns>
-	      <column_widths>177,80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>True</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>label847893</name>
-		<label>Name</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>label847894</name>
-		<label>State</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox176</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <shrink>True</shrink>
-	      <resize>True</resize>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox173</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847965</name>
-		<label>Disposition?</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>3</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>disposition_opt</name>
-		<border_width>3</border_width>
-		<can_focus>True</can_focus>
-		<items>Create as scheduled
-Ignore
-Postpone
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>frame81</name>
-	      <border_width>3</border_width>
-	      <label>Variables</label>
-	      <label_xalign>0.1</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkVBox</class>
-		<name>vbox176</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-
-		<widget>
-		  <class>GtkScrolledWindow</class>
-		  <name>scrolledwindow17</name>
-		  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-		  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-		  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-		  <child>
-		    <padding>0</padding>
-		    <expand>True</expand>
-		    <fill>True</fill>
-		  </child>
-
-		  <widget>
-		    <class>GtkViewport</class>
-		    <name>viewport2</name>
-		    <border_width>2</border_width>
-		    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		    <widget>
-		      <class>GtkTable</class>
-		      <name>variables_table</name>
-		      <rows>2</rows>
-		      <columns>2</columns>
-		      <homogeneous>False</homogeneous>
-		      <row_spacing>2</row_spacing>
-		      <column_spacing>2</column_spacing>
-
-		      <widget>
-			<class>GtkLabel</class>
-			<name>label847869</name>
-			<label>Value</label>
-			<justify>GTK_JUSTIFY_CENTER</justify>
-			<wrap>False</wrap>
-			<xalign>0.5</xalign>
-			<yalign>0.5</yalign>
-			<xpad>0</xpad>
-			<ypad>0</ypad>
-			<child>
-			  <left_attach>1</left_attach>
-			  <right_attach>2</right_attach>
-			  <top_attach>0</top_attach>
-			  <bottom_attach>1</bottom_attach>
-			  <xpad>0</xpad>
-			  <ypad>0</ypad>
-			  <xexpand>True</xexpand>
-			  <yexpand>False</yexpand>
-			  <xshrink>False</xshrink>
-			  <yshrink>False</yshrink>
-			  <xfill>True</xfill>
-			  <yfill>False</yfill>
-			</child>
-		      </widget>
-
-		      <widget>
-			<class>GtkLabel</class>
-			<name>label847870</name>
-			<label>Variable</label>
-			<justify>GTK_JUSTIFY_CENTER</justify>
-			<wrap>False</wrap>
-			<xalign>0.5</xalign>
-			<yalign>0.5</yalign>
-			<xpad>0</xpad>
-			<ypad>0</ypad>
-			<child>
-			  <left_attach>0</left_attach>
-			  <right_attach>1</right_attach>
-			  <top_attach>0</top_attach>
-			  <bottom_attach>1</bottom_attach>
-			  <xpad>0</xpad>
-			  <ypad>0</ypad>
-			  <xexpand>True</xexpand>
-			  <yexpand>False</yexpand>
-			  <xshrink>False</xshrink>
-			  <yshrink>False</yshrink>
-			  <xfill>True</xfill>
-			  <yfill>False</yfill>
-			</child>
-		      </widget>
-		    </widget>
-		  </widget>
-		</widget>
-
-		<widget>
-		  <class>GtkHBox</class>
-		  <name>hbox175</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
-		  </child>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <name>label847967</name>
-		    <label>Value:</label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>3</xpad>
-		    <ypad>3</ypad>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkStatusbar</class>
-		    <name>to_create_status</name>
-		    <border_width>3</border_width>
-		    <child>
-		      <padding>0</padding>
-		      <expand>True</expand>
-		      <fill>True</fill>
-		    </child>
-		  </widget>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GtkLabel" id="label847981">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Since Last Run Dialog&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>to_create_txn_reg_frame</name>
-	  <label>Template Transaction (Read-Only)</label>
-	  <label_xalign>0.05</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+      <child>
+	<widget class="GtkLabel" id="label847982">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes"></property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+      <child>
+	<widget class="GtkLabel" id="label847983">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Transaction Editor Defaults&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>created_page</name>
-      <title>Created Transaction Review</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>created_vbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/scheduled_trans/since_last_run/show_at_file_open">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Show the &quot;since last run&quot; window when a file is opened.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">_Run when data file opened</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/scheduled_trans/transaction_editor/create_auto">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Set the 'auto-create' flag on newly created scheduled transactions.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">_Auto-create new transactions</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	  <signal name="toggled" handler="on_sx_check_toggled" last_modification_time="Tue, 02 Aug 2005 03:22:36 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-    </widget>
+      <child>
+	<widget class="GtkAlignment" id="alignment25">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">0</property>
+	  <property name="bottom_padding">0</property>
+	  <property name="left_padding">12</property>
+	  <property name="right_padding">0</property>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>obsolete_page</name>
-      <title>Obsolete Scheduled Transactions</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox9</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847871</name>
-	  <label>The following scheduled transactions have expired.
-Select those you wish to delete.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>11</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkLabel" id="create_days_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">_Create in advance, days:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">gconf/dialogs/scheduled_trans/transaction_editor/create_days</property>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow18</name>
-	  <border_width>3</border_width>
-	  <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>sx_obsolete_clist</name>
-	    <can_focus>True</can_focus>
-	    <columns>3</columns>
-	    <column_widths>80,80,80</column_widths>
-	    <selection_mode>GTK_SELECTION_EXTENDED</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847872</name>
-	      <label>Name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847873</name>
-	      <label>Frequency</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847874</name>
-	      <label>Ended On</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GtkAlignment" id="alignment26">
+	  <property name="visible">True</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xscale">1</property>
+	  <property name="yscale">1</property>
+	  <property name="top_padding">0</property>
+	  <property name="bottom_padding">0</property>
+	  <property name="left_padding">12</property>
+	  <property name="right_padding">0</property>
 
-	<widget>
-	  <class>GtkHButtonBox</class>
-	  <name>hbuttonbox8</name>
-	  <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-	  <spacing>8</spacing>
-	  <child_min_width>85</child_min_width>
-	  <child_min_height>27</child_min_height>
-	  <child_ipad_x>7</child_ipad_x>
-	  <child_ipad_y>0</child_ipad_y>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>select_all_button</name>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Select All</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>unselect_all_button</name>
-	    <can_default>True</can_default>
-	    <can_focus>True</can_focus>
-	    <label>Unselect All</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	  </widget>
+	  <child>
+	    <widget class="GtkLabel" id="remind_days_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">R_emind in advance, days:</property>
+	      <property name="use_underline">True</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>loan_druid_win</name>
-  <title>Mortgage/Loan Druid</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>loan_druid</name>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>loan_intro_pg</name>
-      <title>Mortgage/Loan Repayment Setup</title>
-      <text>This is a step-by-step method of creating a loan repayment setup
-within GnuCash.  In this Druid, you can input the parameters of
-your loan and its repayment and give the details of its payback.
-Using that information, the appropriate Scheduled Transactions
-will be created.
+      <child>
+	<widget class="GtkLabel" id="label847988">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Register _lines</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="mnemonic_widget">gconf/dialogs/scheduled_trans/transaction_editor/number_of_lines</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">8</property>
+	  <property name="bottom_attach">9</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-If you make a mistake or want to make changes later, you can edit
-the created Scheduled Transactions directly.</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
+      <child>
+	<widget class="GtkHBox" id="hbox182">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>loan_info_pg</name>
-      <title>Loan Information</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox10</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkTable</class>
-	  <name>param_table</name>
-	  <border_width>5</border_width>
-	  <rows>6</rows>
-	  <columns>4</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>5</row_spacing>
-	  <column_spacing>5</column_spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847897</name>
-	    <label>Interest Rate:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847899</name>
-	    <label>Start Date:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>4</top_attach>
-	      <bottom_attach>5</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847900</name>
-	    <label>Length:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>5</top_attach>
-	      <bottom_attach>6</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847895</name>
-	    <label>Amount:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847920</name>
-	    <label>Loan Account:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>rem_spin</name>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>1</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <step>1</step>
-	    <page>10</page>
-	    <page_size>10</page_size>
-	    <child>
-	      <left_attach>3</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>5</top_attach>
-	      <bottom_attach>6</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox167</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>5</top_attach>
-	      <bottom_attach>6</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkSpinButton</class>
-	      <name>len_spin</name>
-	      <can_focus>True</can_focus>
-	      <climb_rate>1</climb_rate>
-	      <digits>0</digits>
-	      <numeric>False</numeric>
-	      <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	      <snap>False</snap>
-	      <wrap>False</wrap>
-	      <value>1</value>
-	      <lower>0</lower>
-	      <upper>100</upper>
-	      <step>1</step>
-	      <page>10</page>
-	      <page_size>10</page_size>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkOptionMenu</class>
-	      <name>len_opt</name>
-	      <can_focus>True</can_focus>
-	      <items>months
-years
-</items>
-	      <initial_choice>0</initial_choice>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment11</name>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>0.25</xscale>
-	    <yscale>1</yscale>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>4</top_attach>
-	      <bottom_attach>5</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment12</name>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>0.5</xscale>
-	    <yscale>1</yscale>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox170</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkSpinButton</class>
-		<name>irate_spin</name>
-		<can_focus>True</can_focus>
-		<climb_rate>1</climb_rate>
-		<digits>3</digits>
-		<numeric>True</numeric>
-		<update_policy>GTK_UPDATE_ALWAYS</update_policy>
-		<snap>True</snap>
-		<wrap>False</wrap>
-		<value>1</value>
-		<lower>0</lower>
-		<upper>100</upper>
-		<step>1</step>
-		<page>10</page>
-		<page_size>10</page_size>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847921</name>
-		<label>%</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847898</name>
-	    <label>Type:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>7.45058e-09</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847901</name>
-	    <label>Months Remaining:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>5</top_attach>
-	      <bottom_attach>6</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment23</name>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>0.5</xscale>
-	    <yscale>0.75</yscale>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>True</yexpand>
-	      <xshrink>True</xshrink>
-	      <yshrink>True</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>type_freq_frame</name>
-	      <border_width>3</border_width>
-	      <label>Interest Rate Change Frequency</label>
-	      <label_xalign>0.05</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+	  <child>
+	    <widget class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/number_of_lines">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Make the template register large enough to show this many lines.</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">6 1 50 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>loan_opts_pg</name>
-      <title>Options</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>opt_vbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847903</name>
-	  <label>Do you...</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.05</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>10</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkLabel" id="label847989">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">lines</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">8</property>
+	  <property name="bottom_attach">9</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkAlignment</class>
-	  <name>alignment18</name>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xscale>0.75</xscale>
-	  <yscale>1</yscale>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox174</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkCheckButton</class>
-	      <name>opt_escrow_cb</name>
-	      <can_focus>True</can_focus>
-	      <label>... utilize an escrow account for payments?</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkAlignment</class>
-	      <name>alignment19</name>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xscale>0.75</xscale>
-	      <yscale>1</yscale>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>opt_escrow_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label847963</name>
-		  <label>Escrow Account:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
-		  </child>
-		</widget>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GtkHBox" id="remind_days_hbox">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
 
-	<widget>
-	  <class>GtkAlignment</class>
-	  <name>alignment20</name>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xscale>0.9</xscale>
-	  <yscale>1</yscale>
-	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHSeparator</class>
-	    <name>hseparator1</name>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+	  <child>
+	    <widget class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/remind_days">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Begin notifications this many days before the transaction is created.</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 10000000 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>repayment_pg</name>
-      <title>Repayment</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox12</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkTable</class>
-	  <name>repay_table</name>
-	  <border_width>5</border_width>
-	  <rows>5</rows>
-	  <columns>4</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>5</row_spacing>
-	  <column_spacing>5</column_spacing>
-	  <child>
-	    <padding>5</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847910</name>
-	    <label>Payment From:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847911</name>
-	    <label>Principal To:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847918</name>
-	    <label>Name:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847909</name>
-	    <label>Amount:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847912</name>
-	    <label>Interest To:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment13</name>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>1</xscale>
-	    <yscale>1</yscale>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>txn_title</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment14</name>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>1</xscale>
-	    <yscale>1</yscale>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>amount_ent</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkAlignment</class>
-	    <name>alignment21</name>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xscale>0.5</xscale>
-	    <yscale>0.9</yscale>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>4</right_attach>
-	      <top_attach>4</top_attach>
-	      <bottom_attach>5</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>True</yexpand>
-	      <xshrink>True</xshrink>
-	      <yshrink>True</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>freq_frame</name>
-	      <border_width>3</border_width>
-	      <label>Repayment Frequency</label>
-	      <label_xalign>0.05</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label847986">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">days</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>payment_pg</name>
-      <title>&lt;repayment type&gt;</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox13</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkEventBox</class>
-	  <name>eventbox1</name>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox158</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkTable</class>
-	      <name>pay_table</name>
-	      <border_width>5</border_width>
-	      <rows>6</rows>
-	      <columns>4</columns>
-	      <homogeneous>False</homogeneous>
-	      <row_spacing>5</row_spacing>
-	      <column_spacing>5</column_spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847916</name>
-		<label>Amount:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>0</left_attach>
-		  <right_attach>1</right_attach>
-		  <top_attach>1</top_attach>
-		  <bottom_attach>2</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>pay_from_account_label</name>
-		<label>Payment From:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>0</left_attach>
-		  <right_attach>1</right_attach>
-		  <top_attach>4</top_attach>
-		  <bottom_attach>5</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847919</name>
-		<label>Name:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>0</left_attach>
-		  <right_attach>1</right_attach>
-		  <top_attach>0</top_attach>
-		  <bottom_attach>1</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>pay_escrow_to_label</name>
-		<label>Payment To (Escrow):</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>2</left_attach>
-		  <right_attach>3</right_attach>
-		  <top_attach>4</top_attach>
-		  <bottom_attach>5</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkAlignment</class>
-		<name>alignment16</name>
-		<xalign>0</xalign>
-		<yalign>0.5</yalign>
-		<xscale>1</xscale>
-		<yscale>1</yscale>
-		<child>
-		  <left_attach>1</left_attach>
-		  <right_attach>4</right_attach>
-		  <top_attach>0</top_attach>
-		  <bottom_attach>1</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>True</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-
-		<widget>
-		  <class>GtkEntry</class>
-		  <name>pay_txn_title</name>
-		  <can_focus>True</can_focus>
-		  <editable>True</editable>
-		  <text_visible>True</text_visible>
-		  <text_max_length>0</text_max_length>
-		  <text></text>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkAlignment</class>
-		<name>alignment17</name>
-		<xalign>0</xalign>
-		<yalign>0.5</yalign>
-		<xscale>1</xscale>
-		<yscale>1</yscale>
-		<child>
-		  <left_attach>1</left_attach>
-		  <right_attach>4</right_attach>
-		  <top_attach>1</top_attach>
-		  <bottom_attach>2</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>True</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-
-		<widget>
-		  <class>GnomeNumberEntry</class>
-		  <name>pay_amt_gne</name>
-		  <max_saved>10</max_saved>
-
-		  <widget>
-		    <class>GtkEntry</class>
-		    <child_name>GnomeEntry:entry</child_name>
-		    <name>pay_amt_ent</name>
-		    <can_focus>True</can_focus>
-		    <editable>True</editable>
-		    <text_visible>True</text_visible>
-		    <text_max_length>0</text_max_length>
-		    <text></text>
-		  </widget>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>pay_escrow_from_label</name>
-		<label>Payment From (Escrow):</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>0</left_attach>
-		  <right_attach>1</right_attach>
-		  <top_attach>5</top_attach>
-		  <bottom_attach>6</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847975</name>
-		<label>Payment To:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <left_attach>2</left_attach>
-		  <right_attach>3</right_attach>
-		  <top_attach>5</top_attach>
-		  <bottom_attach>6</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>pay_specify_source</name>
-		<can_focus>True</can_focus>
-		<label>Specify Source Account</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <left_attach>1</left_attach>
-		  <right_attach>4</right_attach>
-		  <top_attach>3</top_attach>
-		  <bottom_attach>4</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>pay_use_escrow</name>
-		<can_focus>True</can_focus>
-		<label>Use Escrow Account</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <left_attach>1</left_attach>
-		  <right_attach>4</right_attach>
-		  <top_attach>2</top_attach>
-		  <bottom_attach>3</bottom_attach>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <xexpand>False</xexpand>
-		  <yexpand>False</yexpand>
-		  <xshrink>False</xshrink>
-		  <yshrink>False</yshrink>
-		  <xfill>True</xfill>
-		  <yfill>False</yfill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkAlignment</class>
-	      <name>alignment22</name>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xscale>0.5</xscale>
-	      <yscale>0.75</yscale>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkFrame</class>
-		<name>frame92</name>
-		<border_width>5</border_width>
-		<label>Payment Frequency</label>
-		<label_xalign>0.05</label_xalign>
-		<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-		<widget>
-		  <class>GtkVBox</class>
-		  <name>vbox159</name>
-		  <homogeneous>False</homogeneous>
-		  <spacing>0</spacing>
-
-		  <widget>
-		    <class>GtkRadioButton</class>
-		    <name>pay_txn_part_rb</name>
-		    <can_focus>True</can_focus>
-		    <label>Part of Payment Transaction</label>
-		    <active>False</active>
-		    <draw_indicator>True</draw_indicator>
-		    <group>rep_freq_opt</group>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-		  </widget>
-
-		  <widget>
-		    <class>GtkVBox</class>
-		    <name>vbox160</name>
-		    <homogeneous>False</homogeneous>
-		    <spacing>0</spacing>
-		    <child>
-		      <padding>0</padding>
-		      <expand>False</expand>
-		      <fill>False</fill>
-		    </child>
-
-		    <widget>
-		      <class>GtkRadioButton</class>
-		      <name>pay_uniq_freq_rb</name>
-		      <can_focus>True</can_focus>
-		      <label>Other</label>
-		      <active>False</active>
-		      <draw_indicator>True</draw_indicator>
-		      <group>rep_freq_opt</group>
-		      <child>
-			<padding>0</padding>
-			<expand>False</expand>
-			<fill>False</fill>
-		      </child>
-		    </widget>
-
-		    <widget>
-		      <class>GtkAlignment</class>
-		      <name>pay_freq_align</name>
-		      <xalign>1</xalign>
-		      <yalign>0.5</yalign>
-		      <xscale>0.95</xscale>
-		      <yscale>1</yscale>
-		      <child>
-			<padding>0</padding>
-			<expand>False</expand>
-			<fill>False</fill>
-		      </child>
-
-		      <widget>
-			<class>Placeholder</class>
-		      </widget>
-		    </widget>
-		  </widget>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
+      <child>
+	<widget class="GtkHBox" id="create_days_hbox">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">6</property>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>review_pg</name>
-      <title>Review</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox14</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox177</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox176</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox178</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847973</name>
-		<label>Range: </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>5</xpad>
-		<ypad>5</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkVBox</class>
-		<name>vbox178</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>GtkOptionMenu</class>
-		  <name>rev_range_opt</name>
-		  <can_focus>True</can_focus>
-		  <items>Current Year
-Now + 1 Year
-Whole Loan
-Custom
-</items>
-		  <initial_choice>0</initial_choice>
-		  <child>
-		    <padding>0</padding>
-		    <expand>True</expand>
-		    <fill>False</fill>
-		  </child>
-		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>rev_date_frame</name>
-	      <border_width>2</border_width>
-	      <sensitive>False</sensitive>
-	      <label>Date Range</label>
-	      <label_xalign>0.05</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	      <child>
-		<padding>2</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkTable</class>
-		<name>rev_date_range_table</name>
-		<rows>2</rows>
-		<columns>2</columns>
-		<homogeneous>False</homogeneous>
-		<row_spacing>0</row_spacing>
-		<column_spacing>0</column_spacing>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label847971</name>
-		  <label>Start Date:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>1</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>5</xpad>
-		  <ypad>5</ypad>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>0</top_attach>
-		    <bottom_attach>1</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label847972</name>
-		  <label>End Date:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>1</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>5</xpad>
-		  <ypad>5</ypad>
-		  <child>
-		    <left_attach>0</left_attach>
-		    <right_attach>1</right_attach>
-		    <top_attach>1</top_attach>
-		    <bottom_attach>2</bottom_attach>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		    <xexpand>False</xexpand>
-		    <yexpand>False</yexpand>
-		    <xshrink>False</xshrink>
-		    <yshrink>False</yshrink>
-		    <xfill>True</xfill>
-		    <yfill>False</yfill>
-		  </child>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>rev_scrollwin</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
+	  <child>
+	    <widget class="GtkSpinButton" id="gconf/dialogs/scheduled_trans/transaction_editor/create_days">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Create the transaction this many days before its effective date.</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">False</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0 0 10000000 1 10 10</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+	  <child>
+	    <widget class="GtkLabel" id="label847985">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">days</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
 
-<widget>
-  <class>GtkMenu</class>
-  <name>Since Last Run popup</name>
-
-  <widget>
-    <class>GtkMenuItem</class>
-    <name>creation_state</name>
-    <label>Creation State</label>
-    <right_justify>False</right_justify>
-
-    <widget>
-      <class>GtkMenu</class>
-      <name>creation_state_menu</name>
-
-      <widget>
-	<class>GtkPixmapMenuItem</class>
-	<name>ignore</name>
-	<signal>
-	  <name>activate</name>
-	  <handler>on_ignore_activate</handler>
-	  <last_modification_time>Fri, 23 Aug 2002 22:16:45 GMT</last_modification_time>
-	</signal>
-	<label>Ignore</label>
-	<right_justify>False</right_justify>
-	<stock_icon>GNOME_STOCK_MENU_STOP</stock_icon>
-      </widget>
-
-      <widget>
-	<class>GtkPixmapMenuItem</class>
-	<name>postpone</name>
-	<signal>
-	  <name>activate</name>
-	  <handler>on_postpone_activate</handler>
-	  <last_modification_time>Fri, 23 Aug 2002 22:16:45 GMT</last_modification_time>
-	</signal>
-	<label>Postpone</label>
-	<right_justify>False</right_justify>
-	<stock_icon>GNOME_STOCK_MENU_TIMER_STOP</stock_icon>
-      </widget>
-
-      <widget>
-	<class>GtkPixmapMenuItem</class>
-	<name>create</name>
-	<signal>
-	  <name>activate</name>
-	  <handler>on_create_activate</handler>
-	  <last_modification_time>Fri, 23 Aug 2002 22:16:45 GMT</last_modification_time>
-	</signal>
-	<label>Create</label>
-	<right_justify>False</right_justify>
-	<stock_icon>GNOME_STOCK_MENU_TIMER</stock_icon>
-      </widget>
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/scheduled_trans/transaction_editor/notify">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Set the 'notify' flag on newly created scheduled transactions.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">_Notify before transactions are created </property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	  <signal name="toggled" handler="on_sx_check_toggled" last_modification_time="Tue, 02 Aug 2005 03:22:26 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_padding">30</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: tax.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/tax.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/glade/tax.glade -Lsrc/gnome/glade/tax.glade -u -r1.2 -r1.3
--- src/gnome/glade/tax.glade
+++ src/gnome/glade/tax.glade
@@ -1,435 +1,734 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Tax Information Dialog</name>
-  <title>Tax Information</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox14</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area14</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button73</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>apply_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button75</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox81</name>
-      <homogeneous>False</homogeneous>
-      <spacing>2</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>account_frame</name>
-	<label>Accounts</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox96</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox97</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>2</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>income_radio</name>
-	      <can_focus>True</can_focus>
-	      <label>Income</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>tax_info_account_type</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+<widget class="GtkDialog" id="Tax Information Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Tax Information</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox14">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area14">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button73">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>expense_radio</name>
-	      <can_focus>True</can_focus>
-	      <label>Expense</label>
-	      <active>True</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>tax_info_account_type</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="button75">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>account_scroll</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="visible">True</property>
+	  <property name="n_rows">1</property>
+	  <property name="n_columns">3</property>
+	  <property name="homogeneous">True</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="account_frame">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox98</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847733</name>
-	      <label>Accounts Selected:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkVBox" id="vbox96">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox97">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="income_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Income</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="expense_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Expense</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">income_radio</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">2</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="account_scroll">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkViewport" id="viewport1">
+			  <property name="visible">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="account_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox98">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label42">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847733">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Accounts Selected:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="num_accounts_label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">0</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label43">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox99">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label44">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="select_subaccounts_button">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment1">
+			      <property name="visible">True</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">0</property>
+			      <property name="yscale">0</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">0</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkHBox" id="hbox100">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">2</property>
+
+				  <child>
+				    <widget class="GtkImage" id="image1">
+				      <property name="visible">True</property>
+				      <property name="stock">gtk-add</property>
+				      <property name="icon_size">4</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847737">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Select Subaccounts</property>
+				      <property name="use_underline">True</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_LEFT</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				    <packing>
+				      <property name="padding">0</property>
+				      <property name="expand">False</property>
+				      <property name="fill">False</property>
+				    </packing>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label45">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>num_accounts_label</name>
-	      <label>0</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Accounts</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>select_subaccounts_button</name>
-	    <border_width>3</border_width>
-	    <can_focus>True</can_focus>
-	    <label>Select Subaccounts</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="tax_info_frame">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>tax_info_frame</name>
-	<sensitive>False</sensitive>
-	<label>Tax Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox92</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>3</spacing>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>tax_related_button</name>
-	    <can_focus>True</can_focus>
-	    <label>Tax Related</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHSeparator</class>
-	    <name>hseparator1</name>
-	    <child>
-	      <padding>6</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>txf_categories_frame</name>
-	    <sensitive>False</sensitive>
-	    <label>TXF Categories</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox113</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>2</spacing>
-
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>scrolledwindow28</name>
-		<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>GtkCList</class>
-		  <name>txf_category_clist</name>
-		  <can_focus>True</can_focus>
-		  <columns>2</columns>
-		  <column_widths>80,80</column_widths>
-		  <selection_mode>GTK_SELECTION_BROWSE</selection_mode>
-		  <show_titles>True</show_titles>
-		  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <child_name>CList:title</child_name>
-		    <name>label847734</name>
-		    <label>Form</label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		  </widget>
-
-		  <widget>
-		    <class>GtkLabel</class>
-		    <child_name>CList:title</child_name>
-		    <name>label847735</name>
-		    <label>Description</label>
-		    <justify>GTK_JUSTIFY_CENTER</justify>
-		    <wrap>False</wrap>
-		    <xalign>0.5</xalign>
-		    <yalign>0.5</yalign>
-		    <xpad>0</xpad>
-		    <ypad>0</ypad>
-		  </widget>
+	      <child>
+		<widget class="GtkVBox" id="vbox92">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">3</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="tax_related_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Tax Related</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator1">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">6</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="txf_categories_frame">
+		      <property name="visible">True</property>
+		      <property name="sensitive">False</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox113">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="scrolledwindow28">
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkCList" id="txf_category_clist">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="n_columns">2</property>
+				  <property name="column_widths">80,80</property>
+				  <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+				  <property name="show_titles">True</property>
+				  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847734">
+				      <property name="label" translatable="yes">Form</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkLabel" id="label847735">
+				      <property name="label" translatable="yes">Description</property>
+				      <property name="use_underline">False</property>
+				      <property name="use_markup">False</property>
+				      <property name="justify">GTK_JUSTIFY_CENTER</property>
+				      <property name="wrap">False</property>
+				      <property name="selectable">False</property>
+				      <property name="xalign">0.5</property>
+				      <property name="yalign">0.5</property>
+				      <property name="xpad">0</property>
+				      <property name="ypad">0</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="help_scroll">
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkTextView" id="txf_help_text">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">False</property>
+				  <property name="overwrite">False</property>
+				  <property name="accepts_tab">True</property>
+				  <property name="justification">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap_mode">GTK_WRAP_WORD</property>
+				  <property name="cursor_visible">True</property>
+				  <property name="pixels_above_lines">0</property>
+				  <property name="pixels_below_lines">0</property>
+				  <property name="pixels_inside_wrap">0</property>
+				  <property name="left_margin">0</property>
+				  <property name="right_margin">0</property>
+				  <property name="indent">0</property>
+				  <property name="text" translatable="yes"></property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847735">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">TXF Categories</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="payer_name_source_frame">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox97">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="current_account_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Current Account</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="parent_account_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Parent Account</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">current_account_button</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847736">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Payer Name Source</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+	      </child>
 
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>help_scroll</name>
-		<hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkText</class>
-		  <name>txf_help_text</name>
-		  <can_focus>True</can_focus>
-		  <editable>False</editable>
-		  <text></text>
+	      <child>
+		<widget class="GtkLabel" id="label847734">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tax Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>payer_name_source_frame</name>
-	    <label>Payer Name Source</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox97</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>2</spacing>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>current_account_button</name>
-		<can_focus>True</can_focus>
-		<label>Current Account</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>payer_name_source</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>parent_account_button</name>
-		<can_focus>True</can_focus>
-		<label>Parent Account</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>payer_name_source</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: newuser.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/newuser.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome/glade/newuser.glade -Lsrc/gnome/glade/newuser.glade -u -r1.3 -r1.4
--- src/gnome/glade/newuser.glade
+++ src/gnome/glade/newuser.glade
@@ -1,241 +1,379 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>New User Dialog</name>
-  <title>Welcome to GnuCash!</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button3</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="New User Dialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">14</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbbox">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame4</name>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox6</name>
-	<border_width>3</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkRadioButton</class>
-	  <name>new_accounts_button</name>
-	  <can_focus>True</can_focus>
-	  <label>Create a new set of accounts</label>
-	  <active>False</active>
-	  <draw_indicator>True</draw_indicator>
-	  <group>new_user_group</group>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">12</property>
+	  <property name="column_spacing">12</property>
 
-	<widget>
-	  <class>GtkRadioButton</class>
-	  <name>import_qif_button</name>
-	  <can_focus>True</can_focus>
-	  <label>Import my QIF files</label>
-	  <active>False</active>
-	  <draw_indicator>True</draw_indicator>
-	  <group>new_user_group</group>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkImage" id="image">
+	      <property name="visible">True</property>
+	      <property name="stock">gtk-home</property>
+	      <property name="icon_size">6</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;span size=&quot;larger&quot; weight=&quot;bold&quot;&gt;Welcome to GnuCash!&lt;/span&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkRadioButton</class>
-	  <name>tutorial_button</name>
-	  <can_focus>True</can_focus>
-	  <label>Open the new user tutorial</label>
-	  <active>False</active>
-	  <draw_indicator>True</draw_indicator>
-	  <group>new_user_group</group>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	  <child>
+	    <widget class="GtkVBox" id="vbox">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">There are some predefined actions available that most new users prefer to get started with GnuCash. Select one of these actions from below and click the &lt;i&gt;OK&lt;/i&gt; button or press the &lt;i&gt;Cancel&lt;/i&gt; button if don't want to perform any of them.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="new_accounts_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="label" translatable="yes">C_reate a new set of accounts</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="import_qif_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Import my QIF files</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <property name="group">new_accounts_button</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="tutorial_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">_Open the new user tutorial</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <property name="group">new_accounts_button</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options">fill</property>
+	    </packing>
 	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>New User Cancel Dialog</name>
-  <title>Canceling</title>
-  <type>GTK_WINDOW_DIALOG</type>
-  <position>GTK_WIN_POS_MOUSE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog_vbox</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<widget class="GtkDialog" id="New User Cancel Dialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">14</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbbox">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-    </widget>
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-no</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-9</property>
+	    </widget>
+	  </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>5</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-yes</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-8</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<name>newAccountCancelDialog_ShouldRunAgainLable</name>
-	<label>Uncheck if you do not want this dialog to run if you start GnuCash up again. </label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>True</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkCheckButton</class>
-	<name>run_again_toggle</name>
-	<can_focus>True</can_focus>
-	<label>Run dialog for new user again?</label>
-	<active>True</active>
-	<draw_indicator>True</draw_indicator>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
+      <child>
+	<widget class="GtkTable" id="table">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">12</property>
+	  <property name="column_spacing">12</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image">
+	      <property name="visible">True</property>
+	      <property name="stock">gtk-dialog-question</property>
+	      <property name="icon_size">6</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options">fill</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;larger&quot;&gt;Display Welcome Dialog Again?&lt;/span&gt;</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="newAccountCancelDialog_ShouldRunAgainLable">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">If you press the &lt;i&gt;Yes&lt;/i&gt; button, the &lt;i&gt;Welcome to GnuCash&lt;/i&gt; dialog will be displayed again next time you start GnuCash. If you press the &lt;i&gt;No&lt;/i&gt; button, it will not be displayed again.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">True</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: acctperiod.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/acctperiod.glade,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/gnome/glade/acctperiod.glade -Lsrc/gnome/glade/acctperiod.glade -u -r1.10 -r1.11
--- src/gnome/glade/acctperiod.glade
+++ src/gnome/glade/acctperiod.glade
@@ -1,320 +1,331 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Acct Period Druid</name>
-  <title>Setup Accounting Periods</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>acct_period_druid</name>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start page</name>
-      <title>Setup Accounting Periods</title>
-      <text>This druid will help you setup and use accouting periods. 
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="Acct Period Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Setup Accounting Periods</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="acct_period_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Setup Accounting Periods</property>
+	  <property name="text" translatable="yes">This druid will help you setup and use accouting periods. 
  
 Danger: this feature does not work correctly at this time; 
 it is still under development.  It will probably damage your
-data in such a way that it cannot be repaired!</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>menu page</name>
-      <title>Book Closing Dates</title>
-      <title_color>255,255,255</title_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox-xx</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>10</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847720</name>
-	  <label>Select an accounting period and the closing date for the period. 
-Books will be closed on midnight of the selected date.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>period box</name>
-	  <border_width>12</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>remarks label</name>
-	  <label>xxx</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+data in such a way that it cannot be repaired!</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#666666669999</property>
+	  <property name="logo_background_color">#666666669999</property>
+	  <property name="textbox_color">#ffffffffffff</property>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>book page</name>
-      <title>Close Book</title>
-      <title_color>255,255,255</title_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox-yy</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>10</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>results label</name>
-	  <label>xxx</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="menu page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Book Closing Dates</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox-xx">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">10</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847720">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select an accounting period and the closing date for the period. 
+Books will be closed on midnight of the selected date.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="period box">
+		  <property name="border_width">12</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="remarks label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">xxx</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>book label</name>
-	  <label>xxx</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="book page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Close Book</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669998</property>
+	  <property name="logo_background">#666666669998</property>
+	  <property name="contents_background">#e6e6e6e6e6e6</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox-yy">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">10</property>
+
+	      <child>
+		<widget class="GtkLabel" id="results label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">xxx</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="book label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">xxx</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkTable" id="table1">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847723">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Title:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847724">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Notes:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkTextView" id="book notes text">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Enter notes that describe this book.</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="overwrite">False</property>
+			  <property name="accepts_tab">True</property>
+			  <property name="justification">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap_mode">GTK_WRAP_WORD</property>
+			  <property name="cursor_visible">True</property>
+			  <property name="pixels_above_lines">0</property>
+			  <property name="pixels_below_lines">0</property>
+			  <property name="pixels_inside_wrap">0</property>
+			  <property name="left_margin">0</property>
+			  <property name="right_margin">0</property>
+			  <property name="indent">0</property>
+			  <property name="text" translatable="yes"></property>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">expand|shrink|fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="book title entry">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Enter a title for this book.</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_padding">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkTable</class>
-	  <name>table1</name>
-	  <rows>2</rows>
-	  <columns>2</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>0</row_spacing>
-	  <column_spacing>0</column_spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847723</name>
-	    <label>Title:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847724</name>
-	    <label>Notes:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>5</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>True</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>True</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>book notes text</name>
-	      <tooltip>Enter notes that describe this book.</tooltip>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>book title entry</name>
-	    <tooltip>Enter a title for this book.</tooltip>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>5</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
+      <child>
+	<widget class="GnomeDruidPageEdge" id="finish page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">Finish Closing Books</property>
+	  <property name="text" translatable="yes">xxx</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#666666669998</property>
+	  <property name="logo_background_color">#666666669999</property>
+	  <property name="textbox_color">#ffffffffffff</property>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>finish page</name>
-      <title>Finish Closing Books</title>
-      <text>xxx</text>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome/glade/.cvsignore -Lsrc/gnome/glade/.cvsignore -u -r1.1 -r1.2
--- src/gnome/glade/.cvsignore
+++ src/gnome/glade/.cvsignore
@@ -1,2 +1,5 @@
 Makefile
 Makefile.in
+*.gladep
+.DS_Store
+
Index: userpass.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/userpass.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/glade/userpass.glade -Lsrc/gnome/glade/userpass.glade -u -r1.2 -r1.3
--- src/gnome/glade/userpass.glade
+++ src/gnome/glade/userpass.glade
@@ -1,205 +1,220 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Username Password Dialog</name>
-  <title>Username and Password</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox16</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area16</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button79</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button81</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>heading_label</name>
-      <label>Enter your username and password</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-    </widget>
+<widget class="GtkDialog" id="Username Password Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Username and Password</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox16">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area16">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame47</name>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox95</name>
-	<border_width>10</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>2</spacing>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox105</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>5</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847713</name>
-	    <label>Username:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847714</name>
-	    <label>Password:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+      <child>
+	<widget class="GtkLabel" id="heading_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Enter your username and password</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame47">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox106</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>5</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkHBox" id="hbox95">
+	      <property name="border_width">10</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">2</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox105">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847713">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Username:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847714">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Password:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox106">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">5</property>
+
+		  <child>
+		    <widget class="GtkEntry" id="username_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="password_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">False</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>username_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>password_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>False</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: account.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/account.glade,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome/glade/account.glade -Lsrc/gnome/glade/account.glade -u -r1.12 -r1.13
--- src/gnome/glade/account.glade
+++ src/gnome/glade/account.glade
@@ -1,1464 +1,2320 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Account Dialog</name>
-  <title>New Account</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox12</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area12</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button63</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button72</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkNotebook</class>
-      <name>account_notebook</name>
-      <can_focus>True</can_focus>
-      <show_tabs>True</show_tabs>
-      <show_border>True</show_border>
-      <tab_pos>GTK_POS_TOP</tab_pos>
-      <scrollable>False</scrollable>
-      <tab_hborder>2</tab_hborder>
-      <tab_vborder>2</tab_vborder>
-      <popup_enable>False</popup_enable>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Account Dialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Account</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">False</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">2</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox75</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame28</name>
-	  <border_width>3</border_width>
-	  <label>Account Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox62</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox76</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label807</name>
-		<label>Account Name:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label811</name>
-		<label>Account Code:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label808</name>
-		<label>Description:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label809</name>
-		<label>Commodity:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label8477389</name>
-		<label>Smallest Fraction:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="button72">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox77</name>
-	      <border_width>3</border_width>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+      <child>
+	<widget class="GtkNotebook" id="account_notebook">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="show_tabs">True</property>
+	  <property name="show_border">True</property>
+	  <property name="tab_pos">GTK_POS_TOP</property>
+	  <property name="scrollable">False</property>
+	  <property name="enable_popup">False</property>
 
-	      <widget>
-		<class>GtkEntry</class>
-		<name>name_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>code_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>description_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text></text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>commodity_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+	  <child>
+	    <widget class="GtkVBox" id="vbox75">
+	      <property name="border_width">12</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">18</property>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkVBox" id="vbox121">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">18</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table">
+		      <property name="visible">True</property>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">2</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">6</property>
+		      <property name="column_spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Identification&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkTable" id="table3">
+			  <property name="visible">True</property>
+			  <property name="n_rows">8</property>
+			  <property name="n_columns">2</property>
+			  <property name="homogeneous">False</property>
+			  <property name="row_spacing">6</property>
+			  <property name="column_spacing">12</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Account name:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="name_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">0</property>
+			      <property name="bottom_attach">1</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Account code:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="code_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">1</property>
+			      <property name="bottom_attach">2</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Description:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">2</property>
+			      <property name="bottom_attach">3</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="description_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes"></property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char">*</property>
+			      <property name="activates_default">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">2</property>
+			      <property name="bottom_attach">3</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Commodity:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">3</property>
+			      <property name="bottom_attach">4</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="commodity_hbox">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">3</property>
+			      <property name="bottom_attach">4</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Smallest Fraction:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkOptionMenu" id="account_scu">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Smallest fraction of this commodity that can be referenced.</property>
+			      <property name="can_focus">True</property>
+			      <property name="history">0</property>
+
+			      <child internal-child="menu">
+				<widget class="GtkMenu" id="convertwidget1">
+				  <property name="visible">True</property>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget2">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">Use Commodity Value</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget3">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget4">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/10</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget5">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/100</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget6">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/1000</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget7">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/10000</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget8">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/100000</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+
+				  <child>
+				    <widget class="GtkMenuItem" id="convertwidget9">
+				      <property name="visible">True</property>
+				      <property name="label" translatable="yes">1/1000000</property>
+				      <property name="use_underline">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">4</property>
+			      <property name="bottom_attach">5</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="scrolledwindow9">
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<widget class="GtkTextView" id="notes_text">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="editable">True</property>
+				  <property name="overwrite">False</property>
+				  <property name="accepts_tab">True</property>
+				  <property name="justification">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap_mode">GTK_WRAP_WORD</property>
+				  <property name="cursor_visible">True</property>
+				  <property name="pixels_above_lines">0</property>
+				  <property name="pixels_below_lines">0</property>
+				  <property name="pixels_inside_wrap">0</property>
+				  <property name="left_margin">0</property>
+				  <property name="right_margin">0</property>
+				  <property name="indent">0</property>
+				  <property name="text" translatable="yes"></property>
+				</widget>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">1</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">5</property>
+			      <property name="bottom_attach">6</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Notes:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">1</property>
+			      <property name="top_attach">5</property>
+			      <property name="bottom_attach">6</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options">fill</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="placeholder_button">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">This account is present solely as a placeholder in the hierarchy.  Transactions may not be posted to this account, only to sub-accounts of this account.</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Placeholder</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">7</property>
+			      <property name="bottom_attach">8</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="tax_related_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Tax Related</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			    </widget>
+			    <packing>
+			      <property name="left_attach">0</property>
+			      <property name="right_attach">2</property>
+			      <property name="top_attach">6</property>
+			      <property name="bottom_attach">7</property>
+			      <property name="x_options">fill</property>
+			      <property name="y_options"></property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkTable" id="table4">
+		      <property name="visible">True</property>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">5</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">6</property>
+		      <property name="column_spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Account Type&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;Parent Account&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">3</property>
+			  <property name="right_attach">5</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">3</property>
+			  <property name="right_attach">4</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="parent_scroll">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_NONE</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="left_attach">4</property>
+			  <property name="right_attach">5</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="y_options">fill</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow7">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			  <property name="shadow_type">GTK_SHADOW_NONE</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkCList" id="type_list">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="n_columns">1</property>
+			      <property name="column_widths">80</property>
+			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			      <property name="show_titles">False</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477401">
+				  <property name="label" translatable="yes"></property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_options">fill</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkOptionMenu</class>
-		<name>account_scu</name>
-		<tooltip>Smallest fraction of this commodity that can be referenced.</tooltip>
-		<can_focus>True</can_focus>
-		<items>Use Commodity Value
-1
-1/10
-1/100
-1/1000
-1/10000
-1/100000
-1/1000000
-</items>
-		<initial_choice>0</initial_choice>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
+	  </child>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox65</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkLabel" id="label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">General</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame29</name>
-	    <label>Account Type</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow7</name>
-	      <border_width>3</border_width>
-	      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>GtkCList</class>
-		<name>type_list</name>
-		<can_focus>True</can_focus>
-		<columns>1</columns>
-		<column_widths>80</column_widths>
-		<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		<show_titles>False</show_titles>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label812</name>
-		  <label>label812</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkVBox" id="vbox118">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkFrame" id="opening_balance_frame">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox101">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox114">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847737">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Balance:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847738">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Date:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox115">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="opening_balance_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHBox" id="opening_balance_date_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<widget class="GnomeDateEdit" id="opening_balance_date_edit">
+				  <property name="visible">True</property>
+				  <property name="dateedit_flags">GNOME_DATE_EDIT_SHOW_TIME|GNOME_DATE_EDIT_24_HR</property>
+				  <property name="lower_hour">7</property>
+				  <property name="upper_hour">19</property>
+				</widget>
+				<packing>
+				  <property name="padding">0</property>
+				  <property name="expand">True</property>
+				  <property name="fill">True</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8477394">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Balance Information</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame30</name>
-	    <label>Parent Account</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>parent_scroll</name>
-	      <border_width>3</border_width>
-	      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
+	      <child>
+		<widget class="GtkFrame" id="frame49">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox120">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="opening_equity_radio">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Use Opening Balances Equity account</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="radiobutton8">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Select Transfer Account</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">opening_equity_radio</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8477395">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Transfer Type</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame32</name>
-	  <border_width>3</border_width>
-	  <label>Notes</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	      <child>
+		<widget class="GtkFrame" id="transfer_account_frame">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="sensitive">False</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="transfer_account_scroll">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8477396">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Transfer Account</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="tab_expand">False</property>
+	      <property name="tab_fill">True</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow9</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkText</class>
-	      <name>notes_text</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text></text>
+	  <child>
+	    <widget class="GtkLabel" id="label847739">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Opening Balance</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="type">tab</property>
+	    </packing>
+	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox104</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+<widget class="GtkWindow" id="Hierarchy Druid">
+  <property name="border_width">1</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">New Account Hierarchy Setup</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">640</property>
+  <property name="default_height">640</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="hierarchy_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+      <signal name="cancel" handler="on_cancel"/>
 
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>tax_related_button</name>
-	    <border_width>3</border_width>
-	    <can_focus>True</can_focus>
-	    <label>Tax Related</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-
-	  <widget>
-	    <class>GtkCheckButton</class>
-	    <name>placeholder_button</name>
-	    <border_width>3</border_width>
-	    <tooltip>This account is present solely as a placeholder in the hierarchy.  Transactions may not be posted to this account, only to sub-accounts of this account.</tooltip>
-	    <can_focus>True</can_focus>
-	    <label>Placeholder</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">New Account Hierarchy Setup</property>
+	  <property name="text" translatable="yes">This druid will help you create a set of GnuCash accounts for your assets (such as investments, checking or savings accounts), liabilities (such as loans) and different kinds of income and expenses you might have. 
+
+Click 'Cancel'  if you do not wish to create any new accounts now.</property>
 	</widget>
-      </widget>
+      </child>
 
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label8477388</name>
-	<label>General Information</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox118</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>opening_balance_frame</name>
-	  <border_width>3</border_width>
-	  <label>Balance Information</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="currency_choose_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Choose Currency</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="vbox2">
+	      <property name="border_width">20</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox101</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox114</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="newUserChooseCurrencyDescrip">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Please choose the currency to use for new accounts.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847737</name>
-		<label>Balance:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847738</name>
-		<label>Date:</label>
-		<justify>GTK_JUSTIFY_RIGHT</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox115</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkVBox" id="currency_chooser_vbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
+	    </widget>
+	  </child>
+	</widget>
+      </child>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>opening_balance_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="choose_account_types_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Choose accounts to create</property>
+	  <signal name="prepare" handler="on_choose_account_categories_prepare" last_modification_time="Sat, 18 Oct 2003 05:09:55 GMT"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox1">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkLabel" id="pickAccountsDescriptionLabel">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select categories that correspond to the ways that you will use GnuCash.  
+Each category you select will cause several accounts to be created.  
+Select the categories that are relevant to you.  You can always create 
+additional accounts by hand later.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	      <widget>
-		<class>GtkHBox</class>
-		<name>opening_balance_date_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
+	      <child>
+		<widget class="GtkFrame" id="frame5">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox7">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow1">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkTreeView" id="account_categories_tree_view">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="headers_visible">True</property>
+			      <property name="rules_hint">False</property>
+			      <property name="reorderable">False</property>
+			      <property name="enable_search">True</property>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox3">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkButton" id="select_all_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Select All</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <signal name="clicked" handler="select_all_clicked"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="clear_all_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Clear All</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			      <signal name="clicked" handler="clear_all_clicked"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkTable" id="table1">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">1</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">3</property>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame1">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow2">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkViewport" id="viewport1">
+			      <property name="visible">True</property>
+			      <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+			      <child>
+				<widget class="GtkLabel" id="account_types_description_entry">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes"></property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">True</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8477397">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Detailed Description</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame2">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow3">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkViewport" id="viewport2">
+			      <property name="visible">True</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			      <child>
+				<widget class="GtkHBox" id="accounts_in_category">
+				  <property name="visible">True</property>
+				  <property name="homogeneous">False</property>
+				  <property name="spacing">0</property>
+
+				  <child>
+				    <placeholder/>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8477398">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Accounts</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame49</name>
-	  <border_width>3</border_width>
-	  <label>Transfer Type</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="final_account_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Enter opening balances</property>
+	  <signal name="prepare" handler="on_final_account_prepare"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox3">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">10</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox120</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>opening_equity_radio</name>
-	      <can_focus>True</can_focus>
-	      <label>Use Opening Balances Equity account</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>transfer_type_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="finalAccountLabel">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">If you would like an account to have an opening balance, click on the
+account and enter the starting balance in the box on the right. All
+accounts except Equity and placeholder accounts may have an
+opening balance.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">1</property>
+		  <property name="ypad">1</property>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>radiobutton8</name>
-	      <can_focus>True</can_focus>
-	      <label>Select Transfer Account</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>transfer_type_group</group>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow4">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkViewport" id="viewport3">
+			  <property name="visible">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="final_account_tree_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox5">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkFrame" id="frame3">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <widget class="GtkVBox" id="start_balance_box">
+			      <property name="border_width">3</property>
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label8477399">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Opening Balance</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>transfer_account_frame</name>
-	  <border_width>3</border_width>
-	  <sensitive>False</sensitive>
-	  <label>Transfer Account</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+      <child>
+	<widget class="GnomeDruidPageEdge" id="newUserDruidFinishPage">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">Finish Account Setup</property>
+	  <property name="text" translatable="yes">Press `Apply' to create your new accounts.
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>transfer_account_scroll</name>
-	    <border_width>3</border_width>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
+Press `Back' to review your selections.
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+Press `Cancel' to close this dialog without creating any new accounts.</property>
+	  <signal name="finish" handler="on_finish"/>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<child_name>Notebook:tab</child_name>
-	<name>label847739</name>
-	<label>Opening Balance</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-      </widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>Hierarchy Druid</name>
-  <width>540</width>
-  <height>370</height>
-  <title>New Account Hierarchy Setup</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_MOUSE</position>
-  <modal>False</modal>
-  <default_width>640</default_width>
-  <default_height>640</default_height>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>hierarchy_druid</name>
-    <signal>
-      <name>cancel</name>
-      <handler>on_cancel</handler>
-      <last_modification_time>Sat, 16 Jun 2001 23:54:54 GMT</last_modification_time>
-    </signal>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start_page</name>
-      <title>New Account Hierarchy Setup</title>
-      <text>This druid will help you create a set of GnuCash 
-accounts for your assets (such as investments, 
-checking or savings accounts), liabilities (such 
-as loans) and different kinds of income and 
-expenses you might have. 
-
-Click 'Cancel'  if you do not wish to create any 
-new accounts now.</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
+<widget class="GtkDialog" id="Account Picker">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select Account</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">300</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>currency_choose_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>on_choose_currency_prepare</handler>
-	<last_modification_time>Sat, 16 Jun 2001 23:27:41 GMT</last_modification_time>
-      </signal>
-      <title>Choose Currency</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>vbox2</name>
-	<border_width>20</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>5</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>newUserChooseCurrencyDescrip</name>
-	  <label>Please choose the currency to use for new accounts.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="button1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>currency_chooser_vbox</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="button2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>choose_account_types_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>on_choose_account_types_prepare</handler>
-	<last_modification_time>Sat, 16 Jun 2001 23:59:57 GMT</last_modification_time>
-      </signal>
-      <title>Choose accounts to create</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox1</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>5</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>pickAccountsDescriptionLabel</name>
-	  <label>Select categories that correspond to the ways that you will use GnuCash.  
-Each category you select will cause several accounts to be created.  
-Select the categories that are relevant to you.  You can always create 
-additional accounts by hand later.</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
+      <child>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame5</name>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox7</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow1</name>
-	      <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkCList</class>
-		<name>account_types_clist</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>select_row</name>
-		  <handler>on_account_types_list_select_row</handler>
-		  <last_modification_time>Sun, 17 Jun 2001 00:18:23 GMT</last_modification_time>
-		</signal>
-		<signal>
-		  <name>unselect_row</name>
-		  <handler>on_account_types_list_unselect_row</handler>
-		  <last_modification_time>Sun, 17 Jun 2001 00:23:46 GMT</last_modification_time>
-		</signal>
-		<columns>2</columns>
-		<column_widths>144,80</column_widths>
-		<selection_mode>GTK_SELECTION_MULTIPLE</selection_mode>
-		<show_titles>True</show_titles>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>newAccountTypesList_TypeLabel</name>
-		  <label>Account Types</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
+		<widget class="GtkScrolledWindow" id="scrolledwindow24">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCTree" id="account_tree">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">1</property>
+		      <property name="column_widths">80</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">False</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label8477402">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
 		</widget>
+	      </child>
 
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>newAccountTypesList_DescriptionLabel</name>
-		  <label>Description</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox3</name>
-	      <border_width>5</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label8477400">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select or add a GnuCash account</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>select_all_button</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>clicked</name>
-		  <handler>select_all_clicked</handler>
-		  <last_modification_time>Sun, 17 Jun 2001 00:25:54 GMT</last_modification_time>
-		</signal>
-		<label>Select All</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>clear_all_button</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>clicked</name>
-		  <handler>clear_all_clicked</handler>
-		  <last_modification_time>Sun, 17 Jun 2001 00:28:18 GMT</last_modification_time>
-		</signal>
-		<label>Clear All</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox1</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame1</name>
-	    <label>Detailed Description</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow2</name>
-	      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>GtkViewport</class>
-		<name>viewport2</name>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>account_types_description_entry</name>
-		  <label></label>
-		  <justify>GTK_JUSTIFY_LEFT</justify>
-		  <wrap>True</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame2</name>
-	    <label>Accounts</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow3</name>
-	      <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>GtkViewport</class>
-		<name>viewport1</name>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkTree</class>
-		  <name>account_type_tree</name>
-		  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		  <view_mode>GTK_TREE_VIEW_LINE</view_mode>
-		  <view_line>True</view_line>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkButton" id="new_account_button">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">New Account (not implemented)</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <signal name="clicked" handler="gnc_ui_qif_account_picker_new_cb"/>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
     </widget>
+  </child>
+</widget>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>final_account_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>on_final_account_prepare</handler>
-	<last_modification_time>Sun, 17 Jun 2001 00:30:49 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>on_final_account_next</handler>
-	<last_modification_time>Sun, 17 Jun 2001 05:40:45 GMT</last_modification_time>
-      </signal>
-      <title>Enter opening balances</title>
-      <title_color>255,255,255</title_color>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox3</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>10</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>finalAccountLabel</name>
-	  <label>If you would like an account to have an opening balance, click on the account
-and enter the starting balance in the box on the right. All accounts except Equity
-and placeholder accounts may have an opening balance.</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>1</xpad>
-	  <ypad>1</ypad>
-	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
+<widget class="GtkWindow" id="relayout hierarchy">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="druid2">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+      <child>
+	<widget class="GnomeDruidPageEdge" id="druidpagestart1">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">New Account Hierarchy Setup</property>
+	  <property name="text" translatable="yes">This druid will help you create a set of GnuCash accounts for your assets (such as investments, checking or savings accounts), liabilities (such as loans) and different kinds of income and expenses you might have. 
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow4</name>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCTree</class>
-	      <name>final_account_ctree</name>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>tree_select_row</name>
-		<handler>on_final_account_tree_select_row</handler>
-		<last_modification_time>Sun, 17 Jun 2001 05:30:25 GMT</last_modification_time>
-	      </signal>
-	      <signal>
-		<name>tree_unselect_row</name>
-		<handler>on_final_account_tree_unselect_row</handler>
-		<last_modification_time>Sun, 17 Jun 2001 05:38:44 GMT</last_modification_time>
-	      </signal>
-	      <columns>3</columns>
-	      <column_widths>80,80,80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>True</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>cTreeAccountNameLabel</name>
-		<label>Account Name</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>cTreeTypeLabel</name>
-		<label>Type</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>cTreeOpeningBalanceLabel</name>
-		<label>Opening Balance</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
+Click 'Cancel'  if you do not wish to create any new accounts now.</property>
+	</widget>
+      </child>
+
+      <child>
+	<widget class="GnomeDruidPageStandard" id="druidpagestandard1">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes"></property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox4">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox5</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkCheckButton</class>
-	      <name>placeholder</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>toggled</name>
-		<handler>on_final_account_tree_placeholder_toggled</handler>
-		<last_modification_time>Fri, 05 Apr 2002 23:41:25 GMT</last_modification_time>
-	      </signal>
-	      <label>Placeholder</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkLabel" id="label8477407">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select categories that correspond to the ways that you will use GnuCash.  
+Each category you select will cause several accounts to be created.  
+Select the categories that are relevant to you.  You can always create 
+additional accounts by hand later.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>frame3</name>
-	      <label>Opening Balance</label>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		<widget class="GtkVBox" id="vbox124">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame53">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkAlignment" id="alignment4">
+			  <property name="visible">True</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xscale">1</property>
+			  <property name="yscale">1</property>
+			  <property name="top_padding">0</property>
+			  <property name="bottom_padding">0</property>
+			  <property name="left_padding">12</property>
+			  <property name="right_padding">0</property>
+
+			  <child>
+			    <widget class="GtkComboBox" id="combobox1">
+			      <property name="visible">True</property>
+			      <property name="items" translatable="yes">USD
+GBP
+EUR</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8477408">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">&lt;b&gt;New Account Currency&lt;/b&gt;</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">True</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>GtkVBox</class>
-		<name>start_balance_box</name>
-		<border_width>3</border_width>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkVBox" id="vbox122">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHPaned" id="hpaned1">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="position">0</property>
+
+		      <child>
+			<widget class="GtkVPaned" id="vpaned1">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="position">0</property>
+
+			  <child>
+			    <widget class="GtkFrame" id="Categories">
+			      <property name="visible">True</property>
+			      <property name="label_xalign">0</property>
+			      <property name="label_yalign">0.5</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			      <child>
+				<widget class="GtkAlignment" id="alignment3">
+				  <property name="visible">True</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xscale">1</property>
+				  <property name="yscale">1</property>
+				  <property name="top_padding">0</property>
+				  <property name="bottom_padding">0</property>
+				  <property name="left_padding">12</property>
+				  <property name="right_padding">0</property>
+
+				  <child>
+				    <widget class="GtkScrolledWindow" id="scrolledwindow28">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				      <property name="shadow_type">GTK_SHADOW_NONE</property>
+				      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+				      <child>
+					<widget class="GtkTreeView" id="treeview1">
+					  <property name="visible">True</property>
+					  <property name="can_focus">True</property>
+					  <property name="headers_visible">True</property>
+					  <property name="rules_hint">False</property>
+					  <property name="reorderable">False</property>
+					  <property name="enable_search">True</property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477406">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">&lt;b&gt;Categories&lt;/b&gt;</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">True</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="type">label_item</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="shrink">True</property>
+			      <property name="resize">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkFrame" id="frame50">
+			      <property name="visible">True</property>
+			      <property name="label_xalign">0</property>
+			      <property name="label_yalign">0.5</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			      <child>
+				<widget class="GtkAlignment" id="alignment1">
+				  <property name="visible">True</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xscale">1</property>
+				  <property name="yscale">1</property>
+				  <property name="top_padding">0</property>
+				  <property name="bottom_padding">0</property>
+				  <property name="left_padding">12</property>
+				  <property name="right_padding">0</property>
+
+				  <child>
+				    <widget class="GtkScrolledWindow" id="scrolledwindow27">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				      <property name="shadow_type">GTK_SHADOW_IN</property>
+				      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+				      <child>
+					<widget class="GtkTextView" id="textview1">
+					  <property name="visible">True</property>
+					  <property name="can_focus">True</property>
+					  <property name="editable">False</property>
+					  <property name="overwrite">False</property>
+					  <property name="accepts_tab">True</property>
+					  <property name="justification">GTK_JUSTIFY_LEFT</property>
+					  <property name="wrap_mode">GTK_WRAP_NONE</property>
+					  <property name="cursor_visible">True</property>
+					  <property name="pixels_above_lines">0</property>
+					  <property name="pixels_below_lines">0</property>
+					  <property name="pixels_inside_wrap">0</property>
+					  <property name="left_margin">0</property>
+					  <property name="right_margin">0</property>
+					  <property name="indent">0</property>
+					  <property name="text" translatable="yes"></property>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label8477404">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">&lt;b&gt;Description&lt;/b&gt;</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">True</property>
+				  <property name="justify">GTK_JUSTIFY_LEFT</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+				<packing>
+				  <property name="type">label_item</property>
+				</packing>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="shrink">True</property>
+			      <property name="resize">True</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="shrink">True</property>
+			  <property name="resize">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkFrame" id="frame51">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkAlignment" id="alignment2">
+			      <property name="visible">True</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xscale">1</property>
+			      <property name="yscale">1</property>
+			      <property name="top_padding">0</property>
+			      <property name="bottom_padding">0</property>
+			      <property name="left_padding">12</property>
+			      <property name="right_padding">0</property>
+
+			      <child>
+				<widget class="GtkScrolledWindow" id="scrolledwindow29">
+				  <property name="visible">True</property>
+				  <property name="can_focus">True</property>
+				  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+				  <property name="shadow_type">GTK_SHADOW_NONE</property>
+				  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+				  <child>
+				    <widget class="GtkTreeView" id="treeview2">
+				      <property name="visible">True</property>
+				      <property name="can_focus">True</property>
+				      <property name="headers_visible">True</property>
+				      <property name="rules_hint">False</property>
+				      <property name="reorderable">False</property>
+				      <property name="enable_search">True</property>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label8477405">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">&lt;b&gt;Contained Accounts&lt;/b&gt;</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">True</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="shrink">True</property>
+			  <property name="resize">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>Placeholder</class>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>newUserDruidFinishPage</name>
-      <signal>
-	<name>finish</name>
-	<handler>on_finish</handler>
-	<last_modification_time>Sat, 16 Jun 2001 23:41:40 GMT</last_modification_time>
-      </signal>
-      <title>Finish Account Setup</title>
-      <text>Press `Finish' to create your new accounts.
-
-Press `Back' to review your selections.
-
-Press `Cancel' to close this dialog without creating any new accounts.</text>
-      <background_color>25,25,112</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Account Picker</name>
-  <title>Select Account</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>300</default_width>
-  <default_height>400</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>1</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox1</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-	<pack>GTK_PACK_END</pack>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button2</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox2</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GnomeDruidPageStandard" id="druidpagestandard2">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes"></property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox5">
+	      <property name="border_width">16</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">6</property>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<label>Select or add a GnuCash account</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow24</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkCTree</class>
-	    <name>account_tree</name>
-	    <can_focus>True</can_focus>
-	    <columns>2</columns>
-	    <column_widths>214,48</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847711</name>
-	      <label>Account</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label8477409">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">If you would like an account to have an opening balance, click on the account
+and enter the starting balance in the box on the right. All accounts except Equity
+and placeholder accounts may have an opening balance.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">1</property>
+		  <property name="ypad">1</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847712</name>
-	      <label>New?</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow30">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTreeView" id="treeview3">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">False</property>
+		      <property name="reorderable">False</property>
+		      <property name="enable_search">True</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GtkButton</class>
-      <name>new_account_button</name>
-      <can_focus>True</can_focus>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_ui_qif_account_picker_new_cb</handler>
-	<data>QIF_Import_Account_Picker</data>
-	<last_modification_time>Sat, 10 Feb 2001 21:26:10 GMT</last_modification_time>
-      </signal>
-      <label>New Account (not implemented)</label>
-      <relief>GTK_RELIEF_NORMAL</relief>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GnomeDruidPageEdge" id="druidpagefinish1">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	</widget>
       </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/Makefile.am,v
retrieving revision 1.24
retrieving revision 1.25
diff -Lsrc/gnome/glade/Makefile.am -Lsrc/gnome/glade/Makefile.am -u -r1.24 -r1.25
--- src/gnome/glade/Makefile.am
+++ src/gnome/glade/Makefile.am
@@ -2,18 +2,21 @@
 glade_DATA = \
 	account.glade \
 	acctperiod.glade \
+	budget.glade \
+	chart-export.glade \
 	commodities.glade \
 	fincalc.glade \
-	help.glade \
 	lots.glade \
 	merge.glade \
 	newuser.glade \
 	price.glade \
 	print.glade \
 	progress.glade \
+	reconcile.glade \
 	register.glade \
 	stocks.glade \
 	tax.glade \
+	totd.glade \
 	userpass.glade \
 	sched-xact.glade
 
Index: progress.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/progress.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/glade/progress.glade -Lsrc/gnome/glade/progress.glade -u -r1.2 -r1.3
--- src/gnome/glade/progress.glade
+++ src/gnome/glade/progress.glade
@@ -1,112 +1,104 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="Progress Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Working...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkVBox" id="vbox85">
+      <property name="border_width">5</property>
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">5</property>
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Progress Dialog</name>
-  <title>Working...</title>
-  <type>GTK_WINDOW_DIALOG</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkVBox</class>
-    <name>vbox85</name>
-    <border_width>5</border_width>
-    <homogeneous>False</homogeneous>
-    <spacing>5</spacing>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>heading_label</name>
-      <label>Heading</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkLabel" id="heading_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Heading</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkProgressBar</class>
-      <name>progress_bar</name>
-      <value>0</value>
-      <lower>0</lower>
-      <upper>100</upper>
-      <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
-      <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
-      <activity_mode>False</activity_mode>
-      <show_text>True</show_text>
-      <format>%P %%</format>
-      <text_xalign>0.5</text_xalign>
-      <text_yalign>0.5</text_yalign>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkProgressBar" id="progress_bar">
+	  <property name="visible">True</property>
+	  <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+	  <property name="fraction">0</property>
+	  <property name="pulse_step">0.1</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkHButtonBox</class>
-      <name>hbuttonbox3</name>
-      <layout_style>GTK_BUTTONBOX_DEFAULT_STYLE</layout_style>
-      <spacing>30</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	<widget class="GtkHButtonBox" id="hbuttonbox3">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+	  <property name="spacing">30</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="sensitive">False</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<sensitive>False</sensitive>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-	<relief>GTK_RELIEF_NORMAL</relief>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<visible>False</visible>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-	<relief>GTK_RELIEF_NORMAL</relief>
-      </widget>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
--- src/gnome/glade/help.glade
+++ /dev/null
@@ -1,342 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-  <output_translatable_strings>True</output_translatable_strings>
-  <translatable_strings_file>help_strings.c</translatable_strings_file>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Help Window</name>
-  <title>GnuCash Help</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkVBox</class>
-    <name>vbox90</name>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-
-    <widget>
-      <class>GtkHandleBox</class>
-      <name>handlebox1</name>
-      <shadow_type>GTK_SHADOW_OUT</shadow_type>
-      <handle_position>GTK_POS_LEFT</handle_position>
-      <snap_edge>GTK_POS_TOP</snap_edge>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-
-      <widget>
-	<class>GtkToolbar</class>
-	<name>help_toolbar</name>
-	<border_width>2</border_width>
-	<orientation>GTK_ORIENTATION_HORIZONTAL</orientation>
-	<type>GTK_TOOLBAR_BOTH</type>
-	<space_size>5</space_size>
-	<space_style>GTK_TOOLBAR_SPACE_LINE</space_style>
-	<relief>GTK_RELIEF_NONE</relief>
-	<tooltips>True</tooltips>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkHPaned</class>
-      <name>help_paned</name>
-      <handle_size>10</handle_size>
-      <gutter_size>15</gutter_size>
-      <position>200</position>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkNotebook</class>
-	<name>notebook3</name>
-	<can_focus>True</can_focus>
-	<show_tabs>True</show_tabs>
-	<show_border>True</show_border>
-	<tab_pos>GTK_POS_BOTTOM</tab_pos>
-	<scrollable>False</scrollable>
-	<tab_hborder>2</tab_hborder>
-	<tab_vborder>2</tab_vborder>
-	<popup_enable>False</popup_enable>
-	<child>
-	  <shrink>True</shrink>
-	  <resize>False</resize>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow15</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkViewport</class>
-	    <name>viewport3</name>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkCTree</class>
-	      <name>help_topics_tree</name>
-	      <can_focus>True</can_focus>
-	      <columns>1</columns>
-	      <column_widths>80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>False</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CTree:title</child_name>
-		<name>label847</name>
-		<label>Help Topics</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label847666</name>
-	  <label>Topics</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame37</name>
-	  <label>Search GnuCash Help</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox91</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>5</spacing>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label849</name>
-	      <label>Search Term:</label>
-	      <justify>GTK_JUSTIFY_LEFT</justify>
-	      <wrap>False</wrap>
-	      <xalign>7.45058e-09</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>help_search_entry</name>
-	      <tooltip>Type a single term into the box and hit 'search'. At the moment, this search engine does not support complex searches, just single words.</tooltip>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox80</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>help_search_button</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>clicked</name>
-		  <handler>gnc_help_window_search_button_cb</handler>
-		  <data>Help_Window</data>
-		  <last_modification_time>Fri, 15 Dec 2000 18:13:53 GMT</last_modification_time>
-		</signal>
-		<label>Search</label>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>help_search_help_button</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>clicked</name>
-		  <handler>gnc_help_window_search_help_button_cb</handler>
-		  <data>Help_Window</data>
-		  <last_modification_time>Fri, 15 Dec 2000 18:14:21 GMT</last_modification_time>
-		</signal>
-		<label>Help</label>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>frame38</name>
-	      <label>Search results</label>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>scrolledwindow16</name>
-		<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-		<widget>
-		  <class>GtkViewport</class>
-		  <name>viewport4</name>
-		  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		  <widget>
-		    <class>GtkList</class>
-		    <name>search_results_list</name>
-		    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		  </widget>
-		</widget>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <child_name>Notebook:tab</child_name>
-	  <name>label848</name>
-	  <label>Search</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>help_html_vbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <shrink>False</shrink>
-	  <resize>True</resize>
-	</child>
-
-	<widget>
-	  <class>Placeholder</class>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>statusbar_hbox</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>5</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	    <pack>GTK_PACK_END</pack>
-	  </child>
-
-	  <widget>
-	    <class>GtkStatusbar</class>
-	    <name>help_statusbar</name>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-</GTK-Interface>
Index: stocks.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome/glade/stocks.glade,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome/glade/stocks.glade -Lsrc/gnome/glade/stocks.glade -u -r1.2 -r1.3
--- src/gnome/glade/stocks.glade
+++ src/gnome/glade/stocks.glade
@@ -1,706 +1,824 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>Stock Split Druid</name>
-  <title>Stock Split</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>stock_split_druid</name>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start_page</name>
-      <title></title>
-      <text>This druid will help you record a stock split or stock merger.</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>account_page</name>
-      <title>Stock Account</title>
-      <title_color>255,255,255</title_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>vbox98</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847677</name>
-	  <label>Select the account for which you want to record a stock split or merger.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkAlignment</class>
-	  <name>alignment1</name>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xscale>1</xscale>
-	  <yscale>1</yscale>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow21</name>
-	    <border_width>10</border_width>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>account_clist</name>
-	      <can_focus>True</can_focus>
-	      <columns>3</columns>
-	      <column_widths>80,80,80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>True</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label847678</name>
-		<label>Account</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label847679</name>
-		<label>Symbol</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label847680</name>
-		<label>Shares</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>details_page</name>
-      <title>Stock Split Details</title>
-      <title_color>255,255,255</title_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox32</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>10</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847681</name>
-	  <label>Enter the date and the number of shares you gained or lost from the stock split or merger.
-For stock mergers (negative splits) use a negative value for the share distribution.
-You can also enter a description of the transaction, or accept the default one.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+<widget class="GtkWindow" id="Stock Split Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Stock Split</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <signal name="destroy" handler="gnc_stock_split_druid_window_destroy_cb" last_modification_time="Sat, 23 Aug 2003 22:43:04 GMT"/>
+
+  <child>
+    <widget class="GnomeDruid" id="stock_split_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+      <signal name="cancel" handler="gnc_stock_split_druid_cancel_druid" last_modification_time="Sat, 23 Aug 2003 22:42:56 GMT"/>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes"></property>
+	  <property name="text" translatable="yes">This druid will help you record a stock split or stock merger.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#666666669999</property>
+	  <property name="logo_background_color">#666666669999</property>
+	  <property name="textbox_color">#ffffffffffff</property>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox86</name>
-	  <border_width>10</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>4</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox100</name>
-	    <border_width>2</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>4</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847683</name>
-	      <label>Date:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847684</name>
-	      <label>Share Distribution:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847693</name>
-	      <label>Description:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox101</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>4</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>date_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>distribution_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>description_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text>Stock Split</text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="account_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Stock Account</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669999</property>
+	  <property name="logo_background">#666666669999</property>
+	  <signal name="next" handler="gnc_stock_split_druid_account_next" last_modification_time="Sat, 23 Aug 2003 22:43:13 GMT"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="vbox98">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847677">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select the account for which you want to record a stock split or merger.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow21">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="account_clist">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">3</property>
+			  <property name="column_widths">80,80,80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847718">
+			      <property name="label" translatable="yes">Account</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847719">
+			      <property name="label" translatable="yes">Symbol</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847720">
+			      <property name="label" translatable="yes">Shares</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator2</name>
-	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
 	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847691</name>
-	  <label>If you want to record a stock price for the split, enter it below.
-You may safely leave it blank.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox93</name>
-	  <border_width>10</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>4</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox107</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>4</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847692</name>
-	      <label>New Price:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label847715</name>
-	      <label>Currency:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="details_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Stock Split Details</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669999</property>
+	  <property name="logo_background">#666666669999</property>
+	  <signal name="prepare" handler="gnc_stock_split_druid_details_prepare" last_modification_time="Sat, 23 Aug 2003 22:44:51 GMT"/>
+	  <signal name="next" handler="gnc_stock_split_druid_details_next" last_modification_time="Sat, 23 Aug 2003 22:45:27 GMT"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox32">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">10</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847681">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Enter the date and the number of shares you gained or lost from the stock split or merger.
+For stock mergers (negative splits) use a negative value for the share distribution.
+You can also enter a description of the transaction, or accept the default one.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox86">
+		  <property name="border_width">10</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">4</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox100">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">4</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847683">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847684">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Share Distribution:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847693">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Description:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox101">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">4</property>
+
+		      <child>
+			<widget class="GtkHBox" id="date_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="distribution_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="description_entry">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">True</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes">Stock Split</property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox108</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>4</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>price_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkHSeparator" id="hseparator2">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>price_currency_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<widget class="GtkLabel" id="label847691">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">If you want to record a stock price for the split, enter it below.
+You may safely leave it blank.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox93">
+		  <property name="border_width">10</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">4</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox107">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">4</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847692">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">New Price:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847715">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Currency:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox108">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">4</property>
+
+		      <child>
+			<widget class="GtkHBox" id="price_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="price_currency_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>cash_page</name>
-      <title>Cash In Lieu</title>
-      <title_color>255,255,255</title_color>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox33</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847687</name>
-	  <label>If you received a cash disbursement as a result of the stock split,
-enter the details of that payment here. Otherwise, just click `Next'.</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
 	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox102</name>
-	  <border_width>5</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>10</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox87</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox103</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>2</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847688</name>
-		<label>Cash Amount:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label847689</name>
-		<label>Memo:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox104</name>
-	      <homogeneous>True</homogeneous>
-	      <spacing>2</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>cash_box</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="cash_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Cash In Lieu</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#666666669999</property>
+	  <property name="logo_background">#666666669999</property>
+	  <signal name="prepare" handler="gnc_stock_split_druid_cash_prepare" last_modification_time="Sat, 23 Aug 2003 22:55:18 GMT"/>
+	  <signal name="next" handler="gnc_stock_split_druid_cash_next" last_modification_time="Sat, 23 Aug 2003 22:55:44 GMT"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox33">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847687">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">If you received a cash disbursement as a result of the stock split,
+enter the details of that payment here. Otherwise, just click `Next'.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkEntry</class>
-		<name>memo_entry</name>
-		<can_focus>True</can_focus>
-		<editable>True</editable>
-		<text_visible>True</text_visible>
-		<text_max_length>0</text_max_length>
-		<text>Cash In Lieu</text>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox88</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>2</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>frame43</name>
-	      <label>Income Account</label>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>income_scroll</name>
-		<border_width>3</border_width>
-		<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-		<widget>
-		  <class>Placeholder</class>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox102">
+		  <property name="border_width">5</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">10</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox87">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox103">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847688">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Cash Amount:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847689">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Memo:</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">1</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox104">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">True</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkHBox" id="cash_box">
+			      <property name="visible">True</property>
+			      <property name="homogeneous">False</property>
+			      <property name="spacing">0</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkEntry" id="memo_entry">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="editable">True</property>
+			      <property name="visibility">True</property>
+			      <property name="max_length">0</property>
+			      <property name="text" translatable="yes">Cash In Lieu</property>
+			      <property name="has_frame">True</property>
+			      <property name="invisible_char" translatable="yes">*</property>
+			      <property name="activates_default">False</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox88">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkFrame" id="frame43">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="income_scroll">
+			      <property name="border_width">3</property>
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="shadow_type">GTK_SHADOW_NONE</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847716">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Income Account</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkFrame" id="frame44">
+			  <property name="visible">True</property>
+			  <property name="label_xalign">0</property>
+			  <property name="label_yalign">0.5</property>
+			  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+			  <child>
+			    <widget class="GtkScrolledWindow" id="asset_scroll">
+			      <property name="border_width">3</property>
+			      <property name="visible">True</property>
+			      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			      <property name="shadow_type">GTK_SHADOW_NONE</property>
+			      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			      <child>
+				<placeholder/>
+			      </child>
+			    </widget>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label847717">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes">Asset Account</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="type">label_item</property>
+			    </packing>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkFrame</class>
-	      <name>frame44</name>
-	      <label>Asset Account</label>
-	      <label_xalign>0</label_xalign>
-	      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>GtkScrolledWindow</class>
-		<name>asset_scroll</name>
-		<border_width>3</border_width>
-		<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-		<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-		<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-		<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>finish_page</name>
-      <title></title>
-      <text>If you are finished creating the stock split or merger, press `Finish'.
+      <child>
+	<widget class="GnomeDruidPageEdge" id="finish_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes"></property>
+	  <property name="text" translatable="yes">If you are finished creating the stock split or merger, press `Finish'.
 You may also press `Back' to review your choices, or `Cancel' to
-quit without making any changes.</text>
-      <background_color>102,102,153</background_color>
-      <logo_background_color>102,102,153</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
+quit without making any changes.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#666666669999</property>
+	  <property name="logo_background_color">#666666669999</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="finish" handler="gnc_stock_split_druid_finish" last_modification_time="Sat, 23 Aug 2003 22:56:22 GMT"/>
+	</widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
--- src/gnome-search/gw-gnome-search-spec.scm
+++ /dev/null
@@ -1,50 +0,0 @@
-;;; -*-scheme-*-
-
-;(debug-enable 'backtrace)
-;(debug-enable 'debug)
-;(read-enable 'positions)
-
-(debug-set! maxdepth 100000)
-(debug-set! stack    2000000)
-
-(define-module (g-wrapped gw-gnome-search-spec)
-  :use-module (g-wrap))
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-(use-modules (g-wrap gw-wct-spec))
-
-(use-modules (g-wrapped gw-gnome-utils-spec))
-
-(let ((ws (gw:new-wrapset "gw-gnome-search")))
-
-  (gw:wrapset-depends-on ws "gw-standard")
-  (gw:wrapset-depends-on ws "gw-engine")
-  (gw:wrapset-depends-on ws "gw-gnome-utils")
-
-  (gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnome-search))
-
-  (gw:wrapset-add-cs-declarations!
-   ws
-   (lambda (wrapset client-wrapset)
-     (list
-      "#include <dialog-search.h>\n"
-      )))
-
-  (gw:wrapset-add-cs-initializers!
-   ws
-   (lambda (wrapset client-wrapset status-var) 
-     (if client-wrapset
-         '()
-         (gw:inline-scheme '(use-modules (gnucash gnome-search))))))
-
-  (gw:wrap-function
-   ws
-   'gnc:search-dialog-test
-   '<gw:void>
-   "gnc_search_dialog_test"
-   '()
-   "Dialog: create a test Search Dialog.")
-
-)
Index: search-int64.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-int64.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-search/search-int64.c -Lsrc/gnome-search/search-int64.c -u -r1.6 -r1.7
--- src/gnome-search/search-int64.c
+++ src/gnome-search/search-int64.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gnc-amount-edit.h"
 #include "QueryCore.h"
@@ -31,7 +31,7 @@
 
 #define d(x)
 
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static void grab_focus (GNCSearchCoreType *fe);
 static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe);
 static gboolean gncs_validate (GNCSearchCoreType *fe);
@@ -40,7 +40,7 @@
 
 static void gnc_search_int64_class_init	(GNCSearchInt64Class *class);
 static void gnc_search_int64_init	(GNCSearchInt64 *gspaper);
-static void gnc_search_int64_finalise	(GtkObject *obj);
+static void gnc_search_int64_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchInt64 *)(x))->priv)
 
@@ -51,31 +51,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_int64_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchInt64",
-      sizeof(GNCSearchInt64),
-      sizeof(GNCSearchInt64Class),
-      (GtkClassInitFunc)gnc_search_int64_class_init,
-      (GtkObjectInitFunc)gnc_search_int64_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchInt64Class),      /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_int64_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchInt64),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_int64_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchInt64",
+				   &type_info, 0);
   }
 	
   return type;
@@ -84,13 +80,13 @@
 static void
 gnc_search_int64_class_init (GNCSearchInt64Class *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_int64_finalise;
+  object_class->finalize = gnc_search_int64_finalize;
 
   /* override methods */
   gnc_search_core_type->editable_enters = editable_enters;
@@ -99,11 +95,6 @@
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -114,14 +105,14 @@
 }
 
 static void
-gnc_search_int64_finalise (GtkObject *obj)
+gnc_search_int64_finalize (GObject *obj)
 {
   GNCSearchInt64 *o = (GNCSearchInt64 *)obj;
   g_assert (IS_GNCSEARCH_INT64 (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -134,7 +125,7 @@
 GNCSearchInt64 *
 gnc_search_int64_new (void)
 {
-  GNCSearchInt64 *o = (GNCSearchInt64 *)gtk_type_new(gnc_search_int64_get_type ());
+  GNCSearchInt64 *o = g_object_new(gnc_search_int64_get_type (), NULL);
   return o;
 }
 
@@ -173,7 +164,7 @@
 option_changed (GtkWidget *widget, GNCSearchInt64 *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -189,8 +180,8 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -222,7 +213,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -241,16 +232,15 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   GNCSearchInt64 *fi = (GNCSearchInt64 *)fe;
 
   g_return_if_fail (fi);
   g_return_if_fail (IS_GNCSEARCH_INT64 (fi));
-  g_return_if_fail (dialog);
 
   if (fi->priv->entry)
-    gnome_dialog_editable_enters (dialog, GTK_EDITABLE (fi->priv->entry));
+    gtk_entry_set_activates_default(GTK_ENTRY (fi->priv->entry), TRUE);
 }
 
 static GtkWidget *
@@ -276,7 +266,7 @@
     gnc_numeric value = gnc_numeric_create (fi->value, 1);
     gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (entry), value);
   }
-  gtk_signal_connect (GTK_OBJECT (entry), "amount_changed", entry_changed, fe);
+  g_signal_connect (G_OBJECT (entry), "amount_changed", G_CALLBACK (entry_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
   fi->priv->entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (entry));
   fi->priv->gae = GNC_AMOUNT_EDIT (entry);
--- src/gnome-search/gnome-search.scm
+++ /dev/null
@@ -1 +0,0 @@
-(define-module (gnucash gnome-search))
Index: search-string.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-string.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-search/search-string.c -Lsrc/gnome-search/search-string.c -u -r1.7 -r1.8
--- src/gnome-search/search-string.c
+++ src/gnome-search/search-string.c
@@ -25,14 +25,14 @@
 #include <string.h>
 #include <sys/types.h>
 #include <regex.h>
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "search-string.h"
 #include "QueryCore.h"
 
 #define d(x)
 
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static void grab_focus (GNCSearchCoreType *fe);
 static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe);
 static gboolean gncs_validate (GNCSearchCoreType *fe);
@@ -41,7 +41,7 @@
 
 static void gnc_search_string_class_init	(GNCSearchStringClass *class);
 static void gnc_search_string_init	(GNCSearchString *gspaper);
-static void gnc_search_string_finalise	(GtkObject *obj);
+static void gnc_search_string_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchString *)(x))->priv)
 
@@ -51,31 +51,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_string_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchString",
-      sizeof(GNCSearchString),
-      sizeof(GNCSearchStringClass),
-      (GtkClassInitFunc)gnc_search_string_class_init,
-      (GtkObjectInitFunc)gnc_search_string_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchStringClass),     /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_string_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchString),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_string_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchString",
+				   &type_info, 0);
   }
 	
   return type;
@@ -84,13 +80,13 @@
 static void
 gnc_search_string_class_init (GNCSearchStringClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_string_finalise;
+  object_class->finalize = gnc_search_string_finalize;
 
   /* override methods */
   gnc_search_core_type->editable_enters = editable_enters;
@@ -99,11 +95,6 @@
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -116,7 +107,7 @@
 }
 
 static void
-gnc_search_string_finalise (GtkObject *obj)
+gnc_search_string_finalize (GObject *obj)
 {
   GNCSearchString *o = (GNCSearchString *)obj;
   g_assert (IS_GNCSEARCH_STRING (o));
@@ -124,7 +115,7 @@
   g_free (o->value);
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -137,7 +128,7 @@
 GNCSearchString *
 gnc_search_string_new (void)
 {
-  GNCSearchString *o = (GNCSearchString *)gtk_type_new(gnc_search_string_get_type ());
+  GNCSearchString *o = g_object_new(gnc_search_string_get_type (), NULL);
   return o;
 }
 
@@ -180,8 +171,13 @@
 	
   if (!fi->value || *(fi->value) == '\0') {
     GtkWidget *dialog;
-    dialog = gnome_ok_dialog (_("You need to enter a string value"));
-    gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+    dialog = gtk_message_dialog_new (NULL,
+				     GTK_DIALOG_MODAL,
+				     GTK_MESSAGE_ERROR,
+				     GTK_BUTTONS_OK,
+				     _("You need to enter a string value"));
+    gtk_dialog_run (GTK_DIALOG (dialog));
+    gtk_widget_destroy(dialog);
     return FALSE;
   }
 
@@ -210,10 +206,13 @@
 				fi->value, regmsg);
       g_free (regmsg);
 			
-      dialog = gnome_ok_dialog (errmsg);
-			
-      gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-			
+      dialog = gtk_message_dialog_new (NULL,
+				       GTK_DIALOG_MODAL,
+				       GTK_MESSAGE_ERROR,
+				       GTK_BUTTONS_OK,
+				       errmsg);
+      gtk_dialog_run (GTK_DIALOG (dialog));
+      gtk_widget_destroy(dialog);
       g_free (errmsg);
       valid = FALSE;
     }
@@ -234,13 +233,13 @@
 option_changed (GtkWidget *widget, GNCSearchString *fe)
 {
   fe->how = (GNCSearchString_Type)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
 entry_changed (GtkEntry *entry, GNCSearchString *fe)
 {
-  char *new;
+  const char *new;
 	
   new = gtk_entry_get_text(entry);
   gnc_search_string_set_value (fe, new);
@@ -251,8 +250,8 @@
 	       GNCSearchString_Type option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -286,7 +285,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -305,16 +304,15 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   GNCSearchString *fi = (GNCSearchString *)fe;
 
   g_return_if_fail (fi);
   g_return_if_fail (IS_GNCSEARCH_STRING (fi));
-  g_return_if_fail (dialog);
 
   if (fi->priv->entry)
-    gnome_dialog_editable_enters (dialog, GTK_EDITABLE (fi->priv->entry));
+    gtk_entry_set_activates_default(GTK_ENTRY (fi->priv->entry), TRUE);
 }
 
 static GtkWidget *
@@ -336,14 +334,14 @@
   entry = gtk_entry_new ();
   if (fi->value)
     gtk_entry_set_text (GTK_ENTRY (entry), fi->value);
-  gtk_signal_connect (GTK_OBJECT (entry), "changed", entry_changed, fe);
+  g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (entry_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
   fi->priv->entry = entry;
 
   /* Build and connect the toggle button */
   toggle = gtk_toggle_button_new_with_label (_("Case Insensitive?"));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), fi->ign_case);
-  gtk_signal_connect (GTK_OBJECT(toggle), "toggled", toggle_changed, fe);
+  g_signal_connect (G_OBJECT(toggle), "toggled", G_CALLBACK (toggle_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), toggle, FALSE, FALSE, 3);
 
   /* And return the box */
Index: search-core-type.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-core-type.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/gnome-search/search-core-type.c -Lsrc/gnome-search/search-core-type.c -u -r1.10 -r1.11
--- src/gnome-search/search-core-type.c
+++ src/gnome-search/search-core-type.c
@@ -23,7 +23,7 @@
 #endif
 
 #include <string.h>
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "QueryCore.h"
 #include "QueryNew.h"
@@ -41,12 +41,12 @@
 #include "search-account.h"
 
 static void grab_focus (GNCSearchCoreType *fe);
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static gboolean validate (GNCSearchCoreType *fe);
 
 static void gnc_search_core_type_class_init	(GNCSearchCoreTypeClass *class);
 static void gnc_search_core_type_init	(GNCSearchCoreType *gspaper);
-static void gnc_search_core_type_finalise	(GtkObject *obj);
+static void gnc_search_core_type_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchCoreType *)(x))->priv)
 struct _GNCSearchCoreTypePrivate {
@@ -54,57 +54,46 @@
 
 static GtkObjectClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
 static GHashTable *typeTable = NULL;
 
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
-guint
+GType
 gnc_search_core_type_get_type (void)
 {
-  static guint type = 0;
-	
-  if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchCoreType",
-      sizeof(GNCSearchCoreType),
-      sizeof(GNCSearchCoreTypeClass),
-      (GtkClassInitFunc)gnc_search_core_type_class_init,
-      (GtkObjectInitFunc)gnc_search_core_type_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+  static GType type = 0;
+
+  if (type == 0) {
+    GTypeInfo type_info = {
+      sizeof (GNCSearchCoreTypeClass),
+      NULL,
+      NULL,
+      (GClassInitFunc)gnc_search_core_type_class_init,
+      NULL,
+      NULL,
+      sizeof (GNCSearchCoreType),
+      0,
+      (GInstanceInitFunc)gnc_search_core_type_init
     };
 		
-    type = gtk_type_unique(gtk_object_get_type (), &type_info);
+    type = g_type_register_static (G_TYPE_OBJECT, "GNCSearchCoreType", &type_info, 0);
   }
-	
+  
   return type;
 }
 
 static void
-gnc_search_core_type_class_init (GNCSearchCoreTypeClass *class)
+gnc_search_core_type_class_init (GNCSearchCoreTypeClass *klass)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
 	
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class (gtk_object_get_type ());
+  object_class = G_OBJECT_CLASS (klass);
+  parent_class = g_type_class_peek_parent (klass);
 
-  object_class->finalize = gnc_search_core_type_finalise;
+  object_class->finalize = gnc_search_core_type_finalize;
 
   /* override methods */
-  class->validate = validate;
-  class->grab_focus = grab_focus;
-  class->editable_enters = editable_enters;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-#endif
+  klass->validate = validate;
+  klass->grab_focus = grab_focus;
+  klass->editable_enters = editable_enters;
 }
 
 static void
@@ -114,11 +103,12 @@
 }
 
 static void
-gnc_search_core_type_finalise (GtkObject *obj)
+gnc_search_core_type_finalize (GObject *obj)
 {
   GNCSearchCoreType *o = (GNCSearchCoreType *)obj;
   g_free(o->priv);
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -131,27 +121,29 @@
 GNCSearchCoreType *
 gnc_search_core_type_new (void)
 {
-  GNCSearchCoreType *o = (GNCSearchCoreType *)gtk_type_new(gnc_search_core_type_get_type ());
+  GNCSearchCoreType *o;
+
+  o = g_object_new (GNC_TYPE_SEARCH_CORE_TYPE, NULL);
+
   return o;
 }
 
 void
-gnc_search_core_type_editable_enters (GNCSearchCoreType *fe,
-				      GnomeDialog *dialog)
+gnc_search_core_type_editable_enters (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->editable_enters (fe, dialog);
+  GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->editable_enters (fe);
 }
 
 void
 gnc_search_core_type_grab_focus (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->grab_focus (fe);
+  GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->grab_focus (fe);
 }
 
 gboolean
 gnc_search_core_type_validate (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->validate (fe);
+  return GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->validate (fe);
 }
 
 /**
@@ -165,7 +157,7 @@
 GNCSearchCoreType *
 gnc_search_core_type_clone (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->clone(fe);
+  return GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->clone(fe);
 }
 
 /**
@@ -180,7 +172,7 @@
 GtkWidget *
 gnc_search_core_type_get_widget (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->get_widget(fe);
+  return GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->get_widget(fe);
 }
 
 /**
@@ -194,7 +186,7 @@
 QueryPredData_t
 gnc_search_core_type_get_predicate (GNCSearchCoreType *fe)
 {
-  return ((GNCSearchCoreTypeClass *)((GtkObject *)fe)->klass)->get_predicate(fe);
+  return GNC_SEARCH_CORE_TYPE_GET_CLASS (fe)->get_predicate(fe);
 }
 
 /**
@@ -210,7 +202,7 @@
 {
   GNCSearchCoreNew fcn;
 
-  g_return_val_if_fail (typeTable, NULL);
+  g_return_val_if_fail (typeTable != NULL, NULL);
 
   if (type == NULL)
     return NULL;
@@ -238,7 +230,7 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   return;
 }
@@ -248,6 +240,7 @@
 {
   g_return_if_fail (type_name || *type_name || fcn);
   g_return_if_fail (typeTable);
+
   g_hash_table_insert (typeTable, (char *) type_name, (gpointer) fcn);
 }
 
@@ -272,17 +265,17 @@
   gnc_search_core_register_type (GNC_ID_ACCOUNT,
 				 (GNCSearchCoreNew) gnc_search_account_new);
   gnc_search_core_register_type (ACCOUNT_MATCH_ALL_TYPE,
-				 (GNCSearchCoreNew) 
+				 (GNCSearchCoreNew)
 				 gnc_search_account_matchall_new);
   gnc_search_core_register_type (RECONCILED_MATCH_TYPE,
 				 (GNCSearchCoreNew) gnc_search_reconciled_new);
-
 }
 
 void
 gnc_search_core_initialize (void)
 {
   g_return_if_fail (typeTable == NULL);
+
   typeTable = g_hash_table_new (g_str_hash, g_str_equal);
   init_table ();
 }
@@ -290,7 +283,8 @@
 void
 gnc_search_core_finalize (void)
 {
-  g_return_if_fail (typeTable);
+  g_return_if_fail (typeTable != NULL);
+
   g_hash_table_destroy (typeTable);
   typeTable = NULL;
 }
Index: search-numeric.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-numeric.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-search/search-numeric.c -Lsrc/gnome-search/search-numeric.c -u -r1.7 -r1.8
--- src/gnome-search/search-numeric.c
+++ src/gnome-search/search-numeric.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gnc-amount-edit.h"
 #include "QueryCore.h"
@@ -31,7 +31,7 @@
 
 #define d(x)
 
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static void grab_focus (GNCSearchCoreType *fe);
 static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe);
 static gboolean gncs_validate (GNCSearchCoreType *fe);
@@ -40,7 +40,7 @@
 
 static void gnc_search_numeric_class_init	(GNCSearchNumericClass *class);
 static void gnc_search_numeric_init	(GNCSearchNumeric *gspaper);
-static void gnc_search_numeric_finalise	(GtkObject *obj);
+static void gnc_search_numeric_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchNumeric *)(x))->priv)
 
@@ -52,31 +52,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_numeric_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchNumeric",
-      sizeof(GNCSearchNumeric),
-      sizeof(GNCSearchNumericClass),
-      (GtkClassInitFunc)gnc_search_numeric_class_init,
-      (GtkObjectInitFunc)gnc_search_numeric_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchNumericClass),    /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_numeric_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchNumeric),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_numeric_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchNumeric",
+				   &type_info, 0);
   }
 	
   return type;
@@ -85,13 +81,13 @@
 static void
 gnc_search_numeric_class_init (GNCSearchNumericClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_numeric_finalise;
+  object_class->finalize = gnc_search_numeric_finalize;
 
   /* override methods */
   gnc_search_core_type->editable_enters = editable_enters;
@@ -100,11 +96,6 @@
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -117,14 +108,14 @@
 }
 
 static void
-gnc_search_numeric_finalise (GtkObject *obj)
+gnc_search_numeric_finalize (GObject *obj)
 {
   GNCSearchNumeric *o = (GNCSearchNumeric *)obj;
   g_assert (IS_GNCSEARCH_NUMERIC (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -137,7 +128,7 @@
 GNCSearchNumeric *
 gnc_search_numeric_new (void)
 {
-  GNCSearchNumeric *o = (GNCSearchNumeric *)gtk_type_new(gnc_search_numeric_get_type ());
+  GNCSearchNumeric *o = g_object_new(gnc_search_numeric_get_type (), NULL);
   return o;
 }
 
@@ -151,7 +142,7 @@
 GNCSearchNumeric *
 gnc_search_numeric_debcred_new (void)
 {
-  GNCSearchNumeric *o = (GNCSearchNumeric *)gtk_type_new(gnc_search_numeric_get_type ());
+  GNCSearchNumeric *o = g_object_new(gnc_search_numeric_get_type (), NULL);
   o->priv->is_debcred = TRUE;
   return o;
 }
@@ -199,14 +190,14 @@
 how_option_changed (GtkWidget *widget, GNCSearchNumeric *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
 option_changed (GtkWidget *widget, GNCSearchNumeric *fe)
 {
   fe->option = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -217,11 +208,11 @@
 
 static GtkWidget *
 add_menu_item (GtkWidget *menu, gpointer user_data, char *label,
-	       query_compare_t option, GtkSignalFunc fcn)
+	       query_compare_t option, GCallback fcn)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", fcn, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", fcn, user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -244,30 +235,30 @@
 
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("less than") : _("is less than")),
-		 COMPARE_LT, how_option_changed);
+		 COMPARE_LT, G_CALLBACK (how_option_changed));
   first = item;			/* Force one */
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("less than or equal to") :
 			   _("is less than or equal to")),
-		 COMPARE_LTE, how_option_changed);
+		 COMPARE_LTE, G_CALLBACK (how_option_changed));
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("equal to") : _("equals")),
-		 COMPARE_EQUAL, how_option_changed);
+		 COMPARE_EQUAL, G_CALLBACK (how_option_changed));
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("not equal to") : _("does not equal")),
-		 COMPARE_NEQ, how_option_changed);
+		 COMPARE_NEQ, G_CALLBACK (how_option_changed));
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("greater than") : _("is greater than")),
-		 COMPARE_GT, how_option_changed);
+		 COMPARE_GT, G_CALLBACK (how_option_changed));
   ADD_MENU_ITEM (fi->how, (fi->priv->is_debcred ?
 			   _("greater than or equal to") :
 			   _("is greater than or equal to")),
-		 COMPARE_GTE, how_option_changed);
+		 COMPARE_GTE, G_CALLBACK (how_option_changed));
 
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -283,17 +274,17 @@
   menu = gtk_menu_new ();
 
   ADD_MENU_ITEM (fi->option, _("has credits or debits"), NUMERIC_MATCH_ANY,
-		 option_changed);
+		G_CALLBACK (option_changed));
   first = item;			/* Force one */
   ADD_MENU_ITEM (fi->option, _("has debits"), NUMERIC_MATCH_DEBIT,
-		 option_changed);
+		 G_CALLBACK (option_changed));
   ADD_MENU_ITEM (fi->option, _("has credits"), NUMERIC_MATCH_CREDIT,
-		 option_changed);
+		 G_CALLBACK (option_changed));
 
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -312,16 +303,15 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   GNCSearchNumeric *fi = (GNCSearchNumeric *)fe;
 
   g_return_if_fail (fi);
   g_return_if_fail (IS_GNCSEARCH_NUMERIC (fi));
-  g_return_if_fail (dialog);
 
   if (fi->priv->entry)
-    gnome_dialog_editable_enters (dialog, GTK_EDITABLE (fi->priv->entry));
+    gtk_entry_set_activates_default(GTK_ENTRY (fi->priv->entry), TRUE);
 }
 
 static GtkWidget *
@@ -347,7 +337,7 @@
   /* Build and connect the entry window */
   entry = gnc_amount_edit_new ();
   gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (entry), fi->value);
-  gtk_signal_connect (GTK_OBJECT (entry), "amount_changed", entry_changed, fe);
+  g_signal_connect (G_OBJECT (entry), "amount_changed", G_CALLBACK (entry_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
   fi->priv->gae = GNC_AMOUNT_EDIT (entry);
   fi->priv->entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (entry));
Index: search-double.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-double.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-search/search-double.c -Lsrc/gnome-search/search-double.c -u -r1.6 -r1.7
--- src/gnome-search/search-double.c
+++ src/gnome-search/search-double.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gnc-amount-edit.h"
 #include "QueryCore.h"
@@ -31,7 +31,7 @@
 
 #define d(x)
 
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static void grab_focus (GNCSearchCoreType *fe);
 static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe);
 static gboolean gncs_validate (GNCSearchCoreType *fe);
@@ -40,7 +40,7 @@
 
 static void gnc_search_double_class_init	(GNCSearchDoubleClass *class);
 static void gnc_search_double_init	(GNCSearchDouble *gspaper);
-static void gnc_search_double_finalise	(GtkObject *obj);
+static void gnc_search_double_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchDouble *)(x))->priv)
 
@@ -51,31 +51,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_double_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchDouble",
-      sizeof(GNCSearchDouble),
-      sizeof(GNCSearchDoubleClass),
-      (GtkClassInitFunc)gnc_search_double_class_init,
-      (GtkObjectInitFunc)gnc_search_double_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchDoubleClass),     /* class_size */
+      NULL,   			        /* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_double_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchDouble),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_double_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchDouble",
+				   &type_info, 0);
   }
 	
   return type;
@@ -84,13 +80,13 @@
 static void
 gnc_search_double_class_init (GNCSearchDoubleClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_double_finalise;
+  object_class->finalize = gnc_search_double_finalize;
 
   /* override methods */
   gnc_search_core_type->editable_enters = editable_enters;
@@ -99,11 +95,6 @@
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -114,14 +105,14 @@
 }
 
 static void
-gnc_search_double_finalise (GtkObject *obj)
+gnc_search_double_finalize (GObject *obj)
 {
   GNCSearchDouble *o = (GNCSearchDouble *)obj;
   g_assert (IS_GNCSEARCH_DOUBLE (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -134,7 +125,7 @@
 GNCSearchDouble *
 gnc_search_double_new (void)
 {
-  GNCSearchDouble *o = (GNCSearchDouble *)gtk_type_new(gnc_search_double_get_type ());
+  GNCSearchDouble *o = g_object_new(gnc_search_double_get_type (), NULL);
   return o;
 }
 
@@ -173,7 +164,7 @@
 option_changed (GtkWidget *widget, GNCSearchDouble *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -187,8 +178,8 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -220,7 +211,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -239,16 +230,15 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   GNCSearchDouble *fi = (GNCSearchDouble *)fe;
 
   g_return_if_fail (fi);
   g_return_if_fail (IS_GNCSEARCH_DOUBLE (fi));
-  g_return_if_fail (dialog);
 
   if (fi->priv->entry)
-    gnome_dialog_editable_enters (dialog, GTK_EDITABLE (fi->priv->entry));
+    gtk_entry_set_activates_default(GTK_ENTRY (fi->priv->entry), TRUE);
 }
 
 static GtkWidget *
@@ -270,7 +260,7 @@
   entry = gnc_amount_edit_new ();
   if (fi->value)
     gnc_amount_edit_set_damount (GNC_AMOUNT_EDIT (entry), fi->value);
-  gtk_signal_connect (GTK_OBJECT (entry), "amount_changed", entry_changed, fe);
+  g_signal_connect (G_OBJECT (entry), "amount_changed", G_CALLBACK (entry_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
   fi->priv->entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (entry));
   fi->priv->gae = GNC_AMOUNT_EDIT (entry);
Index: search-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-account.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnome-search/search-account.c -Lsrc/gnome-search/search-account.c -u -r1.5 -r1.6
--- src/gnome-search/search-account.c
+++ src/gnome-search/search-account.c
@@ -22,11 +22,11 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "Account.h"
 #include "QueryCore.h"
-#include "gnc-account-tree.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-gui-query.h"
 
 #include "search-account.h"
@@ -40,7 +40,7 @@
 
 static void gnc_search_account_class_init	(GNCSearchAccountClass *class);
 static void gnc_search_account_init	(GNCSearchAccount *gspaper);
-static void gnc_search_account_finalise	(GtkObject *obj);
+static void gnc_search_account_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchAccount *)(x))->priv)
 
@@ -51,13 +51,6 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
 
 guint
 gnc_search_account_get_type (void)
@@ -65,17 +58,21 @@
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchAccount",
-      sizeof(GNCSearchAccount),
-      sizeof(GNCSearchAccountClass),
-      (GtkClassInitFunc)gnc_search_account_class_init,
-      (GtkObjectInitFunc)gnc_search_account_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchAccountClass),    /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_account_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchAccount),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_account_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchAccount",
+				   &type_info, 0);
   }
 	
   return type;
@@ -84,24 +81,19 @@
 static void
 gnc_search_account_class_init (GNCSearchAccountClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_account_finalise;
+  object_class->finalize = gnc_search_account_finalize;
 
   /* override methods */
   gnc_search_core_type->validate = gncs_validate;
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -112,14 +104,14 @@
 }
 
 static void
-gnc_search_account_finalise (GtkObject *obj)
+gnc_search_account_finalize (GObject *obj)
 {
   GNCSearchAccount *o = (GNCSearchAccount *)obj;
   g_assert (IS_GNCSEARCH_ACCOUNT (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -132,7 +124,7 @@
 GNCSearchAccount *
 gnc_search_account_new (void)
 {
-  GNCSearchAccount *o = (GNCSearchAccount *)gtk_type_new(gnc_search_account_get_type ());
+  GNCSearchAccount *o = g_object_new(gnc_search_account_get_type (), NULL);
   return o;
 }
 
@@ -146,7 +138,7 @@
 GNCSearchAccount *
 gnc_search_account_matchall_new (void)
 {
-  GNCSearchAccount *o = (GNCSearchAccount *)gtk_type_new(gnc_search_account_get_type ());
+  GNCSearchAccount *o = g_object_new(gnc_search_account_get_type (), NULL);
   o->priv->match_all = TRUE;
   o->how = GUID_MATCH_ALL;
   return o;
@@ -175,7 +167,7 @@
 option_changed (GtkWidget *widget, GNCSearchAccount *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static GtkWidget *
@@ -183,8 +175,8 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -217,7 +209,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -234,24 +226,23 @@
 static void
 button_clicked (GtkButton *button, GNCSearchAccount *fi)
 {
-  GnomeDialog *dialog;
+  GtkDialog *dialog;
   GtkWidget *account_tree;
   GtkWidget *accounts_scroller;
   GtkWidget *label;
   char *desc;
+  GtkTreeSelection *selection;
 
   /* Create the account tree */
-  account_tree = gnc_account_tree_new ();
-  gtk_clist_column_titles_hide(GTK_CLIST(account_tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(account_tree));
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(account_tree));
-  gtk_clist_set_selection_mode(GTK_CLIST(account_tree),
-			       GTK_SELECTION_MULTIPLE);
+  account_tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(account_tree), FALSE);
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(account_tree));
+  gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
 
   /* Select the currently-selected accounts */
   if (fi->priv->selected_accounts)
-    gnc_account_tree_select_accounts (GNC_ACCOUNT_TREE(account_tree),
-				      fi->priv->selected_accounts, FALSE);
+    gnc_tree_view_account_set_selected_accounts (GNC_TREE_VIEW_ACCOUNT(account_tree),
+						 fi->priv->selected_accounts, FALSE);
 
   /* Create the account scroller and put the tree in it */
   accounts_scroller = gtk_scrolled_window_new (NULL, NULL);
@@ -263,11 +254,12 @@
 
   /* Create the dialog */
   dialog =
-    (GnomeDialog *) gnome_dialog_new (_("Select the Accounts to Compare"),
-				      GNOME_STOCK_BUTTON_OK,
-				      GNOME_STOCK_BUTTON_CANCEL,
-				      NULL);
-  gnome_dialog_close_hides (dialog, TRUE);
+    GTK_DIALOG(gtk_dialog_new_with_buttons(_("Select the Accounts to Compare"),
+					   NULL,
+					   0,
+					   GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					   GTK_STOCK_OK, GTK_RESPONSE_OK,
+					   NULL));
 
   /* Put the dialog together */
   gtk_box_pack_start ((GtkBox *)dialog->vbox, label,
@@ -278,21 +270,15 @@
   gtk_widget_show_all (GTK_WIDGET (dialog));
 
   /* Now run the dialog */
-  switch (gnome_dialog_run (dialog)) {
-  case -1:			/* wm close */
-  case 0:			/* ok */
+  if (gtk_dialog_run (dialog) == GTK_RESPONSE_OK) {
     if (fi->priv->selected_accounts)
       g_list_free (fi->priv->selected_accounts);
 
     fi->priv->selected_accounts =
-      gnc_account_tree_get_current_accounts (GNC_ACCOUNT_TREE (account_tree));
+      gnc_tree_view_account_get_selected_accounts (GNC_TREE_VIEW_ACCOUNT (account_tree));
 
     desc = describe_button (fi);
     gtk_label_set_text (GTK_LABEL (GTK_BIN (button)->child), desc);
-    break;
-
-  case 1:			/* cancel */
-    break;
   }
 
   gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -321,7 +307,7 @@
 
   button = gtk_button_new ();
   gtk_container_add (GTK_CONTAINER (button), label);
-  gtk_signal_connect (GTK_OBJECT (button), "clicked", button_clicked, fe);
+  g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (button_clicked), fe);
   gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 3);
 
   /* And return the box */
Index: search-core-type.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-core-type.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-search/search-core-type.h -Lsrc/gnome-search/search-core-type.h -u -r1.4 -r1.5
--- src/gnome-search/search-core-type.h
+++ src/gnome-search/search-core-type.h
@@ -26,37 +26,35 @@
 #include "QueryNew.h"
 #include "search-param.h"
 
-#define GNCSEARCH_CORE_TYPE(obj)	GTK_CHECK_CAST (obj, gnc_search_core_type_get_type (), GNCSearchCoreType)
-#define GNCSEARCH_CORE_TYPE_CLASS(klass)	GTK_CHECK_CLASS_CAST (klass, gnc_search_core_type_get_type (), GNCSearchCoreTypeClass)
-#define IS_GNCSEARCH_CORE_TYPE(obj)      GTK_CHECK_TYPE (obj, gnc_search_core_type_get_type ())
+#define GNC_TYPE_SEARCH_CORE_TYPE		(gnc_search_core_type_get_type ())
+#define GNC_SEARCH_CORE_TYPE(o)			(G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreType))
+#define GNC_SEARCH_CORE_TYPE_CLASS(k)		(G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreTypeClass))
+#define GNC_IS_SEARCH_CORE_TYPE(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SEARCH_CORE_TYPE)
+#define GNC_SEARCH_CORE_TYPE_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_SEARCH_CORE_TYPE, GNCSearchCoreTypeClass))
 
-typedef struct _GNCSearchCoreType	GNCSearchCoreType;
-typedef struct _GNCSearchCoreTypeClass	GNCSearchCoreTypeClass;
-
-struct _GNCSearchCoreType {
+typedef struct {
   GtkObject parent;
   struct _GNCSearchCoreTypePrivate *priv;
 
   GNCSearchParam *	param;
-};
+} GNCSearchCoreType;
 
-struct _GNCSearchCoreTypeClass {
-  GtkObjectClass parent_class;
+typedef struct {
+  GObjectClass parent_class;
 
   /* virtual methods */
   void			(*grab_focus) (GNCSearchCoreType *fe);
-  void			(*editable_enters) (GNCSearchCoreType *fe,
-					    GnomeDialog *dialog);
+  void			(*editable_enters) (GNCSearchCoreType *fe);
   gboolean		(*validate) (GNCSearchCoreType *fe);
   GNCSearchCoreType *	(*clone) (GNCSearchCoreType *fe);
   GtkWidget *		(*get_widget) (GNCSearchCoreType *);
   QueryPredData_t	(*get_predicate) (GNCSearchCoreType *);
 
   /* signals */
-};
+} GNCSearchCoreTypeClass;
 
 /* These are internal functions */
-guint			gnc_search_core_type_get_type (void);
+GType			gnc_search_core_type_get_type (void);
 GNCSearchCoreType *	gnc_search_core_type_new (void);
 
 /* Create a new search core_type */
@@ -64,8 +62,7 @@
 
 /* methods */
 void			gnc_search_core_type_grab_focus (GNCSearchCoreType *fe);
-void			gnc_search_core_type_editable_enters (GNCSearchCoreType *fe,
-							      GnomeDialog *dialog);
+void			gnc_search_core_type_editable_enters (GNCSearchCoreType *fe);
 gboolean        	gnc_search_core_type_validate (GNCSearchCoreType *fe);
 GNCSearchCoreType *	gnc_search_core_type_clone (GNCSearchCoreType *fe);
 GtkWidget *		gnc_search_core_type_get_widget (GNCSearchCoreType *fe);
Index: search.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search.glade,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-search/search.glade -Lsrc/gnome-search/search.glade -u -r1.7 -r1.8
--- src/gnome-search/search.glade
+++ src/gnome-search/search.glade
@@ -1,485 +1,565 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Search Dialog</name>
-  <visible>False</visible>
-  <title>Search for...</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button33</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_search_find_cb</handler>
-	  <data>Search Dialog</data>
-	  <last_modification_time>Thu, 07 Feb 2002 02:21:36 GMT</last_modification_time>
-	</signal>
-	<label>Find</label>
-	<stock_pixmap>GNOME_STOCK_PIXMAP_SEARCH</stock_pixmap>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_search_cancel_cb</handler>
-	  <data>Search Dialog</data>
-	  <last_modification_time>Thu, 07 Feb 2002 02:22:27 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_search_cancel_cb</handler>
-	  <data>Search Dialog</data>
-	  <last_modification_time>Thu, 07 Feb 2002 02:22:27 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>new_item_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_search_new_cb</handler>
-	  <data>Search Dialog</data>
-	  <last_modification_time>Mon, 18 Feb 2002 05:35:22 GMT</last_modification_time>
-	</signal>
-	<label>New Item....</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button36</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_search_help_cb</handler>
-	  <data>Search Dialog</data>
-	  <last_modification_time>Thu, 07 Feb 2002 02:23:16 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Search Dialog">
+  <property name="title" translatable="yes">Search for...</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox89</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	  <child>
+	    <widget class="GtkButton" id="new_item_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_ui_search_new_cb" last_modification_time="Thu, 15 May 2003 14:03:10 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment1">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox74">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image1">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-new</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label848">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">_New item ...</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox71</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox72</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-7</property>
+	      <signal name="clicked" handler="gnc_ui_search_close_cb" last_modification_time="Thu, 15 May 2003 14:02:29 GMT"/>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>type_label</name>
-	    <label>()</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label844</name>
-	    <label> Search </label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+	  <child>
+	    <widget class="GtkButton" id="help_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-11</property>
+	      <signal name="clicked" handler="gnc_ui_search_help_cb"/>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>search_frame</name>
-	<border_width>3</border_width>
-	<label>Search Criteria</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox88</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox73</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>add_button_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="gnc_ui_search_cancel_cb"/>
+	    </widget>
+	  </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	  <child>
+	    <widget class="GtkButton" id="find_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-find</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="gnc_ui_search_find_cb" last_modification_time="Thu, 15 May 2003 14:02:53 GMT"/>
 	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox89">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox71">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>type_menu_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-		<pack>GTK_PACK_END</pack>
+		<widget class="GtkHBox" id="hbox72">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="type_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">()</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label844">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"> Search </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
 	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="search_frame">
+	      <property name="border_width">6</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label846</name>
-	      <label>Search for items where</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
 	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-		<pack>GTK_PACK_END</pack>
+		<widget class="GtkVBox" id="vbox88">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox73">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="add_button_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="type_menu_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			  <property name="pack_type">GTK_PACK_END</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label846">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Search for items where</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			  <property name="pack_type">GTK_PACK_END</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow1">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkViewport" id="viewport1">
+			  <property name="visible">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkTable" id="criteria_table">
+			      <property name="border_width">3</property>
+			      <property name="visible">True</property>
+			      <property name="n_rows">1</property>
+			      <property name="n_columns">1</property>
+			      <property name="homogeneous">False</property>
+			      <property name="row_spacing">0</property>
+			      <property name="column_spacing">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow1</name>
-	    <height>100</height>
-	    <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkViewport</class>
-	      <name>viewport1</name>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkTable</class>
-		<name>criteria_table</name>
-		<border_width>3</border_width>
-		<rows>1</rows>
-		<columns>2</columns>
-		<homogeneous>False</homogeneous>
-		<row_spacing>0</row_spacing>
-		<column_spacing>0</column_spacing>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label845">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Search Criteria</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>result_hbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hboxXXX</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
+	    <widget class="GtkHBox" id="result_hbox">
+	      <property name="border_width">6</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame12</name>
-	    <label>Type of search</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox24</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>new_search_radiobutton</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_ui_search_type_cb</handler>
-		  <data>Search Dialog</data>
-		  <last_modification_time>Thu, 07 Feb 2002 01:25:13 GMT</last_modification_time>
-		</signal>
-		<label>New search</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>search_type</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>narrow_search_radiobutton</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_ui_search_type_cb</handler>
-		  <data>Search Dialog</data>
-		  <last_modification_time>Wed, 05 Apr 2000 14:20:05 GMT</last_modification_time>
-		</signal>
-		<label>Refine current search</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>search_type</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>add_search_radiobutton</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_ui_search_type_cb</handler>
-		  <data>Search Dialog</data>
-		  <last_modification_time>Wed, 05 Apr 2000 14:20:17 GMT</last_modification_time>
-		</signal>
-		<label>Add results to current search</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>search_type</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkRadioButton</class>
-		<name>delete_search_radiobutton</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_ui_search_type_cb</handler>
-		  <data>Search Dialog</data>
-		  <last_modification_time>Wed, 05 Apr 2000 14:20:26 GMT</last_modification_time>
-		</signal>
-		<label>Delete results from current search</label>
-		<active>False</active>
-		<draw_indicator>True</draw_indicator>
-		<group>search_type</group>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkHSeparator</class>
-		<name>hseparator1</name>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkCheckButton</class>
-		<name>active_only_check</name>
-		<tooltip>Choose whether to search all your data or only that marked as &quot;active&quot;</tooltip>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>toggled</name>
-		  <handler>gnc_ui_search_active_cb</handler>
-		  <data>Search Dialog</data>
-		  <last_modification_time>Wed, 15 Jan 2003 03:21:35 GMT</last_modification_time>
-		</signal>
-		<label>Search only active data</label>
-		<active>True</active>
-		<draw_indicator>True</draw_indicator>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+	      <child>
+		<widget class="GtkHBox" id="hboxXXX">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame12">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox24">
+			  <property name="border_width">3</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="new_search_radiobutton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">New search</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <signal name="toggled" handler="gnc_ui_search_type_cb"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="narrow_search_radiobutton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Refine current search</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">new_search_radiobutton</property>
+			      <signal name="toggled" handler="gnc_ui_search_type_cb"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="add_search_radiobutton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Add results to current search</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">new_search_radiobutton</property>
+			      <signal name="toggled" handler="gnc_ui_search_type_cb"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkRadioButton" id="delete_search_radiobutton">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Delete results from current search</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">False</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <property name="group">new_search_radiobutton</property>
+			      <signal name="toggled" handler="gnc_ui_search_type_cb"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkHSeparator" id="hseparator1">
+			      <property name="visible">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">True</property>
+			      <property name="fill">True</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkCheckButton" id="active_only_check">
+			      <property name="visible">True</property>
+			      <property name="tooltip" translatable="yes">Choose whether to search all your data or only that marked as &quot;active&quot;</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Search only active data</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="active">True</property>
+			      <property name="inconsistent">False</property>
+			      <property name="draw_indicator">True</property>
+			      <signal name="toggled" handler="gnc_ui_search_active_cb"/>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Type of search</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: search-reconciled.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-reconciled.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-search/search-reconciled.c -Lsrc/gnome-search/search-reconciled.c -u -r1.2 -r1.3
--- src/gnome-search/search-reconciled.c
+++ src/gnome-search/search-reconciled.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "QueryCore.h"
 #include "Transaction.h"	/* for ?REC */
@@ -38,7 +38,7 @@
 
 static void gnc_search_reconciled_class_init	(GNCSearchReconciledClass *class);
 static void gnc_search_reconciled_init	(GNCSearchReconciled *gspaper);
-static void gnc_search_reconciled_finalise	(GtkObject *obj);
+static void gnc_search_reconciled_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchReconciled *)(x))->priv)
 
@@ -47,31 +47,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_reconciled_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchReconciled",
-      sizeof(GNCSearchReconciled),
-      sizeof(GNCSearchReconciledClass),
-      (GtkClassInitFunc)gnc_search_reconciled_class_init,
-      (GtkObjectInitFunc)gnc_search_reconciled_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchReconciledClass), /* class_size */
+      NULL,   			        /* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_reconciled_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchReconciled),	/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_reconciled_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchReconciled",
+				   &type_info, 0);
   }
 	
   return type;
@@ -80,24 +76,19 @@
 static void
 gnc_search_reconciled_class_init (GNCSearchReconciledClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_reconciled_finalise;
+  object_class->finalize = gnc_search_reconciled_finalize;
 
   /* override methods */
   gnc_search_core_type->validate = gncs_validate;
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -109,14 +100,14 @@
 }
 
 static void
-gnc_search_reconciled_finalise (GtkObject *obj)
+gnc_search_reconciled_finalize (GObject *obj)
 {
   GNCSearchReconciled *o = (GNCSearchReconciled *)obj;
   g_assert (IS_GNCSEARCH_RECONCILED (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -129,7 +120,7 @@
 GNCSearchReconciled *
 gnc_search_reconciled_new (void)
 {
-  GNCSearchReconciled *o = (GNCSearchReconciled *)gtk_type_new(gnc_search_reconciled_get_type ());
+  GNCSearchReconciled *o = g_object_new(gnc_search_reconciled_get_type (), NULL);
   return o;
 }
 
@@ -168,7 +159,7 @@
 option_changed (GtkWidget *widget, GNCSearchReconciled *fe)
 {
   fe->how = (char_match_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -176,7 +167,7 @@
 {
   gboolean is_on = gtk_toggle_button_get_active (button);
   cleared_match_t value =
-    (cleared_match_t) gtk_object_get_data (GTK_OBJECT (button), "button-value");
+    (cleared_match_t) g_object_get_data (G_OBJECT (button), "button-value");
 
   if (is_on)
     fe->value |= value;
@@ -189,8 +180,8 @@
 	       char_match_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -218,7 +209,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -231,8 +222,8 @@
 
   toggle = gtk_toggle_button_new_with_label (label);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), (fi->value & option));
-  gtk_object_set_data (GTK_OBJECT (toggle), "button-value", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (toggle), "toggled", toggle_changed, fi);
+  g_object_set_data (G_OBJECT (toggle), "button-value", (gpointer) option);
+  g_signal_connect (G_OBJECT (toggle), "toggled", G_CALLBACK (toggle_changed), fi);
 
   return toggle;
 }
Index: search-date.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-date.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-search/search-date.c -Lsrc/gnome-search/search-date.c -u -r1.7 -r1.8
--- src/gnome-search/search-date.c
+++ src/gnome-search/search-date.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gnc-date.h"
 #include "gnc-date-edit.h"
@@ -32,7 +32,7 @@
 
 #define d(x)
 
-static void editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog);
+static void editable_enters (GNCSearchCoreType *fe);
 static void grab_focus (GNCSearchCoreType *fe);
 static GNCSearchCoreType *gncs_clone(GNCSearchCoreType *fe);
 static gboolean gncs_validate (GNCSearchCoreType *fe);
@@ -41,7 +41,7 @@
 
 static void gnc_search_date_class_init	(GNCSearchDateClass *class);
 static void gnc_search_date_init	(GNCSearchDate *gspaper);
-static void gnc_search_date_finalise	(GtkObject *obj);
+static void gnc_search_date_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchDate *)(x))->priv)
 
@@ -51,31 +51,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_date_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchDate",
-      sizeof(GNCSearchDate),
-      sizeof(GNCSearchDateClass),
-      (GtkClassInitFunc)gnc_search_date_class_init,
-      (GtkObjectInitFunc)gnc_search_date_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchDateClass),       /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_date_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchDate),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_date_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchDate",
+				   &type_info, 0);
   }
 	
   return type;
@@ -84,13 +80,13 @@
 static void
 gnc_search_date_class_init (GNCSearchDateClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_date_finalise;
+  object_class->finalize = gnc_search_date_finalize;
 
   /* override methods */
   gnc_search_core_type->editable_enters = editable_enters;
@@ -99,11 +95,6 @@
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -115,14 +106,17 @@
 }
 
 static void
-gnc_search_date_finalise (GtkObject *obj)
+gnc_search_date_finalize (GObject *obj)
 {
   GNCSearchDate *o = (GNCSearchDate *)obj;
   g_assert (IS_GNCSEARCH_DATE (o));
 
+  if (o->priv->entry)
+    gtk_widget_destroy (o->priv->entry);
+
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -135,7 +129,7 @@
 GNCSearchDate *
 gnc_search_date_new (void)
 {
-  GNCSearchDate *o = (GNCSearchDate *)gtk_type_new(gnc_search_date_get_type ());
+  GNCSearchDate *o = g_object_new(gnc_search_date_get_type (), NULL);
   return o;
 }
 
@@ -174,7 +168,7 @@
 option_changed (GtkWidget *widget, GNCSearchDate *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -188,8 +182,8 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK(option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -221,7 +215,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -240,16 +234,15 @@
 }
 
 static void
-editable_enters (GNCSearchCoreType *fe, GnomeDialog *dialog)
+editable_enters (GNCSearchCoreType *fe)
 {
   GNCSearchDate *fi = (GNCSearchDate *)fe;
 
   g_return_if_fail (fi);
   g_return_if_fail (IS_GNCSEARCH_DATE (fi));
-  g_return_if_fail (dialog);
 
   if (fi->priv->entry)
-    gnc_date_editable_enters (dialog, GNC_DATE_EDIT (fi->priv->entry));
+    gnc_date_editable_enters (GNC_DATE_EDIT (fi->priv->entry), TRUE);
 }
 
 static GtkWidget *
@@ -269,8 +262,9 @@
 
   /* Build and connect the date entry window */
   entry = gnc_date_edit_new_ts (fi->ts, FALSE, FALSE);
-  gtk_signal_connect (GTK_OBJECT (entry), "date_changed", date_changed, fe);
+  g_signal_connect (G_OBJECT (entry), "date_changed", G_CALLBACK (date_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
+  g_object_ref (entry);
   fi->priv->entry = entry;
 
   /* And return the box */
Index: gnc-general-search.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/gnc-general-search.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-search/gnc-general-search.h -Lsrc/gnome-search/gnc-general-search.h -u -r1.1 -r1.2
--- src/gnome-search/gnc-general-search.h
+++ src/gnome-search/gnc-general-search.h
@@ -32,21 +32,18 @@
 #ifndef GNC_GENERAL_SEARCH_H
 #define GNC_GENERAL_SEARCH_H
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 #include "dialog-search.h"
 #include "gnc-book.h"
 
-BEGIN_GNOME_DECLS
-
-
 #define GNC_GENERAL_SEARCH(obj) \
-	GTK_CHECK_CAST (obj, gnc_general_search_get_type(), GNCGeneralSearch)
+	G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_general_search_get_type(), GNCGeneralSearch)
 
 #define GNC_GENERAL_SEARCH_CLASS(klass) \
-	GTK_CHECK_CLASS_CAST (klass, gnc_general_search_get_type(), \
+	G_TYPE_CLASS_CAST (klass, gnc_general_search_get_type(), \
 				GNCGeneralSearchClass)
 #define GNC_IS_GENERAL_SEARCH(obj) \
-	GTK_CHECK_TYPE (obj, gnc_general_search_get_type ())
+	G_TYPE_CHECK_INSTANCE_TYPE (obj, gnc_general_search_get_type ())
 
 /*
  * If this returns NULL, then do nothing (probably an edit window).  If
@@ -87,9 +84,6 @@
 
 guint      gnc_general_search_get_type       (void);
 
-
-END_GNOME_DECLS
-
 #endif
 
 /*
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-search/.cvsignore -Lsrc/gnome-search/.cvsignore -u -r1.1 -r1.2
--- src/gnome-search/.cvsignore
+++ src/gnome-search/.cvsignore
@@ -1,3 +1,4 @@
+*.gladep
 *.lo
 *.la
 .deps
Index: gnc-general-search.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/gnc-general-search.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-search/gnc-general-search.c -Lsrc/gnome-search/gnc-general-search.c -u -r1.4 -r1.5
--- src/gnome-search/gnc-general-search.c
+++ src/gnome-search/gnc-general-search.c
@@ -81,50 +81,30 @@
 	static guint general_search_type = 0;
 
 	if (!general_search_type){
-		GtkTypeInfo general_search_info = {
-			"GNCGeneralSearch",
-			sizeof (GNCGeneralSearch),
-			sizeof (GNCGeneralSearchClass),
-			(GtkClassInitFunc) gnc_general_search_class_init,
-			(GtkObjectInitFunc) gnc_general_search_init,
-			NULL,
-			NULL,
+		static const GTypeInfo our_info = {
+			sizeof (GNCGeneralSearchClass),    /* class_size */
+			NULL,   			   /* base_init */
+			NULL,				   /* base_finalize */
+			(GClassInitFunc) gnc_general_search_class_init,
+			NULL,				   /* class_finalize */
+			NULL,				   /* class_data */
+			sizeof (GNCGeneralSearch),	   /* */
+			0,				   /* n_preallocs */
+			(GInstanceInitFunc) gnc_general_search_init,
 		};
 
-		general_search_type = gtk_type_unique (gtk_hbox_get_type (),
-						       &general_search_info);
+		general_search_type = g_type_register_static (GTK_TYPE_HBOX,
+							      "GNCGeneralSearch",
+							      &our_info, 0);
 	}
 
 	return general_search_type;
 }
 
 static void
-gnc_general_search_forall (GtkContainer *container, gboolean include_internals,
-                           GtkCallback callback, gpointer callback_data)
-{
-	g_return_if_fail (container != NULL);
-	g_return_if_fail (GNC_IS_GENERAL_SEARCH (container));
-	g_return_if_fail (callback != NULL);
-
-	/* Let GtkBox handle things only if the internal widgets need
-	 * to be poked. */
-	if (!include_internals)
-		return;
-
-	if (!GTK_CONTAINER_CLASS (parent_class)->forall)
-		return;
-
-	GTK_CONTAINER_CLASS (parent_class)->forall (container,
-						    include_internals,
-						    callback,
-						    callback_data);
-}
-
-static void
 gnc_general_search_class_init (GNCGeneralSearchClass *klass)
 {
 	GtkObjectClass *object_class = (GtkObjectClass *) klass;
-	GtkContainerClass *container_class = (GtkContainerClass *) klass;
 
 	object_class = (GtkObjectClass*) klass;
 
@@ -133,18 +113,12 @@
 	general_search_signals[SELECTION_CHANGED] =
 		gtk_signal_new("changed",
 			       GTK_RUN_FIRST,
-			       object_class->type,
+			       GTK_CLASS_TYPE(object_class),
 			       GTK_SIGNAL_OFFSET(GNCGeneralSearchClass,
 						 changed),
 			       gtk_marshal_NONE__NONE,
 			       GTK_TYPE_NONE, 0);
 
-	gtk_object_class_add_signals(object_class,
-				     general_search_signals,
-				     LAST_SIGNAL);
-
-	container_class->forall = gnc_general_search_forall;
-
 	object_class->destroy = gnc_general_search_destroy;
 
 	klass->changed = NULL;
@@ -170,19 +144,22 @@
 	gsl->entry = NULL;
 	gsl->button = NULL;
 
-	if (gsl->priv->sw) {
+	if (gsl->priv) {
 		/* Clear the callbacks */
-		gnc_search_dialog_set_select_cb (gsl->priv->sw, NULL,
-						 NULL, FALSE);
-		gnc_search_dialog_disconnect (gsl->priv->sw, gsl);
-		gsl->priv->sw = NULL;
-	}
+		if (gsl->priv->sw) {
+			gnc_search_dialog_set_select_cb (gsl->priv->sw, NULL,
+							 NULL, FALSE);
+			gnc_search_dialog_disconnect (gsl->priv->sw, gsl);
+			gsl->priv->sw = NULL;
+		}
 
-	/* Unregister ourselves */
-	gnc_unregister_gui_component (gsl->priv->component_id);
+		/* Unregister ourselves */
+		gnc_unregister_gui_component (gsl->priv->component_id);
 
-	/* And let go */
-	g_free (gsl->priv);
+		/* And let go */
+		g_free (gsl->priv);
+		gsl->priv = NULL;
+	}
 
 	if (GTK_OBJECT_CLASS (parent_class)->destroy)
 		GTK_OBJECT_CLASS (parent_class)->destroy (object);
@@ -229,7 +206,7 @@
 
 /* The search dialog has closed; let's forget about her */
 static int
-on_close_cb (GnomeDialog *dialog, gpointer user_data)
+on_close_cb (GtkDialog *dialog, gpointer user_data)
 {
 	GNCGeneralSearch *gsl = user_data;
 	gsl->priv->sw = NULL;
@@ -277,8 +254,8 @@
 
 	gsl->button = gtk_button_new_with_label (label);
 	gtk_box_pack_start (GTK_BOX (gsl), gsl->button, FALSE, FALSE, 0);
-	gtk_signal_connect (GTK_OBJECT (gsl->button), "clicked",
-			    search_cb, gsl);
+	g_signal_connect (G_OBJECT (gsl->button), "clicked",
+			  G_CALLBACK (search_cb), gsl);
 	gtk_widget_show (gsl->button);
 }
 
@@ -302,7 +279,7 @@
 	get_guid = qof_class_get_parameter (type, QOF_PARAM_GUID);
 	g_return_val_if_fail (get_guid, NULL);
 
-	gsl = gtk_type_new (gnc_general_search_get_type ());
+	gsl = g_object_new (gnc_general_search_get_type (), NULL);
 
 	create_children (gsl, label);
 
@@ -336,7 +313,7 @@
 		gsl->selected_item = selection;
 		reset_selection_text (gsl);
 		gtk_signal_emit(GTK_OBJECT(gsl),
-				general_search_signals[SELECTION_CHANGED]);
+			      general_search_signals[SELECTION_CHANGED]);
 	}
 
 	gnc_gui_component_clear_watches (gsl->priv->component_id);
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/gnome-search/Makefile.am -Lsrc/gnome-search/Makefile.am -u -r1.13 -r1.14
--- src/gnome-search/Makefile.am
+++ src/gnome-search/Makefile.am
@@ -1,9 +1,10 @@
 PWD := $(shell pwd)
 
-pkglib_LTLIBRARIES = libgncmod-gnome-search.la libgw-gnome-search.la
+pkglib_LTLIBRARIES = libgncmod-gnome-search.la
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnome-utils \
@@ -14,8 +15,10 @@
   ${GTKHTML_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GLADE_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
-  ${GLIB_CFLAGS} 
+  ${GNOME_CFLAGS} \
+  ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${GNOME_PRINT_CFLAGS}
 
 libgncmod_gnome_search_la_SOURCES = \
   gncmod-gnome-search.c \
@@ -45,68 +48,24 @@
   search-int64.h \
   search-numeric.h \
   search-reconciled.h \
-  search-string.h \
-  gw-gnome-search.h
-
-libgncmod_gnome_search_la_LDFLAGS = -module
+  search-string.h
 
 libgncmod_gnome_search_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${GUILE_LIBS} \
-  ${GNOME_LIBDIR} \
-  ${GNOMEUI_LIBS} \
+  ${GNOME_LIBS} \
   ${GTKHTML_LIBS} \
   ${GLADE_LIBS} \
-  ${GLIB_LIBS}
-
-libgw_gnome_search_la_SOURCES = gw-gnome-search.c
-libgw_gnome_search_la_LDFLAGS = -module ${G_WRAP_LINK_ARGS}
-
-gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
-gncmod_DATA = gnome-search.scm
+  ${GLIB_LIBS} \
+  ${QOF_LIBS} \
+  ${GNOME_PRINT_LIBS}
 
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = \
   search.glade
 
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = \
-  gw-gnome-search.scm \
-  gw-gnome-search-spec.scm
-
 EXTRA_DIST = \
   .cvsignore \
-  ${glade_DATA} \
-  ${gncmod_DATA} \
-  ${gwmod_DATA}
-
-if GNUCASH_SEPARATE_BUILDDIR
-#Only needed when srcdir and builddir are different
-SCM_FILE_LINKS = gw-gnome-search-spec.scm
-endif
-
-.scm-links: 
-	rm -f gnucash g-wrapped
-	ln -sf . gnucash 
-	ln -sf . g-wrapped 
-if GNUCASH_SEPARATE_BUILDDIR
-	for X in ${SCM_FILE_LINKS} ; do \
-	  ln -sf ${srcdir}/$$X . ; \
-	done
-endif
-	touch .scm-links
-
-gw-gnome-search.scm gw-gnome-search.c gw-gnome-search.h: \
-  .scm-links gw-gnome-search-spec.scm ${top_builddir}/config.status
-	FLAVOR=gnome guile -c \
-	 "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
-	 (set! %load-path (cons \"${PWD}\" %load-path)) \
-	 (set! %load-path (cons \"../engine\" %load-path)) \
-	 (set! %load-path (cons \"../app-utils\" %load-path)) \
-	 (set! %load-path (cons \"../gnome-utils\" %load-path)) \
-	 (primitive-load \"./gw-gnome-search-spec.scm\") \
-	 (gw:generate-wrapset \"gw-gnome-search\")"
-
-BUILT_SOURCES = gw-gnome-search.scm gw-gnome-search.c gw-gnome-search.h
-DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
-                 gw-gnome-search.html
+  ${glade_DATA}
+
Index: search-boolean.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/search-boolean.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-search/search-boolean.c -Lsrc/gnome-search/search-boolean.c -u -r1.3 -r1.4
--- src/gnome-search/search-boolean.c
+++ src/gnome-search/search-boolean.c
@@ -22,7 +22,7 @@
 #include <config.h>
 #endif
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "QueryCore.h"
 
@@ -37,7 +37,7 @@
 
 static void gnc_search_boolean_class_init	(GNCSearchBooleanClass *class);
 static void gnc_search_boolean_init	(GNCSearchBoolean *gspaper);
-static void gnc_search_boolean_finalise	(GtkObject *obj);
+static void gnc_search_boolean_finalize	(GObject *obj);
 
 #define _PRIVATE(x) (((GNCSearchBoolean *)(x))->priv)
 
@@ -46,31 +46,27 @@
 
 static GNCSearchCoreTypeClass *parent_class;
 
-enum {
-  LAST_SIGNAL
-};
-
-#if LAST_SIGNAL > 0
-static guint signals[LAST_SIGNAL] = { 0 };
-#endif
-
 guint
 gnc_search_boolean_get_type (void)
 {
   static guint type = 0;
 	
   if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchBoolean",
-      sizeof(GNCSearchBoolean),
-      sizeof(GNCSearchBooleanClass),
-      (GtkClassInitFunc)gnc_search_boolean_class_init,
-      (GtkObjectInitFunc)gnc_search_boolean_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+    GTypeInfo type_info = {
+      sizeof(GNCSearchBooleanClass),    /* class_size */
+      NULL,   				/* base_init */
+      NULL,				/* base_finalize */
+      (GClassInitFunc)gnc_search_boolean_class_init,
+      NULL,				/* class_finalize */
+      NULL,				/* class_data */
+      sizeof(GNCSearchBoolean),		/* */
+      0,				/* n_preallocs */
+      (GInstanceInitFunc)gnc_search_boolean_init,
     };
 		
-    type = gtk_type_unique(gnc_search_core_type_get_type (), &type_info);
+    type = g_type_register_static (GNC_TYPE_SEARCH_CORE_TYPE,
+				   "GNCSearchBoolean",
+				   &type_info, 0);
   }
 	
   return type;
@@ -79,24 +75,19 @@
 static void
 gnc_search_boolean_class_init (GNCSearchBooleanClass *class)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GNCSearchCoreTypeClass *gnc_search_core_type = (GNCSearchCoreTypeClass *)class;
 
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class(gnc_search_core_type_get_type ());
+  object_class = G_OBJECT_CLASS (class);
+  parent_class = g_type_class_peek_parent (class);
 
-  object_class->finalize = gnc_search_boolean_finalise;
+  object_class->finalize = gnc_search_boolean_finalize;
 
   /* override methods */
   gnc_search_core_type->validate = gncs_validate;
   gnc_search_core_type->get_widget = gncs_get_widget;
   gnc_search_core_type->get_predicate = gncs_get_predicate;
   gnc_search_core_type->clone = gncs_clone;
-
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals(object_class, signals, LAST_SIGNAL);
-#endif
 }
 
 static void
@@ -108,14 +99,14 @@
 }
 
 static void
-gnc_search_boolean_finalise (GtkObject *obj)
+gnc_search_boolean_finalize (GObject *obj)
 {
   GNCSearchBoolean *o = (GNCSearchBoolean *)obj;
   g_assert (IS_GNCSEARCH_BOOLEAN (o));
 
   g_free(o->priv);
 	
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -128,7 +119,7 @@
 GNCSearchBoolean *
 gnc_search_boolean_new (void)
 {
-  GNCSearchBoolean *o = (GNCSearchBoolean *)gtk_type_new(gnc_search_boolean_get_type ());
+  GNCSearchBoolean *o = g_object_new(gnc_search_boolean_get_type (), NULL);
   return o;
 }
 
@@ -167,7 +158,7 @@
 option_changed (GtkWidget *widget, GNCSearchBoolean *fe)
 {
   fe->how = (query_compare_t)
-    gtk_object_get_data (GTK_OBJECT (widget), "option");
+    g_object_get_data (G_OBJECT (widget), "option");
 }
 
 static void
@@ -181,8 +172,8 @@
 	       query_compare_t option)
 {
   GtkWidget *item = gtk_menu_item_new_with_label (label);
-  gtk_object_set_data (GTK_OBJECT (item), "option", (gpointer) option);
-  gtk_signal_connect (GTK_OBJECT (item), "activate", option_changed, user_data);
+  g_object_set_data (G_OBJECT (item), "option", (gpointer) option);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_changed), user_data);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
   return item;
@@ -210,7 +201,7 @@
   opmenu = gtk_option_menu_new ();
   gtk_option_menu_set_menu (GTK_OPTION_MENU (opmenu), menu);
 
-  gtk_signal_emit_by_name (GTK_OBJECT (first), "activate", fe);
+  g_signal_emit_by_name (G_OBJECT (first), "activate", fe);
   gtk_option_menu_set_history (GTK_OPTION_MENU (opmenu), current);
 
   return opmenu;
@@ -234,7 +225,7 @@
   /* Build and connect the toggle */
   toggle = gtk_toggle_button_new_with_label (_("set true"));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), fi->value);
-  gtk_signal_connect (GTK_OBJECT (toggle), "toggled", toggle_changed, fe);
+  g_signal_connect (G_OBJECT (toggle), "toggled", G_CALLBACK (toggle_changed), fe);
   gtk_box_pack_start (GTK_BOX (box), toggle, FALSE, FALSE, 3);
 
   /* And return the box */
Index: gncmod-gnome-search.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/gncmod-gnome-search.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/gnome-search/gncmod-gnome-search.c -Lsrc/gnome-search/gncmod-gnome-search.c -u -r1.8 -r1.9
--- src/gnome-search/gncmod-gnome-search.c
+++ src/gnome-search/gncmod-gnome-search.c
@@ -29,7 +29,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
@@ -81,9 +80,6 @@
     gnc_search_core_initialize ();
   }
   
-  scm_c_eval_string("(use-modules (g-wrapped gw-gnome-search))");
-  scm_c_eval_string("(use-modules (gnucash gnome-search))");
-
   return TRUE;
 }
 
Index: dialog-search.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/dialog-search.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome-search/dialog-search.h -Lsrc/gnome-search/dialog-search.h -u -r1.12 -r1.13
--- src/gnome-search/dialog-search.h
+++ src/gnome-search/dialog-search.h
@@ -92,7 +92,8 @@
 			  GNCSearchCallbackButton *callbacks,
 			  GNCSearchResultCB result_callback,
 			  GNCSearchNewItemCB new_item_cb,
-			  gpointer user_data, GNCSearchFree free_user_data);
+			  gpointer user_data, GNCSearchFree free_user_data,
+			  const gchar *gconf_section);
 
 void gnc_search_dialog_destroy (GNCSearchWindow *sw);
 void gnc_search_dialog_raise (GNCSearchWindow *sw);
Index: dialog-search.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-search/dialog-search.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -Lsrc/gnome-search/dialog-search.c -Lsrc/gnome-search/dialog-search.c -u -r1.41 -r1.42
--- src/gnome-search/dialog-search.c
+++ src/gnome-search/dialog-search.c
@@ -23,17 +23,16 @@
 
 #include "config.h"
 
-#include <gnome.h>
 #include <glib.h>
+#include <gtk/gtk.h>
 
 #include "dialog-utils.h"
-#include "window-help.h"
 #include "gnc-component-manager.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "gnc-gui-query.h"
-#include "global-options.h"
 #include "gnc-query-list.h"
+#include "gnc-gconf-utils.h"
 #include "gncObject.h"
 #include "QueryNew.h"
 #include "QueryObject.h"
@@ -46,6 +45,7 @@
 #include "search-param.h"
 
 #define DIALOG_SEARCH_CM_CLASS "dialog-search"
+#define KEY_ACTIVE_ONLY "search_for_active_only"
 
 typedef enum {
   GNC_SEARCH_MATCH_ALL = 0,
@@ -105,6 +105,7 @@
   GList *	crit_list;	/* list of crit_data */
 
   gint		component_id;
+  const gchar * gconf_section;
 };
 
 struct _crit_data {
@@ -113,7 +114,7 @@
   GtkWidget *		elemwidget;
   GtkWidget *		container;
   GtkWidget *		button;
-  GnomeDialog *		dialog;
+  GtkDialog *		dialog;
 };
 
 static void search_clear_criteria (GNCSearchWindow *sw);
@@ -132,7 +133,7 @@
 {
   GNCSearchCallbackButton *cb;
 
-  cb = gtk_object_get_data (GTK_OBJECT (button), "data");
+  cb = g_object_get_data (G_OBJECT (button), "data");
   gnc_search_callback_button_execute (cb, sw);
 }
 
@@ -151,6 +152,7 @@
   gnc_search_dialog_destroy (sw);
 }
 
+#if 0
 static void
 gnc_search_dialog_line_toggled (GNCQueryList *list, gpointer item,
 				gpointer user_data)
@@ -181,6 +183,40 @@
     /* Call the first button (usually view/edit) */
     gnc_search_callback_button_execute (sw->buttons, sw);
 }
+#endif
+
+static void
+gnc_search_dialog_select_row_cb (GtkCList *clist, gint row, gint column,
+				 GdkEventButton *event, gpointer user_data)
+{
+  GNCSearchWindow *sw = user_data;
+  sw->selected_item = gtk_clist_get_row_data (clist, row);
+
+  /* If we double-click an item, then either "select" it, or run it
+   * through the first button (which should be view/edit
+   */
+  if (event && event->type == GDK_2BUTTON_PRESS) {
+    if (sw->selected_cb)
+      /* Select the time */
+      gnc_search_dialog_select_cb (NULL, sw);
+    else if (sw->buttons)
+      /* Call the first button (usually view/edit) */
+      gnc_search_callback_button_execute (sw->buttons, sw);
+
+    /* If we get here, then nothing to do for a double-click */
+  }
+}
+
+static void
+gnc_search_dialog_unselect_row_cb (GtkCList *clist, gint row, gint column,
+				   GdkEventButton *event, gpointer user_data)
+{
+  GNCSearchWindow *sw = user_data;
+  gpointer item = gtk_clist_get_row_data (clist, row);
+
+  if (sw->selected_item == item)
+    sw->selected_item = NULL;
+}
 
 static void
 gnc_search_dialog_init_result_list (GNCSearchWindow *sw)
@@ -188,10 +224,10 @@
   sw->result_list = gnc_query_list_new(sw->display_list, sw->q);
 
   /* Setup the list callbacks */
-  gtk_signal_connect (GTK_OBJECT (sw->result_list), "line_toggled",
-		      gnc_search_dialog_line_toggled, sw);
-  gtk_signal_connect (GTK_OBJECT (sw->result_list), "double_click_entry",
-		      gnc_search_dialog_double_click_entry, sw);
+  g_signal_connect (G_OBJECT (sw->result_list), "select-row",
+		    G_CALLBACK (gnc_search_dialog_select_row_cb), sw);
+  g_signal_connect (G_OBJECT (sw->result_list), "unselect-row",
+		    G_CALLBACK (gnc_search_dialog_unselect_row_cb), sw);
 }
 
 static void
@@ -225,16 +261,16 @@
       int i;
 
       button = gtk_button_new_with_label (_("Select"));
-      gtk_signal_connect (GTK_OBJECT (button), "clicked",
-			  gnc_search_dialog_select_cb, sw);
+      g_signal_connect (G_OBJECT (button), "clicked",
+			G_CALLBACK (gnc_search_dialog_select_cb), sw);
       gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 3);
       sw->select_button = button;
 			  
       for (i = 0; sw->buttons[i].label; i++) {
 	button = gtk_button_new_with_label (sw->buttons[i].label);
-	gtk_object_set_data (GTK_OBJECT (button), "data", &(sw->buttons[i]));
-	gtk_signal_connect (GTK_OBJECT (button), "clicked",
-			    gnc_search_dialog_result_clicked, sw);
+	g_object_set_data (G_OBJECT (button), "data", &(sw->buttons[i]));
+	g_signal_connect (G_OBJECT (button), "clicked",
+			  G_CALLBACK (gnc_search_dialog_result_clicked), sw);
 	gtk_box_pack_start (GTK_BOX (button_box), button, FALSE, FALSE, 3);
       }
     }
@@ -255,7 +291,7 @@
   gnc_query_list_reset_query (GNC_QUERY_LIST(sw->result_list), sw->q);
 
   /* set 'new search' if fewer than max_count items is returned. */
-  max_count = gnc_lookup_number_option ("_+Advanced", "New Search Limit", 0.0);
+  max_count = gnc_gconf_get_float("dialogs/search", "new_search_limit", NULL);
   if (gnc_query_list_get_num_entries(GNC_QUERY_LIST(sw->result_list)) < max_count)
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (sw->new_rb), TRUE);
 }
@@ -286,8 +322,9 @@
 static void
 search_active_only_cb (GtkToggleButton *button, GNCSearchWindow *sw)
 {
-  gnc_set_boolean_option("__gui", "search_for_active_only",
-			 gtk_toggle_button_get_active (button));
+
+  gnc_gconf_set_bool(sw->gconf_section, KEY_ACTIVE_ONLY,
+		     gtk_toggle_button_get_active (button), NULL);
 }
 
 static void
@@ -474,7 +511,7 @@
 static void
 search_help_cb (GtkButton *button, GNCSearchWindow *sw)
 {
-  helpWindow (NULL, NULL, HH_FIND_TRANSACTIONS);
+  gnc_gnome_help (HF_USAGE, HL_FIND_TRANSACTIONS);
 }
 
 static void
@@ -486,8 +523,8 @@
   if (g_list_length (sw->crit_list) < 2)
     return;
 
-  element = gtk_object_get_data (GTK_OBJECT (button), "element");
-  data = gtk_object_get_data (GTK_OBJECT (element), "data");
+  element = g_object_get_data (G_OBJECT (button), "element");
+  data = g_object_get_data (G_OBJECT (element), "data");
 
   /* remove the element from the list */
   sw->crit_list = g_list_remove (sw->crit_list, data);
@@ -500,18 +537,18 @@
 static void
 attach_element (GtkWidget *element, GNCSearchWindow *sw, int row)
 {
-  GtkWidget *pixmap, *remove;
+  GtkWidget *remove;
   struct _crit_data *data;
 
-  data = gtk_object_get_data (GTK_OBJECT (element), "data");
+  data = g_object_get_data (G_OBJECT (element), "data");
 
   gtk_table_attach (GTK_TABLE (sw->criteria_table), element, 0, 1, row, row+1,
 		    GTK_EXPAND | GTK_FILL, 0, 0, 0);
 
-  pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_REMOVE);
-  remove = gnome_pixmap_button (pixmap, _("Remove"));
-  gtk_object_set_data (GTK_OBJECT (remove), "element", element);
-  gtk_signal_connect (GTK_OBJECT (remove), "clicked", remove_element, sw);
+  
+  remove = gtk_button_new_from_stock (GTK_STOCK_REMOVE);
+  g_object_set_data (G_OBJECT (remove), "element", element);
+  g_signal_connect (G_OBJECT (remove), "clicked", G_CALLBACK (remove_element), sw);
   gtk_table_attach (GTK_TABLE (sw->criteria_table), remove, 1, 2, row, row+1,
 		    0, 0, 0, 0);
   gtk_widget_show (remove);
@@ -521,7 +558,7 @@
 static void
 option_activate (GtkMenuItem *item, struct _crit_data *data)
 {
-  GNCSearchParam *param = gtk_object_get_data (GTK_OBJECT (item), "param");
+  GNCSearchParam *param = g_object_get_data (G_OBJECT (item), "param");
   GNCSearchCoreType *newelem;
 
   if (gnc_search_param_type_match (param, data->param)) {
@@ -537,7 +574,7 @@
    */
   if (data->elemwidget)
     gtk_container_remove (GTK_CONTAINER (data->container), data->elemwidget);
-  gtk_object_destroy (GTK_OBJECT (data->element));
+  g_object_unref (G_OBJECT (data->element));
 
   newelem = gnc_search_core_type_new_type_name
     (gnc_search_param_get_param_type (param));
@@ -556,7 +593,7 @@
 
   /* And grab focus */
   gnc_search_core_type_grab_focus (newelem);
-  gnc_search_core_type_editable_enters (newelem, data->dialog);
+  gnc_search_core_type_editable_enters (newelem);
 }
 
 static void
@@ -567,7 +604,7 @@
   for (node = sw->crit_list; node; ) {
     GList *tmp = node->next;
     struct _crit_data *data = node->data;
-    gtk_object_ref (GTK_OBJECT(data->button));
+    g_object_ref (data->button);
     remove_element (data->button, sw);
     node = tmp;
   }
@@ -583,11 +620,11 @@
 
   data = g_new0 (struct _crit_data, 1);
   data->element = element;
-  data->dialog = GNOME_DIALOG (sw->dialog);
+  data->dialog = GTK_DIALOG (sw->dialog);
 
   hbox = gtk_hbox_new (FALSE, 0);
   /* only set to automaticaly clean up the memory */
-  gtk_object_set_data_full (GTK_OBJECT (hbox), "data", data, g_free);
+  g_object_set_data_full (G_OBJECT (hbox), "data", data, g_free);
 
   p = gnc_search_core_type_get_widget (element);
   data->elemwidget = p;
@@ -598,8 +635,8 @@
   for (l = sw->params_list; l; l = l->next) {
     GNCSearchParam *param = l->data;
     item = gtk_menu_item_new_with_label (_(param->title));
-    gtk_object_set_data (GTK_OBJECT (item), "param", param);
-    gtk_signal_connect (GTK_OBJECT (item), "activate", option_activate, data);
+    g_object_set_data (G_OBJECT (item), "param", param);
+    g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (option_activate), data);
     gtk_menu_append (GTK_MENU (menu), item);
     gtk_widget_show (item);
 
@@ -645,7 +682,7 @@
     int rows;
 
     w = get_element_widget (sw, new);
-    data = gtk_object_get_data (GTK_OBJECT (w), "data");
+    data = g_object_get_data (G_OBJECT (w), "data");
     sw->crit_list = g_list_append (sw->crit_list, data);
 
     rows = GTK_TABLE (sw->criteria_table)->nrows;
@@ -653,7 +690,7 @@
     attach_element (w, sw, rows);
 
     gnc_search_core_type_grab_focus (new);
-    gnc_search_core_type_editable_enters (new, GNOME_DIALOG (sw->dialog));
+    gnc_search_core_type_editable_enters (new);
   }
 }
 
@@ -664,7 +701,7 @@
 }
 
 static int
-gnc_search_dialog_close_cb (GnomeDialog *dialog, GNCSearchWindow *sw)
+gnc_search_dialog_close_cb (GtkDialog *dialog, GNCSearchWindow *sw)
 {
   g_return_val_if_fail (sw, TRUE);
 
@@ -701,23 +738,25 @@
   GNCSearchWindow * sw = data;
 
   g_return_if_fail (sw);
-  gnome_dialog_close (GNOME_DIALOG (sw->dialog));
+  gtk_widget_destroy (sw->dialog);
+  /* DRH: should sw be freed here? */
 }
 
 static void
 gnc_search_dialog_init_widgets (GNCSearchWindow *sw)
 {
   GladeXML *xml;
-  GtkWidget *label, *pixmap, *add, *box;
+  GtkWidget *label, *add, *box;
   GtkWidget *menu, *item, *omenu;
   GtkWidget *new_item_button;
   const char * type_label;
+  gboolean active;
 
   xml = gnc_glade_xml_new ("search.glade", "Search Dialog");
 
   /* Grab the dialog, save the dialog info */
   sw->dialog = glade_xml_get_widget (xml, "Search Dialog");
-  gtk_object_set_data (GTK_OBJECT (sw->dialog), "dialog-info", sw);
+  g_object_set_data (G_OBJECT (sw->dialog), "dialog-info", sw);
 
   /* grab the result hbox */
   sw->result_hbox = glade_xml_get_widget (xml, "result_hbox");
@@ -731,9 +770,9 @@
   gtk_label_set_text (GTK_LABEL (label), type_label);
 
   /* Set the 'add criterion' button */
-  pixmap = gnome_stock_new_with_icon (GNOME_STOCK_PIXMAP_ADD);
-  add = gnome_pixmap_button (pixmap, _("Add criterion"));
-  gtk_signal_connect (GTK_OBJECT (add), "clicked", add_criterion, sw);
+  add = gtk_button_new_from_stock (GTK_STOCK_ADD);
+ 
+  g_signal_connect (G_OBJECT (add), "clicked", G_CALLBACK (add_criterion), sw);
   box = glade_xml_get_widget (xml, "add_button_box");
   gtk_box_pack_start (GTK_BOX (box), add, FALSE, FALSE, 3);
   
@@ -741,12 +780,12 @@
   menu = gtk_menu_new ();
 
   item = gtk_menu_item_new_with_label (_("all criteria are met"));
-  gtk_signal_connect (GTK_OBJECT (item), "activate", match_all, sw);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (match_all), sw);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
 	
   item = gtk_menu_item_new_with_label (_("any criteria are met"));
-  gtk_signal_connect (GTK_OBJECT (item), "activate", match_any, sw);
+  g_signal_connect (G_OBJECT (item), "activate", G_CALLBACK (match_any), sw);
   gtk_menu_append (GTK_MENU (menu), item);
   gtk_widget_show (item);
 	
@@ -765,11 +804,10 @@
   sw->add_rb = glade_xml_get_widget (xml, "add_search_radiobutton");
   sw->del_rb = glade_xml_get_widget (xml, "delete_search_radiobutton");
 
+  active = gnc_gconf_get_bool(sw->gconf_section, KEY_ACTIVE_ONLY, NULL);
   sw->active_only_check = glade_xml_get_widget (xml, "active_only_check");
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sw->active_only_check),
-				gnc_lookup_boolean_option ("__gui",
-							   "search_for_active_only",
-							   TRUE));
+				active);
 
   /* Figure out if we this object-type has an "active" parameter, and
    * if not, then set the active-check button insensitive
@@ -788,7 +826,7 @@
       /* Translators: %s is either "item" or the name of some other
        * item, e.g. "Customer" or "Invoice". */
       g_strdup_printf (_("New %s"), type_label ? type_label : _("item"));
-    gtk_label_set_text (GTK_LABEL (GTK_BIN (new_item_button)->child), desc);
+    gtk_button_set_label (GTK_BUTTON(new_item_button), desc);
     g_free (desc);
   }
   /* add the first criterion */
@@ -830,8 +868,8 @@
 						 close_handler, sw);
 
   /* And setup the close callback */
-  gtk_signal_connect (GTK_OBJECT (sw->dialog), "close",
-		      GTK_SIGNAL_FUNC (gnc_search_dialog_close_cb), sw);
+  g_signal_connect (G_OBJECT (sw->dialog), "destroy",
+		    G_CALLBACK (gnc_search_dialog_close_cb), sw);
 
   gnc_search_dialog_reset_widgets (sw);
   gnc_search_dialog_show_close_cancel (sw);
@@ -841,6 +879,8 @@
 gnc_search_dialog_destroy (GNCSearchWindow *sw)
 {
   if (!sw) return;
+  if (sw->gconf_section)
+    gnc_save_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
   gnc_close_gui_component (sw->component_id);
 }
 
@@ -858,7 +898,8 @@
 			  GNCSearchCallbackButton *callbacks,
 			  GNCSearchResultCB result_callback,
 			  GNCSearchNewItemCB new_item_cb,
-			  gpointer user_data, GNCSearchFree free_cb)
+			  gpointer user_data, GNCSearchFree free_cb,
+			  const gchar *gconf_section)
 {
   GNCSearchWindow *sw = g_new0 (GNCSearchWindow, 1);
 
@@ -881,6 +922,7 @@
   sw->new_item_cb = new_item_cb;
   sw->user_data = user_data;
   sw->free_cb = free_cb;
+  sw->gconf_section = gconf_section;
 
   /* Grab the get_guid function */
   sw->get_guid = qof_class_get_parameter (sw->search_for, QOF_PARAM_GUID);
@@ -889,6 +931,8 @@
   sw->q = show_start_query;
 
   gnc_search_dialog_init_widgets (sw);
+  if (sw->gconf_section)
+    gnc_restore_window_size(sw->gconf_section, GTK_WINDOW(sw->dialog));
 
   /* Maybe display the original query results? */
   if (callbacks && show_start_query) {
@@ -901,15 +945,15 @@
 
 /* Register an on-close signal with the Search Dialog */
 guint gnc_search_dialog_connect_on_close (GNCSearchWindow *sw,
-					  GtkSignalFunc func,
+					  GCallback func,
 					  gpointer user_data)
 {
   g_return_val_if_fail (sw, 0);
   g_return_val_if_fail (func, 0);
   g_return_val_if_fail (user_data, 0);
 
-  return gtk_signal_connect (GTK_OBJECT (sw->dialog), "close",
-			     func, user_data);
+  return g_signal_connect (G_OBJECT (sw->dialog), "destroy",
+			   func, user_data);
 
 }
 
@@ -1021,5 +1065,6 @@
     display = get_display_list (GNC_ID_SPLIT);
 
   sw = gnc_search_dialog_create (GNC_ID_SPLIT, params, display,
-				 NULL, NULL, buttons, NULL, NULL, NULL, NULL);
+				 NULL, NULL, buttons, NULL, NULL, NULL, NULL,
+				 NULL);
 }
--- src/gnome-utils/gnc-mdi-utils.c
+++ /dev/null
@@ -1,1345 +0,0 @@
-/********************************************************************\
- * gnc-mdi-util.c -- utility functions for gnome/mdi                *
- * Copyright (C) 2001 Linux Developers Group                        *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-
-#include "dialog-utils.h"
-#include "global-options.h"
-#include "gnc-book.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-html.h"
-#include "gnc-mdi-utils.h"
-#include "gnc-session.h"
-#include "gnc-ui-util.h"
-#include "gnc-ui.h"
-
-#define GNC_MDI_CM_CLASS "gnc-mdi"
-
-static short module = MOD_GUI;
-
-static GNCMDIInfo *gnc_mdi_current = NULL;
-static gboolean gnc_toolbar_visible = TRUE;
-static gboolean gnc_statusbar_visible = TRUE;
-static gboolean gnc_summarybar_visible = TRUE;
-
-
-/*
- * These strings must match the dispatch enum listed at the start of
- * gnc-mdi-utils.h.
- *
- * Do not internationalize these strings!!!
- */
-static gchar *
-dispatch_menu_paths[GNC_DISP_LAST] = {
-  "_File/_Print",
-  "_Edit/C_ut",
-  "_Edit/_Copy",
-  "_Edit/_Paste",
-  "_View/_Refresh"
-};
-
-gncUIWidget
-gnc_ui_get_toplevel (void)
-{
-  GList *containers = gtk_container_get_toplevels ();
-  GnomeApp *app = NULL;
-  
-  for (; containers; containers = containers->next)
-  {
-    GtkWidget *w = containers->data;
-    GNCMDIInfo *gnc_mdi;
-
-    if (!GNOME_IS_APP (w))
-      continue;
-
-    app = GNOME_APP (w);
-
-    gnc_mdi = gtk_object_get_data (GTK_OBJECT (w), "gnc_mdi");
-    if (!gnc_mdi)
-      continue;
-
-    app = gnome_mdi_get_active_window (gnc_mdi->mdi);
-
-    break;
-  }
-
-  if (app)
-    return GTK_WIDGET (app);
-
-  return NULL;
-}
-
-gboolean
-gnc_mdi_get_toolbar_visibility (void)
-{
-  return(gnc_toolbar_visible);
-}
-
-gboolean
-gnc_mdi_get_statusbar_visibility (void)
-{
-  return(gnc_statusbar_visible);
-}
-
-gboolean
-gnc_mdi_get_summarybar_visibility (void)
-{
-  return(gnc_summarybar_visible);
-}
-
-void
-gnc_mdi_set_toolbar_visibility (gboolean visible)
-{
-  gnc_toolbar_visible = visible;
-}
-
-void
-gnc_mdi_set_statusbar_visibility (gboolean visible)
-{
-  gnc_statusbar_visible = visible;
-}
-
-void
-gnc_mdi_set_summarybar_visibility (gboolean visible)
-{
-  gnc_summarybar_visible = visible;
-}
-
-void
-gnc_mdi_show_progress (const char *message, double percentage)
-{
-  GtkWidget *app;
-  GnomeAppBar *appbar;
-
-  app = gnc_ui_get_toplevel();
-  if (app == NULL)
-    return;
-  if (GNOME_APP(app)->statusbar == NULL)
-    return;
-
-  appbar = GNOME_APPBAR(GNOME_APP(app)->statusbar);
-
-  if (percentage < 0) {
-    gnome_appbar_refresh(appbar);
-    gnome_appbar_set_progress(appbar, 0.0);
-  } else {
-    if (message)
-      gnome_appbar_set_status(appbar, message);
-    gnome_appbar_set_progress(appbar, percentage/100);
-  }
-
-  /* make sure new text is up */
-  while (gtk_events_pending ())
-    gtk_main_iteration ();
-}
-
-typedef struct {
-  GNCMDIChildInfo *mc;
-  gboolean topmost;
-} gnc_mdi_update_args;
-
-/**
- * gnc_mdi_widget_show
- *
- * @data: The widget to modify.
- * @user_data: TRUE if the widget should be shown, FALSE if hidden.
- *
- * This routine is merely a wrapper around gtk_widget_show/hide so
- * that those functions can be called on a list of widgets.
- */
-static void
-gnc_mdi_menu_widget_show(gpointer data, gpointer user_data)
-{
-  gchar *path = (gchar *)data;
-  gnc_mdi_update_args *args = (gnc_mdi_update_args *)user_data;
-  GtkWidget *widget;
-
-  g_return_if_fail(data != NULL);
-  g_return_if_fail(user_data != NULL);
-
-  widget = gnc_mdi_child_find_menu_item(args->mc, path);
-  if (widget == NULL)
-    return;
-
-  if (args->topmost) {
-    gtk_widget_show(widget);
-  } else {
-    gtk_widget_hide(widget);
-  }
-}
-
-static void
-gnc_mdi_toolbar_widget_show(gpointer data, gpointer user_data)
-{
-  gchar *path = (gchar *)data;
-  gnc_mdi_update_args *args = (gnc_mdi_update_args *)user_data;
-  GtkWidget *widget;
-
-  g_return_if_fail(data != NULL);
-  g_return_if_fail(user_data != NULL);
-
-  widget = gnc_mdi_child_find_toolbar_item(args->mc, path);
-  if (widget == NULL)
-    return;
-
-  if (args->topmost) {
-    gtk_widget_show(widget);
-  } else {
-    gtk_widget_hide(widget);
-  }
-}
-
-/**
- * gnc_mdi_widget_sensitive
- *
- * @data: The widget to modify.
- * @user_data: The new sensitivity of the widget.
- *
- * This routine is merely a wrapper around gtk_widget_set_sensitive
- * so that functions can be called on a list of widgets.
- */
-static void
-gnc_mdi_menu_widget_sensitive(gpointer data, gpointer user_data)
-{
-  gchar *path = (gchar *)data;
-  gnc_mdi_update_args *args = (gnc_mdi_update_args *)user_data;
-  GtkWidget *widget;
-
-  g_return_if_fail(data != NULL);
-  g_return_if_fail(user_data != NULL);
-
-  widget = gnc_mdi_child_find_menu_item(args->mc, path);
-  if (widget == NULL)
-    return;
-
-  gtk_widget_set_sensitive(widget, args->topmost);
-}
-
-static void
-gnc_mdi_toolbar_widget_sensitive(gpointer data, gpointer user_data)
-{
-  gchar *path = (gchar *)data;
-  gnc_mdi_update_args *args = (gnc_mdi_update_args *)user_data;
-  GtkWidget *widget;
-
-  g_return_if_fail(data != NULL);
-  g_return_if_fail(user_data != NULL);
-
-  widget = gnc_mdi_child_find_toolbar_item(args->mc, path);
-  if (widget == NULL)
-    return;
-
-  gtk_widget_set_sensitive(widget, args->topmost);
-}
-
-/**
- * gnc_mdi_update_widgets
- *
- * @mc: A pointer to the child data structure for the GNC child
- * being brought to the front (or sent to the back).
- *
- * @topmost: TRUE if this child is being raised to the front of the
- * notebook (or to be the topmost window.)
- *
- * This routine performs all the widget modifications needed to adjust
- * the menus and toolbar for a new gnc window.
- */
-static void
-gnc_mdi_update_widgets(GNCMDIChildInfo *mc, gboolean topmost)
-{
-  gnc_mdi_update_args args;
-
-  if (mc == NULL) return; /* expected once */
-
-  args.mc = mc;
-  args.topmost = topmost;
-  g_list_foreach(mc->menu_names[GNC_AUTO_SHOW], gnc_mdi_menu_widget_show, &args);
-  g_list_foreach(mc->toolbar_names[GNC_AUTO_SHOW], gnc_mdi_toolbar_widget_show, &args);
-  g_list_foreach(mc->menu_names[GNC_AUTO_ENABLE], gnc_mdi_menu_widget_sensitive, &args);
-  g_list_foreach(mc->toolbar_names[GNC_AUTO_ENABLE], gnc_mdi_toolbar_widget_sensitive, &args);
-
-  args.topmost = !topmost;
-  g_list_foreach(mc->menu_names[GNC_AUTO_HIDE], gnc_mdi_menu_widget_show, &args);
-  g_list_foreach(mc->toolbar_names[GNC_AUTO_HIDE], gnc_mdi_toolbar_widget_show, &args);
-  g_list_foreach(mc->menu_names[GNC_AUTO_DISABLE], gnc_mdi_menu_widget_sensitive, &args);
-  g_list_foreach(mc->toolbar_names[GNC_AUTO_DISABLE], gnc_mdi_toolbar_widget_sensitive, &args);
-}
-
-/**
- * gnc_mdi_child_find_menu_item
- *
- * @mc: A pointer to the child data structure for the GNC child
- * currently visible.
- *
- * @path: A string giving the menu path of the item wanted.  This
- * string MUST NOT be internationalized.
- *
- * This routine will search through the menubar looking for a specific
- * menu item.  It handles internationalizing the string passed to it,
- * and pulling apart the string into the components of the menu path.
- *
- * returns: A pointer to the requested GtkMenuItem, or NULL.
- */
-GtkWidget *
-gnc_mdi_child_find_menu_item(GNCMDIChildInfo *mc, gchar *path)
-{
-  GnomeDockItem *di;
-  GtkWidget *menubar;
-  GtkWidget *menu;
-  GtkWidget *menuitem;
-  int pos;
-
-  if (mc->app == NULL)
-    return(NULL);
-
-  di = gnome_app_get_dock_item_by_name (mc->app, GNOME_APP_MENUBAR_NAME);
-  if (di == NULL)
-    return(NULL);
-
-  menubar = gnome_dock_item_get_child (di);
-  if (menubar == NULL)
-    return(NULL);
-
-  menu = gnome_app_find_menu_pos (menubar, path, &pos);
-  if (menu == NULL)
-    return(NULL);
-
-  menuitem = (GtkWidget*)g_list_nth_data(GTK_MENU_SHELL(menu)->children, pos-1);
-  return(menuitem);
-}
-
-/**
- * gnc_mdi_child_find_toolbar_item
- *
- * @mc: A pointer to the child data structure for the GNC child
- * currently visible.
- *
- * @name: A string giving the name the item wanted.  This name MUST
- * NOT be internationalized.
- *
- * This routine will search through the toolbar looking for a specific
- * item.  It returns the widget that is used to display that item in
- * the toolbar.  This routine handles internationalizing the string
- * passed to it.
- *
- * returns: A pointer to the requested toolbar item, or NULL.
- */
-GtkWidget *
-gnc_mdi_child_find_toolbar_item(GNCMDIChildInfo *mc, gchar *name)
-{
-  GtkToolbar *toolbar;
-  GtkToolbarChild *child;
-  gchar *label;
-  gchar *transl;
-  int pos;
-
-  g_return_val_if_fail(mc != NULL, NULL);
-  g_return_val_if_fail(mc->toolbar != NULL, NULL);
-
-  transl = L_(name);
-  toolbar = GTK_TOOLBAR(mc->toolbar);
-  for (pos = 0; pos < toolbar->num_children; pos++) {
-    child = g_list_nth_data(toolbar->children, pos);
-    if ((child == NULL) || (child->label == NULL) || (child->widget == NULL))
-      continue;
-    gtk_label_get(GTK_LABEL(child->label), &label);
-    if (strcasecmp(label, transl) == 0)
-      return(child->widget);
-  }
-  return(NULL);
-}
-
-/**
- * gnc_mdi_child_auto_menu
- *
- * @mc: A pointer to the child data structure for the GNC child
- * whose menus should be set up for automatic adjustment.
- *
- * @type: An enum describing what should be done with this item each
- * time this child is brought to the front.  Choices are: SHOW, HIDE,
- * ENABLE, and DISABLE.
- *
- * @first_path: NULL terminated list of strings corresponding to the
- * menu items that should be added to the adjustment list.
- *
- * This routine searches through the application menu data structures
- * to find the specified menu item widgets, and then adds them to a
- * list.  This list is used for automatic manipulation of the widget
- * whenever the gnc child (@mc) becomes the front-most window. When
- * the child is no longer the front-most window the manipulation is
- * undone.
- *
- * *** Do not i18n strings passed to this function.  The routines
- * *** called by this function correctly handle taking menu paths
- * *** apart and i18n the individual pieces as they go.  Passing i18n
- * *** strings will cause this function to fail.
- */
-void
-gnc_mdi_child_auto_menu(GNCMDIChildInfo *mc,
-                        GNCMDIAutoType type,
-                        gchar *first_path, ...)
-{
-  GList *walker;
-  va_list args;
-  gchar *path;
-
-  va_start(args, first_path);
-  for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
-    for (walker = g_list_first(mc->menu_names[type]);
-         walker;
-         walker = g_list_next(walker)) {
-      if (strcmp(path, walker->data) == 0)
-        break;
-    }
-    if (walker) {
-      /* Found. Don't add again. */
-      continue;
-    }
-
-    /* Not found, add it. */
-    mc->menu_names[type] = g_list_append(mc->menu_names[type], path);
-  }
-  va_end(args);
-}
-
-/**
- * gnc_mdi_child_auto_toolbar
- *
- * @mc: A pointer to the child data structure for the GNC child
- * whose toolbar items should be set up for automatic adjustment.
- *
- * @type: An enum describing what should be done with this item each
- * time this child is brought to the front.  Choices are: SHOW, HIDE,
- * ENABLE, and DISABLE.
- *
- * @first_path: NULL terminated list of strings corresponding to the
- * toolbar items that should be added to the adjustment list.
- *
- * This routine searches through the application toolbar data structures
- * to find the specified toolbar item widgets, and then adds them to a
- * list.  This list is used for automatic manipulation of the widget
- * whenever the gnc child (par1) becomes the front-most window. When
- * the child is no longer the front-most window the manipulation is
- * undone.
- *
- * *** Do not i18n strings passed to this function.  This is for
- * *** consistency with the previous function.  This function
- * *** correctly handles performing i18n on the strings passed to it.
- */
-void
-gnc_mdi_child_auto_toolbar(GNCMDIChildInfo *mc,
-                           GNCMDIAutoType type,
-                           gchar *first_path, ...)
-{
-  GList *walker;
-  gchar *path;
-  va_list args;
-
-  va_start(args, first_path);
-  for (path = first_path; path != NULL; path = va_arg(args, gchar *)) {
-    for (walker = g_list_first(mc->toolbar_names[type]);
-         walker;
-         walker = g_list_next(walker)) {
-      if (strcmp(path, walker->data) == 0)
-        break;
-    }
-    if (walker) {
-      /* Found. Don't add again. */
-      continue;
-    }
-
-    /* Not found, add it. */
-    mc->toolbar_names[type] = g_list_append(mc->toolbar_names[type], path);
-  }
-  va_end(args);
-}
-
-/**
- * gnc_mdi_show_toolbar
- *
- * @mc: A pointer to the child data structure for the GNC child
- * whose toolbar items should be shown/hidden.
- *
- * This routine shows or hides the gnome dock item containing the
- * toolbar.
- */
-void
-gnc_mdi_show_toolbar (GNCMDIChildInfo *mc)
-{
-  GtkWidget *dockitem = GTK_WIDGET(mc->toolbar)->parent;
-
-  ENTER("mc=%p, mc->app=%p", mc, mc ? mc->app : 0);
-  if (gnc_toolbar_visible) {
-    DEBUG("showing toolbar");
-    gtk_widget_show(dockitem);
-  } else {
-    gtk_widget_hide(dockitem);
-    DEBUG("hiding toolbar");
-    if (mc->app) {
-      gtk_widget_queue_resize(mc->app->dock);
-      DEBUG("dock resize");
-    }
-  }
-  LEAVE(" ");
-}
-
-/**
- * gnc_mdi_show_statusbar
- *
- * @mc: A pointer to the child data structure for the GNC child
- * whose statusbar should be shown/hidden.
- *
- * This routine shows or hides the gnome dock item containing the
- * statusbar.
- */
-void
-gnc_mdi_show_statusbar (GNCMDIChildInfo *mc)
-{
-  ENTER("mc=%p, mc->app=%p", mc, mc ? mc->app : 0);
-  if (!mc || !mc->app) {
-    LEAVE("oops");
-    return;
-  }
-
-  if (gnc_statusbar_visible) {
-    gtk_widget_show(mc->app->statusbar);
-  } else {
-    gtk_widget_hide(mc->app->statusbar);
-    gtk_widget_queue_resize(mc->app->statusbar->parent);
-  }
-  LEAVE(" ");
-}
-
-/**
- * gnc_mdi_show_summarybar
- *
- * @mc: A pointer to the child data structure for the GNC child
- * whose summarybar should be shown/hidden.
- *
- * This routine shows or hides the gnome dock item containing the
- * summarybar.
- */
-void
-gnc_mdi_show_summarybar (GNCMDIChildInfo *mc)
-{
-  GnomeDockItem *summarybar;
-  guint dc1, dc2, dc3, dc4;
-
-  ENTER("mc=%p, mc->app=%p", mc, mc ? mc->app : 0);
-  if (!mc || !mc->app) {
-    LEAVE("oops");
-    return;
-  }
-
-  summarybar = gnome_dock_get_item_by_name(GNOME_DOCK(mc->app->dock),
-                                           "Summary Bar",
-                                           &dc1, &dc2, &dc3, &dc4);
-  if (!summarybar) {
-    LEAVE("no summarybar");
-    return;
-  }
-
-  if (gnc_summarybar_visible) {
-    gtk_widget_show(GTK_WIDGET(summarybar));
-  } else {
-    gtk_widget_hide(GTK_WIDGET(summarybar));
-    gtk_widget_queue_resize(mc->app->dock);
-  }
-  LEAVE(" ");
-}
-
-/**
- * gnc_mdi_tweak_menus
- *
- * @mc: A pointer to the GNC MDI child associated with the Main
- * window.
- *
- * This routine tweaks the View window in the main window menubar so
- * that the menu checkboxes correctly show the state of the Toolbar,
- * Summarybar and Statusbar.  There is no way to have the checkboxes
- * start checked.  This will trigger each of the callbacks once, but
- * they are designed to ignore the first 'sync' callback.  This is a
- * suboptimal solution, but I can't find a better one at the moment.
- */
-static void
-gnc_mdi_tweak_menus(GNCMDIChildInfo * mc)
-{
-  GtkWidget *widget;
-  GnomeMDI *info;
-
-  ENTER(" ");
-  info = mc->gnc_mdi->mdi;
-  widget = gnc_mdi_child_find_menu_item(mc, "_View/_Toolbar");
-  gtk_signal_handler_block_by_data(GTK_OBJECT(widget), info);
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), gnc_toolbar_visible);
-  gtk_signal_handler_unblock_by_data(GTK_OBJECT(widget), info);
-
-  widget = gnc_mdi_child_find_menu_item(mc, "_View/_Status Bar");
-  gtk_signal_handler_block_by_data(GTK_OBJECT(widget), info);
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), gnc_statusbar_visible);
-  gtk_signal_handler_unblock_by_data(GTK_OBJECT(widget), info);
-
-  widget = gnc_mdi_child_find_menu_item(mc, "_View/S_ummary Bar");
-  gtk_signal_handler_block_by_data(GTK_OBJECT(widget), info);
-  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widget), gnc_summarybar_visible);
-  gtk_signal_handler_unblock_by_data(GTK_OBJECT(widget), info);
-  LEAVE(" ");
-}
-
-static void
-gnc_mdi_show_bars (GNCMDIChildInfo *mc)
-{
-  gnc_mdi_show_toolbar (mc);
-  gnc_mdi_show_statusbar (mc);
-  gnc_mdi_show_summarybar (mc);
-  gnc_mdi_tweak_menus(mc);
-}
-
-static void
-gnc_mdi_child_set_title (GNCMDIChildInfo *childwin)
-{
-  const char *filename;
-  char *title;
-
-  if (!childwin || !childwin->app)
-    return;
-
-  filename = gnc_session_get_url (gnc_get_current_session ());
-
-  if (!filename)
-    filename = _("<no file>");
-  else if (strncmp ("file:", filename, 5) == 0)
-    filename += 5;
-
-  if (!childwin->title)
-    title = g_strdup_printf ("%s (%s)", childwin->gnc_mdi->title, filename);
-  else
-    title = g_strdup_printf ("%s - %s (%s)", childwin->title,
-                             childwin->gnc_mdi->title, filename);
-
-  gtk_window_set_title (GTK_WINDOW(childwin->app), title);
-
-  g_free (title);
-}
-
-/**
- * gnc_mdi_app_destroyed_cb
- *
- * @app: A pointer to the GnomeApp data structure being destroyed.
- *
- * @user_data: A pointer to a GNCMDIInfo data structure associated
- * with this GnomeMDI data structure.  This value comes from the
- * callback registration.
- *
- * This function is called during destruction of the gnome app data
- * structure.  Its purpose is to save the toolbar settings and
- * disconnect the toolbar from any open views.
- *
- * (I'm not sure this routine is ever really called. I tried to find a
- * set of actions that would trigger it and couldn't.)
- */
-static void 
-gnc_mdi_app_destroyed_cb (GnomeApp * app, gpointer user_data)
-{
-  GNCMDIInfo * mainwin = user_data;
-  GnomeMDI * mdi = mainwin->mdi;
-
-  ENTER(" ");
-  if (mainwin->shutdown && (g_list_length (mdi->windows) == 0))
-    mainwin->shutdown (0);
-  else
-  {
-    GtkWidget *toolbar = gtk_object_get_user_data (GTK_OBJECT (app));
-    GList * child; 
-
-    if (toolbar)
-      gtk_widget_unref (toolbar);
-
-    gtk_object_set_user_data (GTK_OBJECT (app), NULL);
-
-    for (child = mainwin->children; child; child = child->next)
-    {
-      GNCMDIChildInfo * mc = child->data;
-
-      if (mc && mc->toolbar && mc->app && (mc->app == app))
-      {
-        /* we need to pull the toolbar out to prevent its being destroyed */
-        gtk_widget_ref (mc->toolbar);
-        gtk_container_remove (GTK_CONTAINER(mc->toolbar->parent), mc->toolbar);
-      }
-    }
-  }
-  LEAVE(" ");
-}
-
-static void
-gnc_mdi_app_created_cb (GnomeMDI * mdi, GnomeApp * app, gpointer data)
-{
-  GNCMDIInfo * mainwin = data;
-
-  /* enable save and restore of menubar positions */
-  ENTER(" ");
-  gnome_app_enable_layout_config (app, TRUE);
-
-  /* flag the app as gnc mdi created */
-  gtk_object_set_data (GTK_OBJECT (app), "gnc_mdi", mainwin);
-
-  /* add a signal to preserve the toolbar on destroy */ 
-  gtk_signal_connect (GTK_OBJECT (app), "destroy", 
-                      GTK_SIGNAL_FUNC (gnc_mdi_app_destroyed_cb),
-                      mainwin);
-  LEAVE(" ");
-}
-
-/**
- * gnc_mdi_destroy_cb
- *
- * @w: A pointer to the GnomeMDI data structure being destroyed.
- *
- * @data: A pointer to a GNCMDIInfo data structure associated with
- * this GnomeMDI data structure.  This value comes from the callback
- * registration.
- *
- * This function is called during destruction of the gnome MDI object,
- * which occurs in the gnc_mdi_destroy function.  This function is
- * basically a subroutine of that function, with a couple of layers of
- * gtk code between them.
- */
-static void
-gnc_mdi_destroy_cb (GtkObject * w, gpointer data)
-{
-  GNCMDIInfo * gnc_mdi = data;
-
-  ENTER(" ");
-  gnc_mdi->mdi = NULL;
-
-  if (gnc_mdi->shutdown)
-    gnc_mdi->shutdown (0);
-
-  if (gnc_mdi_current == gnc_mdi)
-    gnc_mdi_current = NULL;
-
-  gnc_unregister_gui_component (gnc_mdi->component_id);
-
-  g_free (gnc_mdi);
-  LEAVE(" ");
-}
-
-/**
- * gnc_mdi_child_menu_tweaking
- *
- * @mc: A pointer to the child data structure for the GNC child view
- * that has just been created.
- *
- * This routine adjust the main menubar to reflect which of the
- * 'dispatchable' menu items this view has set up callbacks for.  It
- * also calls a view specific routine which can add menu items to the
- * menubar, and calls the main window routine to adjust items in the
- * View menu.
- */
-static void
-gnc_mdi_child_menu_tweaking (GNCMDIChildInfo * mc)
-{
-  GNCMDIAutoType what;
-  GNCMDIDispatchType type;
-
-  for (type = GNC_DISP_PRINT; type < GNC_DISP_LAST; type++) {
-    what = mc->dispatch_callback[type] ? GNC_AUTO_ENABLE : GNC_AUTO_DISABLE;
-    gnc_mdi_child_auto_menu(mc, what, dispatch_menu_paths[type], NULL);
-  }
-
-  if (mc->menu_tweaking)
-    mc->menu_tweaking(mc);
-}
-
-/**
- * gnc_mdi_child_menu_tweaking
- *
- * @mc: A pointer to the child data structure for the GNC child view
- * that should be updated.
- *
- * @type: The dispatch entry whose data should be set.
- *
- * @cb: A view specific callback function.
- *
- * @data: The data to pass to the view specific callback.
- *
- * This routine remembers the data for dispatching various top level
- * menu items to view specific functions.  These are items like the
- * print menu item, or the refresh menu item.  All this function does
- * is record the passed arguments on to the gnc mdi child data
- * structure for later use in determining whether or not the menu item
- * should be available, and then for use when the menu item is
- * selected.
- */
-void
-gnc_mdi_set_dispatch_cb (GNCMDIChildInfo * mc, GNCMDIDispatchType type,
-                         GtkCallback cb, gpointer data)
-{
-  g_return_if_fail(mc != NULL);
-  g_return_if_fail(type < GNC_DISP_LAST);
-  g_return_if_fail(cb != NULL);
-
-  mc->dispatch_callback[type] = cb;
-  mc->dispatch_data[type] = data;
-
-}
-
-static void
-gnc_mdi_child_changed_cb (GnomeMDI * mdi, GnomeMDIChild * prev_child,
-                          gpointer data)
-{
-  GNCMDIChildInfo * childwin = NULL, *prevwin = NULL;
-  GnomeUIInfo      * hintinfo;
-  GtkWidget        * oldbar;
-  GnomeApp         * new_app = NULL; 
-  GnomeDockItemBehavior behavior;
-
-  ENTER(" ");
-  if (prev_child)
-  {
-    prevwin = gtk_object_get_user_data (GTK_OBJECT(prev_child));
-    if (mdi->mode != GNOME_MDI_TOPLEVEL)
-      gnc_mdi_update_widgets(prevwin, FALSE);
-  }
-
-  if (mdi && mdi->active_child)
-  {
-    childwin = gtk_object_get_user_data (GTK_OBJECT(mdi->active_child));
-    new_app = gnome_mdi_get_app_from_view (childwin->contents);
-  }
-
-  behavior = GNOME_DOCK_ITEM_BEH_EXCLUSIVE;
-  if (!gnome_preferences_get_toolbar_detachable ())
-    behavior |= GNOME_DOCK_ITEM_BEH_LOCKED;
-
-  if (childwin && childwin->toolbar)
-  {
-    if (childwin->app && (childwin->app == new_app))
-    {
-      oldbar = gtk_object_get_user_data (GTK_OBJECT(new_app));
-      if (oldbar && (oldbar != childwin->toolbar))
-      {
-        if (oldbar->parent)
-          gtk_widget_hide (GTK_WIDGET(oldbar)->parent);        
-          gnc_mdi_show_bars(childwin);
-      }
-    }
-    else if (childwin->app)
-    {
-      oldbar = gtk_object_get_user_data (GTK_OBJECT(new_app));
-      if (oldbar && oldbar->parent && (oldbar != childwin->toolbar))
-        gtk_widget_hide (GTK_WIDGET(oldbar)->parent);        
-
-      /* we need to move the toolbar to a new App (mdi mode probably
-       * changed) */
-      if (GTK_WIDGET(childwin->toolbar)->parent)
-      {
-        gtk_widget_ref (GTK_WIDGET(childwin->toolbar));
-        gtk_container_remove (GTK_CONTAINER
-                              (GTK_WIDGET(childwin->toolbar)->parent),
-                              GTK_WIDGET(childwin->toolbar));
-      }
-
-      childwin->app = new_app;
-      gnome_app_add_toolbar (GNOME_APP(childwin->app), 
-                             GTK_TOOLBAR(childwin->toolbar),
-                             "Toolbar", behavior,
-                             GNOME_DOCK_TOP, 1, 0, 0);
-
-      gtk_toolbar_set_style (GTK_TOOLBAR(childwin->toolbar), 
-                             gnc_get_toolbar_style ());
-      gnc_mdi_show_bars(childwin);
-    }
-    else
-    {
-      oldbar = gtk_object_get_user_data (GTK_OBJECT(new_app));
-      if (oldbar && oldbar->parent && (oldbar != childwin->toolbar))
-        gtk_widget_hide (GTK_WIDGET(oldbar)->parent);        
-
-      childwin->app = new_app;
-      gnome_app_add_toolbar (GNOME_APP(childwin->app), 
-                             GTK_TOOLBAR(childwin->toolbar),
-                             "Toolbar", behavior,
-                             GNOME_DOCK_TOP, 1, 0, 0);
-
-      gtk_toolbar_set_style (GTK_TOOLBAR(childwin->toolbar), 
-                             gnc_get_toolbar_style ());
-      gnc_mdi_show_bars(childwin);
-      gnc_mdi_child_menu_tweaking(childwin);
-    }
-
-    oldbar = gtk_object_get_user_data (GTK_OBJECT(new_app));
-    if (oldbar)
-      gtk_widget_unref (oldbar);
-
-    if (childwin->toolbar)
-      gtk_widget_ref (childwin->toolbar);
-
-    gtk_object_set_user_data (GTK_OBJECT(new_app), childwin->toolbar);
-  }
-
-  /* set the window title */ 
-  gnc_mdi_child_set_title (childwin);
-
-  /* install menu hints if relevant */
-  if (mdi && mdi->active_child)
-  {
-    /* the arg to this callback is SUPPOSED to be the last active child, 
-     * but it gets to be NULL under some circumstances */
-    hintinfo = gnome_mdi_get_menubar_info (new_app);
-    if (hintinfo)
-      gnome_app_install_menu_hints (new_app, hintinfo);
-    
-    hintinfo = gnome_mdi_get_child_menu_info (new_app);
-    if (hintinfo)
-      gnome_app_install_menu_hints (new_app, hintinfo);
-    gnc_mdi_update_widgets(childwin, TRUE);
-  }
-  LEAVE(" ");
-}
-
-static void
-gnc_mdi_configure_toolbar_cb (gpointer data)
-{
-  GNCMDIInfo * mi = data; 
-  GtkToolbarStyle tbstyle;
-  GList * child;
-
-  ENTER(" ");
-  tbstyle = gnc_get_toolbar_style ();
-
-  for (child = mi->children; child; child = child->next)
-  {
-    GNCMDIChildInfo * mc = child->data;
-
-    if (mc && mc->toolbar) {
-      gtk_toolbar_set_style (GTK_TOOLBAR(mc->toolbar), tbstyle);
-      if (mc->app) {
-        gtk_widget_queue_resize(mc->app->dock);
-      }
-    }
-  }
-  LEAVE(" ");
-}
-
-static void
-gnc_mdi_configure_mdi_cb (gpointer data)
-{
-  GNCMDIInfo * mi = data; 
-
-  ENTER(" ");
-  gnome_mdi_set_mode (mi->mdi, gnc_get_mdi_mode ());
-  LEAVE(" ");
-}
-
-static int
-gnc_ui_info_size (GnomeUIInfo *ui_info)
-{
-  int size;
-
-  if (!ui_info) return 0;
-
-  for (size = 0; ui_info[size].type != GNOME_APP_UI_ENDOFINFO; size++)
-    ;
-
-  return size;
-}
-
-static GnomeUIInfo *
-gnc_ui_info_concat (GnomeUIInfo *first_info, ...)
-{
-  GnomeUIInfo end = GNOMEUIINFO_END;
-  GnomeUIInfo *ui_info;
-  GnomeUIInfo *next_info;
-  va_list ap;
-  int index;
-
-  va_start (ap, first_info);
-
-  next_info = first_info;
-  index = 0;
-
-  while (TRUE)
-  {
-    index += gnc_ui_info_size (next_info);
-
-    next_info = va_arg (ap, GnomeUIInfo *);
-    if (!next_info)
-      break;
-  }
-
-  ui_info = g_new0 (GnomeUIInfo, index + 1);
-
-  va_end (ap);
-
-  va_start (ap, first_info);
-
-  next_info = first_info;
-  index = 0;
-
-  while (TRUE)
-  {
-    int i, len;
-
-    len = gnc_ui_info_size (next_info);
-    for (i = 0; i < len; i++, index++)
-      ui_info[index] = next_info[i];
-
-    next_info = va_arg (ap, GnomeUIInfo *);
-    if (!next_info)
-      break;
-  }
-
-  ui_info[index] = end;
-
-  va_end (ap);
-
-  return ui_info;
-}
-
-GNCMDIInfo *
-gnc_mdi_new (const char *app_name,
-             const char *title,
-             GnomeUIInfo *toolbar_prefix,
-             GnomeUIInfo *toolbar_suffix,
-             GNCShutdownFunc shutdown,
-             GNCMDICanRestoreCB can_restore_cb,
-             GNCMDIRestoreCB restore_cb)
-{
-  GNCMDIInfo * gnc_mdi;
-
-  ENTER(" ");
-  if (gnc_mdi_current) {
-    LEAVE("already exists");
-    return gnc_mdi_current;
-  }
-  g_return_val_if_fail (app_name != NULL, NULL);
-  g_return_val_if_fail (title != NULL, NULL);
-  g_return_val_if_fail (can_restore_cb != NULL, NULL);
-  g_return_val_if_fail (restore_cb != NULL, NULL);
-
-  gnc_mdi = g_new0 (GNCMDIInfo, 1);
-
-  gnc_mdi->app_name = g_strdup (app_name);
-  gnc_mdi->title = g_strdup (title);
-  gnc_mdi->toolbar_prefix = gnc_ui_info_concat (toolbar_prefix, NULL);
-  gnc_mdi->toolbar_suffix = gnc_ui_info_concat (toolbar_suffix, NULL);
-  gnc_mdi->shutdown = shutdown;
-  gnc_mdi->can_restore_cb = can_restore_cb;
-  gnc_mdi->restore_cb = restore_cb;
-
-  gnc_mdi->mdi = GNOME_MDI (gnome_mdi_new (app_name, title));
-  DEBUG("gnc_mdi=%p, mdi=%p", gnc_mdi, gnc_mdi->mdi);
-  gnc_mdi->component_id = gnc_register_gui_component (GNC_MDI_CM_CLASS,
-                                                      NULL, NULL, gnc_mdi);
-
-  gtk_signal_connect (GTK_OBJECT(gnc_mdi->mdi), "destroy",
-                      GTK_SIGNAL_FUNC(gnc_mdi_destroy_cb),
-                      gnc_mdi);
-
-  gtk_signal_connect (GTK_OBJECT(gnc_mdi->mdi), "app_created",
-                      GTK_SIGNAL_FUNC(gnc_mdi_app_created_cb),
-                      gnc_mdi);
-
-  gtk_signal_connect (GTK_OBJECT(gnc_mdi->mdi), "child_changed",
-                      GTK_SIGNAL_FUNC(gnc_mdi_child_changed_cb),
-                      gnc_mdi);
-
-  gnc_mdi->toolbar_change_callback_id =
-    gnc_register_option_change_callback (gnc_mdi_configure_toolbar_cb, 
-                                         gnc_mdi,
-                                         "General", "Toolbar Buttons");
-
-  gnc_mdi->mdi_change_callback_id =
-    gnc_register_option_change_callback (gnc_mdi_configure_mdi_cb, 
-                                         gnc_mdi,
-                                         "_+Advanced", "Application MDI mode");
-
-  gnome_mdi_set_mode (gnc_mdi->mdi, gnc_get_mdi_mode ());
-
-  gnc_mdi_current = gnc_mdi;
-
-  LEAVE("set gnc_mdi_current");
-  return gnc_mdi;
-}
-
-static char * 
-gnc_mdi_child_save_func (GnomeMDIChild * child, gpointer user_data)
-{
-  return g_strdup (child->name);
-}
-
-void
-gnc_mdi_add_child (GNCMDIInfo * wind, GNCMDIChildInfo * child)
-{
-  g_return_if_fail (wind != NULL);
-  g_return_if_fail (child != NULL);
-
-  ENTER("GNCMDIInfo=%p, GNCMDIChildInfo=%p, mdi_child=%p", wind, child, child->child);
-  wind->children = g_list_append (wind->children, child);
-  child->gnc_mdi = wind;
-
-  if (GNOME_IS_MDI_GENERIC_CHILD (child->child))
-  {
-    GnomeMDIGenericChild *mdi_child;
-
-    mdi_child = GNOME_MDI_GENERIC_CHILD (child->child);
-
-    gnome_mdi_generic_child_set_config_func (mdi_child,
-                                             gnc_mdi_child_save_func, NULL);
-  }
-  LEAVE(" ");
-}
-
-void
-gnc_mdi_remove_child (GNCMDIInfo * gnc_mdi, GNCMDIChildInfo * child)
-{
-  ENTER(" ");
-  if (!gnc_mdi || !child) return;
-
-  gnc_mdi->children = g_list_remove (gnc_mdi->children, child);
-  LEAVE(" ");
-}
-
-void
-gnc_mdi_child_refresh (GNCMDIChildInfo *child)
-{
-  g_return_if_fail (child != NULL);
-
-  gnome_mdi_child_set_name (child->child, child->child->name);
-  gnome_mdi_update_child (child->gnc_mdi->mdi, child->child);
-
-  /* pesky child_set_name tries to change the window title. Set it back. */
-  if ((child->gnc_mdi->mdi->active_child == child->child) && child->app)
-    gnc_mdi_child_set_title (child);
-}
-
-GNCMDIChildInfo *
-gnc_mdi_child_find_by_app (GnomeApp *app)
-{
-  GNCMDIChildInfo *child;
-  GList *item;
-
-  g_return_val_if_fail (gnc_mdi_current != NULL, NULL);
-
-  for (item = gnc_mdi_current->children; item; item = g_list_next(item)) {
-    child = item->data;
-    if (child->app == app)
-      return child;
-  }
-  return NULL;
-}
-
-GNCMDIInfo *
-gnc_mdi_get_current (void)
-{
-  return gnc_mdi_current;
-}
-
-gboolean
-gnc_mdi_has_apps (void)
-{
-  GList *toplevels;
-
-  for (toplevels = gtk_container_get_toplevels ();
-       toplevels;
-       toplevels = toplevels->next)
-  {
-    GNCMDIInfo *gnc_mdi;
-
-    if (!GNOME_IS_APP (toplevels->data))
-      continue;
-
-    if (GTK_OBJECT_DESTROYED (toplevels->data))
-      continue;
-
-    gnc_mdi = gtk_object_get_data (GTK_OBJECT (toplevels->data), "gnc_mdi");
-    if (!gnc_mdi)
-      continue;
-
-    return TRUE;
-  }
-
-  return FALSE;
-}
-
-void
-gnc_app_set_title (GnomeApp *app)
-{
-  GNCMDIChildInfo *childwin;
-  GNCMDIInfo *mainwin;
-  GnomeMDIChild *child;
-  GtkWidget *view;
-
-  g_return_if_fail (app != NULL);
-
-  mainwin = gtk_object_get_data (GTK_OBJECT (app), "gnc_mdi");
-  if (!mainwin || !mainwin->mdi)
-    return;
-
-  view = gnome_mdi_get_view_from_window (mainwin->mdi, app);
-  if (!view) return;
-
-  child = gnome_mdi_get_child_from_view (view);
-  if (!child) return;
-
-  childwin = gtk_object_get_user_data (GTK_OBJECT (child));
-  if (!childwin) return;
-
-  gnc_mdi_child_set_title (childwin);
-}
-
-/**
- * gnc_mdi_destroy
- *
- * @gnc_mdi: A pointer to a GNCMDIInfo data structure to destroy. 
- *
- * This function is called during the destruction of the gnucash gui.
- * It is called from gnc_gui_destroy() in top-level.c
- */
-void
-gnc_mdi_destroy (GNCMDIInfo * gnc_mdi)
-{
-  GList *ptr, *next;
-  GNCMDIChildInfo *gnc_child;
-  GnomeMDIChild *active;
-
-  ENTER(" ");
-  if (!gnc_mdi) return;
-
-  gnc_mdi->shutdown = NULL;
-
-  /*
-   * Work around a bug in the gnome mdi code.  When mdi closes the
-   * visible window, it will try and put up the next window, even
-   * though some of the necessary data structures have already been
-   * destroyed.  Manually delete all but the front window here before
-   * destroying the MDI object. (Walk the list by hand because the
-   * list entries will be getting deleted as we go, and glib doesn't
-   * protect against this.)
-   */
-  active = gnc_mdi->mdi->active_child;
-  for (ptr = gnc_mdi->children; ptr != NULL; ptr = next) {
-    next = ptr->next;
-    gnc_child = ptr->data;
-    if (active == gnc_child->child)
-      continue;
-
-    gnome_mdi_remove_child(gnc_mdi->mdi, gnc_child->child, TRUE);
-    /* gnc_child and ptr are now invalid */
-  }
-
-  if (gnc_mdi->mdi)
-    gtk_object_destroy (GTK_OBJECT (gnc_mdi->mdi));
-  LEAVE(" ");
-}
-
-void
-gnc_mdi_save (GNCMDIInfo * gnc_mdi, char * filename)
-{
-  char * encoded;
-  char * session_name;
-
-  ENTER(" ");
-  if (!gnc_mdi) {
-    LEAVE("oops");
-    return;
-  }
-
-  encoded = gnc_html_encode_string (filename);
-  session_name = g_strdup_printf ("/%s/MDI : %s",
-                                  gnc_mdi->app_name,
-                                  encoded ? encoded : "");
-  g_free (encoded);
-
-  if (filename && *filename != '\0')
-    gnome_mdi_save_state (GNOME_MDI (gnc_mdi->mdi), session_name);
-
-  LEAVE(" ");
-  g_free (session_name);
-}
-
-void
-gnc_mdi_restore (GNCMDIInfo * gnc_mdi, const char * filename)
-{
-  char * encoded;
-  char * session_name;
-  GList * old_children;
-  GList * c;
-
-  ENTER(" ");
-  old_children = g_list_copy (gnc_mdi->mdi->children);
-  encoded = gnc_html_encode_string (filename);
-  session_name = g_strdup_printf ("/%s/MDI : %s",
-                                  gnc_mdi->app_name,
-                                  encoded ? encoded : "");
-  g_free (encoded);
-
-  if (!filename ||
-      *filename == '\0' ||
-      !gnc_mdi->can_restore_cb (filename))
-    gnc_mdi->restore_cb (NULL);
-  else if (!gnome_mdi_restore_state (GNOME_MDI(gnc_mdi->mdi),
-                                     session_name, gnc_mdi->restore_cb) ||
-           gnc_mdi->mdi->children == NULL)
-    gnc_mdi->restore_cb (NULL);
-
-  g_free (session_name);
-
-  for (c = old_children; c ; c = c->next)
-    gnome_mdi_remove_child (gnc_mdi->mdi, GNOME_MDI_CHILD(c->data), TRUE);
-
-  g_list_free (old_children);
-  LEAVE(" ");
-}
-
-void
-gnc_mdi_create_child_toolbar (GNCMDIInfo * mi, GNCMDIChildInfo * child)
-{
-  GnomeUIInfo * tbinfo;
-  GtkToolbar  * tb;
-
-  ENTER(" ");
-  g_return_if_fail (mi != NULL);
-  g_return_if_fail (child != NULL);
-
-  tbinfo = gnc_ui_info_concat (mi->toolbar_prefix,
-                               child->toolbar_info,
-                               mi->toolbar_suffix,
-                               NULL);
-
-  g_free (child->toolbar_info);
-  child->toolbar_info = tbinfo;
-
-  tb = GTK_TOOLBAR (gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL,
-                                     GTK_TOOLBAR_BOTH));
-
-  child->toolbar = GTK_WIDGET (tb);
-
-  gnome_app_fill_toolbar (tb, tbinfo, NULL);
-  LEAVE(" ");
-}
Index: gnc-date-format.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-format.glade,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/gnc-date-format.glade -Lsrc/gnome-utils/gnc-date-format.glade -u -r1.1 -r1.2
--- src/gnome-utils/gnc-date-format.glade
+++ src/gnome-utils/gnc-date-format.glade
@@ -1,414 +1,364 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>GNC Date Format</name>
-  <program_name>gnc-date-format</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>GNC Date Format</name>
-  <title>window1</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GtkTable</class>
-    <name>date_format_table</name>
-    <rows>6</rows>
-    <columns>3</columns>
-    <homogeneous>False</homogeneous>
-    <row_spacing>0</row_spacing>
-    <column_spacing>0</column_spacing>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>sample_label</name>
-      <label>December 31, 2000</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>2</left_attach>
-	<right_attach>3</right_attach>
-	<top_attach>5</top_attach>
-	<bottom_attach>6</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkEntry</class>
-      <name>format_entry</name>
-      <can_focus>True</can_focus>
-      <signal>
-	<name>changed</name>
-	<handler>gnc_ui_date_format_changed_cb</handler>
-	<last_modification_time>Sat, 31 May 2003 02:37:30 GMT</last_modification_time>
-      </signal>
-      <editable>True</editable>
-      <text_visible>True</text_visible>
-      <text_max_length>0</text_max_length>
-      <text>%Y-%m-%d</text>
-      <child>
-	<left_attach>2</left_attach>
-	<right_attach>3</right_attach>
-	<top_attach>3</top_attach>
-	<bottom_attach>4</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>True</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkCheckButton</class>
-      <name>years_button</name>
-      <can_focus>True</can_focus>
-      <signal>
-	<name>toggled</name>
-	<handler>gnc_ui_date_format_changed_cb</handler>
-	<last_modification_time>Sat, 31 May 2003 02:36:51 GMT</last_modification_time>
-      </signal>
-      <label>include century</label>
-      <active>True</active>
-      <draw_indicator>True</draw_indicator>
-      <child>
-	<left_attach>2</left_attach>
-	<right_attach>3</right_attach>
-	<top_attach>2</top_attach>
-	<bottom_attach>3</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkHBox</class>
-      <name>months_hbox</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<left_attach>2</left_attach>
-	<right_attach>3</right_attach>
-	<top_attach>1</top_attach>
-	<bottom_attach>2</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>True</yfill>
-      </child>
-
-      <widget>
-	<class>GtkRadioButton</class>
-	<name>month_number_button</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>toggled</name>
-	  <handler>gnc_ui_date_format_changed_cb</handler>
-	  <last_modification_time>Sat, 31 May 2003 02:35:30 GMT</last_modification_time>
-	</signal>
-	<label>number</label>
-	<active>False</active>
-	<draw_indicator>True</draw_indicator>
-	<group>months</group>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkRadioButton</class>
-	<name>month_abbrev_button</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>toggled</name>
-	  <handler>gnc_ui_date_format_changed_cb</handler>
-	  <last_modification_time>Sat, 31 May 2003 02:36:22 GMT</last_modification_time>
-	</signal>
-	<label>abbreviation</label>
-	<active>False</active>
-	<draw_indicator>True</draw_indicator>
-	<group>months</group>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkRadioButton</class>
-	<name>month_name_button</name>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>toggled</name>
-	  <handler>gnc_ui_date_format_changed_cb</handler>
-	  <last_modification_time>Sat, 31 May 2003 02:36:36 GMT</last_modification_time>
-	</signal>
-	<label>name</label>
-	<active>False</active>
-	<draw_indicator>True</draw_indicator>
-	<group>months</group>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>label1</name>
-      <label></label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>2</right_attach>
-	<top_attach>4</top_attach>
-	<bottom_attach>5</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>months_label</name>
-      <label>Months:</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>2</right_attach>
-	<top_attach>1</top_attach>
-	<bottom_attach>2</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>years_label</name>
-      <label>Years:</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>2</right_attach>
-	<top_attach>2</top_attach>
-	<bottom_attach>3</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>format_label</name>
-      <label>Format:</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>2</right_attach>
-	<top_attach>3</top_attach>
-	<bottom_attach>4</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>label2</name>
-      <label>Sample:</label>
-      <justify>GTK_JUSTIFY_LEFT</justify>
-      <wrap>False</wrap>
-      <xalign>0</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>2</right_attach>
-	<top_attach>5</top_attach>
-	<bottom_attach>6</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkOptionMenu</class>
-      <name>format_omenu</name>
-      <can_focus>True</can_focus>
-      <items>US (12/31/2001)
+<widget class="GtkWindow" id="GNC Date Format">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">window1</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkTable" id="date_format_table">
+      <property name="visible">True</property>
+      <property name="n_rows">6</property>
+      <property name="n_columns">3</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+	<widget class="GtkLabel" id="sample_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">December 31, 2000</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkEntry" id="format_entry">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="editable">True</property>
+	  <property name="visibility">True</property>
+	  <property name="max_length">0</property>
+	  <property name="text" translatable="yes">%Y-%m-%d</property>
+	  <property name="has_frame">True</property>
+	  <property name="invisible_char" translatable="yes">*</property>
+	  <property name="activates_default">False</property>
+	  <signal name="changed" handler="gnc_ui_date_format_changed_cb"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkCheckButton" id="years_button">
+	  <property name="visible">True</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">include century</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">True</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	  <signal name="toggled" handler="gnc_ui_date_format_changed_cb"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="months_hbox">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="month_number_button">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">number</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="gnc_ui_date_format_changed_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="month_abbrev_button">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">abbreviation</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">month_number_button</property>
+	      <signal name="toggled" handler="gnc_ui_date_format_changed_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkRadioButton" id="month_name_button">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">name</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <property name="group">month_number_button</property>
+	      <signal name="toggled" handler="gnc_ui_date_format_changed_cb"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">2</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label1">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes"></property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="months_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Months:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="years_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Years:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="format_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Format:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label2">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Sample:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="label_box">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">8</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="widget_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Date format:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <placeholder/>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkComboBox" id="format_combobox">
+	  <property name="visible">True</property>
+	  <property name="items" translatable="yes">US (12/31/2001)
 UK (31/12/2001)
 Europe (31.12.2001)
 ISO (2001-12-31)
+UTC
 Locale
 Custom
-</items>
-      <initial_choice>0</initial_choice>
-      <child>
-	<left_attach>1</left_attach>
-	<right_attach>3</right_attach>
-	<top_attach>0</top_attach>
-	<bottom_attach>1</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
+</property>
+	  <signal name="changed" handler="gnc_ui_date_format_changed_cb" last_modification_time="Wed, 14 Sep 2005 05:03:24 GMT"/>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">3</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options">fill</property>
+	</packing>
       </child>
     </widget>
-
-    <widget>
-      <class>GtkHBox</class>
-      <name>label_box</name>
-      <homogeneous>False</homogeneous>
-      <spacing>8</spacing>
-      <child>
-	<left_attach>0</left_attach>
-	<right_attach>1</right_attach>
-	<top_attach>0</top_attach>
-	<bottom_attach>1</bottom_attach>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<xexpand>False</xexpand>
-	<yexpand>False</yexpand>
-	<xshrink>False</xshrink>
-	<yshrink>False</yshrink>
-	<xfill>True</xfill>
-	<yfill>False</yfill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>widget_label</name>
-	<label>Date format:</label>
-	<justify>GTK_JUSTIFY_LEFT</justify>
-	<wrap>False</wrap>
-	<xalign>0</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label9</name>
-	<label></label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-    </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gnc-html-history.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-html-history.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/gnc-html-history.c -Lsrc/gnome-utils/gnc-html-history.c -u -r1.1 -r1.2
--- src/gnome-utils/gnc-html-history.c
+++ src/gnome-utils/gnc-html-history.c
@@ -153,7 +153,7 @@
   else {
     /* this is the first entry in the list */
     if(hist->nodes) {
-      printf("???? hist->nodes non-NULL, but no last_node \n");
+      g_print ("???? hist->nodes non-NULL, but no last_node \n");
     }
     hist->nodes        = n;
     hist->last_node    = n;
Index: commodity.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/commodity.glade,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-utils/commodity.glade -Lsrc/gnome-utils/commodity.glade -u -r1.7 -r1.8
--- src/gnome-utils/commodity.glade
+++ src/gnome-utils/commodity.glade
@@ -1,1037 +1,1140 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Commodity Selector Dialog</name>
-  <visible>False</visible>
-  <title>Select currency/security </title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox12</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area12</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<sensitive>False</sensitive>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>new_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_select_commodity_new_cb</handler>
-	  <data>Commodity_Selector_Dialog</data>
-	  <last_modification_time>Tue, 08 Aug 2000 16:55:32 GMT</last_modification_time>
-	</signal>
-	<label>New...</label>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button65</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>select_user_prompt</name>
-      <label>Select user information here...</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkHBox</class>
-      <name>hbox62</name>
-      <border_width>5</border_width>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="Commodity Selector Dialog">
+  <property name="title" translatable="yes">Select currency/security </property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area12">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox75</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>4</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label807</name>
-	  <label>Type:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="new_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label808</name>
-	  <label>Currency/security:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="button69">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
 	  </child>
-	</widget>
-      </widget>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox76</name>
-	<homogeneous>True</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>namespace_combo</name>
-	  <value_in_list>True</value_in_list>
-	  <ok_if_empty>False</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>namespace_entry</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>changed</name>
-	      <handler>gnc_ui_select_commodity_namespace_changed_cb</handler>
-	      <data>Commodity_Selector_Dialog</data>
-	      <last_modification_time>Thu, 10 Aug 2000 18:02:04 GMT</last_modification_time>
-	    </signal>
-	    <editable>False</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
 	</widget>
-
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>commodity_combo</name>
-	  <value_in_list>True</value_in_list>
-	  <ok_if_empty>False</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>commodity_entry</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>changed</name>
-	      <handler>gnc_ui_select_commodity_changed_cb</handler>
-	      <last_modification_time>Sun, 13 Apr 2003 23:10:41 GMT</last_modification_time>
-	    </signal>
-	    <editable>False</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
-	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Commodity Dialog</name>
-  <visible>False</visible>
-  <title>New Commodity</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox13</name>
-    <homogeneous>False</homogeneous>
-    <spacing>3</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area13</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<sensitive>False</sensitive>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_commodity_ok_cb</handler>
-	  <data>Commodity_Dialog</data>
-	  <last_modification_time>Wed, 11 Apr 2001 09:03:12 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>help_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>gnc_ui_commodity_help_cb</handler>
-	  <data>Commodity_Dialog</data>
-	  <last_modification_time>Wed, 11 Apr 2001 09:03:24 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>commodity_info_frame</name>
-      <border_width>3</border_width>
-      <label>Commodity Information</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkTable" id="table3">
+	  <property name="visible">True</property>
+	  <property name="n_rows">3</property>
+	  <property name="n_columns">3</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">2</property>
+	  <property name="column_spacing">2</property>
 
-      <widget>
-	<class>GtkTable</class>
-	<name>table1</name>
-	<border_width>5</border_width>
-	<rows>5</rows>
-	<columns>2</columns>
-	<homogeneous>False</homogeneous>
-	<row_spacing>3</row_spacing>
-	<column_spacing>3</column_spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label809</name>
-	  <label>Full name:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label810</name>
-	  <label>Symbol/abbreviation:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkLabel" id="label808">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Currency/security:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>namespace_label</name>
-	  <label>Type:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>2</top_attach>
-	    <bottom_attach>3</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkLabel" id="label807">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Type:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">1</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label811</name>
-	  <label>CUSIP or other code:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>3</top_attach>
-	    <bottom_attach>4</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkCombo" id="commodity_combo">
+	      <property name="visible">True</property>
+	      <property name="value_in_list">True</property>
+	      <property name="allow_empty">False</property>
+	      <property name="case_sensitive">False</property>
+	      <property name="enable_arrow_keys">True</property>
+	      <property name="enable_arrows_always">False</property>
+
+	      <child internal-child="entry">
+		<widget class="GtkEntry" id="commodity_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		  <signal name="changed" handler="gnc_ui_select_commodity_changed_cb" last_modification_time="Wed, 16 Jul 2003 20:18:37 GMT"/>
+		</widget>
+	      </child>
+
+	      <child internal-child="list">
+		<widget class="GtkList" id="convertwidget4">
+		  <property name="visible">True</property>
+		  <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		  <child>
+		    <widget class="GtkListItem" id="convertwidget5">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkLabel" id="convertwidget6">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">2</property>
+	      <property name="bottom_attach">3</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label813</name>
-	  <label>Fraction traded:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>1</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>4</top_attach>
-	    <bottom_attach>5</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkCombo" id="namespace_combo">
+	      <property name="visible">True</property>
+	      <property name="value_in_list">True</property>
+	      <property name="allow_empty">False</property>
+	      <property name="case_sensitive">False</property>
+	      <property name="enable_arrow_keys">True</property>
+	      <property name="enable_arrows_always">False</property>
+
+	      <child internal-child="entry">
+		<widget class="GtkEntry" id="namespace_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		  <signal name="changed" handler="gnc_ui_select_commodity_namespace_changed_cb"/>
+		</widget>
+	      </child>
+
+	      <child internal-child="list">
+		<widget class="GtkList" id="convertwidget1">
+		  <property name="visible">True</property>
+		  <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		  <child>
+		    <widget class="GtkListItem" id="convertwidget2">
+		      <property name="visible">True</property>
+
+		      <child>
+			<widget class="GtkLabel" id="convertwidget3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes"></property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>fullname_entry</name>
-	  <tooltip>Enter the full name of the commodity. Example: US Dollars</tooltip>
-	  <can_focus>True</can_focus>
-	  <has_focus>True</has_focus>
-	  <signal>
-	    <name>changed</name>
-	    <handler>gnc_ui_commodity_changed_cb</handler>
-	    <last_modification_time>Wed, 16 Apr 2003 06:17:13 GMT</last_modification_time>
-	  </signal>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkLabel" id="select_user_prompt">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Select user information here...</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">3</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>mnemonic_entry</name>
-	  <tooltip>Enter the ticker symbol or currency code for the commodity. Example: USD</tooltip>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>changed</name>
-	    <handler>gnc_ui_commodity_changed_cb</handler>
-	    <last_modification_time>Wed, 16 Apr 2003 06:17:20 GMT</last_modification_time>
-	  </signal>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
-	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+<widget class="GtkDialog" id="Commodity Dialog">
+  <property name="title" translatable="yes">New Commodity</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox13">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area13">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>namespace_combo</name>
-	  <value_in_list>False</value_in_list>
-	  <ok_if_empty>True</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>2</top_attach>
-	    <bottom_attach>3</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>namespace_entry</name>
-	    <tooltip>Enter the type of commodity. For stocks, this is often an exchange on which the stock is traded. You can choose an existing type from the list or enter a new type with the keyboard.</tooltip>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>changed</name>
-	      <handler>gnc_ui_commodity_changed_cb</handler>
-	      <last_modification_time>Wed, 16 Apr 2003 06:17:30 GMT</last_modification_time>
-	    </signal>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>code_entry</name>
-	  <tooltip>Enter a unique code used to identify the commodity. Or, you may safely leave this field blank.</tooltip>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>3</top_attach>
-	    <bottom_attach>4</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox64</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>4</top_attach>
-	    <bottom_attach>5</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
+	    <widget class="GtkButton" id="help_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-help</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-11</property>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label814</name>
-	    <label>1 /</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>4</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkSpinButton</class>
-	    <name>fraction_spinbutton</name>
-	    <tooltip>Enter the smallest fraction of the commodity which can be traded. For stocks which can only be traded in whole numbers, enter 1.</tooltip>
-	    <can_focus>True</can_focus>
-	    <climb_rate>1</climb_rate>
-	    <digits>0</digits>
-	    <numeric>False</numeric>
-	    <update_policy>GTK_UPDATE_ALWAYS</update_policy>
-	    <snap>False</snap>
-	    <wrap>False</wrap>
-	    <value>10000</value>
-	    <lower>1</lower>
-	    <upper>1e+08</upper>
-	    <step>1</step>
-	    <page>100</page>
-	    <page_size>100</page_size>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>price_quote_frame</name>
-      <border_width>3</border_width>
-      <label>Quote Source Information</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkFrame" id="commodity_info_frame">
+	  <property name="border_width">3</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox129</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>3</spacing>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>finance_quote_warning</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkTable" id="table1">
+	      <property name="visible">True</property>
+	      <property name="n_rows">5</property>
+	      <property name="n_columns">3</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label809">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Full name:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label810">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Symbol/abbreviation:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label812">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Type:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label811">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">CUSIP or other code:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label813">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Fraction traded:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">1</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox64">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label814">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">1 /</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">4</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="fraction_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Enter the smallest fraction of the commodity which can be traded. For stocks which can only be traded in whole numbers, enter 1.</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">False</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">10000 1 1e+08 1 100 100</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="code_entry">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Enter a unique code used to identify the commodity. Or, you may safely leave this field blank.</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCombo" id="namespace_combo">
+		  <property name="visible">True</property>
+		  <property name="value_in_list">False</property>
+		  <property name="allow_empty">True</property>
+		  <property name="case_sensitive">False</property>
+		  <property name="enable_arrow_keys">True</property>
+		  <property name="enable_arrows_always">False</property>
+
+		  <child internal-child="entry">
+		    <widget class="GtkEntry" id="namespace_entry">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Enter the type of commodity. For stocks, this is often an exchange on which the stock is traded. You can choose an existing type from the list or enter a new type with the keyboard.</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		      <signal name="changed" handler="gnc_ui_commodity_changed_cb" last_modification_time="Sat, 19 Jul 2003 20:58:53 GMT"/>
+		    </widget>
+		  </child>
+
+		  <child internal-child="list">
+		    <widget class="GtkList" id="convertwidget7">
+		      <property name="visible">True</property>
+		      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		      <child>
+			<widget class="GtkListItem" id="convertwidget8">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="convertwidget9">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="mnemonic_entry">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Enter the ticker symbol or currency code for the commodity. Example: USD</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		  <signal name="changed" handler="gnc_ui_commodity_changed_cb" last_modification_time="Sat, 19 Jul 2003 20:58:45 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="fullname_entry">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Enter the full name of the commodity. Example: US Dollars</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		  <signal name="changed" handler="gnc_ui_commodity_changed_cb" last_modification_time="Sat, 19 Jul 2003 20:58:38 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label825">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">*</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label826">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">*</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label827">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">*</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 
-	  <widget>
-	    <class>GtkArrow</class>
-	    <name>arrow1</name>
-	    <arrow_type>GTK_ARROW_RIGHT</arrow_type>
-	    <shadow_type>GTK_SHADOW_OUT</shadow_type>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label654</name>
-	    <sensitive>False</sensitive>
-	    <label>Warning: Finance::Quote not installed properly.</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkArrow</class>
-	    <name>arrow2</name>
-	    <arrow_type>GTK_ARROW_LEFT</arrow_type>
-	    <shadow_type>GTK_SHADOW_OUT</shadow_type>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkCheckButton</class>
-	  <name>get_quote_check</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>toggled</name>
-	    <handler>gnc_ui_commodity_quote_info_cb</handler>
-	    <last_modification_time>Wed, 25 Jun 2003 06:17:32 GMT</last_modification_time>
-	  </signal>
-	  <label>Get Online Quotes</label>
-	  <active>False</active>
-	  <draw_indicator>True</draw_indicator>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkLabel" id="label815">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Commodity Incormation</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkTable</class>
-	  <name>table2</name>
-	  <rows>5</rows>
-	  <columns>3</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>3</row_spacing>
-	  <column_spacing>3</column_spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>source_label</name>
-	    <label>The source for price quotes:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>single_source_button</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>gnc_ui_commodity_quote_info_cb</handler>
-	      <last_modification_time>Wed, 25 Jun 2003 06:17:44 GMT</last_modification_time>
-	    </signal>
-	    <label>single source</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>stock source</group>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>multi_source_button</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>gnc_ui_commodity_quote_info_cb</handler>
-	      <last_modification_time>Wed, 25 Jun 2003 06:17:53 GMT</last_modification_time>
-	    </signal>
-	    <label>multiple sources</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>stock source</group>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>unknown_source_button</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>toggled</name>
-	      <handler>gnc_ui_commodity_quote_info_cb</handler>
-	      <last_modification_time>Wed, 25 Jun 2003 06:18:00 GMT</last_modification_time>
-	    </signal>
-	    <label>unknown sources</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>stock source</group>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>quote_tz_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>4</top_attach>
-	      <bottom_attach>5</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>quote_tz_label</name>
-	    <label>Timezone for these quotes:</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>4</top_attach>
-	      <bottom_attach>5</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>multi_source_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
-
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>unknown_source_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
+      <child>
+	<widget class="GtkFrame" id="price_quote_frame">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	    <widget>
-	      <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkVBox" id="vbox82">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="finance_quote_warning">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkArrow" id="arrow1">
+		      <property name="visible">True</property>
+		      <property name="arrow_type">GTK_ARROW_RIGHT</property>
+		      <property name="shadow_type">GTK_SHADOW_OUT</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label824">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Warning: Finance::Quote not installed properly.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkArrow" id="arrow2">
+		      <property name="visible">True</property>
+		      <property name="arrow_type">GTK_ARROW_LEFT</property>
+		      <property name="shadow_type">GTK_SHADOW_OUT</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="get_quote_check">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Get Online Quotes</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="gnc_ui_commodity_quote_info_cb" last_modification_time="Wed, 16 Jul 2003 21:09:11 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkTable" id="table2">
+		  <property name="visible">True</property>
+		  <property name="n_rows">5</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="single_source_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">single source</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="gnc_ui_commodity_quote_info_cb" last_modification_time="Wed, 16 Jul 2003 21:11:43 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="multi_source_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">multiple sources</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">single_source_button</property>
+		      <signal name="toggled" handler="gnc_ui_commodity_quote_info_cb" last_modification_time="Wed, 16 Jul 2003 21:11:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="unknown_source_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">unknown sources</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">single_source_button</property>
+		      <signal name="toggled" handler="gnc_ui_commodity_quote_info_cb" last_modification_time="Wed, 16 Jul 2003 21:12:07 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="multi_source_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="unknown_source_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="quote_tz_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="quote_tz_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Timezone for these quotes:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="source_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">The source for price quotes:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="single_source_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>single_source_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>2</left_attach>
-	      <right_attach>3</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
+	  </child>
 
-	    <widget>
-	      <class>Placeholder</class>
+	  <child>
+	    <widget class="GtkLabel" id="label816">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Quote Source Information</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: QuickFill.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/QuickFill.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/QuickFill.c -Lsrc/gnome-utils/QuickFill.c -u -r1.3 -r1.4
--- src/gnome-utils/QuickFill.c
+++ src/gnome-utils/QuickFill.c
@@ -25,17 +25,12 @@
 
 #include "config.h"
 
-#include <ctype.h>
 #include <string.h>
 
-#ifdef HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
-
 #include "QuickFill.h"
 #include "dialog-utils.h"
 #include "gnc-engine.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 
@@ -48,16 +43,11 @@
 
 
 /** PROTOTYPES ******************************************************/
-static void quickfill_insert_recursive (QuickFill *qf, const GdkWChar *text,
-                                        int depth, const char *mb_text,
-                                        QuickFillSort sort);
+static void quickfill_insert_recursive (QuickFill *qf, const char *text,
+                                        int depth, QuickFillSort sort);
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_REGISTER;
-
-/* A cache for quickfill strings */
-static GCache * qf_string_cache = NULL;
-
+static QofLogModule log_module = GNC_MOD_REGISTER;
 
 /********************************************************************\
 \********************************************************************/
@@ -85,16 +75,12 @@
 {
   QuickFill *qf;
 
-  if (sizeof (guint) < sizeof (GdkWChar))
+  if (sizeof (guint) < sizeof (gunichar))
   {
     PWARN ("Can't use quickfill");
     return NULL;
   }
 
-  /* For now, use the engine cache. */
-  if (qf_string_cache == NULL)
-    qf_string_cache = gnc_engine_get_string_cache ();
-
   qf = g_new (QuickFill, 1);
 
   qf->text = NULL;
@@ -108,10 +94,11 @@
 /********************************************************************\
 \********************************************************************/
 
-static void
+static gboolean
 destroy_helper (gpointer key, gpointer value, gpointer data)
 {
   gnc_quickfill_destroy (value);
+  return TRUE;
 }
 
 void
@@ -120,18 +107,32 @@
   if (qf == NULL)
     return;
 
-  g_hash_table_foreach (qf->matches, destroy_helper, NULL);
+  g_hash_table_foreach (qf->matches, (GHFunc)destroy_helper, NULL);
   g_hash_table_destroy (qf->matches);
   qf->matches = NULL;
 
   if (qf->text)
-    g_cache_remove (qf_string_cache, qf->text);
+    gnc_string_cache_remove(qf->text);
   qf->text = NULL;
   qf->len = 0;
 
   g_free (qf);
 }
 
+void
+gnc_quickfill_purge (QuickFill *qf)
+{
+  if (qf == NULL)
+    return;
+
+  g_hash_table_foreach_remove (qf->matches, destroy_helper, NULL);
+
+  if (qf->text)
+    gnc_string_cache_remove (qf->text);
+  qf->text = NULL;
+  qf->len = 0;
+}
+
 /********************************************************************\
 \********************************************************************/
 
@@ -148,9 +149,9 @@
 \********************************************************************/
 
 QuickFill *
-gnc_quickfill_get_char_match (QuickFill *qf, GdkWChar wc)
+gnc_quickfill_get_char_match (QuickFill *qf, gunichar uc)
 {
-  guint key = iswlower (wc) ? towupper (wc) : wc;
+  guint key = g_unichar_toupper (uc);
 
   if (NULL == qf) return NULL;
 
@@ -171,19 +172,24 @@
 
 QuickFill *
 gnc_quickfill_get_string_len_match (QuickFill *qf,
-                                    const GdkWChar *str, int len)
+                                    const char *str, int len)
 {
+  const char *c;
+  gunichar uc;
+
   if (NULL == qf) return NULL;
   if (NULL == str) return NULL;
 
-  while ((*str != 0) && (len > 0))
+  c = str;
+  while (*c && (len > 0))
   {
     if (qf == NULL)
       return NULL;
 
-    qf = gnc_quickfill_get_char_match (qf, *str);
+    uc = g_utf8_get_char (c);
+    qf = gnc_quickfill_get_char_match (qf, uc);
 
-    str++;
+    c = g_utf8_next_char (c);
     len--;
   }
 
@@ -194,33 +200,12 @@
 \********************************************************************/
 
 QuickFill *
-gnc_quickfill_get_string_match (QuickFill *qf, const GdkWChar *str)
+gnc_quickfill_get_string_match (QuickFill *qf, const char *str)
 {
   if (NULL == qf) return NULL;
   if (NULL == str) return NULL;
 
-  return gnc_quickfill_get_string_len_match (qf, str, gnc_wcslen (str));
-}
-
-/********************************************************************\
-\********************************************************************/
-
-QuickFill *
-gnc_quickfill_get_string_match_mb (QuickFill *qf, const char *str)
-{
-  GdkWChar *wc_text;
-
-  if (NULL == qf) return NULL;
-  if (NULL == str) return NULL;
-
-  /* The match routines all expect wide-chars. */
-  if (gnc_mbstowcs (&wc_text, str) < 0)
-  {
-    PERR ("bad text conversion");
-    return NULL;
-  }
-
-  return gnc_quickfill_get_string_len_match (qf, wc_text, gnc_wcslen (wc_text));
+  return gnc_quickfill_get_string_len_match (qf, str, g_utf8_strlen (str, -1));
 }
 
 /********************************************************************\
@@ -267,58 +252,41 @@
 void
 gnc_quickfill_insert (QuickFill *qf, const char *text, QuickFillSort sort)
 {
-  GdkWChar *wc_text;
+  gchar *normalized_str;
 
   if (NULL == qf) return;
   if (NULL == text) return;
 
-  if (gnc_mbstowcs (&wc_text, text) < 0)
-  {
-    PERR ("bad text conversion");
-    return;
-  }
-
-  quickfill_insert_recursive (qf, wc_text, 0, text, sort);
 
-  g_free (wc_text);
-}
-
-void
-gnc_quickfill_insert_wc (QuickFill *qf, const GdkWChar *text,
-                         QuickFillSort sort)
-{
-  char *mb_text;
-
-  if (NULL == qf) return;
-  if (NULL == text) return;
-
-  mb_text = gnc_wcstombs (text);
-  if (mb_text == NULL)
-  {
-    PERR ("bad text conversion");
-    return;
-  }
-
-  quickfill_insert_recursive (qf, text, 0, mb_text, sort);
-
-  g_free (mb_text);
+  normalized_str = g_utf8_normalize (text, -1, G_NORMALIZE_NFC);
+  quickfill_insert_recursive (qf, normalized_str, 0, sort);
+  g_free (normalized_str);
 }
 
 /********************************************************************\
 \********************************************************************/
 
 static void
-quickfill_insert_recursive (QuickFill *qf, const GdkWChar *text, int depth,
-                            const char *mb_text, QuickFillSort sort)
+quickfill_insert_recursive (QuickFill *qf, const char *text, int depth,
+                            QuickFillSort sort)
 {
   guint key;
   char *old_text;
   QuickFill *match_qf;
   int len;
+  char *key_char;
+  gunichar key_char_uc;
+
+  if (qf == NULL)
+    return;
+  
+  if ((text == NULL) || (g_utf8_strlen (text, -1) <= depth))
+    return;
 
-  if (text[depth] == 0) return;
+  key_char = g_utf8_offset_to_pointer (text, depth);
 
-  key = iswlower (text[depth]) ? towupper (text[depth]) : text[depth];
+  key_char_uc = g_utf8_get_char (key_char);
+  key = g_unichar_toupper (key_char_uc);
 
   match_qf = g_hash_table_lookup (qf->matches, GUINT_TO_POINTER (key));
   if (match_qf == NULL)
@@ -332,33 +300,33 @@
   switch (sort)
   {
     case QUICKFILL_ALPHA:
-      if (old_text && (strcoll (mb_text, old_text) >= 0))
+      if (old_text && (g_utf8_collate (text, old_text) >= 0))
         break;
 
     case QUICKFILL_LIFO:
     default:
-      len = gnc_wcslen (text);
+      len = g_utf8_strlen (text, -1);
 
       /* If there's no string there already, just put the new one in. */
       if (old_text == NULL)
       {
-        match_qf->text = g_cache_insert (qf_string_cache, (gpointer) mb_text);
+        match_qf->text = gnc_string_cache_insert((gpointer) text);
         match_qf->len = len;
         break;
       }
 
       /* Leave prefixes in place */
       if ((len > match_qf->len) &&
-          (strncmp(mb_text, old_text, strlen(old_text)) == 0))
+          (strncmp(text, old_text, strlen(old_text)) == 0))
         break;
 
-      g_cache_remove (qf_string_cache, old_text);
-      match_qf->text = g_cache_insert (qf_string_cache, (gpointer) mb_text);
+      gnc_string_cache_remove(old_text);
+      match_qf->text = gnc_string_cache_insert((gpointer) text);
       match_qf->len = len;
       break;
   }
 
-  quickfill_insert_recursive (match_qf, text, ++depth, mb_text, sort);
+  quickfill_insert_recursive (match_qf, text, ++depth, sort);
 }
 
 /********************** END OF FILE *********************************\
Index: gnc-dir.h.in
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-dir.h.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/gnc-dir.h.in -Lsrc/gnome-utils/gnc-dir.h.in -u -r1.1 -r1.2
--- src/gnome-utils/gnc-dir.h.in
+++ src/gnome-utils/gnc-dir.h.in
@@ -25,6 +25,6 @@
 
 #define GNC_ACCOUNTS_DIR "@-GNC_ACCOUNTS_DIR-@"
 #define GNC_GLADE_DIR "@-GNC_GLADE_DIR-@"
-#define GNC_PIXMAP_DIR "@-GNC_PIXMAP_DIR-@"
+#define GNC_GCONF_DIR "@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@"
 
 #endif
--- src/gnome-utils/window-help.c
+++ /dev/null
@@ -1,819 +0,0 @@
-/********************************************************************\
- * window-help.c -- a help window for hypertext help.               *
- * Copyright (C) 1997 Robin D. Clark                                *
- * Copyright (C) 1998 Linas Vepstas                                 *
- * Copyright (C) 1999 Jeremy Collins ( gtk-xmhtml port )            *
- * Copyright (C) 2000 Dave Peticolas                                *
- * Copyright (C) 2000 Bill Gribble                                  *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#include "config.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <gnome.h>
-#include <libguile.h>
-#include "guile-mappings.h"
-#include <limits.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <libgnomeui/gnome-window-icon.h>
-
-/* needed for db.h with 'gcc -ansi -pedantic' */
-#ifndef _BSD_SOURCE
-#  define _BSD_SOURCE 1
-#endif
-
-/* This is just WRONG, and breaks the build...  If you think you need
- * to undef HAVE_DB1_DB_H, then clearly the configure scripts are wrong,
- * not this!
- * #undef HAVE_DB1_DB_H
- */
-#ifdef PREFER_DB1
-#ifdef HAVE_DB1_DB_H
-# include <db1/db.h>
-#else
-# ifdef HAVE_DB_185_H
-#  include <db_185.h>
-# else
-#  include <db.h>
-# endif
-#endif
-#else
-#ifdef HAVE_DB_185_H
-# include <db_185.h>
-#else
-# ifdef HAVE_DB_H
-#  include <db.h>
-# else
-#  include <db1/db.h>
-# endif
-#endif
-#endif
-
-#include "file-utils.h"
-#include "dialog-utils.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-html-history.h"
-#include "gnc-html.h"
-#include "window-help.h"
-
-#define WINDOW_HELP_CM_CLASS "window-help"
-
-struct _gnc_help_window {
-  GtkWidget   * toplevel;
-
-  GtkWidget   * toolbar;
-  GtkWidget   * statusbar;  
-  GtkWidget   * statusbar_hbox;
-  GtkWidget   * html_vbox;
-  GtkWidget   * topics_tree;
-  GtkWidget   * paned;
-
-  GtkWidget   * search_entry;
-  GtkWidget   * search_results;
-  GtkWidget   * type_pixmap;
-
-  DB          * index_db;
-  gnc_html    * html;
-};
-
-/* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
-
-static gint last_width = 0;
-static gint last_height = 0;
-
-
-/********************************************************************
- * gnc_help_window_check_urltype
- * is it OK to show a certain URLType in this window?
- ********************************************************************/
-
-static int
-gnc_help_window_check_urltype(URLType t)
-{
-  if (!safe_strcmp (t, URL_TYPE_FILE) ||
-      !safe_strcmp (t, URL_TYPE_HELP) ||
-      !safe_strcmp (t, URL_TYPE_HTTP) ||
-      !safe_strcmp (t, URL_TYPE_SECURE)) {
-    return TRUE;
-
-  } else {
-    return FALSE;
-  }
-}
-
-
-/********************************************************************
- * gnc_help_window_check_urltype
- * is it OK to show a certain URLType in this window?
- ********************************************************************/
-
-static void
-gnc_help_window_url_flyover(gnc_html * html, const gchar * url,
-                            gpointer data)
-{
-  gnc_help_window * help = (gnc_help_window *)data;
-  gtk_statusbar_pop(GTK_STATUSBAR(help->statusbar), 1);
-  if(url) {
-    gtk_statusbar_push(GTK_STATUSBAR(help->statusbar),
-                       1, url);
-  }
-}
-
-
-/********************************************************************
- * after-load cb : enable/disable history buttons
- ********************************************************************/
-
-static void
-gnc_help_window_set_back_button(gnc_help_window * win, int enabled)
-{
-  GtkToolbar * tb = GTK_TOOLBAR(win->toolbar);
-  gtk_widget_set_sensitive
-    (GTK_WIDGET(((GtkToolbarChild *)g_list_nth_data(tb->children, 0))->widget),
-     enabled);
-}
-
-
-static void
-gnc_help_window_set_fwd_button(gnc_help_window * win, int enabled)
-{
-  GtkToolbar * tb = GTK_TOOLBAR(win->toolbar);
-  gtk_widget_set_sensitive
-    (GTK_WIDGET(((GtkToolbarChild *)g_list_nth_data(tb->children, 1))->widget),
-     enabled);
-}
-
-
-static gint
-compare_locations (gconstpointer a, gconstpointer b)
-{
-  return safe_strcmp (a, b);
-}
-
-static void
-gnc_help_show_topic (gnc_help_window *help, const char * location)
-{
-  GtkCTreeNode *node, *n;
-  GtkCTree *ctree;
-  GtkCTreeRow *row;
-  gint rownum;
-
-  ctree = GTK_CTREE (help->topics_tree);
-
-  rownum = GTK_CLIST(ctree)->focus_row;
-
-  node = gtk_ctree_node_nth (ctree, rownum);
-
-  if (node)
-  {
-    char *node_loc;
-
-    node_loc = gtk_ctree_node_get_row_data (ctree, node);
-
-    if (safe_strcmp (location, node_loc) != 0)
-    {
-      char *help_loc;
-
-      help_loc = gnc_build_url (URL_TYPE_HELP, location, NULL);
-      if (safe_strcmp (help_loc, node_loc) != 0)
-        node = NULL;
-      g_free (help_loc);
-    }
-  }
-
-  if (!node)
-    node = gtk_ctree_find_by_row_data_custom (ctree, NULL,
-                                              (gpointer) location,
-                                              compare_locations);
-
-  if (!node)
-  {
-    char *help_loc = gnc_build_url (URL_TYPE_HELP, location, NULL);
-    node = gtk_ctree_find_by_row_data_custom (ctree, NULL, help_loc,
-                                              compare_locations);
-    g_free (help_loc);
-  }
-
-  if (!node)
-  {
-    gtk_ctree_unselect_recursive (ctree, NULL);
-    return;
-  }
-
-  /* Select it */
-  gtk_signal_handler_block_by_data (GTK_OBJECT (ctree), help);
-  gtk_ctree_select (ctree, node);
-  gtk_signal_handler_unblock_by_data (GTK_OBJECT (ctree), help);
-
-  /* Expand all the parents */
-  row = GTK_CTREE_ROW (node);
-  while ((n = row->parent) != NULL)
-  {
-    gtk_ctree_expand (ctree, n);
-    row = GTK_CTREE_ROW (n);
-  }
-
-  /* Make sure it's visible */
-  if (gtk_ctree_node_is_visible(ctree, node) != GTK_VISIBILITY_FULL)
-    gtk_ctree_node_moveto(ctree, node, 0, 0.5, 0.0);
-}
-
-static void 
-gnc_help_window_load_cb(gnc_html * html, URLType type, 
-                        const gchar * location, const gchar * label, 
-                        gpointer data)
-{
-  gnc_help_window * win = data;
-
-  if(gnc_html_history_forward_p(gnc_html_get_history(win->html))) {
-    gnc_help_window_set_fwd_button(win, TRUE); 
-  }
-  else {
-    gnc_help_window_set_fwd_button(win, FALSE); 
-  }
-  
-  if(gnc_html_history_back_p(gnc_html_get_history(win->html))) {
-    gnc_help_window_set_back_button(win, TRUE); 
-  }
-  else {
-    gnc_help_window_set_back_button(win, FALSE); 
-  }
-
-  gnc_help_show_topic (win, location);
-}
-
-
-/********************************************************************
- * toolbar callbacks
- ********************************************************************/
-
-static int 
-gnc_help_window_fwd_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window       * help = data;
-  gnc_html_history_node * node;
-
-  gnc_html_history_forward(gnc_html_get_history(help->html));
-  node = gnc_html_history_get_current(gnc_html_get_history(help->html));
-  gnc_html_show_url(help->html, node->type, node->location, node->label, 0);
-  return TRUE;
-}
-
-static int 
-gnc_help_window_back_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window       * help = data;
-  gnc_html_history_node * node;
-
-  gnc_html_history_back(gnc_html_get_history(help->html));
-  node = gnc_html_history_get_current(gnc_html_get_history(help->html));
-  gnc_html_show_url(help->html, node->type, node->location, node->label, 0);
-  return TRUE;
-}
-
-static int
-gnc_help_window_stop_button_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window       * help = data;
-  gnc_html_cancel(help->html);
-  return TRUE;
-}
-
-static int
-gnc_help_window_reload_button_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window       * help = data;
-  gnc_html_reload(help->html);
-  return TRUE;
-}
-
-static void
-goto_string_cb(char * string, gpointer data)
-{
-  if(!data) return;
-  if(!string) {
-    *(char **)data = NULL;
-  }
-  else {
-    *(char **)data = g_strdup(string);
-  }
-}
-
-static int
-gnc_help_window_goto_button_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window * help = data;
-  int             retval = -1;
-  char            * url = NULL;
-  URLType         type;
-  char            * location = NULL;
-  char            * label = NULL;
-
-  GtkWidget * dlg = gnome_request_dialog(FALSE, 
-                                         _("Enter URI to load:"), "", 250,
-                                         &goto_string_cb, &url,
-                                         GTK_WINDOW (help->toplevel));
-  retval = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
-  
-  if((retval == 0) && url && (strlen(url) > 0)) {
-    type = gnc_html_parse_url(help->html, url, &location, &label);
-    gnc_html_show_url(help->html, type, location, label, 0);
-    g_free(location);
-    g_free(label);
-  }
-
-  if(url) {
-    g_free(url);
-  }
-
-  return TRUE;
-}
-
-
-/********************************************************************
- * topics-browser callbacks 
- * silly tree building and clicking stuff
- ********************************************************************/
-
-static void
-gnc_help_window_topic_select_cb(GtkCTree * tree, GtkCTreeNode * row, int col,
-                                gpointer user_data)
-{
-  gnc_help_window * wind = user_data;
-  URLType         type;
-  char            * location = NULL;
-  char            * label = NULL;
-  char            * url = gtk_ctree_node_get_row_data(tree, row);
-
-  if(url && strlen(url) > 0) {
-    type = gnc_html_parse_url(wind->html, url, &location, &label);
-    gnc_html_show_url(wind->html, type, location, label, 0);
-    g_free(location);
-    g_free(label);
-  }
-}
-
-static void
-free_url_cb(gpointer user_data)
-{
-  if(user_data) free(user_data);
-}
-
-static void 
-topics_add_children(SCM topics, GtkCTree * tree, GtkCTreeNode * parent, 
-                    gnc_help_window * help)
-{
-  SCM          this_topic;
-  SCM          subtopics;
-  GtkCTreeNode * node; 
-  char         * topic_str;
-  char         * ctopics[1];
-  char         * curl = NULL;
-  gboolean     leafnode;
-
-  if(!SCM_LISTP(topics)) return;
-
-  for(; !SCM_NULLP(topics); topics = SCM_CDR(topics)) {
-    this_topic = SCM_CAR(topics);
-
-    if(!SCM_LISTP(this_topic)) continue;
-
-    if(!SCM_NULLP(SCM_CDR(this_topic)) && !SCM_NULLP(SCM_CDDR(this_topic))) {
-      subtopics  = SCM_CADDR(this_topic);
-    }
-    else {
-      subtopics = SCM_BOOL_F;
-    }
-
-    topic_str  = gh_scm2newstr(SCM_CAR(this_topic), NULL);
-    ctopics[0] = _(topic_str);
-
-    if(!SCM_NULLP(SCM_CDR(this_topic))) {
-      curl = gh_scm2newstr(SCM_CADR(this_topic), NULL);
-    }
-   
-    if(SCM_LISTP(subtopics)) {
-      leafnode = FALSE;
-    }
-    else {
-      leafnode = TRUE;
-    }
-    
-    node = gtk_ctree_insert_node(GTK_CTREE(tree),
-                                 GTK_CTREE_NODE(parent), NULL,
-                                 ctopics, 1,
-                                 NULL, NULL, NULL, NULL,
-                                 leafnode, FALSE);
-
-    gtk_ctree_node_set_row_data_full(GTK_CTREE(tree), 
-                                     GTK_CTREE_NODE(node), curl,
-                                     free_url_cb);
-    free(topic_str);
-    if(SCM_LISTP(subtopics)) {
-      topics_add_children(subtopics, tree, node, help);
-    }
-  }
-}
-
-static void
-gnc_help_window_load_topics(gnc_help_window * help, const gchar * file)
-{  
-  SCM topics;
-  SCM load_topics =  scm_c_eval_string("gnc:load-help-topics");
-
-  topics = scm_call_1(load_topics, scm_makfrom0str(file));
-  topics_add_children(topics, GTK_CTREE(help->topics_tree), NULL, help);
-  gtk_ctree_expand_to_depth (GTK_CTREE(help->topics_tree), NULL, 1);
-  gtk_widget_show_all(help->topics_tree);
-}
-
-
-static void
-gnc_help_window_destroy_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window * help = data;
-
-  gnc_unregister_gui_component_by_data (WINDOW_HELP_CM_CLASS, help);
-
-  /* close the help index db */
-  if(help->index_db) {
-    help->index_db->close(help->index_db);
-  }
-
-  gnc_html_destroy(help->html);
-
-  help->html        = NULL;
-  help->toplevel    = NULL;
-  help->statusbar   = NULL;
-  help->html_vbox   = NULL;
-  help->topics_tree = NULL;
-
-  g_free(help);
-}
-
-static void
-gnc_help_window_close_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window * help = data;
-
-  gnc_close_gui_component_by_data (WINDOW_HELP_CM_CLASS, help);
-}
-
-static void
-gnc_help_window_print_cb(GtkWidget * w, gpointer data)
-{
-  gnc_help_window * help = data;
-  
-  gnc_html_print(help->html);
-}
-
-
-static void 
-item_destroy_cb(GtkListItem * li, gpointer user_data)
-{
-  gpointer x = gtk_object_get_user_data(GTK_OBJECT(li));
-  g_free(x);
-}
-
-
-static void
-show_search_results(gnc_help_window * help, const char * matches, 
-                    int match_len)
-{
-  const char * current;
-  const char * end;
-  char       * this_link=NULL;
-  int        link_len;
-  GList      * results = NULL; 
-  GtkWidget  * listitem;
-
-  if(!matches) {
-    if(GTK_LIST(help->search_results)->children) {
-      gtk_list_remove_items(GTK_LIST(help->search_results),
-                            GTK_LIST(help->search_results)->children);
-    }
-    return;
-  }
-
-  current = matches;  
-  while((end = strchr(current, '\n')) != NULL) {
-    link_len  = end - current;
-    this_link = g_new0(char, link_len + 1);
-    strncpy(this_link, current, link_len);
-    listitem = gtk_list_item_new_with_label(this_link);
-    gtk_object_set_user_data(GTK_OBJECT(listitem), this_link);
-    gtk_signal_connect(GTK_OBJECT(listitem), "destroy",
-                       GTK_SIGNAL_FUNC(item_destroy_cb), NULL);
-    
-    gtk_widget_show(listitem);
-    results = g_list_append(results, listitem);
-    current = end+1;
-  }
-  
-  /* get rid of the old items */ 
-  if(GTK_LIST(help->search_results)->children) {
-    gtk_list_remove_items(GTK_LIST(help->search_results),
-                          GTK_LIST(help->search_results)->children);
-  }
-
-  /* add the new ones */ 
-  if(results) {
-    gtk_list_append_items(GTK_LIST(help->search_results),
-                          results);
-  }
-}
-
-
-static void
-gnc_help_window_search_button_cb(GtkButton * button, gpointer data)
-{
-  gnc_help_window * help = data;
-  char            * search_string = 
-    gtk_entry_get_text(GTK_ENTRY(help->search_entry));
-  DBT             key, value;
-  int             err=1;
-  
-  /* initialize search key/value */
-  memset(&key, 0, sizeof(DBT));
-  memset(&value, 0, sizeof(DBT));
-
-  key.data    = search_string;
-  key.size    = strlen(search_string);
-
-  /* do the search */
-  if(help->index_db) {
-    err = help->index_db->get(help->index_db, &key, &value, 0);
-  }
-
-  if(err == 0) {
-    /* the data in the DB is a newline-separated list of filenames */
-    show_search_results(help, value.data, value.size);    
-  }
-}
-
-static void
-gnc_help_window_search_help_button_cb(GtkButton * button, gpointer data)
-{
-#if 0
-  gnc_help_window * help = data;
-#endif
-
-  printf("help on help\n");
-}
-
-static void
-gnc_help_window_search_result_select_cb(GtkWidget * list, GtkWidget * child,
-                                        gpointer user_data)
-{
-  gnc_help_window * help = user_data;
-  char * helpfile = gtk_object_get_user_data(GTK_OBJECT(child));
-  gnc_help_window_show_help(help, helpfile, NULL);
-}
-
-static void
-close_handler (gpointer user_data)
-{
-  gnc_help_window *help = user_data;
-
-  gdk_window_get_geometry (GTK_WIDGET(help->toplevel)->window, NULL, NULL,
-                           &last_width, &last_height, NULL);
-
-  gnc_save_window_size ("help_win", last_width, last_height);
-
-  gnc_help_window_destroy (help);
-}
-
-/********************************************************************
- * gnc_help_window_new 
- * allocates and opens up a help window
- ********************************************************************/
-
-gnc_help_window *
-gnc_help_window_new (void)
-{
-  
-  gnc_help_window * help = g_new0(gnc_help_window, 1);
-  char            * indexfile;
-  GnomeUIInfo     toolbar_data[] = 
-  {
-    { GNOME_APP_UI_ITEM,
-      N_("Back"),
-      N_("Move back one step in the history"),
-      gnc_help_window_back_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_BACK,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Forward"),
-      N_("Move forward one step in the history"),
-      gnc_help_window_fwd_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_FORWARD,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("Reload"),
-      N_("Reload the current document"),
-      gnc_help_window_reload_button_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_REFRESH,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Open"),
-      N_("Open a new document"),
-      gnc_help_window_goto_button_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_OPEN,
-      0, 0, NULL
-    },
-    { GNOME_APP_UI_ITEM,
-      N_("Stop"),
-      N_("Cancel outstanding HTML requests"),
-      gnc_help_window_stop_button_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_STOP,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("Print"),
-      N_("Print Help window"),
-      gnc_help_window_print_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_PRINT,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_SEPARATOR,
-    { GNOME_APP_UI_ITEM,
-      N_("Close"),
-      N_("Close this Help window"),
-      gnc_help_window_close_cb, help,
-      NULL,
-      GNOME_APP_PIXMAP_STOCK, 
-      GNOME_STOCK_PIXMAP_CLOSE,
-      0, 0, NULL
-    },
-    GNOMEUIINFO_END
-  };
-  GladeXML *xml;
-
-  xml = gnc_glade_xml_new ("help.glade", "Help Window");
-
-  help->toplevel = glade_xml_get_widget (xml, "Help Window");
-  gnome_window_icon_set_from_default (GTK_WINDOW (help->toplevel));
-
-  gnc_register_gui_component (WINDOW_HELP_CM_CLASS, NULL, close_handler, help);
-
-  help->toolbar        = glade_xml_get_widget (xml, "help_toolbar");
-  help->statusbar      = glade_xml_get_widget (xml, "help_statusbar");
-  help->statusbar_hbox = glade_xml_get_widget (xml, "statusbar_hbox");
-  help->html_vbox      = glade_xml_get_widget (xml, "help_html_vbox");
-  help->topics_tree    = glade_xml_get_widget (xml, "help_topics_tree");
-  help->paned          = glade_xml_get_widget (xml, "help_paned");
-  help->search_entry   = glade_xml_get_widget (xml, "help_search_entry");
-  help->search_results = glade_xml_get_widget (xml, "search_results_list");
-  help->type_pixmap    = glade_xml_get_widget (xml, "file_type_pixmap");
-
-  help->html         = gnc_html_new();
-
-  glade_xml_signal_connect_data
-    (xml, "gnc_help_window_search_button_cb",
-     GTK_SIGNAL_FUNC (gnc_help_window_search_button_cb), help);
-
-  glade_xml_signal_connect_data
-    (xml, "gnc_help_window_search_help_button_cb",
-     GTK_SIGNAL_FUNC (gnc_help_window_search_help_button_cb), help);
-
-  gnome_app_fill_toolbar(GTK_TOOLBAR(help->toolbar), toolbar_data, NULL);
-  gtk_box_pack_start(GTK_BOX(help->html_vbox), 
-                     gnc_html_get_widget(help->html),
-                     TRUE, TRUE, 0);
-  gtk_paned_set_position(GTK_PANED(help->paned), 200);
-  
-  gnc_html_set_urltype_cb(help->html, gnc_help_window_check_urltype);
-  gnc_html_set_flyover_cb(help->html, gnc_help_window_url_flyover, 
-                          (gpointer)help);
-  gnc_html_set_load_cb(help->html, gnc_help_window_load_cb, 
-                       (gpointer)help);
-  
-  gnc_help_window_load_topics(help, "help-topics-index.scm"); 
-
-  gtk_signal_connect(GTK_OBJECT(help->toplevel), "destroy",
-                     GTK_SIGNAL_FUNC(gnc_help_window_destroy_cb), 
-                     (gpointer)help);
-  
-  gtk_signal_connect(GTK_OBJECT(help->topics_tree), "tree_select_row",
-                     GTK_SIGNAL_FUNC(gnc_help_window_topic_select_cb), 
-                     (gpointer)help);
-
-  gtk_signal_connect(GTK_OBJECT(help->search_results), "select_child",
-                     GTK_SIGNAL_FUNC(gnc_help_window_search_result_select_cb), 
-                     (gpointer)help);
-
-  indexfile = gncFindFile("help-search-index.db");
-  help->index_db = dbopen(indexfile, O_RDONLY, 0644, DB_HASH, NULL);
-  if (!help->index_db) {
-    PERR("Failed to open help index DB '%s' : %s\n",
-         indexfile ? indexfile : "(null)",
-         strerror(errno) ? strerror(errno) : "");
-  }
-  g_free(indexfile);
-
-  if (last_width == 0)
-    gnc_get_window_size("help_win", &last_width, &last_height);
-
-  gtk_window_set_default_size(GTK_WINDOW(help->toplevel),
-                              last_width, last_height);
-
-  gnc_window_adjust_for_screen (GTK_WINDOW(help->toplevel));
-
-  gtk_widget_show_all(help->toplevel);
-  
-  return help;
-}
-
-
-/********************************************************************
- * gnc_help_window_destroy
- * delete a help window 
- ********************************************************************/
-
-void
-gnc_help_window_destroy(gnc_help_window * help)
-{
-  if (!help) return;
-
-  gnc_unregister_gui_component_by_data (WINDOW_HELP_CM_CLASS, help);
-
-  gtk_signal_disconnect_by_func(GTK_OBJECT(help->toplevel), 
-                                GTK_SIGNAL_FUNC(gnc_help_window_destroy_cb), 
-                                (gpointer)help);
-  /* close the help index db */
-  if(help->index_db) {
-    help->index_db->close(help->index_db);
-  }
-
-  /* take care of the gnc-html object specially */
-  gtk_widget_ref(gnc_html_get_widget(help->html));
-  gnc_html_destroy(help->html);
-
-  gtk_widget_destroy(GTK_WIDGET(help->toplevel)); 
-}
-
-void
-gnc_help_window_show_help(gnc_help_window * help, const char * location,
-                          const char * label)
-{
-  gnc_html_show_url(help->html, URL_TYPE_FILE, location, label, 0);
-}
-
-
-/********************************************************************
- * compatibility stuff (temporary)
- ********************************************************************/
-
-void
-helpWindow(GtkWidget * parent, const char * title, const char * htmlfile)
-{
-  gnc_help_window * help;
-  char * location = NULL;
-  char * label = NULL;
-
-  help = gnc_help_window_new();
-  gnc_html_parse_url(NULL, htmlfile, &location, &label);
-  gnc_help_window_show_help(help, location, label);
-  g_free(location);
-  g_free(label);
-}
Index: gnc-general-select.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-general-select.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-general-select.h -Lsrc/gnome-utils/gnc-general-select.h -u -r1.3 -r1.4
--- src/gnome-utils/gnc-general-select.h
+++ src/gnome-utils/gnc-general-select.h
@@ -32,13 +32,12 @@
 #define GNC_GENERAL_SELECT_H
 
 #include <gnome.h>
+#include <glib.h>
 
-BEGIN_GNOME_DECLS
-
-
-#define GNC_GENERAL_SELECT(obj)          GTK_CHECK_CAST (obj, gnc_general_select_get_type(), GNCGeneralSelect)
-#define GNC_GENERAL_SELECT_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_general_select_get_type(), GNCGeneralSelectClass)
-#define GNC_IS_GENERAL_SELECT(obj)       GTK_CHECK_TYPE (obj, gnc_general_select_get_type ())
+#define GNC_TYPE_GENERAL_SELECT          (gnc_general_select_get_type ())
+#define GNC_GENERAL_SELECT(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_general_select_get_type(), GNCGeneralSelect)
+#define GNC_GENERAL_SELECT_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, gnc_general_select_get_type(), \ GNCGeneralSelectClass)
+#define GNC_IS_GENERAL_SELECT(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, gnc_general_select_get_type ())
 
 typedef const char *	(*GNCGeneralSelectGetStringCB) (gpointer);
 typedef gpointer 	(*GNCGeneralSelectNewSelectCB) (gpointer cbarg, gpointer default_selection, GtkWidget *parent);
@@ -60,6 +59,8 @@
   GNCGeneralSelectGetStringCB	get_string;
   GNCGeneralSelectNewSelectCB	new_select;
   gpointer			cb_arg;
+
+  int disposed; /* private */
 } GNCGeneralSelect;
 
 typedef struct {
@@ -78,10 +79,7 @@
 gpointer   gnc_general_select_get_selected   (GNCGeneralSelect *gsl);
 const char *gnc_general_select_get_printname (GNCGeneralSelect *gsl,
 					      gpointer selection);
-guint      gnc_general_select_get_type       (void);
-
-
-END_GNOME_DECLS
+GType      gnc_general_select_get_type       (void);
 
 #endif
 
Index: gnc-amount-edit.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-amount-edit.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/gnc-amount-edit.c -Lsrc/gnome-utils/gnc-amount-edit.c -u -r1.4 -r1.5
--- src/gnome-utils/gnc-amount-edit.c
+++ src/gnome-utils/gnc-amount-edit.c
@@ -4,9 +4,9 @@
  * Copyright (C) 2000 Dave Peticolas <dave at krondo.com>
  * All rights reserved.
  *
- * Gnucash is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public License
- * as published by the Free Software Foundation; either version 2 of the
+ * Gnucash is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
  * License, or (at your option) any later version.
  *
  * Gnucash is distributed in the hope that it will be useful,
@@ -54,7 +54,7 @@
 
 static void gnc_amount_edit_init         (GNCAmountEdit      *gae);
 static void gnc_amount_edit_class_init   (GNCAmountEditClass *class);
-static void gnc_amount_edit_changed      (GtkEditable        *gae);
+static void gnc_amount_edit_changed      (GtkEditable        *gae, gpointer data);
 static gint gnc_amount_edit_key_press    (GtkWidget          *widget,
 					  GdkEventKey        *event);
 
@@ -66,58 +66,60 @@
  *
  * Returns the GtkType for the GNCAmountEdit widget
  */
-guint
+GType
 gnc_amount_edit_get_type (void)
 {
-  static guint amount_edit_type = 0;
+  static GType amount_edit_type = 0;
 
-  if (!amount_edit_type){
-    GtkTypeInfo amount_edit_info = {
-      "GNCAmountEdit",
-      sizeof (GNCAmountEdit),
+  if (amount_edit_type == 0) {
+    GTypeInfo amount_edit_info = {
       sizeof (GNCAmountEditClass),
-      (GtkClassInitFunc) gnc_amount_edit_class_init,
-      (GtkObjectInitFunc) gnc_amount_edit_init,
       NULL,
       NULL,
-      (GtkClassInitFunc) NULL,
+      (GClassInitFunc) gnc_amount_edit_class_init,
+      NULL,
+      NULL,
+      sizeof (GNCAmountEdit),
+      0,
+      (GInstanceInitFunc) gnc_amount_edit_init
     };
-
-    amount_edit_type = gtk_type_unique (GTK_TYPE_ENTRY, &amount_edit_info);
+		
+    amount_edit_type = g_type_register_static (GTK_TYPE_ENTRY,
+					       "GNCAmountEdit",
+					       &amount_edit_info,
+					       0);
   }
 
   return amount_edit_type;
 }
 
 static void
-gnc_amount_edit_class_init (GNCAmountEditClass *class)
+gnc_amount_edit_class_init (GNCAmountEditClass *klass)
 {
-  GtkObjectClass *object_class;
+  GObjectClass *object_class;
   GtkWidgetClass *widget_class;
-  GtkEditableClass *editable_class;
+  /* GtkEditableClass *editable_class; */
 
-  object_class = (GtkObjectClass*) class;
-  widget_class = (GtkWidgetClass*) class;
-  editable_class = (GtkEditableClass*) class;
+  object_class = G_OBJECT_CLASS (klass);
+  widget_class = GTK_WIDGET_CLASS (klass);
+  /* editable_class = GTK_EDITABLE_CLASS (g_type_interface_peek (klass, GTK_TYPE_EDITABLE)); */
 
-  parent_class = gtk_type_class (gtk_entry_get_type ());
+  parent_class = g_type_class_peek_parent (klass);
 
   amount_edit_signals [AMOUNT_CHANGED] =
-    gtk_signal_new ("amount_changed",
-                    GTK_RUN_FIRST, object_class->type, 
-                    GTK_SIGNAL_OFFSET (GNCAmountEditClass,
-                                       amount_changed),
-                    gtk_signal_default_marshaller,
-                    GTK_TYPE_NONE, 0);
-	
-  gtk_object_class_add_signals (object_class, amount_edit_signals,
-                                LAST_SIGNAL);
+    g_signal_new ("amount_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCAmountEditClass, amount_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
 
   widget_class->key_press_event = gnc_amount_edit_key_press;
 
-  editable_class->changed = gnc_amount_edit_changed;
-
-  class->amount_changed = NULL;
+  /* editable_class->changed = gnc_amount_edit_changed; */
 }
 
 static void
@@ -128,12 +130,15 @@
   gae->print_info = gnc_default_print_info (FALSE);
   gae->fraction = 0;
   gae->evaluate_on_enter = FALSE;
+
+  g_signal_connect (G_OBJECT (gae), "changed",
+		    G_CALLBACK (gnc_amount_edit_changed), NULL);
 }
 
 static void
-gnc_amount_edit_changed (GtkEditable *editable)
+gnc_amount_edit_changed (GtkEditable *editable, gpointer data)
 {
-  (* GTK_EDITABLE_CLASS (parent_class)->changed)(editable);
+  /*GTK_EDITABLE_CLASS (parent_class)->changed(editable);*/
 
   GNC_AMOUNT_EDIT(editable)->need_to_parse = TRUE;
 }
@@ -187,7 +192,7 @@
 {
   GNCAmountEdit *gae;
 
-  gae = gtk_type_new (gnc_amount_edit_get_type ());
+  gae = g_object_new (GNC_TYPE_AMOUNT_EDIT, NULL);
 
   return GTK_WIDGET (gae);
 }
Index: gnc-menu-extensions.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-menu-extensions.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-utils/gnc-menu-extensions.h -Lsrc/gnome-utils/gnc-menu-extensions.h -u -r1.6 -r1.7
--- src/gnome-utils/gnc-menu-extensions.h
+++ src/gnome-utils/gnc-menu-extensions.h
@@ -23,55 +23,44 @@
 #ifndef GNC_MENU_EXTENSIONS_H
 #define GNC_MENU_EXTENSIONS_H
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
-#define WINDOW_NAME_MAIN     "Main"
-#define WINDOW_NAME_REGISTER "Register"
-#define WINDOW_NAME_INVOICE  "Invoice"
-#define WINDOW_NAME_ALL      "All"
+typedef struct _ExtensionInfo
+{
+  SCM extension;
 
-void gnc_add_c_extension(GnomeUIInfo *info, gchar *path);
-void gnc_add_scm_extension(SCM extension);
+  GtkActionEntry ae;
+  gchar *path;
+  const gchar *typeStr;
+  GtkUIManagerItemType type;
+} ExtensionInfo;
 
-/* Replacement for gnome_app_insert_menus, since the original one will
- * fail for i18n. In particular, as soon as the gnome stock menus
- * (created through the macros in gnome-app-helper) have a different
- * translation in the original gnome libs compared to the gnucash
- * message catalog, then the gnome_app_insert_menus will
- * fail. Therefore this function looks up the translation of each 'path'
- * element in the gettext domain "gnome-libs" first. 
- *
- * This function should be used in all places where the 'path'
- * contains a stock gnome menu, created through the macros in
- * gnome-app-helper. */
-void
-gnc_gnome_app_insert_menus (GnomeApp *app, const gchar *path, 
-			    GnomeUIInfo *menuinfo);
-
-/* This is called from the window initializing code, when the actual
- * menu items stored by the above functions should now be inserted in
- * the menu of the GnomeApp app.
+
+#define ADDITIONAL_MENUS_PLACEHOLDER "AdditionalMenusPlaceholder"
+
+GSList *gnc_extensions_get_menu_list (void);
+void gnc_extension_invoke_cb (SCM extension, SCM window);
+
+/** This function stores a menu item/callback for later insertion into
+ *  the application menus,
  *
- * app - The GnomeApp to add the stored menu items
- * prefix - The prefix of the window that is currently being set up.
+ *  @param extension A scheme object descrubing the menu to be
+ *  inserted.  Functions written in C should use the gnc-plugin code.
  */
-void gnc_extensions_menu_setup(GnomeApp * app, gchar *prefix);
-/* This is called from the window initializing code, when the actual
- * menu items stored by the above functions should now be inserted in
- * the menu of the GnomeApp app.
- *
- * Use this function when your menu callbacks needs some user_data
- * pointer in order to access window-related data.
+void gnc_add_scm_extension(SCM extension);
+
+/** This function inserts all of the menu items stored by
+ *  gnc_add_scm_extension() into the application menus.
  *
- * app - The GnomeApp to add the stored menu items
- * prefix - The prefix of the window that is currently being set up.
- * user_data - The user data to be passed on to menu item's callback functions.
+ *  @param uiMerge The GtkUIManager [GtkUIManager] object to use for
+ *  merging.
+ */
+void gnc_extensions_menu_setup( GtkUIManager *uiMerge );
+
+/** This function releases any memory being held by the 'extensions'
+ *  code.  It is called from the window shutdown code.
  */
-void gnc_extensions_menu_setup_with_data(GnomeApp * app, 
-					 gchar *prefix, 
-					 gpointer user_data);
 void gnc_extensions_shutdown(void);
 
 #endif
--- src/gnome-utils/gtkselect.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* gtkselect.h - select widget for gtk+
- * Copyright 1997 Paolo Molaro (from gtkcombo, where this was copied from)
- * Copyright 2000 Gordon Oliver
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#ifndef GTK_SMART_SELECT_H
-#define GTK_SMART_SELECT_H
-
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkitem.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#define GTK_SELECT(obj)		GTK_CHECK_CAST (obj, gtk_select_get_type (), GtkSelect)
-#define GTK_SELECT_CLASS(klass)	GTK_CHECK_CLASS_CAST (klass, gtk_select_get_type (), GtkSelectClass)
-#define GTK_IS_SELECT(obj)       GTK_CHECK_TYPE (obj, gtk_select_get_type ())
-
-typedef struct _GtkSelect		GtkSelect;
-typedef struct _GtkSelectClass	GtkSelectClass;
-
-/* you should access only the selected field directly */
-struct _GtkSelect {
-	GtkHBox hbox;
-	GtkWidget *selected;
-
-	GtkWidget *entry;
-	GtkWidget *button;
-	GtkWidget *popup;
-	GtkWidget *popwin;
-	GtkWidget *list;
-	GtkWidget *empty;
-
-	GList *entries;
-
-	guint entry_change_id;
-	guint list_change_id;
-
-	guint use_arrows:1;
-
-        guint16 current_button;
-	guint activate_id;
-};
-
-struct _GtkSelectClass {
-	GtkHBoxClass parent_class;
-};
-
-guint      gtk_select_get_type              (void);
-
-GtkWidget *gtk_select_new                   (void);
-
-/* set/unset arrows working for changing the value (can be annoying */
-void       gtk_select_set_use_arrows        (GtkSelect*    select, 
-                                            gint         val);
-
-void       gtk_select_disable_activate      (GtkSelect*    select);
-
-void	   gtk_select_insert_items	  (GtkSelect	    *select,
-					   GList	    *items,
-					   gint		     position);
-
-void	   gtk_select_append_items	  (GtkSelect	    *select,
-					   GList	    *items);
-
-void	   gtk_select_prepend_items	  (GtkSelect	    *select,
-					   GList	    *items);
-
-void	   gtk_select_remove_items	  (GtkSelect	    *list,
-					   GList	    *items);
-
-void	   gtk_select_remove_items_no_unref (GtkSelect	    *list,
-					   GList	    *items);
-
-void	   gtk_select_clear_items	  (GtkSelect	    *list,
-					   gint		     start,
-					   gint		     end);
-
-void	   gtk_select_select_item	  (GtkSelect	    *list,
-					   gint		     item);
-
-void	   gtk_select_select_child	  (GtkSelect	    *list,
-					   GtkWidget	    *child);
-
-gint	   gtk_select_child_position	  (GtkSelect	    *list,
-					   GtkWidget	    *child);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* GTK_SMART_SELECT_H */
Index: gnc-date-format.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-format.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-date-format.h -Lsrc/gnome-utils/gnc-date-format.h -u -r1.3 -r1.4
--- src/gnome-utils/gnc-date-format.h
+++ src/gnome-utils/gnc-date-format.h
@@ -30,8 +30,10 @@
 #define GNC_DATE_FORMAT_H 
 
 #include <gnome.h>
+#include <glib.h>
 #include "gnc-date.h"
 
+#define GNC_TYPE_DATE_FORMAT         (gnc_date_format_get_type ())
 #define GNC_DATE_FORMAT(obj)          GTK_CHECK_CAST (obj, gnc_date_format_get_type(), GNCDateFormat)
 #define GNC_DATE_FORMAT_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_date_format_get_type(), GNCDateFormatClass)
 #define GNC_IS_DATE_FORMAT(obj)       GTK_CHECK_TYPE (obj, gnc_date_format_get_type ())
@@ -42,25 +44,22 @@
  **/
 typedef struct {
 	GtkHBox hbox;
-
-	GtkWidget *label;
-
 	GNCDateFormatPriv *priv;
 } GNCDateFormat;
 
 typedef struct {
-	GtkHBoxClass parent_class;
+	GtkHBoxClass hbox_class;
 	void (*format_changed) (GNCDateFormat *gdf);
 } GNCDateFormatClass;
 
-guint     gnc_date_format_get_type        (void);
+GType     gnc_date_format_get_type        (void);
 
 GtkWidget *gnc_date_format_new            (void);
 GtkWidget *gnc_date_format_new_without_label (void);
 GtkWidget *gnc_date_format_new_with_label (const char *label);
 
-void      gnc_date_format_set_format      (GNCDateFormat *gdf, DateFormat format);
-DateFormat gnc_date_format_get_format     (GNCDateFormat *gdf);
+void      gnc_date_format_set_format      (GNCDateFormat *gdf, QofDateFormat format);
+QofDateFormat gnc_date_format_get_format     (GNCDateFormat *gdf);
 
 void      gnc_date_format_set_months      (GNCDateFormat *gdf,
 					   GNCDateMonthFormat months);
Index: account-quickfill.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/account-quickfill.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/account-quickfill.c -Lsrc/gnome-utils/account-quickfill.c -u -r1.2 -r1.3
--- src/gnome-utils/account-quickfill.c
+++ src/gnome-utils/account-quickfill.c
@@ -23,13 +23,14 @@
 
 #include "config.h"
 #include "account-quickfill.h"
-#include "gnc-engine-util.h"
-#include "gnc-event.h"
-#include "gnc-trace.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_REGISTER;
+static QofLogModule log_module = GNC_MOD_REGISTER;
+
+static void shared_quickfill_gconf_changed (GConfEntry *entry, gpointer qfb);
 
 /* ===================================================================== */
 /* In order to speed up register starts for registers htat have a huge
@@ -44,6 +45,7 @@
 typedef struct {
   QuickFill *qf;
   QofBook *book;
+  AccountGroup *group;
   gint  listener;
   AccountBoolCB dont_add_cb;
   gpointer dont_add_data;
@@ -53,6 +55,9 @@
 shared_quickfill_destroy (QofBook *book, gpointer key, gpointer user_data)
 {
   QFB *qfb = user_data;
+  gnc_gconf_general_remove_cb(KEY_ACCOUNT_SEPARATOR,
+			      shared_quickfill_gconf_changed,
+			      qfb);
   gnc_quickfill_destroy (qfb->qf);
   gnc_engine_unregister_event_handler (qfb->listener);
   g_free (qfb);
@@ -91,7 +96,7 @@
   name = xaccAccountGetFullName (account, gnc_get_account_separator ());
   if (NULL == name) return;
 
-  match = gnc_quickfill_get_string_match_mb (qf, name);
+  match = gnc_quickfill_get_string_match (qf, name);
   if (!match) goto add_string;
   match_str = gnc_quickfill_string (match);
   if (!match_str) goto add_string;
@@ -128,6 +133,17 @@
   return NULL;
 }
 
+static void
+shared_quickfill_gconf_changed (GConfEntry *entry, gpointer user_data)
+{
+  QFB *qfb = user_data;
+
+  /* Reload the quickfill */
+  gnc_quickfill_purge(qfb->qf);
+  xaccGroupForEachAccount (qfb->group, load_shared_qf_cb, qfb, TRUE);
+}
+
+
 /* Build the quickfill list out of account names. 
  * Essentially same loop as in gnc_load_xfer_cell() above.
  */
@@ -140,10 +156,15 @@
   qfb = g_new0(QFB, 1);
   qfb->qf = gnc_quickfill_new ();
   qfb->book = book;
+  qfb->group = group;
   qfb->listener = 0;
   qfb->dont_add_cb = cb;
   qfb->dont_add_data = data;
 
+  gnc_gconf_general_register_cb(KEY_ACCOUNT_SEPARATOR,
+				shared_quickfill_gconf_changed,
+				qfb);
+
   xaccGroupForEachAccount (group, load_shared_qf_cb, qfb, TRUE);
 
   qfb->listener = 
Index: dialog-options.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-options.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-utils/dialog-options.h -Lsrc/gnome-utils/dialog-options.h -u -r1.6 -r1.7
--- src/gnome-utils/dialog-options.h
+++ src/gnome-utils/dialog-options.h
@@ -36,13 +36,17 @@
 
 typedef void (* GNCOptionWinCallback)(GNCOptionWin *, gpointer data);
 
-GNCOptionWin * gnc_options_dialog_new(gboolean make_toplevel, gchar *title);
+GNCOptionWin * gnc_options_dialog_new(gchar *title);
+GNCOptionWin * gnc_options_dialog_new_w_dialog(gchar *title, GtkWidget *dialog);
 void gnc_options_dialog_destroy(GNCOptionWin * win);
+void gnc_options_register_stocks (void);
 
 GtkWidget * gnc_options_dialog_widget(GNCOptionWin * win);
 GtkWidget * gnc_options_dialog_notebook(GNCOptionWin * win);
 
 void gnc_options_dialog_changed (GNCOptionWin *win);
+void gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option);
+void gnc_option_changed_option_cb(GtkWidget *dummy, GNCOption *option);
 
 void gnc_options_dialog_set_apply_cb(GNCOptionWin * win,
                                      GNCOptionWinCallback thunk,
@@ -57,7 +61,6 @@
 void gnc_options_dialog_set_global_help_cb(GNCOptionWinCallback thunk,
                                            gpointer cb_data);
 
-void gnc_show_options_dialog(void);
 void gnc_build_options_dialog_contents(GNCOptionWin *win,
                                        GNCOptionDB  *odb);
 
@@ -102,7 +105,4 @@
 void gnc_options_ui_register_option (GNCOptionDef_t *option);
 GNCOptionDef_t * gnc_options_ui_get_option (const char *option_name);
 
-/* For option definitions outside the main module only */
-void gnc_options_dialog_changed_internal (GtkWidget *widget);
-
 #endif /* OPTIONS_DIALOG_H */
--- src/gnome-utils/window-help.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/********************************************************************\
- * window-help.h -- a help window for hypertext help.               *
- * Copyright (C) 1997 Robin D. Clark                                *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_HELP_WINDOW_H
-#define GNC_HELP_WINDOW_H
-
-#include <gnome.h>
-
-#include "gnc-html.h"
-
-typedef struct _gnc_help_window gnc_help_window;
-
-/** PROTOTYPES ******************************************************/
-
-void helpWindow(GtkWidget *parent, const char *title, const char * htmlfile);
-
-gnc_help_window  * gnc_help_window_new(void);
-void             gnc_help_window_destroy(gnc_help_window * help);
-void             gnc_help_window_show_help(gnc_help_window * hw, 
-                                           const gchar * loc,
-                                           const gchar * label);
-
-#endif
Index: dialog-query-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-query-list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/dialog-query-list.c -Lsrc/gnome-utils/dialog-query-list.c -u -r1.4 -r1.5
--- src/gnome-utils/dialog-query-list.c
+++ src/gnome-utils/dialog-query-list.c
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "gnc-book.h"
 #include "QueryNew.h"
@@ -99,7 +99,7 @@
   if (!current)
     return;
 
-  cb = gtk_object_get_data (GTK_OBJECT (button), "data");
+  cb = g_object_get_data (G_OBJECT (button), "data");
   g_return_if_fail (cb);
 
   gnc_dialog_query_run_callback (cb, current, dql);
@@ -120,13 +120,31 @@
   gnc_dialog_query_run_callback (dql->buttons, item, dql);
 }
 
+static int
+gnc_dialog_query_list_delete_cb (GtkDialog *dialog, GdkEvent  *event, DialogQueryList *dql)
+{
+  g_return_val_if_fail (dql, TRUE);
+
+  gnc_unregister_gui_component (dql->component_id);
+
+  /* XXX: Clear/destroy the param_list? */  
+
+  /* destroy the book list */
+  dql_clear_booklist (dql);
+
+  /* Destroy and exit */
+  gtk_widget_destroy(dql->dialog);
+  g_free (dql);
+  return FALSE;
+}
+
 static void
 close_handler (gpointer data)
 {
   DialogQueryList * dql = data;
 
   g_return_if_fail (dql);
-  gnome_dialog_close (GNOME_DIALOG (dql->dialog));
+  gnc_dialog_query_list_delete_cb (GTK_DIALOG(dql->dialog), NULL, dql);
 }
 
 static void
@@ -140,7 +158,7 @@
   {
     for (node = dql->books; node; node = node->next)
     {
-      info = gnc_gui_get_entity_events (changes, (GUID*)(node->data));
+      info = gnc_gui_get_entity_events (changes, (const GUID*)(node->data));
       if (info && (info->event_mask & GNC_EVENT_DESTROY))
       {
 	gnc_close_gui_component (dql->component_id);
@@ -150,23 +168,6 @@
   }
 }
 
-static int
-gnc_dialog_query_list_close_cb (GnomeDialog *dialog, DialogQueryList *dql)
-{
-  g_return_val_if_fail (dql, TRUE);
-
-  gnc_unregister_gui_component (dql->component_id);
-
-  /* XXX: Clear/destroy the param_list? */  
-
-  /* destroy the book list */
-  dql_clear_booklist (dql);
-
-  /* Destroy and exit */
-  g_free (dql);
-  return FALSE;
-}
-
 static void
 gnc_dialog_query_list_close (GtkButton *button, DialogQueryList *dql)
 {
@@ -190,7 +191,7 @@
 
   /* Grab the dialog, save the dialog info */
   dql->dialog = glade_xml_get_widget (xml, "Query List Dialog");
-  gtk_object_set_data (GTK_OBJECT (dql->dialog), "dialog-info", dql);
+  g_object_set_data (G_OBJECT (dql->dialog), "dialog-info", dql);
 
   /* grab the widgets */
   dql->label = glade_xml_get_widget (xml, "dialog_label");
@@ -203,17 +204,17 @@
   gtk_container_add (GTK_CONTAINER (scroller), dql->qlist);
 
   /* connect the double-click signal of the qlist */
-  gtk_signal_connect (GTK_OBJECT (dql->qlist), "double_click_entry",
-		      gnc_dialog_query_list_double_click_entry, dql);
+  g_signal_connect (G_OBJECT (dql->qlist), "double_click_entry",
+		    G_CALLBACK(gnc_dialog_query_list_double_click_entry), dql);
   
 
   /* connect to the close button */
-  gtk_signal_connect (GTK_OBJECT (close), "clicked",
-		      GTK_SIGNAL_FUNC (gnc_dialog_query_list_close), dql);
+  g_signal_connect (G_OBJECT (close), "clicked",
+		    G_CALLBACK (gnc_dialog_query_list_close), dql);
 
   /* connect to the cleanup */
-  gtk_signal_connect (GTK_OBJECT (dql->dialog), "close",
-		      GTK_SIGNAL_FUNC (gnc_dialog_query_list_close_cb), dql);
+  g_signal_connect (G_OBJECT (dql->dialog), "delete_event",
+		    G_CALLBACK (gnc_dialog_query_list_delete_cb), dql);
 
 
   /* register ourselves */
@@ -261,9 +262,9 @@
   /* build up the buttons */
   for (i = 0; buttons[i].label; i++) {
     button = gtk_button_new_with_label (buttons[i].label);
-    gtk_object_set_data (GTK_OBJECT (button), "data", &(dql->buttons[i]));
-    gtk_signal_connect (GTK_OBJECT (button), "clicked",
-			gnc_dialog_query_list_button_clicked, dql);
+    g_object_set_data (G_OBJECT (button), "data", &(dql->buttons[i]));
+    g_signal_connect (G_OBJECT (button), "clicked",
+		      G_CALLBACK(gnc_dialog_query_list_button_clicked), dql);
     gtk_box_pack_start (GTK_BOX (dql->button_box), button, FALSE, FALSE, 3);
   }
 }
Index: gnc-currency-edit.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-currency-edit.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/gnc-currency-edit.c -Lsrc/gnome-utils/gnc-currency-edit.c -u -r1.4 -r1.5
--- src/gnome-utils/gnc-currency-edit.c
+++ src/gnome-utils/gnc-currency-edit.c
@@ -22,14 +22,37 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org
  *
  */
-/*
-  @NOTATION@
- */
 
-/*
- * Currency editor widget
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GncCurrencyEdit
+ * @{ */
+/** @file gnc-currency-edit.c
+ *  @brief Currency selection widget.
+ *  @author Dave Peticolas <dave at krondo.com>
+ *  @author David Hampton <hampton at employees.org>
+ *
+ *  This widget is a GtkComboBox that is wrapped with support
+ *  functions for building/selecting from a list of ISO4217 currency
+ *  names.  All data is maintained within the widget itself, which
+ *  makes the name/item lookup functions somewhat complicated.  The
+ *  alternative coding would be to keep an auxiliary list of strings
+ *  attacked to the widget for lookup purposes, but that would be 100%
+ *  redundant information.
  *
- * Authors: Dave Peticolas <dave at krondo.com>
+ *  This function currently builds a new GtkListStore for each widget
+ *  created.  It could be optimized to build a single list store and
+ *  share across all extant version of the widget, or even build the
+ *  list store once and maintain for the life of the application.
+ *
+ *  When the GtkComboCellEntry widget supports completion, this Gnucash
+ *  widget should be modified so that it is based upon that widget.
+ *  That would give users the capability to select a currency by typing
+ *  its ISO 4217 code (e.g. USD, GBP, etc).  Moving to that widget
+ *  today, however, would cause more problems that its worth.  There is
+ *  currently no way to get access to the embedded GtkEntry widget, and
+ *  therefore no way to implement completion in gnucash or prevent the
+ *  user from typing in random data.
  */
 
 #include <config.h>
@@ -39,99 +62,107 @@
 
 #include "gnc-currency-edit.h"
 #include "gnc-commodity.h"
-#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 #include "messages.h"
 
-#define MNEMONIC_MAXLEN 10
-
 static void gnc_currency_edit_init         (GNCCurrencyEdit      *gce);
 static void gnc_currency_edit_class_init   (GNCCurrencyEditClass *class);
-static void gnc_currency_edit_destroy      (GtkObject            *object);
 
-static GtkComboClass *parent_class;
+static GtkComboBoxClass *parent_class;
 
-/**
- * gnc_currency_edit_get_type:
- *
- * Returns the GtkType for the GNCCurrencyEdit widget
+/** @name Basic Object Implementation */
+/** @{ */
+
+/*  Return the GType for the GNCCurrencyEdit currency selection widget.
  */
-guint
+GType
 gnc_currency_edit_get_type (void)
 {
-	static guint currency_edit_type = 0;
+	static GType currency_edit_type = 0;
 
-	if (!currency_edit_type){
-		GtkTypeInfo currency_edit_info = {
-			"GNCCurrencyEdit",
-			sizeof (GNCCurrencyEdit),
+	if (currency_edit_type == 0) {
+		static const GTypeInfo currency_edit_info = {
 			sizeof (GNCCurrencyEditClass),
-			(GtkClassInitFunc) gnc_currency_edit_class_init,
-			(GtkObjectInitFunc) gnc_currency_edit_init,
 			NULL,
 			NULL,
+			(GClassInitFunc) gnc_currency_edit_class_init,
+			NULL,
+			NULL,
+			sizeof (GNCCurrencyEdit),
+			0, /* n_preallocs */
+			(GInstanceInitFunc) gnc_currency_edit_init,
+			NULL
 		};
 
-		currency_edit_type = gtk_type_unique (gtk_combo_get_type (),
-                                                      &currency_edit_info);
+		currency_edit_type = g_type_register_static (GTK_TYPE_COMBO_BOX, 
+							     "GNCCurrencyEdit",
+							     &currency_edit_info, 0);
 	}
 
 	return currency_edit_type;
 }
 
+
+/** Initialize the GncCurrencyEdit class object.
+ *
+ *  @internal
+ *
+ *  @param klass A pointer to the newly created class object.
+ */
 static void
-gnc_currency_edit_class_init (GNCCurrencyEditClass *class)
+gnc_currency_edit_class_init (GNCCurrencyEditClass *klass)
 {
-	GtkObjectClass *object_class = (GtkObjectClass *) class;
-
-	object_class = (GtkObjectClass*) class;
-
-	parent_class = gtk_type_class (gtk_combo_get_type ());
-
-	object_class->destroy = gnc_currency_edit_destroy;
+	parent_class = g_type_class_peek_parent (klass);
 }
 
+
+/** Initialize a GncCurrencyEdit object.  This function is currently a
+ *  noop.
+ *
+ *  @internal
+ *
+ *  @param gce A pointer to the newly created object.
+ */
 static void
 gnc_currency_edit_init (GNCCurrencyEdit *gce)
 {
-        gtk_combo_set_use_arrows_always(GTK_COMBO(gce), TRUE);
-        gtk_combo_set_value_in_list(GTK_COMBO(gce), FALSE, TRUE);
-        gtk_combo_disable_activate(GTK_COMBO(gce));
 }
 
-static void
-gnc_currency_edit_destroy (GtkObject *object)
-{
-	g_return_if_fail (object != NULL);
-	g_return_if_fail (GNC_IS_CURRENCY_EDIT (object));
-
-	if (GTK_OBJECT_CLASS (parent_class)->destroy)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
-}
 
+/** This auxiliary function adds a single currency name to the combo
+ *  box.  It is called as an iterator function when running a list of
+ *  currencies.
+ *
+ *  @internal
+ *
+ *  @param commodity The currency to add to the selection widget.
+ *
+ *  @param gce A pointer to the selection widget.
+ */
 static void
-add_item(GNCCurrencyEdit *gce, gnc_commodity *commodity)
+add_item(gnc_commodity *commodity, GNCCurrencyEdit *gce)
 {
-        GtkWidget *item;
-        GtkWidget *label;
         const char *string;
 
-        item = gtk_list_item_new();
-
-        string = gnc_commodity_get_printname (commodity);
-
-        label = gtk_label_new(string);
-        gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5);
-
-        gtk_container_add(GTK_CONTAINER(item), label);
-
-        gtk_widget_show_all(item);
-
-	gtk_combo_set_item_string(GTK_COMBO(gce), GTK_ITEM (item), string);
-
-        gtk_container_add(GTK_CONTAINER(GTK_COMBO(gce)->list), item);
+        string = gnc_commodity_get_printname(commodity);
+	gtk_combo_box_append_text(GTK_COMBO_BOX(gce), string);
 }
 
+
+/** This auxiliary function adds a single currency name to the combo
+ *  box.  It is called as an iterator function when running a list of
+ *  currencies.
+ *
+ *  @internal
+ *
+ *  @param a A pointer to the first currency to compare.
+ *
+ *  @param b A pointer to the second currency to compare.
+ *
+ *  @return This function returns -1 if the first currency should be
+ *  ordered before the second, 0 if the currencies have the same name,
+ *  and +1 if the second currency should be ordered before the first.
+ */
 static int
 currency_compare(gconstpointer a, gconstpointer b)
 {
@@ -139,91 +170,146 @@
                        gnc_commodity_get_printname (b));
 }
 
+
+/** This auxiliary function adds all the currency names to a combo
+ *  box.
+ *
+ *  @internal
+ *
+ *  @param gce A pointer to the widget that should be filled with
+ *  currency names.
+ */
 static void
 fill_currencies(GNCCurrencyEdit *gce)
 {
         GList *currencies;
-        GList *node;
 
         currencies = gnc_commodity_table_get_commodities
                 (gnc_get_current_commodities (), GNC_COMMODITY_NS_ISO);
-
         currencies = g_list_sort(currencies, currency_compare);
-
-        for (node = currencies; node != NULL; node = node->next)
-                add_item(gce, node->data);
-
+	g_list_foreach(currencies, (GFunc)add_item, gce);
         g_list_free(currencies);
 }
 
-/**
- * gnc_currency_edit_new:
- *
- * Creates a new GNCCurrencyEdit widget which can be used to provide
- * an easy way to enter ISO currency codes.
+
+/*  Create a new GNCCurrencyEdit widget which can be used to provide
+ *  an easy way to enter ISO currency codes.
  * 
- * Returns a GNCCurrencyEdit widget.
+ *  @return A GNCCurrencyEdit widget.
  */
 GtkWidget *
 gnc_currency_edit_new (void)
 {
 	GNCCurrencyEdit *gce;
+	GtkListStore *store;
+	GtkCellRenderer *cell;
 
-	gce = gtk_type_new (gnc_currency_edit_get_type ());
+	store = gtk_list_store_new (1, G_TYPE_STRING);
+	gce = g_object_new (GNC_TYPE_CURRENCY_EDIT, "model", store, NULL);
+	g_object_unref (store);
+
+	cell = gtk_cell_renderer_text_new ();
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (gce), cell, TRUE);
+	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (gce), cell,
+					"text", 0,
+					NULL);
 
 	fill_currencies (gce);
 
 	return GTK_WIDGET (gce);
 }
 
-/**
- * gnc_currency_edit_set_curreny:
- * @gce: the currency editor widget
- * @currency: the currency to select
+/** @} */
+
+/** @name Get/Set Functions */
+
+/*  Set the widget to display a certain currency name.
  *
- * Sets the currency value of the widget to a particular currency.
+ *  @param gce The currency editor widget to set.
  *
- * Returns nothing.
+ *  @param currency The currency to set as the displayed/selected
+ *  value of the widget.
  */
 void
 gnc_currency_edit_set_currency (GNCCurrencyEdit *gce,
                                 const gnc_commodity *currency)
 {
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	const gchar *printname, *tree_string;
+	GValue value = { 0 };
+	gint result = 1;
+
         g_return_if_fail(gce != NULL);
         g_return_if_fail(GNC_IS_CURRENCY_EDIT(gce));
         g_return_if_fail(currency != NULL);
+	
+	model = gtk_combo_box_get_model(GTK_COMBO_BOX(gce));
+	if (!gtk_tree_model_get_iter_first(model, &iter)) {
+		/* empty tree */
+		return;
+	}
 
-        gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(gce)->entry),
-                           gnc_commodity_get_printname (currency));
+	printname = gnc_commodity_get_printname(currency);
+	do {
+		gtk_tree_model_get_value(model, &iter, 0, &value);
+		tree_string = g_value_get_string(&value);
+		result = strcmp(printname, tree_string);
+		g_value_unset(&value);
+
+		if (result == 0) {
+		  gtk_combo_box_set_active_iter(GTK_COMBO_BOX(gce), &iter);
+		  return;
+		}
+	} while (gtk_tree_model_iter_next(model, &iter));
 }
 
-/**
- * gnc_currency_edit_get_curreny:
- * @gce: the currency editor widget
+
+/*  Retrieve the displayed currency of the widget.
+ *
+ *  @param gce The currency editor widget whose values should be retrieved.
  *
- * Returns the selected currency.
+ *  @return A pointer to the selected currency (a gnc_commodity
+ *  structure).
  */
 gnc_commodity *
 gnc_currency_edit_get_currency (GNCCurrencyEdit *gce)
 {
 	gnc_commodity *commodity;
-        char *mnemonic, *name;
+        const char *fullname;
+	char *mnemonic, *name;
+	GtkTreeModel *model;
+	GtkTreeIter iter;
+	GValue value = { 0 };
 
         g_return_val_if_fail(gce != NULL, NULL);
         g_return_val_if_fail(GNC_IS_CURRENCY_EDIT(gce), NULL);
 
-        mnemonic = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(gce)->entry)));
+	if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(gce), &iter)) {
+		model = gtk_combo_box_get_model(GTK_COMBO_BOX(gce));
+		gtk_tree_model_get_value(model, &iter, 0, &value);
+		fullname = g_value_get_string(&value);
+		mnemonic = g_strdup(fullname);
+		g_value_unset(&value);
+
+		name = index(mnemonic, ' ');
+		if (name != NULL)
+			*name = '\0';
+		commodity = gnc_commodity_table_lookup (gnc_get_current_commodities (),
+							GNC_COMMODITY_NS_ISO,
+							mnemonic);
+		g_free(mnemonic);
+	} else {
+		g_warning("Combo box returned 'inactive'. Using locale default currency.");
+		commodity = gnc_locale_default_currency();
+	}
+
 
-	name = index(mnemonic, ' ');
-	if (name != NULL)
-		*name = '\0';
-        commodity = gnc_commodity_table_lookup (gnc_get_current_commodities (),
-						GNC_COMMODITY_NS_ISO,
-						mnemonic);
-	g_free(mnemonic);
 	return commodity;
 }
 
+/** @} */
+
 /*
   Local Variables:
   c-basic-offset: 8
Index: exchange-dialog.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/exchange-dialog.glade,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/exchange-dialog.glade -Lsrc/gnome-utils/exchange-dialog.glade -u -r1.4 -r1.5
--- src/gnome-utils/exchange-dialog.glade
+++ src/gnome-utils/exchange-dialog.glade
@@ -1,373 +1,452 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Exchange-dialog</name>
-  <program_name>exchange-dialog</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Exchange Dialog</name>
-  <type>GTK_WINDOW_POPUP</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button3</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox2</name>
-      <homogeneous>False</homogeneous>
-      <spacing>3</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<label>Split Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox1</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox1</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label7</name>
-	      <label>Amount:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label1</name>
-	      <label>From:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label2</name>
-	      <label>To:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label4</name>
-	      <label>Date:</label>
-	      <justify>GTK_JUSTIFY_RIGHT</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox2</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>from_amount_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>from_entry</name>
-	      <sensitive>False</sensitive>
-	      <can_focus>True</can_focus>
-	      <editable>False</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
+<widget class="GtkDialog" id="Exchange Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_POPUP</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
-
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>to_entry</name>
-	      <sensitive>False</sensitive>
-	      <can_focus>True</can_focus>
-	      <editable>False</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>date_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame2</name>
-	<label>Exchange/Price Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox4</name>
-	  <border_width>3</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox3</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>3</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>rate_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Exchange Rate:</label>
-	      <active>True</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>exch_type</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>amount_button</name>
-	      <can_focus>True</can_focus>
-	      <label>To Amount:</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>exch_type</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox4</name>
-	    <homogeneous>True</homogeneous>
-	    <spacing>3</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>rate_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>to_amount_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">3</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox1">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label7">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Amount:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">From:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label2">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">To:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label4">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Date:</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_RIGHT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">1</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox2">
+		      <property name="border_width">3</property>
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="from_amount_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="from_entry">
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkEntry" id="to_entry">
+			  <property name="visible">True</property>
+			  <property name="sensitive">False</property>
+			  <property name="can_focus">True</property>
+			  <property name="editable">False</property>
+			  <property name="visibility">True</property>
+			  <property name="max_length">0</property>
+			  <property name="text" translatable="yes"></property>
+			  <property name="has_frame">True</property>
+			  <property name="invisible_char" translatable="yes">*</property>
+			  <property name="activates_default">False</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="date_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Split Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame2">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox4">
+		  <property name="border_width">3</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox3">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="rate_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Exchange Rate:</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkRadioButton" id="amount_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">To Amount:</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">rate_button</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox4">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">True</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<widget class="GtkHBox" id="rate_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="to_amount_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label8">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Exchange/Price Information</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gnc-dense-cal.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-dense-cal.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-dense-cal.h -Lsrc/gnome-utils/gnc-dense-cal.h -u -r1.3 -r1.4
--- src/gnome-utils/gnc-dense-cal.h
+++ src/gnome-utils/gnc-dense-cal.h
@@ -26,11 +26,13 @@
 #include <gdk/gdk.h>
 #include <gtk/gtkadjustment.h>
 #include <gtk/gtkwidget.h>
+#include <glib.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif /* __cplusplus */
 
+#define GNC_TYPE_DENSE_CAL          (gnc_dense_cal_get_type ()) 
 #define GNC_DENSE_CAL(obj)          GTK_CHECK_CAST (obj, gnc_dense_cal_get_type (), GncDenseCal)
 #define GNC_DENSE_CAL_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_dense_cal_get_type (), GncDenseCalClass)
 #define GNC_IS_DENSE_CAL(obj)       GTK_CHECK_TYPE (obj, gnc_dense_cal_get_type ())
@@ -67,7 +69,7 @@
 
         gint numMonths;
         gint monthsPerCol;
-        gint num_weeks; // computed
+        gint num_weeks; /* computed */
 
         GDateMonth month;
         gint year;
@@ -99,6 +101,8 @@
         int numMarks;
         /* array of GList*s of per-cell markings. */
         GList **marks;
+
+	int disposed; /* private */
 };
 
 struct _GncDenseCalClass
@@ -111,7 +115,7 @@
         gchar *name;
         gchar *info;
         guint tag;
-        // GdkColor markStyle;
+        /* GdkColor markStyle; */
         /**
          * A GList of the dcal->marks indexes containing this mark.
          **/
@@ -119,7 +123,7 @@
 } gdc_mark_data;
 
 GtkWidget*     gnc_dense_cal_new                    (void);
-GtkType        gnc_dense_cal_get_type               (void);
+GType          gnc_dense_cal_get_type               (void);
 
 void gnc_dense_cal_set_month( GncDenseCal *dcal, GDateMonth mon );
 /**
Index: dialog-account.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-account.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/dialog-account.h -Lsrc/gnome-utils/dialog-account.h -u -r1.2 -r1.3
--- src/gnome-utils/dialog-account.h
+++ src/gnome-utils/dialog-account.h
@@ -31,35 +31,34 @@
 
 /** @addtogroup GUI
     @{ */
-
+/** @addtogroup GuiAccount Creating and editing accounts in the GUI
+    @{ */
 /** @file dialog-account.h
  *
  *  This file contains the functions to present a gui to the user for
  *  creating a new account or editing an existing account.
  *
- *  @brief Dialog fo create/edit an account.
+ *  @brief Dialog for create/edit an account.
  *  @author Copyright (C) 1997 Robin D. Clark
  *  @author Copyright (C) 2000 Dave Peticolas
  */
 
-/** PROTOTYPES ******************************************************/
-typedef struct _AccountWindow  AccountWindow;
-
-/** @name Non-Modal */
-/** @{ */
+/** @name Non-Modal
+ @{ */
 
 /** Disply a window for editing the attributes of an existing account.
  *
- *  @param group This parameter is not used.
+ *  @param account This parameter specifies the account whose data
+ *  will be edited.
  */
-AccountWindow *gnc_ui_edit_account_window (Account *account);
+void gnc_ui_edit_account_window (Account *account);
 
 
 /** Disply a window for creating a new account
  *
  *  @param group This parameter is not used.
  */
-AccountWindow *gnc_ui_new_account_window (AccountGroup *group);
+void gnc_ui_new_account_window (AccountGroup *group);
 
 
 /** Disply a window for creating a new account.  This function will
@@ -71,31 +70,32 @@
  *
  *  @param parent The initially selected parent account.
  */
-AccountWindow *gnc_ui_new_account_window_with_default (AccountGroup *group,
-						       Account * parent);
+void gnc_ui_new_account_window_with_default (AccountGroup *group,
+					     Account * parent);
 
 
 /** Disply a window for creating a new account.  This function will
  *  restrict the available account type values to the list specified by the caller.
  *
- *  @param group This parameter is not used.
+ *  @param unused This parameter is not used.
  *
  *  @param valid_types A GList of GNCAccountType gints [as pointers]
  *  which are allowed to be created.  The calling function is
  *  responsible for freeing this list.
  */
-AccountWindow *gnc_ui_new_account_with_types (AccountGroup *unused,
-					      GList *valid_types);
+void gnc_ui_new_account_with_types (AccountGroup *unused,
+				    GList *valid_types);
 /** @} */
 
 
 
-/** @name Modal */
-/** @{ */
+/** @name Modal 
+ @{ */
 
 /** Disply a modal window for creating a new account
  *
- *  @param group This parameter is not used.
+ *  @param name The account name/path to be created.  This parameter
+ *  is not used for determining the initially selected parent account.
  */
 Account * gnc_ui_new_accounts_from_name_window (const char *name);
 
@@ -117,7 +117,7 @@
 							   GList *valid_types);
 
 
-/** Disply a modal window for creating a new account.  This function
+/** Display a modal window for creating a new account.  This function
  *  will restrict the available account type values to the list
  *  specified by the caller.
  *
@@ -140,11 +140,6 @@
 						       gnc_commodity * default_commodity,
 						       Account * parent);
 
-/** @} */
-/** @} */
-
-void gnc_ui_edit_account_window_raise (AccountWindow * winData);
-
 /*
  * register a callback that get's called when the account has changed
  * so significantly that you need to destroy yourself.  In particular
@@ -152,5 +147,8 @@
  * account type has changed.
  */
 void gnc_ui_register_account_destroy_callback (void (*cb)(Account *));
+/** @} */
+/** @} */
+/** @} */
 
 #endif
Index: gnome-utils.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnome-utils.scm,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-utils/gnome-utils.scm -Lsrc/gnome-utils/gnome-utils.scm -u -r1.6 -r1.7
--- src/gnome-utils/gnome-utils.scm
+++ src/gnome-utils/gnome-utils.scm
@@ -16,7 +16,7 @@
 (export gnc:make-menu)
 (export gnc:make-separator)
 (export gnc:new-menu-namer)
-(export gnc:*add-extension-hook*)
+(re-export gnc:*add-extension-hook*)
 
 (export gnc:kvp-option-dialog)
 
@@ -25,7 +25,7 @@
 (define (gnc:kvp-option-dialog id-type slots title changed_cb)
   (let* ((options (gnc:make-kvp-options id-type))
 	 (optiondb (gnc:option-db-new options))
-	 (optionwin (gnc:option-dialog-new #t title)))
+	 (optionwin (gnc:option-dialog-new title)))
 
     (define (apply-cb)
       (gnc:options-scm->kvp options slots gnc:*kvp-option-path* #t)
--- src/gnome-utils/gnc-account-tree.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*******************************************************************\
- * account-tree.h -- GNOME account tree functions                   *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- * Copyright (C) 2000 Dave Peticolas <peticola at cs.ucdavis.edu>      *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_ACCOUNT_TREE_H
-#define GNC_ACCOUNT_TREE_H
-
-#include <gtk/gtkctree.h>
-
-#include "Group.h"
-#include "gnc-ui-util.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif				/* __cplusplus */
-
-#define GTK_TYPE_GNC_ACCOUNT_TREE (gnc_account_tree_get_type ())
-#define GNC_ACCOUNT_TREE(obj)     (GTK_CHECK_CAST ((obj), GTK_TYPE_GNC_ACCOUNT_TREE, GNCAccountTree))
-#define GNC_ACCOUNT_TREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_GNC_ACCOUNT_TREE, GNCAccountTreeClass))
-#define IS_GNC_ACCOUNT_TREE(obj)  (GTK_CHECK_TYPE ((obj), GTK_TYPE_GNC_ACCOUNT_TREE))
-#define IS_GNC_ACCOUNT_TREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_GNC_ACCOUNT_TREE))
-
-typedef struct GNCAccountTree_s      GNCAccountTree;
-typedef struct GNCAccountTreeClass_s GNCAccountTreeClass;
-typedef struct AccountViewInfo_s     AccountViewInfo;
-
-typedef gboolean (*AccountFilter) (Account *account, gpointer user_data);
-
-struct AccountViewInfo_s
-{
-  gboolean include_type[NUM_ACCOUNT_TYPES];
-
-  gboolean show_field[NUM_ACCOUNT_FIELDS];
-};
-
-struct GNCAccountTree_s
-{
-  GtkCTree ctree;
-
-  AccountFilter view_filter;
-  gpointer view_filter_data;
-
-  AccountFilter selectable_filter;
-  gpointer selectable_filter_data;
-
-  AccountViewInfo avi;
-
-  const gchar * column_headings[NUM_ACCOUNT_FIELDS + 1];
-
-  GtkStyle *deficit_style;
-
-  GUID root_account;
-
-  GList * current_accounts;
-
-  gboolean ignore_unselect;
-};
-
-struct GNCAccountTreeClass_s
-{
-  GtkCTreeClass parent_class;
-
-  void (*select_account)   (GNCAccountTree *tree,
-                            Account        *account);
-
-  void (*unselect_account) (GNCAccountTree *tree,
-                            Account        *account);
-
-  void (*activate_account) (GNCAccountTree *tree,
-                            Account        *account);
-};
-
-/***********************************************************
- *                public functions                         *
- ***********************************************************/
-
-GtkType gnc_account_tree_get_type (void);
-
-GtkWidget * gnc_account_tree_new (void);
-
-GtkWidget * gnc_account_tree_new_with_root (Account *account);
-
-void gnc_account_tree_refresh (GNCAccountTree *tree);
-
-gboolean gnc_account_tree_select_account (GNCAccountTree *tree,
-					  Account *account,
-                                          gboolean show_account);
-
-gboolean gnc_account_tree_select_subaccounts (GNCAccountTree *tree,
-                                              Account *account,
-                                              gboolean show_account);
-
-gboolean gnc_account_tree_select_accounts (GNCAccountTree *tree,
-                                           GList          *account_list,
-                                           gboolean        show_last);
-
-gboolean gnc_account_tree_unselect_account (GNCAccountTree *tree,
-                                            Account        *account,
-                                            gboolean       show_account);
-
-gboolean gnc_account_tree_unselect_subaccounts (GNCAccountTree *tree,
-                                                Account *account,
-                                                gboolean show_account);
-
-void gnc_account_tree_expand_account (GNCAccountTree *tree,
-                                      Account *account);
-
-void gnc_account_tree_toggle_account_expansion (GNCAccountTree *tree,
-                                                Account *account);
-
-void gnc_account_tree_expand_all (GNCAccountTree *tree);
-
-void gnc_account_tree_show_income_expense (GNCAccountTree *tree);
-
-void gnc_account_tree_hide_income_expense (GNCAccountTree *tree);
-
-Account * gnc_account_tree_get_current_account (GNCAccountTree *tree);
-GList *   gnc_account_tree_get_current_accounts (GNCAccountTree *tree);
-
-Account * gnc_account_tree_get_focus_account (GNCAccountTree *tree);
-
-gboolean  gnc_account_tree_account_selected (GNCAccountTree *tree,
-                                             Account *account);
-
-void gnc_account_tree_hide_all_but_name (GNCAccountTree *tree);
-
-void gnc_init_account_view_info(AccountViewInfo *avi);
-
-void gnc_account_tree_set_view_info (GNCAccountTree *tree,
-				     AccountViewInfo *info);
-
-void gnc_account_tree_get_view_info (GNCAccountTree *tree,
-				     AccountViewInfo *info);
-
-void gnc_account_tree_set_view_filter (GNCAccountTree *tree,
-                                       AccountFilter filter,
-                                       gpointer user_data);
-
-void gnc_account_tree_set_selectable_filter (GNCAccountTree *tree,
-                                             AccountFilter filter,
-                                             gpointer user_data);
-const char * gnc_ui_account_get_field_name (AccountFieldCode field);
-const char * gnc_ui_account_get_pref_name (AccountFieldCode field);
-AccountFieldCode gnc_ui_account_pref_name_to_code (const char *pref_name);
-
-
-#ifdef __cplusplus
-}
-#endif				/* __cplusplus */
-
-#endif				/* GNC_ACCOUNT_TREE_H */
Index: misc-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/misc-gnome-utils.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/misc-gnome-utils.h -Lsrc/gnome-utils/misc-gnome-utils.h -u -r1.1 -r1.2
--- src/gnome-utils/misc-gnome-utils.h
+++ src/gnome-utils/misc-gnome-utils.h
@@ -19,10 +19,10 @@
 #ifndef __GTT_UTIL_H__
 #define __GTT_UTIL_H__
 
-#include <gtk/gtktext.h>
+#include <gtk/gtk.h>
 
 /* Some gtk-like utilities */
-void xxxgtk_text_set_text (GtkText *text, const char *str);
-const char * xxxgtk_text_get_text (GtkText *text);
+void xxxgtk_textview_set_text (GtkTextView *text, const char *str);
+char * xxxgtk_textview_get_text (GtkTextView *text);
 
 #endif /* __GTT_UTIL_H__ */
Index: gnc-account-sel.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-account-sel.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/gnome-utils/gnc-account-sel.c -Lsrc/gnome-utils/gnc-account-sel.c -u -r1.10 -r1.11
--- src/gnome-utils/gnc-account-sel.c
+++ src/gnome-utils/gnc-account-sel.c
@@ -44,19 +44,20 @@
 
 static guint account_sel_signals [LAST_SIGNAL] = { 0 };
 
-static void gnc_account_sel_init         (GNCAccountSel      *gas);
-static void gnc_account_sel_class_init   (GNCAccountSelClass *class);
-static void gas_accounts_to_names( gpointer data, gpointer user_data );
-
-static void gas_populate_list( GNCAccountSel *gas );
-static void gas_strcmp_adapter( gpointer a, gpointer b );
-static void gnc_account_sel_event_cb( GUID *entity, QofIdType id_type,
+static void gnc_account_sel_init (GNCAccountSel *gas);
+static void gnc_account_sel_class_init (GNCAccountSelClass *klass);
+static void gnc_account_sel_finalize (GObject *object);
+static void gnc_account_sel_dispose (GObject *object);
+
+static void gas_accounts_to_names (gpointer data, gpointer user_data);
+
+static void gas_populate_list (GNCAccountSel *gas);
+static void gas_strcmp_adapter (gpointer a, gpointer b);
+static void gnc_account_sel_event_cb (GUID *entity, QofIdType id_type,
                                       GNCEngineEventType event_type,
-                                      gpointer user_data );
+                                      gpointer user_data);
 
-static void gas_new_account_click( GtkButton *b, gpointer ud );
-
-static void gas_destroy( GtkObject *o, gpointer user_data );
+static void gas_new_account_click (GtkButton *b, gpointer ud);
 
 #if 0 /* completion not implemented */
 static void gnc_account_sel_changed( GtkEditable *entry, gpointer ud );
@@ -67,24 +68,27 @@
 
 static GtkHBox *parent_class;
 
-guint
+GType
 gnc_account_sel_get_type (void)
 {
-        static guint account_sel_type = 0;
+        static GType account_sel_type = 0;
 
-        if (!account_sel_type){
-                GtkTypeInfo account_sel_info = {
-                        "GNCAccountSel",
-                        sizeof (GNCAccountSel),
+        if (account_sel_type == 0) {
+                GTypeInfo account_sel_info = {
                         sizeof (GNCAccountSelClass),
-                        (GtkClassInitFunc) gnc_account_sel_class_init,
-                        (GtkObjectInitFunc) gnc_account_sel_init,
-                        NULL,
-                        NULL,
-                        (GtkClassInitFunc) NULL,
+			NULL,
+			NULL,
+                        (GClassInitFunc) gnc_account_sel_class_init,
+			NULL,
+			NULL,
+			sizeof (GNCAccountSel),
+			0,
+                        (GInstanceInitFunc) gnc_account_sel_init
                 };
 
-                account_sel_type = gtk_type_unique (GTK_TYPE_HBOX, &account_sel_info);
+                account_sel_type = g_type_register_static (GTK_TYPE_HBOX,
+							   "GNCAccountSel",
+							   &account_sel_info, 0);
         }
 
         return account_sel_type;
@@ -107,31 +111,25 @@
 
 static
 void
-gnc_account_sel_class_init (GNCAccountSelClass *class)
+gnc_account_sel_class_init (GNCAccountSelClass *klass)
 {
-        GtkObjectClass *object_class;
-        GtkWidgetClass *widget_class;
-        GtkHBoxClass *hbox_class;
+	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-        object_class = (GtkObjectClass*) class;
-        widget_class = (GtkWidgetClass*) class;
-        hbox_class = (GtkHBoxClass*) class;
+	parent_class = g_type_class_peek_parent (klass);
 
-        parent_class = gtk_type_class (gtk_entry_get_type ());
+	object_class->finalize = gnc_account_sel_finalize;
+	object_class->dispose = gnc_account_sel_dispose;
 
         account_sel_signals [ACCOUNT_SEL_CHANGED] =
-                gtk_signal_new ("account_sel_changed",
-                                GTK_RUN_FIRST, object_class->type, 
-                                GTK_SIGNAL_OFFSET (GNCAccountSelClass,
-                                                   account_sel_changed),
-                                gtk_signal_default_marshaller,
-                                GTK_TYPE_NONE, 0);
-	
-        gtk_object_class_add_signals (object_class,
-                                      account_sel_signals,
-                                      LAST_SIGNAL);
-
-        class->account_sel_changed = NULL;
+                g_signal_new ("account_sel_changed",
+                              G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (GNCAccountSelClass, account_sel_changed),
+			      NULL,
+			      NULL,
+			      g_cclosure_marshal_VOID__VOID,
+                              G_TYPE_NONE,
+			      0);
 }
 
 static void
@@ -147,9 +145,6 @@
 
         /* This is only because completion cannot be implemented. */
         gtk_editable_set_editable( GTK_EDITABLE(gas->combo->entry), FALSE );
-        gtk_signal_connect( GTK_OBJECT(gas), "destroy",
-                            GTK_SIGNAL_FUNC( gas_destroy ),
-                            gas );
 
 #if 0 /* completion not implemented. */
         gtk_signal_connect( GTK_OBJECT(gas->combo->entry), "changed",
@@ -359,7 +354,7 @@
 {
         GNCAccountSel *gas;
 
-        gas = gtk_type_new (gnc_account_sel_get_type ());
+        gas = g_object_new (GNC_TYPE_ACCOUNT_SEL, NULL);
 
         return GTK_WIDGET (gas);
 }
@@ -426,22 +421,47 @@
         gas_populate_list( gas );
 }
 
-static
-void
-gas_destroy( GtkObject *o, gpointer user_data )
+static void
+gnc_account_sel_finalize (GObject *object)
 {
-        GNCAccountSel *gas = (GNCAccountSel*)user_data;
-        if ( gas->acctTypeFilters ) {
-                g_list_free( gas->acctTypeFilters );
+	GNCAccountSel *gas;
+	
+	g_return_if_fail (object != NULL);
+        g_return_if_fail (GNC_IS_ACCOUNT_SEL (object));
+
+	gas = GNC_ACCOUNT_SEL (object);
+
+        if (gas->acctTypeFilters) {
+                g_list_free (gas->acctTypeFilters);
         }
-        gnc_engine_unregister_event_handler( gas->eventHandlerId );
+
+	G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnc_account_sel_dispose (GObject *object)
+{
+	GNCAccountSel *gas;
+	
+	g_return_if_fail (object != NULL);
+        g_return_if_fail (GNC_IS_ACCOUNT_SEL (object));
+
+	gas = GNC_ACCOUNT_SEL (object);
+
+        if (gas->eventHandlerId) {
+		gnc_engine_unregister_event_handler (gas->eventHandlerId);
+		gas->eventHandlerId = 0;
+	}
+
+	G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 void
 gnc_account_sel_set_new_account_ability( GNCAccountSel *gas,
                                          gboolean state )
 {
-        g_assert( gas );
+        g_return_if_fail (gas != NULL);
+
         if ( state == (gas->newAccountButton != NULL) ) {
                 /* We're already in that state; don't do anything. */
                 return;
@@ -471,12 +491,11 @@
 gnc_account_sel_set_new_account_modal( GNCAccountSel *gas,
 				       gboolean state )
 {
-	g_assert ( gas );
+	g_return_if_fail (gas != NULL);
 	gas->isModal = state;
 }
 
-static
-void
+static void
 gas_new_account_click( GtkButton *b, gpointer ud )
 {
         GNCAccountSel *gas = (GNCAccountSel*)ud;
--- src/gnome-utils/gnc-mdi-utils.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/********************************************************************\
- * gnc-mdi-utils.h -- utility functions for gnome/mdi               *
- * Copyright (C) 2001 Linux Developers Group                        *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
- *                                                                  *
-\********************************************************************/
-
-#ifndef GNC_MDI_UTILS_H
-#define GNC_MDI_UTILS_H
-
-#include <gnome.h>
-#include <libguile.h>
-
-typedef struct gnc_mdi_child_info GNCMDIChildInfo;
-
-typedef void (*GNCShutdownFunc) (int exit_status);
-typedef gboolean (*GNCMDICanRestoreCB) (const char * filename);
-typedef GnomeMDIChild * (*GNCMDIRestoreCB) (const char *config_string);
-typedef void (*GNCMDIAutoSetup) (GNCMDIChildInfo *child);
-
-typedef enum {
-  GNC_AUTO_SHOW,
-  GNC_AUTO_HIDE,
-  GNC_AUTO_ENABLE,
-  GNC_AUTO_DISABLE,
-  GNC_AUTO_LAST
-} GNCMDIAutoType;
-
-/*
- * If you update this enum, you must also update the list of menu
- * paths at the start of gnc-mdi-utils.c.
- */
-typedef enum {
-  GNC_DISP_PRINT,
-  GNC_DISP_CUT,
-  GNC_DISP_COPY,
-  GNC_DISP_PASTE,
-  GNC_DISP_REFRESH,
-  GNC_DISP_LAST
-} GNCMDIDispatchType;
-
-typedef struct
-{
-  GnomeMDI * mdi;
-
-  char     * app_name;
-  char     * title;
-
-  GnomeUIInfo *toolbar_prefix;
-  GnomeUIInfo *toolbar_suffix;
-
-  int      component_id;
-
-  SCM      toolbar_change_callback_id;
-  SCM      mdi_change_callback_id;
-
-  GList    * children;
-
-  GNCShutdownFunc shutdown;
-
-  GNCMDICanRestoreCB can_restore_cb;
-  GNCMDIRestoreCB restore_cb;
-} GNCMDIInfo;
-
-struct gnc_mdi_child_info
-{
-  GnomeMDIChild   * child;
-  GNCMDIInfo      * gnc_mdi;
-  GtkWidget       * contents;
-  GnomeApp        * app;
-
-  GtkWidget       * toolbar;  
-  GnomeUIInfo     * toolbar_info;
-  GnomeUIInfo     * menu_info;
-
-  int             component_id;
-  void            * user_data;
-  char            * title;
- 
-  GNCMDIAutoSetup menu_tweaking;
-  GList	          * menu_names[GNC_AUTO_LAST];
-  GList	          * toolbar_names[GNC_AUTO_LAST];
-
-  GtkCallback     dispatch_callback[GNC_DISP_LAST];
-  gpointer        dispatch_data[GNC_DISP_LAST];
-};
-
-
-GNCMDIInfo * gnc_mdi_new (const char *app_name,
-                          const char *title,
-                          GnomeUIInfo *toolbar_prefix,
-                          GnomeUIInfo *toolbar_suffix,
-                          GNCShutdownFunc shutdown,
-                          GNCMDICanRestoreCB can_restore_cb,
-                          GNCMDIRestoreCB restore_cb);
-void gnc_mdi_destroy (GNCMDIInfo * gnc_mdi);
-
-void gnc_mdi_add_child (GNCMDIInfo * wind, GNCMDIChildInfo * child);
-void gnc_mdi_remove_child (GNCMDIInfo * gnc_mdi, GNCMDIChildInfo * child);
-void gnc_mdi_child_refresh (GNCMDIChildInfo *child);
-
-GNCMDIChildInfo * gnc_mdi_child_find_by_app (GnomeApp *app);
-GNCMDIInfo * gnc_mdi_get_current (void);
-gboolean gnc_mdi_has_apps (void);
-
-void gnc_mdi_show_progress (const char *message, double percentage);
-
-void gnc_app_set_title (GnomeApp *app);
-
-void gnc_mdi_save (GNCMDIInfo * gnc_mdi, char * filename);
-void gnc_mdi_restore (GNCMDIInfo * gnc_mdi, const char * filename);
-
-void gnc_mdi_create_child_toolbar (GNCMDIInfo * mi, GNCMDIChildInfo * child);
-
-void gnc_mdi_child_auto_menu(GNCMDIChildInfo *, GNCMDIAutoType, gchar *, ...);
-void gnc_mdi_child_auto_toolbar(GNCMDIChildInfo *, GNCMDIAutoType, gchar *, ...);
-GtkWidget * gnc_mdi_child_find_menu_item(GNCMDIChildInfo *mc, gchar *path);
-GtkWidget * gnc_mdi_child_find_toolbar_item(GNCMDIChildInfo *mc, gchar *name);
-void gnc_mdi_set_dispatch_cb (GNCMDIChildInfo * mc, GNCMDIDispatchType type,
-			      GtkCallback cb, gpointer data);
-gboolean gnc_mdi_get_toolbar_visibility (void);
-gboolean gnc_mdi_get_statusbar_visibility (void);
-gboolean gnc_mdi_get_summarybar_visibility (void);
-void gnc_mdi_set_toolbar_visibility (gboolean visible);
-void gnc_mdi_set_statusbar_visibility (gboolean visible);
-void gnc_mdi_set_summarybar_visibility (gboolean visible);
-void gnc_mdi_show_toolbar (GNCMDIChildInfo *mc);
-void gnc_mdi_show_statusbar (GNCMDIChildInfo *mc);
-void gnc_mdi_show_summarybar (GNCMDIChildInfo *mc);
-
-
-#endif
Index: gnc-menu-extensions.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-menu-extensions.scm,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/gnc-menu-extensions.scm -Lsrc/gnome-utils/gnc-menu-extensions.scm -u -r1.4 -r1.5
--- src/gnome-utils/gnc-menu-extensions.scm
+++ src/gnome-utils/gnc-menu-extensions.scm
@@ -49,21 +49,16 @@
   (gnc:make-extension 'menu-item name documentation-string path script))
 
 (define (gnc:make-menu name path)
-  (gnc:make-extension 'menu name #f path #f))
+  (gnc:make-extension 'menu name "" path #f))
 
 (define (gnc:make-separator path)
-  (gnc:make-extension 'separator #f #f path #f))
-
-(define gnc:*add-extension-hook*
-  (gnc:hook-define 
-   'add-extension-hook
-   "Functions to run when the extensions menu is created. Hook args: ()"))
+  (gnc:make-extension 'separator "" "" path #f))
 
 (define (gnc:extensions-menu-setup)
-  (define menu (gnc:make-menu (N_ "Extensions") 
-			      (list gnc:window-name-main "_Tools")))
+  (define menu (gnc:make-menu (N_ "Extensions") (list "_Tools")))
   (gnc:add-extension menu)
-  (gnc:hook-run-danglers gnc:*add-extension-hook*))
+  (gnc:hook-run-danglers gnc:*add-extension-hook*)
+  #f)
 
 (if (gnc:debugging?)
     (gnc:hook-add-dangler gnc:*ui-startup-hook*
Index: gnc-gnome-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/gnc-gnome-utils.h -Lsrc/gnome-utils/gnc-gnome-utils.h -u -r1.1 -r1.2
--- src/gnome-utils/gnc-gnome-utils.h
+++ src/gnome-utils/gnc-gnome-utils.h
@@ -1,6 +1,7 @@
 /********************************************************************\
  * gnc-gnome-utils.h -- utility functions for gnome for GnuCash     *
  * Copyright (C) 2001 Linux Developers Group                        *
+ * Copyright (C) 2003 David Hampton <hampton at employees.org>         *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -21,14 +22,134 @@
  *                                                                  *
 \********************************************************************/
 
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GuiGnome Gnome-specific GUI handling.
+    @{ */
+/** @file gnc-gnome-utils.h
+    @brief Gnome specific utility functions.
+    @author Copyright (C) 2001 Linux Developers Group
+    @author Copyright (C) 2003 David Hampton <hampton at employees.org>    
+*/
+
 #ifndef GNC_GNOME_UTILS_H
 #define GNC_GNOME_UTILS_H
 
+#ifdef LIBGUILEH
+/** Initialize the Gnome libraries.
+ *
+ *  @param arg0 The running application as it appears to a user.
+ *
+ *  @param program The compiled name of the application. "gnucash"
+ *
+ *  @param version The program version. (e.g. 1.8.7)
+ *
+ *  @param command_line A scheme list containing all of the command
+ *  line arguments (or all of the arguments notyet pasrsed in scheme).
+ *
+ *  @return The initial command_line argument minus any arguments
+ *  parsed by this function.
+ */
 SCM gnc_gnome_init (const char * arg0,
                     const char * progname,
                     const char * version,
                     SCM command_line);
+#endif
 
+/** Shutdown/cleanup any gnome related libraries. */
 void gnc_gnome_shutdown (void);
 
+
+/** Given a pixmap/pixbuf file name, find the file in the pixmap
+ *  directory associated with this application.  This routine will
+ *  display an error message if it can't find the file.
+ *
+ *  @param name The name of the file to be found.
+ *
+ *  @return the full path name of the file, or NULL of the file can't
+ *  be found.
+ *
+ *  @note It is the caller's responsibility to free the returned string.
+ */
+char *gnc_gnome_locate_pixmap (const char *name);
+
+
+/** Given a file name, find the file in the directories associated
+ *  with this application.  This routine will display an error message
+ *  if it can't find the file.
+ *
+ *  @param name The name of the file to be found.
+ *
+ *  @return the full path name of the file, or NULL of the file can't
+ *  be found.
+ *
+ *  @note It is the caller's responsibility to free the returned string.
+ */
+char *gnc_gnome_locate_data_file (const char *name);
+
+
+/** Given a file name, find the file in the directories associated
+ *  with this application.  This routine will display an error message
+ *  if it can't find the file.
+ *
+ *  @param name The name of the file to be found.
+ *
+ *  @return the full path name of the file, or NULL of the file can't
+ *  be found.
+ *
+ *  @note It is the caller's responsibility to free the returned string.
+ */
+char *gnc_gnome_locate_ui_file (const char *name);
+
+
+/** Launch the default gnome help browser and open to a given link
+ *  within a given file.  This routine will display an error message
+ *  if it can't find the help file or can't open the help browser.
+ *
+ *  @param file_name The name of the help file.
+ *
+ *  @param anchor The anchor the help browser should scroll to..
+ *
+ *  @return the full path name of the file, or NULL of the file can't
+ *  be found.
+ */
+void gnc_gnome_help (const char *file_name,
+		     const char *anchor);
+
+
+/** Given a file name, find and load the requested pixmap.  This
+ *  routine will display an error message if it can't find the file or
+ *  load the pixmap.
+ *
+ *  @param name The name of the pixmap file to load.
+ *
+ *  @return A pointer to the pixmap, or NULL of the file couldn't
+ *  be found or loaded..
+ */
+GtkWidget * gnc_gnome_get_pixmap (const char *name);
+
+
+/** Given a file name, find and load the requested pixbuf.  This
+ *  routine will display an error message if it can't find the file or
+ *  load the pixbuf.
+ *
+ *  @param name The name of the pixbuf file to load.
+ *
+ *  @return A pointer to the pixbuf, or NULL of the file couldn't
+ *  be found or loaded..
+ */
+GdkPixbuf * gnc_gnome_get_gdkpixbuf (const char *name);
+
+
+/** Shutdown gnucash.  This function will call the Scheme side of
+ *  GnuCash to initiate an orderly shutdown, and when that has
+ *  finished it will exit the program.
+ *
+ *  @param exit_status The exit status for the program.
+ */
+void gnc_shutdown (int exit_status);
+
+
 #endif
+/** @} */
+/** @} */
Index: gnc-account-sel.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-account-sel.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-account-sel.h -Lsrc/gnome-utils/gnc-account-sel.h -u -r1.3 -r1.4
--- src/gnome-utils/gnc-account-sel.h
+++ src/gnome-utils/gnc-account-sel.h
@@ -33,11 +33,10 @@
 #include <gnome.h>
 #include "Account.h"
 
-BEGIN_GNOME_DECLS
-
-#define GNC_ACCOUNT_SEL(obj)          GTK_CHECK_CAST (obj, gnc_account_sel_get_type(), GNCAccountSel)
-#define GNC_ACCOUNT_SEL_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_account_sel_get_type(), GNCAccountSelClass)
-#define GNC_IS_ACCOUNT_SEL(obj)       GTK_CHECK_TYPE (obj, gnc_account_sel_get_type ())
+#define GNC_TYPE_ACCOUNT_SEL          (gnc_account_sel_get_type())	
+#define GNC_ACCOUNT_SEL(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_ACCOUNT_SEL, GNCAccountSel)
+#define GNC_ACCOUNT_SEL_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_ACCOUNT_SEL, GNCAccountSelClass)
+#define GNC_IS_ACCOUNT_SEL(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_ACCOUNT_SEL)
 
 typedef struct
 {
@@ -64,9 +63,9 @@
         void (*account_sel_changed) (GNCAccountSel *gas);
 } GNCAccountSelClass;
 
-guint      gnc_account_sel_get_type(void);
-GtkWidget* gnc_account_sel_new(void);
-GtkWidget* gnc_account_sel_gtk_entry(GNCAccountSel *gas);
+GType      gnc_account_sel_get_type (void);
+GtkWidget* gnc_account_sel_new (void);
+GtkWidget* gnc_account_sel_gtk_entry (GNCAccountSel *gas);
 /**
  * Sets the GAS to the given account.  If the account doesn't exist in the
  * list, then it doesn't change the state of the GAS.  If the account is
@@ -101,8 +100,4 @@
 void gnc_account_sel_set_new_account_modal( GNCAccountSel *gas,
                                               gboolean state );
 
-
-
-END_GNOME_DECLS
-
 #endif /* !ndef GNC_ACCOUNT_SEL_H */
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnome-utils/.cvsignore -Lsrc/gnome-utils/.cvsignore -u -r1.5 -r1.6
--- src/gnome-utils/.cvsignore
+++ src/gnome-utils/.cvsignore
@@ -1,5 +1,6 @@
 Makefile
 Makefile.in
+*.gladep
 *.lo
 *.la
 .deps
@@ -10,4 +11,4 @@
 gw-gnome-utils.h
 gw-gnome-utils.scm
 gw-gnome-utils.c
-gnc-version.h
+*gnc-version.h
Index: gnc-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gnome-utils.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-gnome-utils.c -Lsrc/gnome-utils/gnc-gnome-utils.c -u -r1.3 -r1.4
--- src/gnome-utils/gnc-gnome-utils.c
+++ src/gnome-utils/gnc-gnome-utils.c
@@ -26,21 +26,28 @@
 #include <gnome.h>
 #include <libguile.h>
 
-#ifdef GTKHTML_HAVE_GCONF
 #include <gconf/gconf.h>
-#endif
 
 #ifdef USE_GUPPI
 #include "gnc-html-guppi.h"
 #endif
 
+#include "gnc-html-graph-gog.h"
+
 #include "argv-list-converters.h"
+#include "druid-gconf-setup.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gnome-utils.h"
 #include "gnc-html.h"
+#include "gnc-engine.h"
+#include "gnc-ui.h"
 
 #include <libgnomeui/gnome-window-icon.h>
 #include <gnc-dir.h>
 
+static QofLogModule log_module = GNC_MOD_GUI;
+static GnomeProgram *gnucash_program = NULL;
+
 static char**
 gnc_scm2argv (SCM scm, int prelen, const char **prependargv)
 {
@@ -60,17 +67,86 @@
   { NULL, 0, 0, NULL, 0 }
 };
 
+char *
+gnc_gnome_locate_pixmap (const char *name)
+{
+  char *fullname;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  fullname = gnome_program_locate_file (gnucash_program,
+					GNOME_FILE_DOMAIN_APP_PIXMAP,
+					name, TRUE, NULL);
+  if (fullname == NULL) {
+    PERR ("Could not locate pixmap/pixbuf file %s", name);
+    return NULL;
+  }
+
+  return fullname;
+}
+
+char *
+gnc_gnome_locate_data_file (const char *name)
+{
+  char *fullname;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  fullname = gnome_program_locate_file (gnucash_program,
+					GNOME_FILE_DOMAIN_APP_DATADIR,
+					name, TRUE, NULL);
+
+  if (fullname == NULL) {
+    PERR ("Could not locate file %s", name);
+    return NULL;
+  }
+
+  return fullname;
+}
+
+char *
+gnc_gnome_locate_ui_file (const char *name)
+{
+  char *partial;
+  char *fullname;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  partial = g_strdup_printf("ui/%s", name);
+  fullname = gnc_gnome_locate_data_file(partial);
+  g_free(partial);
+
+  return fullname;
+}
+
+static void
+gnc_gtk_add_rc_file (void)
+{
+  const gchar *var;
+  gchar *str;
+
+  var = g_get_home_dir ();
+  if (var) {
+    str = g_build_filename (var, ".gtkrc-2.0.gnucash", NULL);
+    gtk_rc_add_default_file (str);
+    g_free (str);
+  }
+}
+
 SCM
 gnc_gnome_init (const char * arg0,
                 const char * progname,
                 const char * version,
                 SCM command_line)
 {
-  poptContext returnedPoptContext;
+  poptContext returnedPoptContext; /* owned by the library */
   int restargc;
+  char *fullname;
   char **restargv;
   char **restargv2;
   SCM ret = command_line;
+  GError *error = NULL;
+  GValue value = { 0, };
 
   if (arg0)
     default_argv[0] = arg0;
@@ -85,23 +161,21 @@
 
   restargc = argv_length (restargv);
 
-  gnome_init_with_popt_table (progname, version, restargc, restargv,
-                              nullPoptTable, 0, &returnedPoptContext);
-
+  gnc_gtk_add_rc_file();
+  gnucash_program =
+    gnome_program_init("gnucash", version, LIBGNOMEUI_MODULE,
+		       restargc, restargv,
+		       GNOME_PARAM_POPT_TABLE, nullPoptTable,
+		       GNOME_PROGRAM_STANDARD_PROPERTIES,
+		       GNOME_PARAM_NONE);
+
+  g_value_init(&value, G_TYPE_POINTER);
+  g_object_get_property (G_OBJECT (gnucash_program),
+			 GNOME_PARAM_POPT_CONTEXT, &value);
+  returnedPoptContext = g_value_get_pointer (&value);
   restargv2 = (char**) poptGetArgs (returnedPoptContext);
   ret = gnc_argv2scm (argv_length (restargv2), (const char**)restargv2);
 
-#ifdef GTKHTML_HAVE_GCONF
-  {
-    GError * gerror;
-
-    if (!gconf_init (restargc, restargv, &gerror))
-      g_error_free (gerror);
-  }
-#endif
-
-  /* this must come after using the poptGetArgs return value */
-  poptFreeContext (returnedPoptContext);
   gnc_free_argv (restargv);
 
   /* initialization required for gtkhtml */
@@ -110,13 +184,23 @@
   gtk_widget_set_default_visual (gdk_rgb_get_visual ());
 
   /* use custom icon */
-  gnome_window_icon_set_default_from_file (GNC_PIXMAP_DIR"/gnucash-icon.png");  
-    
+  fullname = gnc_gnome_locate_pixmap ("gnucash-icon.png");
+  if (fullname) {
+    gtk_window_set_default_icon_from_file (fullname, &error);
+    g_free(fullname);
+    if (error) {
+      PERR ("Could not set default icon: %s", error->message);
+      g_error_free (error);
+    }
+  }
+
 #ifdef USE_GUPPI    
   /* initialize guppi handling in gnc-html */
   gnc_html_guppi_init ();
 #endif
 
+  druid_gconf_install_check_schemas();
+
   return ret;
 }
 
@@ -127,3 +211,104 @@
   gnc_html_guppi_shutdown();
 #endif
 }
+
+void
+gnc_gnome_help (const char *file_name, const char *anchor)
+{
+  GError *error = NULL;
+
+  DEBUG ("Attempting to opening help file %s", file_name);
+  if (gnome_help_display (file_name, anchor, &error))
+    return;
+
+  g_assert(error != NULL);
+  PERR ("%s", error->message);
+  g_error_free(error);
+}
+
+/********************************************************************\
+ * gnc_gnome_get_pixmap                                             *
+ *   returns a GtkWidget given a pixmap filename                    *
+ *                                                                  *
+ * Args: none                                                       *
+ * Returns: GtkWidget or NULL if there was a problem                *
+ \*******************************************************************/
+GtkWidget *
+gnc_gnome_get_pixmap (const char *name)
+{
+  GtkWidget *pixmap;
+  char *fullname;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  fullname = gnc_gnome_locate_pixmap (name);
+  if (fullname == NULL)
+    return NULL;
+
+  DEBUG ("Loading pixmap file %s", fullname);
+
+  pixmap = gtk_image_new_from_file (fullname);
+  if (pixmap == NULL) {
+    PERR ("Could not load pixmap");
+  }
+  g_free (fullname);
+
+  return pixmap;
+}
+
+/********************************************************************\
+ * gnc_gnome_get_gdkpixbuf                                          *
+ *   returns a GdkImlibImage object given a pixmap filename         *
+ *                                                                  *
+ * Args: none                                                       *
+ * Returns: GdkPixbuf or NULL if there was a problem                *
+ \*******************************************************************/
+GdkPixbuf *
+gnc_gnome_get_gdkpixbuf (const char *name)
+{
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+  char *fullname;
+
+  g_return_val_if_fail (name != NULL, NULL);
+
+  fullname = gnc_gnome_locate_pixmap (name);
+  if (fullname == NULL)
+    return NULL;
+
+  DEBUG ("Loading pixbuf file %s", fullname);
+  pixbuf = gdk_pixbuf_new_from_file (fullname, &error);
+  if (error != NULL) {
+    g_assert (pixbuf == NULL);
+    PERR ("Could not load pixbuf: %s", error->message);
+    g_error_free (error);
+  }
+  g_free (fullname);
+
+  return pixbuf;
+}
+
+
+/*  shutdown gnucash.  This function will call the Scheme side of
+ *  GnuCash to initiate an orderly shutdown, and when that has
+ *  finished it will exit the program.
+ */
+void
+gnc_shutdown (int exit_status)
+{
+  /*SCM scm_shutdown = gnc_scm_lookup("gnucash bootstrap", "gnc:shutdown");*/
+  SCM scm_shutdown = scm_c_eval_string("gnc:shutdown");
+
+  if(scm_procedure_p(scm_shutdown) != SCM_BOOL_F)
+  {
+    SCM scm_exit_code = scm_long2num(exit_status);    
+    scm_call_1(scm_shutdown, scm_exit_code);
+  }
+  else
+  {
+    /* Either guile is not running, or for some reason we
+       can't find gnc:shutdown. Either way, just exit. */
+    g_warning("couldn't find gnc:shutdown -- exiting anyway.");
+    exit(exit_status);
+  }
+}
Index: gnc-frequency.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-frequency.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-utils/gnc-frequency.h -Lsrc/gnome-utils/gnc-frequency.h -u -r1.7 -r1.8
--- src/gnome-utils/gnc-frequency.h
+++ src/gnome-utils/gnc-frequency.h
@@ -30,11 +30,10 @@
 #include "FreqSpec.h"
 #include "dialog-utils.h"
 
-BEGIN_GNOME_DECLS
-
-#define GNC_FREQUENCY(obj)	  GTK_CHECK_CAST(obj, gnc_frequency_get_type(), GNCFrequency)
-#define GNC_FREQENCY_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gnc_frequency_get_type(), GNCFrequency)
-#define GNC_IS_FREQUENCY(obj)     GTK_CHECK_TYPE(obj, gnc_frequency_get_type())
+#define GNC_TYPE_FREQUENCY	  (gnc_frequency_get_type())
+#define GNC_FREQUENCY(obj)	  G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_FREQUENCY, GNCFrequency)
+#define GNC_FREQENCY_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_FREQUENCY, GNCFrequency)
+#define GNC_IS_FREQUENCY(obj)     G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_FREQUENCY)
 
 /**
  * A GNCFrequency is a VBox containing a scrollable GtkNotebook [and other
@@ -53,10 +52,11 @@
 	GladeXML        *gxml;
 } GNCFrequency;
 
-typedef struct _GNCFrequencyClass 
+typedef struct _GNCFrequencyClass
 {
-  GtkVBoxClass parent_class;
-  void (*changed) (GNCFrequency *gf);
+	GtkVBoxClass parent_class;
+
+	void (*changed) (GNCFrequency *gf);
 } GNCFrequencyClass;
 
 struct pageDataTuple 
@@ -66,11 +66,11 @@
 	char		*name;
 };
 
-guint gnc_frequency_get_type( void );
+GType gnc_frequency_get_type( void );
 
 /**
  * Create a new freq spec widget.
- * The menus and panaels will be initialized to correspond to the
+ * The menus and panels will be initialized to correspond to the
  * settings in the FreqSpec, and the date window will show the 
  * indicated date.  Either or both may be NULL.
  * For the default freq spec widget, use 'NULL'.
@@ -97,12 +97,11 @@
  * implementation, the default label text is "Frequency:"
  */
 void gnc_frequency_set_frequency_label_text (GNCFrequency *gf, const gchar *txt);
+
 /**
  * Set the label text for the date entry widget. In the current
  * impelmentation, the default label text is "Start Date:"
  */
 void gnc_frequency_set_date_label_text (GNCFrequency *gf, const gchar *txt);
 
-END_GNOME_DECLS
-
 #endif /* !defined( GNC_FREQUENCY_H ) */
Index: gnc-gui-query.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gui-query.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/gnome-utils/gnc-gui-query.c -Lsrc/gnome-utils/gnc-gui-query.c -u -r1.9 -r1.10
--- src/gnome-utils/gnc-gui-query.c
+++ src/gnome-utils/gnc-gui-query.c
@@ -24,6 +24,8 @@
 
 #include <gnome.h>
  
+#include "dialog-utils.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-engine-util.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui.h"
@@ -31,11 +33,100 @@
 
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+/* static short module = MOD_GUI; */
+
+void gnc_remember_all_toggled (GtkToggleButton *togglebutton, gpointer user_data);
+
+
+void
+gnc_remember_all_toggled (GtkToggleButton *togglebutton,
+			  gpointer user_data)
+{
+  GtkWidget *other_button;
+  gboolean active;
+
+  active = gtk_toggle_button_get_active(togglebutton);
+  other_button = gnc_glade_lookup_widget(GTK_WIDGET(togglebutton),
+					 "remember_one");
+  gtk_widget_set_sensitive(other_button, !active);
+  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_button), FALSE);
+}
+
+
+static gint
+gnc_remember_common(gncUIWidget parent, const gchar *dialog_name,
+		    const gchar *message, const gchar *gconf_key,
+		    const gchar *first_button_text, ...)
+{
+    GladeXML *xml;
+    GtkWidget *dialog, *label, *box, *checkbox;
+    gint response;
+    const gchar *text;
+    va_list args;
+
+    /* Does the user want to see this question? If not, return the
+     * previous answer. */
+    response = gnc_gconf_get_int(GCONF_WARNINGS_PERM, gconf_key, NULL);
+    if (response != 0)
+      return response;
+    response = gnc_gconf_get_int(GCONF_WARNINGS_TEMP, gconf_key, NULL);
+    if (response != 0)
+      return response;
+
+    /* Find the glade page layout */
+    xml = gnc_glade_xml_new ("gnc-gui-query.glade", dialog_name);
+    dialog = glade_xml_get_widget (xml, dialog_name);
+    glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
+				      dialog);
+
+    /* Insert the message. */
+    label = glade_xml_get_widget (xml, "label");
+    gtk_label_set_markup(GTK_LABEL(label), message);
+
+    /* Hide the checkboxes if there's no key */
+    box = glade_xml_get_widget (xml, "remember_vbox");
+    if (gconf_key == NULL)
+      gtk_widget_hide(box);
+
+    /* Set the buttons */
+    va_start(args, first_button_text);
+    for (text = first_button_text; text != NULL; ) {
+      response = va_arg(args, gint);
+      gtk_dialog_add_button(GTK_DIALOG(dialog), text, response);
+      text = va_arg(args, gchar *);
+    }
+    va_end(args);
+//    gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_YES);
+    
+    /* Tell the window manager if there's a parent window. */
+    if (parent)
+      gtk_window_set_transient_for(GTK_WINDOW(dialog), GTK_WINDOW (parent));
+
+    /* Get a response */
+    response = gtk_dialog_run(GTK_DIALOG(dialog));
+    if ((response == GTK_RESPONSE_NONE) || (response == GTK_RESPONSE_DELETE_EVENT)) {
+      gtk_widget_destroy(GTK_WIDGET(dialog));
+      return GTK_RESPONSE_NO;
+    }
+
+    /* Save the answer? */
+    checkbox = glade_xml_get_widget (xml, "remember_all");
+    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox))) {
+      gnc_gconf_set_int(GCONF_WARNINGS_PERM, gconf_key, response, NULL);
+    } else {
+      checkbox = glade_xml_get_widget (xml, "remember_one");
+      if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox))) {
+	gnc_gconf_set_int(GCONF_WARNINGS_TEMP, gconf_key, response, NULL);
+      }
+    }
+
+    gtk_widget_destroy(GTK_WIDGET(dialog));
+    return response;
+}
 
 
 /********************************************************************\
- * gnc_ok_cancel_dialog_common                                      *
+ * gnc_ok_cancel_dialog                                             *
  *   display a message, and asks the user to press "Ok" or "Cancel" *
  *                                                                  *
  * NOTE: This function does not return until the dialog is closed   *
@@ -49,61 +140,39 @@
  *                string.                                           *
  * Return: the result the user selected                             *
 \********************************************************************/
-GNCVerifyResult
+gint
 gnc_ok_cancel_dialog(gncUIWidget parent,
-		     GNCVerifyResult default_result,
+		     gint default_result,
 		     const gchar *format,...)
 {
   GtkWidget *dialog = NULL;
-  gint default_button;
   gint result;
   gchar *buffer;
   va_list args;
 
+  if (parent == NULL)
+    parent = gnc_ui_get_toplevel();
+
   va_start(args, format);
   buffer = g_strdup_vprintf(format, args);
-  dialog = gnome_message_box_new(buffer,
-                                 GNOME_MESSAGE_BOX_QUESTION,
-                                 GNOME_STOCK_BUTTON_OK,
-                                 GNOME_STOCK_BUTTON_CANCEL,
-                                 NULL);
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_QUESTION,
+				   GTK_BUTTONS_OK_CANCEL,
+				   buffer);
   g_free(buffer);
   va_end(args);
 
-  switch (default_result)
-  {
-    case GTK_RESPONSE_OK:
-      default_button = 0;
-      break;
-    case GTK_RESPONSE_CANCEL:
-      default_button = 1;
-      break;
-    default:
-      PWARN("bad default button\n");
-      default_button = 0;
-      break;
-  }
-
-  gnome_dialog_set_default(GNOME_DIALOG(dialog), default_button);
-  if (parent != NULL)
-    gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(parent));
-
-  result = gnome_dialog_run_and_close(GNOME_DIALOG(dialog));
-
-  switch (result)
-  {
-    case 0:
-      return GTK_RESPONSE_OK;
-    case 1:
-    default:
-      return GTK_RESPONSE_CANCEL;
-  }
+  gtk_dialog_set_default_response (GTK_DIALOG(dialog), default_result);
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
+  return(result);
 }
 
 
 
 /********************************************************************\
- * gnc_verify_cancel_dialog_common                                  *
+ * gnc_verify_cancel_dialog                                         *
  *   display a message, and asks the user to press "Yes", "No", or  *
  *   "Cancel"                                                       *
  *                                                                  *
@@ -118,67 +187,44 @@
  * Return: the result the user selected                             *
 \********************************************************************/
 
-GNCVerifyResult
+gint
 gnc_verify_cancel_dialog(GtkWidget *parent,
-			 GNCVerifyResult default_result,
+			 gint default_result,
 			 const gchar *format, ...)
 {
-  GtkWidget *verify_box = NULL;
-  gint default_button;
+  GtkWidget *dialog;
   gint result;
   gchar *buffer;
   va_list args;
 
+  if (parent == NULL)
+    parent = gnc_ui_get_toplevel();
+
   va_start(args, format);
   buffer = g_strdup_vprintf(format, args);
-  verify_box = gnome_message_box_new(buffer,
-				     GNOME_MESSAGE_BOX_QUESTION,
-				     GNOME_STOCK_BUTTON_YES,
-				     GNOME_STOCK_BUTTON_NO,
-                                     GNOME_STOCK_BUTTON_CANCEL,
-				     NULL);
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_QUESTION,
+				   GTK_BUTTONS_NONE,
+				   buffer);
   g_free(buffer);
   va_end(args);
 
-  switch (default_result)
-  {
-    case GTK_RESPONSE_YES:
-      default_button = 0;
-      break;
-    case GTK_RESPONSE_NO:
-      default_button = 1;
-      break;
-    case GTK_RESPONSE_CANCEL:
-      default_button = 2;
-      break;
-    default:
-      PWARN("bad default button\n");
-      default_button = 0;
-      break;
-  }
-
-  gnome_dialog_set_default(GNOME_DIALOG(verify_box), default_button);
-  if (parent != NULL)
-    gnome_dialog_set_parent(GNOME_DIALOG(verify_box), GTK_WINDOW(parent));
-
-  result = gnome_dialog_run_and_close(GNOME_DIALOG(verify_box));
-
-  switch (result)
-  {
-    case 0:
-      return GTK_RESPONSE_YES;
-    case 1:
-      return GTK_RESPONSE_NO;
-    case 2:
-    default:
-      return GTK_RESPONSE_CANCEL;
-  }
+  gtk_dialog_add_buttons (GTK_DIALOG(dialog),
+			  GTK_STOCK_YES,    GTK_RESPONSE_YES,
+			  GTK_STOCK_NO,     GTK_RESPONSE_NO,
+			  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+			  NULL);
+
+  gtk_dialog_set_default_response(GTK_DIALOG(dialog), default_result);
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
+  return(result);
 }
 
 
-
 /********************************************************************\
- * gnc_verify_dialog_common                                         *
+ * gnc_verify_dialog                                                *
  *   display a message, and asks the user to press "Yes" or "No"    *
  *                                                                  *
  * NOTE: This function does not return until the dialog is closed   *
@@ -195,32 +241,55 @@
 gnc_verify_dialog(gncUIWidget parent, gboolean yes_is_default,
 		  const gchar *format, ...)
 {
-  GtkWidget *verify_box = NULL;
+  GtkWidget *dialog;
   gchar *buffer;
+  gint result;
   va_list args;
 
+  if (parent == NULL)
+    parent = gnc_ui_get_toplevel();
+
   va_start(args, format);
   buffer = g_strdup_vprintf(format, args);
-  verify_box = gnome_message_box_new(buffer,
-				     GNOME_MESSAGE_BOX_QUESTION,
-				     GNOME_STOCK_BUTTON_YES,
-				     GNOME_STOCK_BUTTON_NO,
-				     NULL);
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_QUESTION,
+				   GTK_BUTTONS_YES_NO,
+				   buffer);
   g_free(buffer);
   va_end(args);
 
-  if (parent != NULL)
-    gnome_dialog_set_parent(GNOME_DIALOG(verify_box), GTK_WINDOW(parent));
-  
-  gnome_dialog_set_default(GNOME_DIALOG(verify_box), (yes_is_default ? 0 : 1));
-
-  return (gnome_dialog_run_and_close(GNOME_DIALOG(verify_box)) == 0);
+  gtk_dialog_set_default_response(GTK_DIALOG(dialog),
+				  (yes_is_default ? GTK_RESPONSE_YES : GTK_RESPONSE_NO));
+  result = gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
+  return (result == GTK_RESPONSE_YES);
 }
 
 
+gint
+gnc_verify_remember_dialog(gncUIWidget parent, const gchar *gconf_key,
+			   const gchar *yes_label, const gchar *no_label,
+			   const gchar *format, ...)
+{
+    gchar *buffer;
+    gint response;
+    va_list args;
+
+    va_start(args, format);
+    buffer = g_strdup_vprintf(format, args);
+    response = gnc_remember_common(parent, "Question Dialog", buffer, gconf_key,
+				   yes_label, GTK_RESPONSE_YES,
+				   no_label, GTK_RESPONSE_NO,
+				   NULL);
+    g_free(buffer);
+    va_end(args);
+    return response;
+}
+
 
 /********************************************************************\
- * gnc_info_dialog_common                                           * 
+ * gnc_info_dialog                                                  * 
  *   displays an information dialog box                             * 
  *                                                                  * 
  * Args:   parent  - the parent window                              *  
@@ -233,7 +302,7 @@
 void 
 gnc_info_dialog(GtkWidget *parent, const gchar *format, ...)
 {
-  GtkWidget *info_box = NULL;
+  GtkWidget *dialog;
   gchar *buffer;
   va_list args;
 
@@ -242,20 +311,19 @@
 
   va_start(args, format);
   buffer = g_strdup_vprintf(format, args);
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_INFO,
+				   GTK_BUTTONS_CLOSE,
+				   buffer);
   va_end(args);
 
-  if (parent)
-    info_box = gnome_ok_dialog_parented(buffer, GTK_WINDOW(parent));
-  else
-    info_box = gnome_ok_dialog(buffer);
-  g_free(buffer);
-
-  gnome_dialog_run_and_close(GNOME_DIALOG(info_box));
+  gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
 }
 
 
 
-
 /********************************************************************\
  * gnc_warning_dialog_common                                        * 
  *   displays a warning dialog box                                  * 
@@ -270,17 +338,22 @@
 static void 
 gnc_warning_dialog_common(GtkWidget *parent, const gchar *format, va_list args)
 {
-  GtkWidget *warning_box = NULL;
+  GtkWidget *dialog = NULL;
   gchar *buffer;
 
   if (parent == NULL)
     parent = GTK_WIDGET(gnc_ui_get_toplevel());
 
   buffer = g_strdup_vprintf(format, args);
-  warning_box = gnome_warning_dialog_parented(buffer, GTK_WINDOW(parent));
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_WARNING,
+				   GTK_BUTTONS_CLOSE,
+				   buffer);
   g_free(buffer);
 
-  gnome_dialog_run_and_close(GNOME_DIALOG(warning_box));
+  gtk_dialog_run (GTK_DIALOG (dialog));
+  gtk_widget_destroy (dialog);
 }
 
 void 
@@ -300,6 +373,27 @@
 }
 
 
+gint
+gnc_warning_remember_dialog(gncUIWidget parent, const gchar *gconf_key,
+			   const gchar *yes_label, const gchar *no_label,
+			   const gchar *format, ...)
+{
+    gchar *buffer;
+    gint response;
+    va_list args;
+
+    va_start(args, format);
+    buffer = g_strdup_vprintf(format, args);
+    response = gnc_remember_common(parent, "Warning Dialog", buffer, gconf_key,
+				   yes_label, GTK_RESPONSE_YES,
+				   no_label, GTK_RESPONSE_NO,
+				   NULL);
+    g_free(buffer);
+    va_end(args);
+    return response;
+}
+
+
 
 /********************************************************************\
  * gnc_error_dialog_common                                          * 
@@ -315,19 +409,22 @@
 static void 
 gnc_error_dialog_common(GtkWidget *parent, const gchar *format, va_list args)
 {
-  GtkWidget *top_window, *error_box = NULL;
+  GtkWidget *dialog;
   gchar *buffer;
 
-  if (parent == NULL) {
-    top_window = gnc_ui_get_toplevel();
-    parent = top_window ? top_window : NULL;
-  }
+  if (parent == NULL)
+    parent = GTK_WIDGET(gnc_ui_get_toplevel());
 
   buffer = g_strdup_vprintf(format, args);
-  error_box = gnome_error_dialog_parented(buffer, GTK_WINDOW(parent));
+  dialog = gtk_message_dialog_new (GTK_WINDOW(parent),
+				   GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+				   GTK_MESSAGE_ERROR,
+				   GTK_BUTTONS_CLOSE,
+				   buffer);
   g_free(buffer);
 
-  gnome_dialog_run_and_close(GNOME_DIALOG(error_box));
+  gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy (dialog);
 }
 
 void 
@@ -495,26 +592,23 @@
 		       &radio_result);
   }
 
-  dialog = gnome_dialog_new (title,
-                             GNOME_STOCK_BUTTON_OK,
-                             GNOME_STOCK_BUTTON_CANCEL,
-                             NULL);
-
-  if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+  dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW(parent),
+					GTK_DIALOG_DESTROY_WITH_PARENT,
+					GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					GTK_STOCK_OK, GTK_RESPONSE_OK,
+					NULL);
 
   /* default to ok */
-  gnome_dialog_set_default(GNOME_DIALOG(dialog), 0);
+  gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK);
 
-  /* destroy, don't hide */
-  gnome_dialog_close_hides(GNOME_DIALOG(dialog), FALSE);
-
-  dvbox = GNOME_DIALOG(dialog)->vbox;
+  dvbox = GTK_DIALOG(dialog)->vbox;
 
   gtk_box_pack_start(GTK_BOX(dvbox), main_vbox, TRUE, TRUE, 0);
 
-  if (gnome_dialog_run_and_close(GNOME_DIALOG(dialog)) != 0)
+  if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_OK)
     radio_result = -1;
 
+  gtk_widget_destroy (dialog);
+
   return radio_result;
 }
Index: print-session.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/print-session.h -Lsrc/gnome-utils/print-session.h -u -r1.4 -r1.5
--- src/gnome-utils/print-session.h
+++ src/gnome-utils/print-session.h
@@ -24,77 +24,83 @@
 #ifndef PRINT_SESSION_H
 #define PRINT_SESSION_H
 
+/** @addtogroup Printing
+    @{ */
+/** @file print-session.h
+    @brief Functions for printing
+    @author Copyright (C) 2000 Bill Gribble <grib at billgribble.com>
+*/
+
 #include "config.h"
 
 #include <gnome.h>
-#include <libgnomeprint/gnome-printer.h>
 #include <libgnomeprint/gnome-print.h>
-#include <libgnomeprint/gnome-print-meta.h>
-#include <libgnomeprint/gnome-print-preview.h>
-#include <libgnomeprint/gnome-printer-dialog.h>
-#include <libgnomeprint/gnome-print-dialog.h>
-#include <libgnomeprint/gnome-print-master.h>
-#include <libgnomeprint/gnome-print-master-preview.h>
-/* #include <libgnomeprint/gnome-printer-profile.h> */
-#include <libgnomeprint/gnome-font.h>
+
+#include <libgnomeprint/gnome-print-job.h>
+
+#include <libgnomeprintui/gnome-print-dialog.h>
+#include <libgnomeprintui/gnome-print-preview.h>
 
 typedef struct {
-  GnomePrintMaster   * master;
-  GnomePrintMeta     * meta;
+  gboolean             hand_built_pages;
+  gint                 print_type;
+
+  GnomePrintJob      * job;
+  GnomePrintContext  * context;		/* Convenience only. Owned by the job */
   GnomeFont          * default_font;
-  char               * paper;
+  GnomePrintPaper    * paper;
 } PrintSession;
 
-typedef struct {
-  GtkWidget         * toplevel;
-  GtkWidget         * canvas;
-  GnomePrintContext * pc;
-  PrintSession      * session;
-} PrintPreviewDialog;
-
-typedef struct {
-  GtkWidget         * toplevel;
-  GtkWidget         * printer_entry;
-  GtkWidget         * paper_entry;
-  PrintSession      * session;
-} PrintDialog;
 
-typedef struct {
-  GtkWidget         * toplevel;
-  GtkWidget         * papersel;
-  GtkWidget         * entry;
-  PrintSession      * session;
-} PaperDialog;
-
-
-/* paper selector dialog */
-PaperDialog * gnc_ui_paper_dialog_create(PrintSession * ps, GtkWidget * entry);
-void gnc_ui_paper_dialog_destroy(PaperDialog * psd);
-
-/* print preview dialog stuff */
-PrintPreviewDialog * gnc_ui_print_preview_create(PrintSession * ps);
-void gnc_ui_print_preview_destroy(PrintPreviewDialog * ppd);
-
-/* print check dialog stuff */
-PrintDialog * gnc_ui_print_dialog_create(PrintSession * ps);
-void gnc_ui_print_dialog_destroy(PrintDialog * pcd);
+/** @addtogroup Basic Session Functions
+    @{ */
 
-/* printsession stuff */
-PrintSession * gnc_print_session_create(gboolean);
+/** Create a new print 'session'.  Once created, a series of commands
+ *  can be issued on the session to create the output page.  The
+ *  output will be printed when the session is done.  This function
+ *  will present the standard print/preview selection box to the user
+ *  and wait for the result.
+ *
+ *  If the hand_built_pages argument is set to TRUE, this function
+ *  will perform a couple of extra setup steps.  Specifically it will
+ *  call the gnome begin page, set color and set font functions.  The
+ *  code will also call close page when the #gnc_print_session_done
+ *  function is called.
+ *
+ *  @param hand_built_pages If TRUE, this funciton will perform extra setup.
+ *
+ *  @return A pointer to the data structure describing this print session.
+ */
+PrintSession * gnc_print_session_create(gboolean hand_built_pages);
+
+
+/** Destroy a print 'session' without producing any output.
+ *
+ *  @param ps A pointer to the session to be destroyed.
+ */
 void gnc_print_session_destroy(PrintSession * ps);
 
+
+/** Finish a print 'session'.  The output from this session will be
+ *  printed to the device selected when the session was created.
+ *
+ *  @param ps A pointer to the session to be closed.
+ */
+void gnc_print_session_done(PrintSession * ps);
+
+/** @} */
+
+/** @addtogroup Adding Output to a Page
+    @{ */
 void gnc_print_session_moveto(PrintSession * ps, double x, double y);
 void gnc_print_session_text(PrintSession * ps, const char * text);
-void gnc_print_session_done(PrintSession * ps, gboolean);
 
 void gnc_print_session_rotate(PrintSession *ps, double theta_in_degrees);
 void gnc_print_session_translate(PrintSession *ps, double x, double y);
 
 void gnc_print_session_gsave(PrintSession *ps);
 void gnc_print_session_grestore(PrintSession *ps);
-
-void gnc_print_session_preview(PrintSession * ps);
-void gnc_print_session_print(PrintSession * ps);
-void gnc_print_session_render(PrintSession * ps);
+/** @} */
+/** @} */
 
 #endif
Index: print-session.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/print-session.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/print-session.c -Lsrc/gnome-utils/print-session.c -u -r1.3 -r1.4
--- src/gnome-utils/print-session.c
+++ src/gnome-utils/print-session.c
@@ -25,143 +25,122 @@
 #include "config.h"
 
 #include <gnome.h>
+#include <libgnomeprint/gnome-font.h>
+#include <libgnomeprintui/gnome-print-job-preview.h>
 #include <stdio.h>
 
 #include "gnc-ui.h"
 #include "messages.h"
 #include "print-session.h"
-#include "window-help.h"
 
 
 PrintSession * 
-gnc_print_session_create(gboolean hand_built_pages) {
+gnc_print_session_create(gboolean hand_built_pages)
+{
   PrintSession * ps = g_new0(PrintSession, 1);
+  GnomePrintConfig *config;
+  GtkWidget *dialog;
+  gint response;
+
+  /* Ask the user what to do with the output */
+  dialog = gnome_print_dialog_new(ps->job, (guchar *) _("Print GnuCash Document"), 0);
+  response = gtk_dialog_run(GTK_DIALOG(dialog));
+  switch (response) {
+    case GNOME_PRINT_DIALOG_RESPONSE_PRINT: 
+    case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
+      config = gnome_print_dialog_get_config (GNOME_PRINT_DIALOG (dialog));
+      gtk_widget_destroy(dialog);
+      ps->job = gnome_print_job_new(config);
+      ps->context = gnome_print_job_get_context(ps->job);
+      break;
+    
+    default:
+      gtk_widget_destroy(dialog);
+      g_free(ps);
+      return NULL;
+  }
 
-  /* this is about the most basic we can get */
-  ps->master       = gnome_print_master_new();
-  ps->meta         = gnome_print_meta_new();
-  ps->default_font = gnome_font_new("Courier", 12);
+  ps->hand_built_pages = hand_built_pages;
+  ps->print_type = response;
+
+  ps->default_font = gnome_font_find_closest((guchar *)"Sans Regular", 12);
 
   if (hand_built_pages) {
-    gnome_print_beginpage(GNOME_PRINT_CONTEXT(ps->meta), "");
-    gnome_print_setrgbcolor(GNOME_PRINT_CONTEXT(ps->meta),
-			    0.0, 0.0, 0.0);
-    gnome_print_setfont(GNOME_PRINT_CONTEXT(ps->meta), 
-			GNOME_FONT(ps->default_font));
+    gnome_print_beginpage(ps->context, (guchar *)"");
+    gnome_print_setrgbcolor(ps->context, 0.0, 0.0, 0.0);
+    gnome_print_setfont(ps->context, ps->default_font);
   }
   return ps;
 }
 
 void 
-gnc_print_session_destroy(PrintSession * ps) {
-  gtk_object_unref(GTK_OBJECT(ps->meta));
-  gtk_object_unref(GTK_OBJECT(ps->master));
-  gtk_object_unref(GTK_OBJECT(ps->default_font));
+gnc_print_session_destroy(PrintSession * ps)
+{
+  g_object_unref(ps->job);
+  g_object_unref(ps->default_font);
 
   g_free(ps);
 }
 
 void 
-gnc_print_session_moveto(PrintSession * ps, double x, double y) {
-  gnome_print_moveto(GNOME_PRINT_CONTEXT(ps->meta), x, y);
+gnc_print_session_moveto(PrintSession * ps, double x, double y)
+{
+  gnome_print_moveto(ps->context, x, y);
 }
 
 
 void 
-gnc_print_session_text(PrintSession * ps, const char * text) {
-  gnome_print_show(GNOME_PRINT_CONTEXT(ps->meta), text);  
+gnc_print_session_text(PrintSession * ps, const char * text)
+{
+  gnome_print_show(ps->context, (guchar*)text);  
 }
 
 
 void
-gnc_print_session_done(PrintSession * ps, gboolean hand_built_pages) {
-  if (hand_built_pages) {
-    gnome_print_showpage(GNOME_PRINT_CONTEXT(ps->meta));
+gnc_print_session_done(PrintSession * ps)
+{
+  GtkWidget *widget;
+
+  if (ps->hand_built_pages) {
+    gnome_print_showpage(ps->context);
   }
-  gnome_print_context_close(GNOME_PRINT_CONTEXT(ps->meta));
+  gnome_print_job_close (ps->job);
 
+  switch (ps->print_type) {
+    case GNOME_PRINT_DIALOG_RESPONSE_PRINT: 
+      gnome_print_job_print(ps->job);
+      break;
+
+    case GNOME_PRINT_DIALOG_RESPONSE_PREVIEW:
+      widget = gnome_print_job_preview_new(ps->job, (guchar*)"Print Preview");
+      gtk_widget_show(widget);
+      break;
+    
+    default:
+      break;
+  }
 }
 
 void
 gnc_print_session_rotate(PrintSession *ps, double theta_in_degrees)
 {
-  gnome_print_rotate(GNOME_PRINT_CONTEXT(ps->meta), theta_in_degrees);
+  gnome_print_rotate(ps->context, theta_in_degrees);
 }
 
 void
 gnc_print_session_translate(PrintSession *ps, double x, double y)
 {
-  gnome_print_translate(GNOME_PRINT_CONTEXT(ps->meta), x, y);
+  gnome_print_translate(ps->context, x, y);
 }
 
 void
 gnc_print_session_gsave(PrintSession *ps)
 {
-  gnome_print_gsave(GNOME_PRINT_CONTEXT(ps->meta));
+  gnome_print_gsave(ps->context);
 }
 
 void
 gnc_print_session_grestore(PrintSession *ps)
 {
-  gnome_print_grestore(GNOME_PRINT_CONTEXT(ps->meta));
-}
-
-void
-gnc_print_session_print(PrintSession * ps) {
-  GtkWidget * dialog    =
-    gnome_print_dialog_new(_("Print GnuCash Document"), 0);
-  int button            = gnome_dialog_run(GNOME_DIALOG(dialog));
-
-  switch(button) {
-  case 0: 
-    /* print button */
-    if(ps->master) {
-      gtk_object_unref(GTK_OBJECT(ps->master));
-      ps->master = NULL;
-    }
-    ps->master = 
-      gnome_print_master_new_from_dialog(GNOME_PRINT_DIALOG(dialog));
-    gnome_dialog_close(GNOME_DIALOG(dialog));
-    gnc_print_session_render(ps);
-    break;
-    
-  case 1:
-    if(ps->master) {
-      gtk_object_unref(GTK_OBJECT(ps->master));
-      ps->master = NULL;
-    }
-    ps->master = 
-      gnome_print_master_new_from_dialog(GNOME_PRINT_DIALOG(dialog));
-    gnome_dialog_close(GNOME_DIALOG(dialog));
-    gnc_print_session_preview(ps);    
-    break;
-
-  case 2:
-    gnome_dialog_close(GNOME_DIALOG(dialog));
-    break;
-  }
-}
-
-
-void 
-gnc_print_session_render(PrintSession * ps) {
-  GnomePrintContext * pc = gnome_print_master_get_context(ps->master);
-  
-  gnome_print_meta_render_from_object(GNOME_PRINT_CONTEXT(pc),
-                                      GNOME_PRINT_META(ps->meta)); 
-  gnome_print_context_close(pc);
-  gnome_print_master_print(ps->master);
-}
-
-void 
-gnc_print_session_preview(PrintSession * ps) {
-  GnomePrintContext * pc = gnome_print_master_get_context(ps->master);
-  GnomePrintMasterPreview * preview;
-
-  gnome_print_meta_render_from_object(GNOME_PRINT_CONTEXT(pc),
-                                      GNOME_PRINT_META(ps->meta)); 
-  gnome_print_context_close(pc);
-  
-  preview = gnome_print_master_preview_new(ps->master, _("Print Preview"));
-  gtk_widget_show_all(GTK_WIDGET(preview));
+  gnome_print_grestore(ps->context);
 }
Index: gnc-date-edit.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-edit.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/gnc-date-edit.h -Lsrc/gnome-utils/gnc-date-edit.h -u -r1.4 -r1.5
--- src/gnome-utils/gnc-date-edit.h
+++ src/gnome-utils/gnc-date-edit.h
@@ -32,32 +32,27 @@
 #ifndef GNC_DATE_EDIT_H
 #define GNC_DATE_EDIT_H 
 
-#include <gnome.h>
-
-BEGIN_GNOME_DECLS
-
+#include <glib.h>
 
 typedef enum {
 	GNC_DATE_EDIT_SHOW_TIME             = 1 << 0,
 	GNC_DATE_EDIT_24_HR                 = 1 << 1,
 	GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY = 1 << 2,
-#if 0
-        GNC_DATE_EDIT_SHOW_DATE             = 1 << 3,
-        GNC_DATE_EDIT_SHOW_DELTA            = 1 << 4
-#endif
 } GNCDateEditFlags;
 
-
-#define GNC_DATE_EDIT(obj)          GTK_CHECK_CAST (obj, gnc_date_edit_get_type(), GNCDateEdit)
-#define GNC_DATE_EDIT_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_date_edit_get_type(), GNCDateEditClass)
-#define GNC_IS_DATE_EDIT(obj)       GTK_CHECK_TYPE (obj, gnc_date_edit_get_type ())
+#define GNC_TYPE_DATE_EDIT          (gnc_date_edit_get_type ())
+#define GNC_DATE_EDIT(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, gnc_date_edit_get_type(), GNCDateEdit)
+#define GNC_DATE_EDIT_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, gnc_date_edit_get_type(), GNCDateEditClass)
+#define GNC_IS_DATE_EDIT(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, gnc_date_edit_get_type ())
 
 /**
+ *  \verbatim
  *  * 2001.05.13T1647 [PDT], #gnucash:
  * <jsled> dave_p: So the header for gnc-dateedit.h is a bit light
  *         on _why_ such a thing was done... any help?
  * <dave_p> jsled: gnome date edit isn't i18n'd properly. also, we
  *          added the register date hotkeys.
+ *  \endverbatim
  **/
 typedef struct {
 	GtkHBox hbox;
@@ -78,6 +73,8 @@
 	int       upper_hour;
 	
 	int       flags;
+
+	int       disposed;
 } GNCDateEdit;
 
 typedef struct {
@@ -86,12 +83,33 @@
 	void (*time_changed) (GNCDateEdit *gde);
 } GNCDateEditClass;
 
-guint     gnc_date_edit_get_type        (void);
+GType     gnc_date_edit_get_type        (void);
 
 GtkWidget *gnc_date_edit_new            (time_t the_time,
                                          int show_time, int use_24_format);
 GtkWidget *gnc_date_edit_new_ts         (Timespec the_time,
                                          int show_time, int use_24_format);
+
+/**
+ * Create a new GncDateEdit widget from a glade file.  The widget
+ * generated is set to today's date, and will not show a time as part
+ * of the date.  This function does not use any of the arguments
+ * passed by glade.
+ *
+ * @param widget_name This parameter is unused.  The actual widget
+ * name will be set by glade so it does not need to be done here.
+ *
+ * @param string1 Unused.
+ * @param string2 Unused.
+ * @param int1 Unused.
+ * @param int2 Unused.
+ *
+ * @return A pointer to the newly created GncDateEdit widget.
+ */
+GtkWidget *gnc_date_edit_new_glade (gchar *widget_name,
+				    gchar *string1, gchar *string2,
+				    gint int1, gint int2);
+
 GtkWidget *gnc_date_edit_new_flags      (time_t the_time,
                                          GNCDateEditFlags flags);
 
@@ -110,10 +128,5 @@
                                          GNCDateEditFlags flags);
 int       gnc_date_edit_get_flags       (GNCDateEdit *gde);
 
-void      gnc_date_editable_enters      (GnomeDialog *dialog,
-					 GNCDateEdit *gde);
-
-
-END_GNOME_DECLS
-
+void      gnc_date_editable_enters (GNCDateEdit *gde, gboolean state);
 #endif
Index: transfer.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/transfer.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/transfer.glade -Lsrc/gnome-utils/transfer.glade -u -r1.3 -r1.4
--- src/gnome-utils/transfer.glade
+++ src/gnome-utils/transfer.glade
@@ -1,701 +1,973 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Transfer Dialog</name>
-  <title>Transfer Funds</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox13</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area13</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button66</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button68</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Transfer Dialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Transfer Funds</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">False</property>
+  <signal name="response" handler="gnc_xfer_dialog_response_cb" last_modification_time="Sun, 27 Jul 2003 17:44:58 GMT"/>
+  <signal name="close" handler="gnc_xfer_dialog_close_cb" last_modification_time="Sun, 27 Jul 2003 17:45:10 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">2</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbbox">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>transfermain-vbox</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>transferinfo-frame</name>
-	<border_width>3</border_width>
-	<label>Transfer Information</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox70</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox80</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label814</name>
-	      <label>Amount:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+      <child>
+	<widget class="GtkVBox" id="transfermain-vbox">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">18</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table">
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">6</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="transferinfo-label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Basic Information&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label816</name>
-	      <label>Num:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label817</name>
-	      <label>Description:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkTable" id="table">
+		  <property name="visible">True</property>
+		  <property name="n_rows">5</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">12</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Amount:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="amount_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Date:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="date_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">3</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Num:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="num_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Description:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="description_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Memo:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="memo_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options">fill</property>
+		</packing>
 	      </child>
 	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label818</name>
-	      <label>Memo:</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>1</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	  <child>
+	    <widget class="GtkTable" id="table">
+	      <property name="visible">True</property>
+	      <property name="n_rows">4</property>
+	      <property name="n_columns">5</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">6</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox81</name>
-	    <border_width>3</border_width>
-	    <homogeneous>True</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>amount_big_hbox</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>5</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>amount_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>0</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-
-		<widget>
-		  <class>Placeholder</class>
-		</widget>
-	      </widget>
-
-	      <widget>
-		<class>GtkHBox</class>
-		<name>date_hbox</name>
-		<homogeneous>False</homogeneous>
-		<spacing>3</spacing>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <name>label815</name>
-		  <label>Date:</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>1</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		  <child>
-		    <padding>0</padding>
-		    <expand>False</expand>
-		    <fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="left_trans_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Transfer From&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">12</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Currency:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="left_currency_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
 		  </child>
 		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
 
-		<widget>
-		  <class>Placeholder</class>
+	      <child>
+		<widget class="GtkCheckButton" id="left_show_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Show Income/Expense</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
 		</widget>
-	      </widget>
-	    </widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>num_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label2">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>description_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="right_trans_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Transfer To&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">5</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
-	    </widget>
 
-	    <widget>
-	      <class>GtkEntry</class>
-	      <name>memo_entry</name>
-	      <can_focus>True</can_focus>
-	      <editable>True</editable>
-	      <text_visible>True</text_visible>
-	      <text_max_length>0</text_max_length>
-	      <text></text>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
-	</widget>
-      </widget>
 
-      <widget>
-	<class>GtkHBox</class>
-	<name>transfertrees-hbox</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>left_trans_frame</name>
-	  <border_width>3</border_width>
-	  <label>Transfer From</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+	      <child>
+		<widget class="GtkHBox" id="hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">12</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox82</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>left_trans_window</name>
-	      <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+		  <child>
+		    <widget class="GtkLabel" id="label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Currency:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox77</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label820</name>
-		<label>Currency:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>left_currency_label</name>
-		<label> </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-	    </widget>
+		  <child>
+		    <widget class="GtkLabel" id="right_currency_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">4</property>
+		  <property name="right_attach">5</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkCheckButton</class>
-	      <name>left_show_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Show Income/Expense</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+	      <child>
+		<widget class="GtkCheckButton" id="right_show_button">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Show Income/Expense</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">4</property>
+		  <property name="right_attach">5</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
 	      </child>
-	    </widget>
-	  </widget>
-	</widget>
 
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>right_trans_frame</name>
-	  <border_width>3</border_width>
-	  <label>Transfer To</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
+	      <child>
+		<widget class="GtkScrolledWindow" id="swindow">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox83</name>
-	    <border_width>3</border_width>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>right_trans_window</name>
-	      <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
+		  <child>
+		    <widget class="GtkViewport" id="viewport">
+		      <property name="visible">True</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		      <child>
+			<widget class="GtkHBox" id="right_tree_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">4</property>
+		  <property name="right_attach">5</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox78</name>
-	      <border_width>3</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>label822</name>
-		<label>Currency:</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<name>right_currency_label</name>
-		<label> </label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>1</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-		<child>
-		  <padding>0</padding>
-		  <expand>True</expand>
-		  <fill>True</fill>
-		</child>
-	      </widget>
-	    </widget>
+	      <child>
+		<widget class="GtkScrolledWindow" id="swindow">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-	    <widget>
-	      <class>GtkCheckButton</class>
-	      <name>right_show_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Show Income/Expense</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
+		  <child>
+		    <widget class="GtkViewport" id="viewport">
+		      <property name="visible">True</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+		      <child>
+			<widget class="GtkHBox" id="left_tree_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		</packing>
 	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-      </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>curr_transfer_frame</name>
-	<border_width>3</border_width>
-	<label>Currency Transfer</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkTable</class>
-	  <name>table1</name>
-	  <rows>4</rows>
-	  <columns>2</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>0</row_spacing>
-	  <column_spacing>0</column_spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>price_radio</name>
-	    <can_focus>True</can_focus>
-	    <label>Exchange Rate:</label>
-	    <active>True</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>price_amount_group</group>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>amount_radio</name>
-	    <can_focus>True</can_focus>
-	    <label>To Amount:</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>price_amount_group</group>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>price_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
+	  <child>
+	    <widget class="GtkTable" id="curr_transfer_table">
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">6</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">&lt;b&gt;Currency Transfer&lt;/b&gt;</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">True</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+	      <child>
+		<widget class="GtkLabel" id="label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">    </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
 
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>to_amount_hbox</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>True</yfill>
-	    </child>
+	      <child>
+		<widget class="GtkTable" id="table">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">6</property>
+		  <property name="column_spacing">12</property>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+		  <child>
+		    <widget class="GtkRadioButton" id="price_radio">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Exchange Rate:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
 
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>conv_forward</name>
-	    <label></label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>conv_reverse</name>
-	    <label></label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>3</top_attach>
-	      <bottom_attach>4</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
+		  <child>
+		    <widget class="GtkHBox" id="price_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="conv_forward">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="amount_radio">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">To Amount:</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">price_radio</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="right_amount_hbox">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="conv_reverse">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options">fill</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gnc-currency-edit.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-currency-edit.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/gnc-currency-edit.h -Lsrc/gnome-utils/gnc-currency-edit.h -u -r1.2 -r1.3
--- src/gnome-utils/gnc-currency-edit.h
+++ src/gnome-utils/gnc-currency-edit.h
@@ -24,8 +24,32 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org
  *
  */
-/*
-  @NOTATION@
+
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GncCurrencyEdit
+ * @{ */
+/** @file gnc-currency-edit.h
+ *  @brief Currency selection widget.
+ *  @author Dave Peticolas <dave at krondo.com>
+ *  @author David Hampton <hampton at employees.org>
+ *
+ *  This widget is a GtkComboBox that is wrapped with support
+ *  functions for building/selecting from a list of ISO4217 currency
+ *  names.  All data is maintained within the widget itself, which
+ *  makes the name/item lookup functions somewhat complicated.  The
+ *  alternative coding would be to keep an auxiliary list of strings
+ *  attacked to the widget for lookup purposes, but that would be 100%
+ *  redundant information.
+ *
+ *  When the GtkComboCellEntry widget supports completion, this Gnucash
+ *  widget should be modified so that it is based upon that widget.
+ *  That would give users the capability to select a currency by typing
+ *  its ISO 4217 code (e.g. USD, GBP, etc).  Moving to that widget
+ *  today, however, would cause more problems that its worth.  There is
+ *  currently no way to get access to the embedded GtkEntry widget, and
+ *  therefore no way to implement completion in gnucash or prevent the
+ *  user from typing in random data.
  */
 
 #ifndef GNC_CURRENCY_EDIT_H
@@ -35,34 +59,64 @@
 
 #include "gnc-commodity.h"
 
-BEGIN_GNOME_DECLS
-
+/** @name Basic Object Implementation */
+/** @{ */
 
-#define GNC_CURRENCY_EDIT(obj)          GTK_CHECK_CAST (obj, gnc_currency_edit_get_type(), GNCCurrencyEdit)
-#define GNC_CURRENCY_EDIT_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_currency_edit_get_type(), GNCCurrencyEditClass)
-#define GNC_IS_CURRENCY_EDIT(obj)       GTK_CHECK_TYPE (obj, gnc_currency_edit_get_type ())
+#define GNC_TYPE_CURRENCY_EDIT	    (gnc_currency_edit_get_type())
+#define GNC_CURRENCY_EDIT(o)	    (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_CURRENCY_EDIT, GNCCurrencyEdit))
+#define GNC_CURRENCY_EDIT_CLASS(k)  (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_CURRENCY_EDIT, GNCCurrencyEditClass))
+#define GNC_IS_CURRENCY_EDIT(o)	    (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_CURRENCY_EDIT))
 
 typedef struct {
-        GtkCombo combo;
+        GtkComboBox combobox;
 } GNCCurrencyEdit;
 
 typedef struct {
-        GtkComboClass parent_class;
+        GtkComboBoxClass combobox;
 } GNCCurrencyEditClass;
 
-guint      gnc_currency_edit_get_type       (void);
+/** Return the GType for the GNCCurrencyEdit currency selection widget.
+ *
+ *  @return A GType value.
+ */
+GType gnc_currency_edit_get_type (void);
+
+
+/** Create a new GNCCurrencyEdit widget which can be used to provide
+ *  an easy way to enter ISO currency codes.
+ * 
+ *  @return A GNCCurrencyEdit widget.
+ */
+GtkWidget *gnc_currency_edit_new (void);
+/** @} */
+
+
+/** @name Get/Set Functions */
 
-GtkWidget *gnc_currency_edit_new            (void);
 
-void       gnc_currency_edit_set_currency   (GNCCurrencyEdit *gce,
-                                             const gnc_commodity *currency);
+/** Set the widget to display a certain currency name.
+ *
+ *  @param gce The currency editor widget to set.
+ *
+ *  @param currency The currency to set as the displayed/selected
+ *  value of the widget.
+ */
+void gnc_currency_edit_set_currency (GNCCurrencyEdit *gce, const gnc_commodity *currency);
 
-gnc_commodity * gnc_currency_edit_get_currency (GNCCurrencyEdit *gce);
 
-END_GNOME_DECLS
+/** Retrieve the displayed currency of the widget.
+ *
+ *  @param gce The currency editor widget whose values should be retrieved.
+ *
+ *  @return A pointer to the selected currency (a gnc_commodity
+ *  structure).
+ */
+gnc_commodity *gnc_currency_edit_get_currency (GNCCurrencyEdit *gce);
 
 #endif
 
+/** @} */
+
 /*
   Local Variables:
   c-basic-offset: 8
Index: gnc-html.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-html.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/gnome-utils/gnc-html.h -Lsrc/gnome-utils/gnc-html.h -u -r1.7 -r1.8
--- src/gnome-utils/gnc-html.h
+++ src/gnome-utils/gnc-html.h
@@ -42,9 +42,9 @@
 #define URL_TYPE_SCHEME	"scheme"     /* for scheme code evaluation */
 #define URL_TYPE_HELP	"help"       /* for a gnucash help window */
 #define URL_TYPE_XMLDATA	"xmldata"    /* links to gnucash XML data files */ 
-#define URL_TYPE_ACTION	"action"     /* for special SUBMIT actions */ 
 #define URL_TYPE_PRICE	"price"      /* for price editor popups */
 #define URL_TYPE_OTHER	"other"
+#define URL_TYPE_BUDGET "budget"
 
 #include "gnc-html-history.h"
 
@@ -81,15 +81,17 @@
                                gpointer data);
 typedef int  (* GncHTMLButtonCB)(gnc_html * html, GdkEventButton * event,
                                  gpointer data);
+//#if 0
 typedef int  (* GncHTMLObjectCB)(gnc_html * html, GtkHTMLEmbedded * eb,
                                  gpointer data); 
+//#endif
 typedef int  (* GncHTMLActionCB)(gnc_html * html, const char * method,
                                  const char * action, GHashTable * form_data);
 typedef gboolean (* GncHTMLStreamCB)(const char *location, char **data, int *datalen);
 typedef gboolean (* GncHTMLUrlCB)(const char *location, const char *label,
                                   gboolean new_window, GNCURLResult * result);
 
-gnc_html    * gnc_html_new(void);
+gnc_html    * gnc_html_new(GtkWindow *parent);
 void          gnc_html_destroy(gnc_html * html);
 void          gnc_html_show_url(gnc_html * html, 
                                 URLType type,
@@ -116,8 +118,10 @@
 
 /* object handlers deal with <object classid="foo"> objects in HTML.
  * the handlers are looked up at object load time. */
+//#if 0
 void          gnc_html_register_object_handler(const char * classid, 
                                                GncHTMLObjectCB hand);
+//#endif
 void          gnc_html_unregister_object_handler(const char * classid);
 
 /* action handlers deal with submitting forms of the type 
Index: dialog-query-list.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-query-list.glade,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/dialog-query-list.glade -Lsrc/gnome-utils/dialog-query-list.glade -u -r1.1 -r1.2
--- src/gnome-utils/dialog-query-list.glade
+++ src/gnome-utils/dialog-query-list.glade
@@ -1,145 +1,141 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Dialog Query List</name>
-  <program_name>dialog-query-list</program_name>
-  <directory></directory>
-  <source_directory>src</source_directory>
-  <pixmaps_directory>pixmaps</pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Query List Dialog</name>
-  <visible>False</visible>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Query List Dialog">
+  <property name="title" translatable="yes"></property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">500</property>
+  <property name="default_height">300</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox1</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>dialog_label</name>
-	<label></label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>True</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>5</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox1</name>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>3</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>result_scroller</name>
-	  <width>250</width>
-	  <height>150</height>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkVBox" id="vbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
 
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>button_vbox</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkLabel" id="dialog_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"></property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">True</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">5</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
 	  </child>
 
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
+	  <child>
+	    <widget class="GtkHBox" id="hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="result_scroller">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_NONE</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVBox" id="button_vbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">3</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gnc-amount-edit.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-amount-edit.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-amount-edit.h -Lsrc/gnome-utils/gnc-amount-edit.h -u -r1.3 -r1.4
--- src/gnome-utils/gnc-amount-edit.h
+++ src/gnome-utils/gnc-amount-edit.h
@@ -4,10 +4,10 @@
  * Copyright (C) 2000 Dave Peticolas <dave at krondo.com>
  * All rights reserved.
  *
- * GnuCash is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Library General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
+ * GnuCash is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
  *
  * Gnucash is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -34,12 +34,10 @@
 #include "gnc-numeric.h"
 #include "gnc-ui-util.h"
 
-BEGIN_GNOME_DECLS
-
-
-#define GNC_AMOUNT_EDIT(obj)          GTK_CHECK_CAST (obj, gnc_amount_edit_get_type(), GNCAmountEdit)
-#define GNC_AMOUNT_EDIT_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_amount_edit_get_type(), GNCAmountEditClass)
-#define GNC_IS_AMOUNT_EDIT(obj)       GTK_CHECK_TYPE (obj, gnc_amount_edit_get_type ())
+#define GNC_TYPE_AMOUNT_EDIT          (gnc_amount_edit_get_type())
+#define GNC_AMOUNT_EDIT(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_AMOUNT_EDIT, GNCAmountEdit)
+#define GNC_AMOUNT_EDIT_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_AMOUNT_EDIT, GNCAmountEditClass)
+#define GNC_IS_AMOUNT_EDIT(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_AMOUNT_EDIT)
 
 typedef struct
 {
@@ -65,7 +63,7 @@
   void (*amount_changed) (GNCAmountEdit *gae);
 } GNCAmountEditClass;
 
-guint     gnc_amount_edit_get_type        (void);
+GType     gnc_amount_edit_get_type        (void);
 
 GtkWidget *gnc_amount_edit_new            (void);
 
@@ -88,7 +86,4 @@
 
 void      gnc_amount_edit_set_evaluate_on_enter (GNCAmountEdit *gae,
                                                  gboolean evaluate_on_enter);
-
-END_GNOME_DECLS
-
 #endif
Index: gw-gnome-utils-spec.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gw-gnome-utils-spec.scm,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/gnome-utils/gw-gnome-utils-spec.scm -Lsrc/gnome-utils/gw-gnome-utils-spec.scm -u -r1.22 -r1.23
--- src/gnome-utils/gw-gnome-utils-spec.scm
+++ src/gnome-utils/gw-gnome-utils-spec.scm
@@ -23,10 +23,7 @@
 
   (gw:wrapset-set-guile-module! ws '(g-wrapped gw-gnome-utils))
 
-  (gw:wrap-value ws 'gnc:window-name-main '(<gw:mchars> callee-owned const) "WINDOW_NAME_MAIN")
-  (gw:wrap-value ws 'gnc:window-name-register '(<gw:mchars> callee-owned const) "WINDOW_NAME_REGISTER")
-  (gw:wrap-value ws 'gnc:window-name-invoice '(<gw:mchars> callee-owned const) "WINDOW_NAME_INVOICE")
-  (gw:wrap-value ws 'gnc:window-name-all '(<gw:mchars> callee-owned const) "WINDOW_NAME_ALL")
+  (gw:wrap-value ws 'gnc:additional-menus-placeholder '(<gw:mchars> callee-owned const) "ADDITIONAL_MENUS_PLACEHOLDER")
 
   (gw:wrapset-add-cs-declarations!
    ws
@@ -38,11 +35,15 @@
       "#include <gtk/gtk.h>\n"
       "#include <gnc-amount-edit.h>\n"
       "#include <gnc-date-edit.h>\n"
+      "#include <gnc-file.h>\n"
+      "#include <gnc-gconf-utils.h>\n"
       "#include <gnc-gnome-utils.h>\n"
       "#include <gnc-gui-query.h>\n"
       "#include <gnc-html.h>\n"
-      "#include <gnc-mdi-utils.h>\n"
+      "#include <gnc-main-window.h>\n"
+      "#include <gnc-window.h>\n"
       "#include <gnc-menu-extensions.h>\n"
+      "#include <gnc-plugin-file-history.h>\n"
       "#include <gnc-ui.h>\n"
       "#include <print-session.h>\n"
       )))
@@ -68,10 +69,12 @@
    "Shutdown the GnuCash gnome system.")
 
   (gw:wrap-as-wct ws '<gtk:Widget*> "GtkWidget*" "const GtkWidget*")
+  (gw:wrap-as-wct ws '<gtk:Window*> "GtkWindow*" "const GtkWindow*")
   (gw:wrap-as-wct ws '<gnc:UIWidget> "gncUIWidget" "const gncUIWidget")
-  (gw:wrap-as-wct ws '<gnc:mdi-info*> "GNCMDIInfo*" "const GNCMDIInfo*")
   (gw:wrap-as-wct ws '<gnc:OptionWin*> "GNCOptionWin*" "const GNCOptionWin*")
   (gw:wrap-as-wct ws '<gnc:url-type> "URLType" "const URLType")
+  (gw:wrap-as-wct ws '<gnc:Window*> "GncWindow *" "const GncWindow *")
+  (gw:wrap-as-wct ws '<gnc:MainWindow*> "GncMainWindow *" "const GncMainWindow *")
 
   ;;
   ;; URLTypes
@@ -88,7 +91,6 @@
   (gw:wrap-value ws 'gnc:url-type-scheme '<gnc:url-type> "URL_TYPE_SCHEME")
   (gw:wrap-value ws 'gnc:url-type-help '<gnc:url-type> "URL_TYPE_HELP")
   (gw:wrap-value ws 'gnc:url-type-xmldata '<gnc:url-type> "URL_TYPE_XMLDATA")
-  (gw:wrap-value ws 'gnc:url-type-action '<gnc:url-type> "URL_TYPE_ACTION")
   (gw:wrap-value ws 'gnc:url-type-price '<gnc:url-type> "URL_TYPE_PRICE")
   (gw:wrap-value ws 'gnc:url-type-other '<gnc:url-type> "URL_TYPE_OTHER")
 
@@ -98,7 +100,7 @@
    'gnc:option-dialog-new
    '<gnc:OptionWin*>
    "gnc_options_dialog_new"
-   '((<gw:bool> make-toplevel) ((<gw:mchars> caller-owned) title))
+   '(((<gw:mchars> caller-owned) title))
    "Create a new option dialog")
 
   (gw:wrap-function
@@ -125,42 +127,8 @@
    '((<gnc:OptionWin*> option-window) (<gw:scm> apply-cb) (<gw:scm> close-cb))
    "Setup callbacks for the option window.")
 
-  (gw:wrap-function
-   ws
-   'gnc:mdi-has-apps?
-   '<gw:bool>
-   "gnc_mdi_has_apps"
-   '()
-   "Return true if there are gnc mdi app windows open.")
-
-  (gw:wrap-function
-   ws
-   'gnc:mdi-get-current
-   '<gnc:mdi-info*>
-   "gnc_mdi_get_current"
-   '()
-   "Return the main window data structure for the application.")
-
-  (gw:wrap-function
-   ws
-   'gnc:mdi-save 
-   '<gw:void>
-   "gnc_mdi_save" '((<gnc:mdi-info*> mi) 
-                    ((<gw:mchars> caller-owned) bookname))
-   "Save the MDI window configuration for the specified book")
-
-  (gw:wrap-function
-   ws
-   'gnc:mdi-restore
-   '<gw:void>
-   "gnc_mdi_restore" '((<gnc:mdi-info*> mi) 
-                       ((<gw:mchars> caller-owned const) bookname))
-   "Restore MDI window configuration for the specified book")
-
 
   (gw:wrap-as-wct ws '<gnc:PrintSession*> "PrintSession*" "const PrintSession*")
-  (gw:wrap-as-wct ws '<gnc:PrintDialog*> "PrintDialog*" "const PrintDialog*")
-  (gw:wrap-as-wct ws '<gnc:PaperDialog*> "PaperDialog*" "const PaperDialog*")
 
   (gw:wrap-function
    ws
@@ -168,7 +136,8 @@
    '<gnc:PrintSession*>
    "gnc_print_session_create"
    '((<gw:bool> yes_is_default))
-   "Start a new print session.")
+   "Start a new print session.  This will display a dialog asking for "
+   "number of copies, print vs. preview, etc.")
 
   (gw:wrap-function
    ws
@@ -231,17 +200,8 @@
    'gnc:print-session-done
    '<gw:void>
    "gnc_print_session_done"
-   '((<gnc:PrintSession*> p)
-     (<gw:bool> yes_is_default))
-   "Let the print context know you're finished with it.")
-
-  (gw:wrap-function
-   ws
-   'gnc:print-session-print
-   '<gw:void>
-   "gnc_print_session_print"
    '((<gnc:PrintSession*> p))
-   "Show the GNOME print dialog to start printing.")
+   "Let the print context know you're finished with it.")
 
   (gw:wrap-function
    ws
@@ -438,34 +398,7 @@
   ;; druid-utils.h
   (gw:wrap-as-wct ws '<gnc:GnomeDruid> "GnomeDruid*" "const GnomeDruid*")
 
-  (gw:wrap-function
-   ws
-   'gnc:druid-set-title-image
-   '<gw:void>
-   "gnc_druid_set_title_image"
-   '((<gnc:GnomeDruid> druid)
-     ((<gw:mchars> caller-owned) image-path))
-   "Set the title image of a druid.")
-
-  (gw:wrap-function
-   ws
-   'gnc:druid-set-logo-image
-   '<gw:void>
-   "gnc_druid_set_logo_image"
-   '((<gnc:GnomeDruid> druid)
-     ((<gw:mchars> caller-owned) logo-path))
-   "Set the logo image of a druid.")
-
-  (gw:wrap-function
-   ws
-   'gnc:druid-set-watermark-image
-   '<gw:void>
-   "gnc_druid_set_watermark_image"
-   '((<gnc:GnomeDruid> druid)
-     ((<gw:mchars> caller-owned) watermark-path))
-   "Set the watermark image of a druid.")
-
-  (gw:wrap-function
+ (gw:wrap-function
    ws
    'gnc:druid-set-colors
    '<gw:void>
@@ -498,15 +431,6 @@
 
   (gw:wrap-function
    ws
-   'gnc:mdi-show-progress
-   '<gw:void>
-   "gnc_mdi_show_progress"
-   '(((<gw:mchars> caller-owned const) message)
-     (<gw:double> percentage))
-   "Show progress bar with the associated percentage (from 0 to 100).")
-
-  (gw:wrap-function
-   ws
    'gnc:set-busy-cursor
    '<gw:void>
    "gnc_set_busy_cursor"
@@ -521,6 +445,71 @@
    "gnc_unset_busy_cursor"
    '((<gtk:Widget*> window))
    "Remove a busy cursor for a specific window. If null, the busy cursor will be removed on all windows.")
-)
 
+  (gw:wrap-function
+   ws
+   'gnc:gconf-get-bool
+   '<gw:bool>
+   "gnc_gconf_get_bool_no_error"
+   '(((<gw:mchars> caller-owned) section)
+     ((<gw:mchars> caller-owned) name))
+   "Get a boolean value from gconf.")
+
+  (gw:wrap-function
+   ws
+   'gnc:file-query-save
+   '<gw:bool>
+   "gnc_file_query_save"
+   '()
+   "Query the user whether to save the current file, and save
+if they say 'Yes'. The return is false if the user says 'Cancel'.")
+
+  (gw:wrap-function
+   ws
+   'gnc:file-quit
+   '<gw:void>
+   "gnc_file_quit"
+   '()
+   "Stop working with the current file.")
 
+  (gw:wrap-function
+   ws
+   'gnc:file-open-file
+   '<gw:bool>
+   "gnc_file_open_file"
+   '(((<gw:mchars> caller-owned const) filename))
+   "Open filename.")
+
+  (gw:wrap-function
+   ws
+   'gnc:history-get-last
+   '(<gw:mchars> caller-owned)
+   "gnc_history_get_last"
+   '()
+   "Get the last file opened by the user.")
+
+  (gw:wrap-function
+   ws
+   'gnc:main-window-set-progressbar-window
+   '<gw:void>
+   "gnc_main_window_set_progressbar_window"
+   '((<gnc:MainWindow*> window))
+   "Set the progressbar window from the given GncMainWindow; does the cast. :p")
+
+  (gw:wrap-function
+   ws
+   'gnc:window-set-progressbar-window
+   '<gw:void>
+   "gnc_window_set_progressbar_window"
+   '((<gnc:Window*> window))
+   "Set the progressbar window from the given GncWindow.")
+
+  (gw:wrap-function
+   ws
+   'gnc:window-show-progress
+   '<gw:void>
+   "gnc_window_show_progress"
+   '(((<gw:mchars> caller-owned const) message)
+     (<gw:double> percentage))
+   "Set the progressbar window from the given GncWindow.")
+)
Index: dialog-options.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-options.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -Lsrc/gnome-utils/dialog-options.c -Lsrc/gnome-utils/dialog-options.c -u -r1.32 -r1.33
--- src/gnome-utils/dialog-options.c
+++ src/gnome-utils/dialog-options.c
@@ -25,30 +25,38 @@
 #include <gnome.h>
 #include <g-wrap-wct.h>
 
+#include "gnc-tree-model-budget.h" //FIXME?
+#include "gnc-budget.h"
+
 #include "dialog-options.h"
 #include "dialog-utils.h"
 #include "engine-helpers.h"
 #include "glib-helpers.h"
-#include "global-options.h"
 #include "gnc-account-sel.h"
-#include "gnc-account-tree.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-general-select.h"
 #include "gnc-currency-edit.h"
 #include "gnc-date-edit.h"
 #include "gnc-engine-util.h"
 #include "gnc-engine.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui.h"
 #include "guile-util.h"
 #include "messages.h"
 #include "option-util.h"
+#include "gdk/gdkfont.h"
 #include "guile-mappings.h"
 #include "gnc-date-format.h"
+#include "misc-gnome-utils.h"
+
+/* TODO: clean up "register-stocks" junk
+ */
 
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 /*
  * Point where preferences switch control method from a set of
@@ -56,11 +64,12 @@
  */
 #define MAX_TAB_COUNT 4
 
+/* A Hash-table of GNCOptionDef_t keyed with option names. */
 static GHashTable *optionTable = NULL;
 
 struct gnc_option_win
 {
-  GtkWidget  * container;
+  GtkWidget  * dialog;
   GtkWidget  * notebook;
   GtkWidget  * page_list;
 
@@ -90,45 +99,27 @@
 
 static GNCOptionWinCallback global_help_cb = NULL;
 gpointer global_help_cb_data = NULL;
-static void gnc_options_dialog_reset_cb(GtkWidget * w, gpointer data);
-
 
-static GtkWidget *
-gnc_options_dialog_get_apply_button (GtkWidget *widget)
-{
-  while (widget)
-  {
-    GtkWidget *button;
-
-    button = gtk_object_get_data (GTK_OBJECT (widget),
-                                  "gnc_option_apply_button");
-    if (button)
-      return button;
-
-    widget = widget->parent;
-  }
-
-  return NULL;
-}
-
-void
-gnc_options_dialog_changed_internal (GtkWidget *widget)
-{
-  GtkWidget *button;
+void gnc_options_dialog_response_cb(GtkDialog *dialog, gint response,
+				    GNCOptionWin *window);
+static void gnc_options_dialog_reset_cb(GtkWidget * w, gpointer data);
+void gnc_options_dialog_list_select_cb(GtkWidget * list, GtkWidget * item,
+				       gpointer data);
 
-  button = gnc_options_dialog_get_apply_button (widget);
-  if (button)
-    gtk_widget_set_sensitive (button, TRUE);
-}
 
 static void
-gnc_options_dialog_clear_changed (GtkWidget *widget)
+gnc_options_dialog_changed_internal (GtkWidget *widget, gboolean sensitive)
 {
-  GtkWidget *button;
+  GtkDialog *dialog;
+
+  while (widget && !GTK_IS_DIALOG(widget))
+    widget = gtk_widget_get_parent(widget);
+  if (widget == NULL)
+    return;
 
-  button = gnc_options_dialog_get_apply_button (widget);
-  if (button)
-    gtk_widget_set_sensitive (button, FALSE);
+  dialog = GTK_DIALOG(widget);
+  gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_OK, sensitive);
+  gtk_dialog_set_response_sensitive (dialog, GTK_RESPONSE_APPLY, sensitive);
 }
 
 void
@@ -136,33 +127,24 @@
 {
   if (!win) return;
 
-  gnc_options_dialog_changed_internal (win->container);
+  gnc_options_dialog_changed_internal (win->dialog, TRUE);
 }
 
-static void
-gnc_option_changed_cb(GtkEditable *editable, gpointer data)
+void 
+gnc_option_changed_widget_cb(GtkWidget *widget, GNCOption *option)
 {
-  GtkWidget *raw;
-  GNCOption *option = data;
-
-  raw = GTK_WIDGET(editable);
   gnc_option_set_changed (option, TRUE);
-
   gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (raw);
+  gnc_options_dialog_changed_internal (widget, TRUE);
 }
 
-static void 
-gnc_date_option_changed_cb(GtkWidget *dummy, gpointer data)
+void 
+gnc_option_changed_option_cb(GtkWidget *dummy, GNCOption *option)
 {
-  GNCOption *option = data;
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
+  GtkWidget *widget;
 
-  gnc_options_dialog_changed_internal (gnc_option_get_widget (option));
+  widget = gnc_option_get_widget (option);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static void
@@ -206,7 +188,7 @@
 {
   GNCOption *option = (GNCOption *) raw_option;
   gnc_date_option_set_select_method(option, TRUE, FALSE);
-  gnc_date_option_changed_cb(widget, option);
+  gnc_option_changed_option_cb(widget, option);
 }
 
 static void
@@ -214,7 +196,7 @@
 {
   GNCOption *option = (GNCOption *) raw_option;
   gnc_date_option_set_select_method(option, FALSE, FALSE);
-  gnc_date_option_changed_cb(widget, option);
+  gnc_option_changed_option_cb(widget, option);
   return;
 }
 
@@ -256,17 +238,16 @@
   if (option_def && option_def->set_value)
   {
     bad_value = option_def->set_value (option, use_default, widget, value);
+    if (bad_value)
+    {
+      PERR("bad value\n");
+    }
   }
   else
   {
     PERR("Unknown type. Ignoring.\n");
   }
 
-  if (bad_value)
-  {
-    PERR("bad value\n");
-  }
-
   free(type);
 }
 
@@ -331,58 +312,19 @@
   gtk_widget_set_sensitive (widget, selectable);
 }
 
-static void
-default_button_cb(GtkButton *button, gpointer data)
+static void 
+gnc_option_default_cb(GtkWidget *widget, GNCOption *option)
 {
-  GNCOption *option = data;
-
   gnc_option_set_ui_value (option, TRUE);
-
   gnc_option_set_changed (option, TRUE);
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(button));
+  gnc_options_dialog_changed_internal (widget, TRUE);
 }
 
 static void
-gnc_option_toggled_cb(GtkToggleButton *button, gpointer data)
+gnc_option_multichoice_cb(GtkWidget *widget, gpointer data)
 {
   GNCOption *option = data;
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc (option);
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(button));
-}
-
-
-static void
-gnc_option_multichoice_cb(GtkWidget *w, gint index, gpointer data)
-{
-  GNCOption *option = data;
-  GtkWidget *widget;
-  GtkWidget *omenu;
-  gpointer _current;
-  gint current;
-
-  widget = gnc_option_get_widget (option);
-
-  _current = gtk_object_get_data(GTK_OBJECT(widget), "gnc_multichoice_index");
-  current = GPOINTER_TO_INT(_current);
-
-  if (current == index)
-    return;
-
-  gtk_option_menu_set_history(GTK_OPTION_MENU(widget), index);
-  gtk_object_set_data(GTK_OBJECT(widget), "gnc_multichoice_index",
-                      GINT_TO_POINTER(index));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  omenu = gtk_object_get_data(GTK_OBJECT(w), "gnc_option_menu");
-  gnc_options_dialog_changed_internal (omenu);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static void
@@ -406,43 +348,7 @@
 
   gtk_object_set_data (GTK_OBJECT(widget), "gnc_radiobutton_index",
 		       GINT_TO_POINTER(new_value));
-
-  gnc_option_set_changed (option, TRUE);
-  gnc_option_call_option_widget_changed_proc(option);
-  gnc_options_dialog_changed_internal (widget);
-}
-
-static void
-gnc_option_rd_combo_cb(GtkWidget *w, gint index, gpointer data)
-{
-  GtkWidget *widget, *omenu;
-  GList *children;
-  GNCOption *option = data;
-  gpointer _current;
-  gint current;
-
-  children =
-    gtk_container_children(GTK_CONTAINER(gnc_option_get_widget (option)));
-
-  widget = g_list_nth_data(children, GNC_RD_WID_REL_WIDGET_POS);
-				     
-  _current = gtk_object_get_data(GTK_OBJECT(widget),
-                                 "gnc_multichoice_index");
-  current = GPOINTER_TO_INT(_current);
-
-  if (current == index)
-    return;
-
-  gtk_option_menu_set_history(GTK_OPTION_MENU(widget), index);
-  gtk_object_set_data(GTK_OBJECT(widget), "gnc_multichoice_index",
-                      GINT_TO_POINTER(index));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  omenu = gtk_object_get_data(GTK_OBJECT(w), "gnc_option_menu");
-  gnc_options_dialog_changed_internal (omenu);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static GtkWidget *
@@ -453,28 +359,25 @@
   GtkWidget *rel_widget=NULL, *ab_widget=NULL;
   GtkWidget *entry;
   gboolean show_time, use24;
-  GNCOptionInfo *info;
   char *type;
-  char **raw_strings;
-  char **raw;
+  char *string;
   int num_values;
 
   type = gnc_option_date_option_get_subtype(option);
   show_time = gnc_option_show_time(option);
-  use24 = gnc_lookup_boolean_option("International", 
-				    "Use 24-hour time format", FALSE);
+  use24 = gnc_gconf_get_bool(GCONF_GENERAL, "24hour_time", FALSE);
 
   if (safe_strcmp(type, "relative") != 0)
   {
     ab_widget = gnc_date_edit_new(time(NULL), show_time, use24);
     entry = GNC_DATE_EDIT(ab_widget)->date_entry;
-    gtk_signal_connect(GTK_OBJECT(entry), "changed",
-		       GTK_SIGNAL_FUNC(gnc_date_option_changed_cb), option);
+    g_signal_connect(G_OBJECT(entry), "changed",
+		     G_CALLBACK(gnc_option_changed_option_cb), option);
     if (show_time)
     {
       entry = GNC_DATE_EDIT(ab_widget)->time_entry;
-      gtk_signal_connect(GTK_OBJECT(entry), "changed",
-		       GTK_SIGNAL_FUNC(gnc_date_option_changed_cb), option);
+      g_signal_connect(G_OBJECT(entry), "changed",
+		       G_CALLBACK(gnc_option_changed_option_cb), option);
     }
   }
     
@@ -485,46 +388,16 @@
     
     g_return_val_if_fail(num_values >= 0, NULL);
     
-    info = g_new0(GNCOptionInfo, num_values);
-    raw_strings = g_new0(char *, num_values * 2);
-    raw = raw_strings;
-    
+    rel_widget = gtk_combo_box_new_text();
     for (i = 0; i < num_values; i++)
     {
-      *raw = gnc_option_permissible_value_name(option, i);
-      if (*raw != NULL)
-	info[i].name = _(*raw);
-      else
-	info[i].name = "";
-      
-      raw++;
-      
-      *raw = gnc_option_permissible_value_description(option, i);
-      if (*raw != NULL)
-        info[i].tip = _(*raw);
-      else
-        info[i].tip = "";
-      if(safe_strcmp(type, "both") == 0)
-      {
-        info[i].callback = gnc_option_rd_combo_cb;
-      }
-      else 
-      {
-        info[i].callback = gnc_option_multichoice_cb;
-      }
-      info[i].user_data = option;
-
-      raw++;
+      string = gnc_option_permissible_value_name(option, i);
+      gtk_combo_box_append_text(GTK_COMBO_BOX(rel_widget), string);
+      g_free(string);
     }
 
-    rel_widget = gnc_build_option_menu(info, num_values);
-  
-    for (i = 0; i < num_values * 2; i++)
-      if (raw_strings[i] != NULL)
-        free(raw_strings[i]);
-
-    g_free(raw_strings);
-    g_free(info);
+    g_signal_connect(G_OBJECT(rel_widget), "changed",
+		     G_CALLBACK(gnc_option_multichoice_cb), option);
   }
 
   if(safe_strcmp(type, "absolute") == 0)
@@ -545,12 +418,12 @@
     box = gtk_hbox_new(FALSE, 5);
 
     ab_button = gtk_radio_button_new(NULL);
-    gtk_signal_connect(GTK_OBJECT(ab_button), "toggled",
-		       GTK_SIGNAL_FUNC(gnc_rd_option_ab_set_cb), option);
+    g_signal_connect(G_OBJECT(ab_button), "toggled",
+		     G_CALLBACK(gnc_rd_option_ab_set_cb), option);
 
     rel_button = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(ab_button));
-    gtk_signal_connect(GTK_OBJECT(rel_button), "toggled",
-		       GTK_SIGNAL_FUNC(gnc_rd_option_rel_set_cb), option);
+    g_signal_connect(G_OBJECT(rel_button), "toggled",
+		     G_CALLBACK(gnc_rd_option_rel_set_cb), option);
 
     gtk_box_pack_start(GTK_BOX(box), ab_button, FALSE, FALSE, 0);
     gtk_box_pack_start(GTK_BOX(box), ab_widget, FALSE, FALSE, 0);
@@ -569,54 +442,44 @@
   }
 }
 
+static GtkWidget *
+gnc_option_create_budget_widget(GNCOption *option)
+{
+    GtkTreeModel *tm;
+    GtkComboBox *cb;
+    GtkCellRenderer *cr;
+
+    tm = gnc_tree_model_budget_new(gnc_get_current_book());
+    cb = GTK_COMBO_BOX(gtk_combo_box_new_with_model(tm));
+    g_object_unref(tm);
+    cr = gtk_cell_renderer_text_new();
+    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(cb), cr, TRUE);
+
+    gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(cb), cr, "text",
+                                   BUDGET_NAME_COLUMN, NULL);
+    return GTK_WIDGET(cb);
+}
 
 static GtkWidget *
 gnc_option_create_multichoice_widget(GNCOption *option)
 {
   GtkWidget *widget;
-  GNCOptionInfo *info;
   int num_values;
-  char **raw_strings;
-  char **raw;
+  char *string;
   int i;
 
   num_values = gnc_option_num_permissible_values(option);
 
   g_return_val_if_fail(num_values >= 0, NULL);
 
-  info = g_new0(GNCOptionInfo, num_values);
-  raw_strings = g_new0(char *, num_values * 2);
-  raw = raw_strings;
-
-  for (i = 0; i < num_values; i++)
-  {
-    *raw = gnc_option_permissible_value_name(option, i);
-    if (*raw != NULL)
-      info[i].name = _(*raw);
-    else
-      info[i].name = "";
-
-    raw++;
-
-    *raw = gnc_option_permissible_value_description(option, i);
-    if (*raw != NULL)
-      info[i].tip = _(*raw);
-    else
-      info[i].tip = "";
-
-    info[i].callback = gnc_option_multichoice_cb;
-    info[i].user_data = option;
-    raw++;
+  widget = gtk_combo_box_new_text();
+  for (i = 0; i < num_values; i++) {
+    string = gnc_option_permissible_value_name(option, i);
+    gtk_combo_box_append_text(GTK_COMBO_BOX(widget), string);
+    g_free(string);
   }
-
-  widget = gnc_build_option_menu(info, num_values);
-
-  for (i = 0; i < num_values * 2; i++)
-    if (raw_strings[i] != NULL)
-      free(raw_strings[i]);
-  
-  g_free(raw_strings);
-  g_free(info);
+  g_signal_connect(G_OBJECT(widget), "changed",
+        	   G_CALLBACK(gnc_option_multichoice_cb), option);
 
   return widget;
 }
@@ -626,7 +489,7 @@
 {
   GtkTooltips *tips = data;
 
-  gtk_object_unref (GTK_OBJECT (tips));
+  g_object_unref (tips);
 }
 
 static GtkWidget *
@@ -653,7 +516,7 @@
 
   /* Create the tooltips */
   tooltips = gtk_tooltips_new ();
-  gtk_object_ref (GTK_OBJECT (tooltips));
+  g_object_ref (tooltips);
   gtk_object_sink (GTK_OBJECT (tooltips));
 
   /* Iterate over the options and create a radio button for each one */
@@ -670,8 +533,8 @@
     gtk_object_set_data (GTK_OBJECT (widget), "gnc_radiobutton_index",
 			 GINT_TO_POINTER (i));
     gtk_tooltips_set_tip(tooltips, widget, tip ? _(tip) : "", NULL);
-    gtk_signal_connect(GTK_OBJECT(widget), "toggled",
-		       GTK_SIGNAL_FUNC(gnc_option_radiobutton_cb), option);
+    g_signal_connect(G_OBJECT(widget), "toggled",
+		     G_CALLBACK(gnc_option_radiobutton_cb), option);
     gtk_box_pack_start (GTK_BOX (box), widget, FALSE, FALSE, 0);
 
     if (label)
@@ -680,50 +543,48 @@
       free (tip);
   }
 
-  gtk_signal_connect (GTK_OBJECT (frame), "destroy",
-                      GTK_SIGNAL_FUNC (radiobutton_destroy_cb), tooltips);
+  g_signal_connect (G_OBJECT (frame), "destroy",
+		    G_CALLBACK (radiobutton_destroy_cb), tooltips);
 
   return frame;
 }
 
+
 static void
-gnc_option_account_cb(GNCAccountTree *tree, Account * account, gpointer data)
+gnc_option_account_cb(GtkTreeSelection *selection, gpointer data)
 {
   GNCOption *option = data;
+  GtkTreeView *tree_view;
 
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc (option);
+  tree_view = gtk_tree_selection_get_tree_view(selection);
 
-  gnc_options_dialog_changed_internal (GTK_WIDGET(tree));
+  gnc_option_changed_widget_cb(GTK_WIDGET(tree_view), option);
 }
 
 static void
 gnc_option_account_select_all_cb(GtkWidget *widget, gpointer data)
 {
   GNCOption *option = data;
+  GncTreeViewAccount *tree_view;
+  GtkTreeSelection *selection;
 
-  gtk_clist_select_all(GTK_CLIST(gnc_option_get_widget (option)));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (widget);
+  tree_view = GNC_TREE_VIEW_ACCOUNT(gnc_option_get_widget (option));
+  selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
+  gtk_tree_selection_select_all(selection);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static void
 gnc_option_account_clear_all_cb(GtkWidget *widget, gpointer data)
 {
   GNCOption *option = data;
+  GncTreeViewAccount *tree_view;
+  GtkTreeSelection *selection;
 
-  gtk_clist_unselect_all(GTK_CLIST(gnc_option_get_widget (option)));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (widget);
+  tree_view = GNC_TREE_VIEW_ACCOUNT(gnc_option_get_widget (option));
+  selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
+  gtk_tree_selection_unselect_all(selection);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 
@@ -738,6 +599,7 @@
   GtkWidget *vbox;
   GtkWidget *bbox;
   GList *acct_type_list;
+  GtkTreeSelection *selection;
 
   multiple_selection = gnc_option_multiple_selection(option);
   acct_type_list = gnc_option_get_account_type_list(option);
@@ -747,21 +609,20 @@
   vbox = gtk_vbox_new(FALSE, 0);
   gtk_container_add(GTK_CONTAINER(frame), vbox);
 
-  tree = gnc_account_tree_new();
-  gtk_clist_column_titles_hide(GTK_CLIST(tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(tree));
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(tree));
+  tree = GTK_WIDGET(gnc_tree_view_account_new (FALSE));
+  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW(tree), FALSE);
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(tree));
   if (multiple_selection)
-    gtk_clist_set_selection_mode(GTK_CLIST(tree), GTK_SELECTION_MULTIPLE);
-  else 
-    gtk_clist_set_selection_mode(GTK_CLIST(tree), GTK_SELECTION_BROWSE);
+    gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
+  else
+    gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
 
   if (acct_type_list) {
     GList *node;
     AccountViewInfo avi;
     int i;
 
-    gnc_account_tree_get_view_info (GNC_ACCOUNT_TREE (tree), &avi);
+    gnc_tree_view_account_get_view_info (GNC_TREE_VIEW_ACCOUNT (tree), &avi);
 
     for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
       avi.include_type[i] = FALSE;
@@ -771,7 +632,7 @@
       avi.include_type[type] = TRUE;
     }
 
-    gnc_account_tree_set_view_info (GNC_ACCOUNT_TREE (tree), &avi);
+    gnc_tree_view_account_set_view_info (GNC_TREE_VIEW_ACCOUNT (tree), &avi);
     g_list_free (acct_type_list);    
   }
 
@@ -780,7 +641,7 @@
                                  GTK_POLICY_AUTOMATIC, 
                                  GTK_POLICY_AUTOMATIC);
 
-  gtk_box_pack_start(GTK_BOX(vbox), scroll_win, FALSE, FALSE, 0);
+  gtk_box_pack_start(GTK_BOX(vbox), scroll_win, TRUE, TRUE, 0);
   gtk_container_border_width(GTK_CONTAINER(scroll_win), 5);
   gtk_container_add(GTK_CONTAINER(scroll_win), tree);
 
@@ -793,23 +654,21 @@
     button = gtk_button_new_with_label(_("Select All"));
     gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-    gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                       GTK_SIGNAL_FUNC(gnc_option_account_select_all_cb),
-                       option);
+    g_signal_connect(G_OBJECT(button), "clicked",
+		     G_CALLBACK(gnc_option_account_select_all_cb), option);
 
     button = gtk_button_new_with_label(_("Clear All"));
     gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-    gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                       GTK_SIGNAL_FUNC(gnc_option_account_clear_all_cb),
-                       option);
+    g_signal_connect(G_OBJECT(button), "clicked",
+		     G_CALLBACK(gnc_option_account_clear_all_cb), option);
   }
 
   button = gtk_button_new_with_label(_("Select Default"));
   gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-		     GTK_SIGNAL_FUNC(default_button_cb), option);
+  g_signal_connect(G_OBJECT(button), "clicked",
+		   G_CALLBACK(gnc_option_default_cb), option);
 
   gnc_option_set_widget (option, tree);
 
@@ -822,13 +681,8 @@
 {
   GNCOption *option = data;
 
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
   gtk_clist_set_row_data(clist, row, GINT_TO_POINTER(TRUE));
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(clist));
+  gnc_option_changed_widget_cb(GTK_WIDGET(clist), option);
 }
 
 static void
@@ -837,13 +691,8 @@
 {
   GNCOption *option = data;
 
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
   gtk_clist_set_row_data(clist, row, GINT_TO_POINTER(FALSE));
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(clist));
+  gnc_option_changed_widget_cb(GTK_WIDGET(clist), option);
 }
 
 static void
@@ -852,12 +701,7 @@
   GNCOption *option = data;
 
   gtk_clist_select_all(GTK_CLIST(gnc_option_get_widget (option)));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (widget);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static void
@@ -866,12 +710,7 @@
   GNCOption *option = data;
 
   gtk_clist_unselect_all(GTK_CLIST(gnc_option_get_widget (option)));
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (widget);
+  gnc_option_changed_widget_cb(widget, option);
 }
 
 static GtkWidget *
@@ -939,22 +778,20 @@
   button = gtk_button_new_with_label(_("Select All"));
   gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_option_list_select_all_cb),
-                     option);
+  g_signal_connect(G_OBJECT(button), "clicked",
+		   G_CALLBACK(gnc_option_list_select_all_cb), option);
 
   button = gtk_button_new_with_label(_("Clear All"));
   gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_option_list_clear_all_cb),
-                     option);
+  g_signal_connect(G_OBJECT(button), "clicked",
+		   G_CALLBACK(gnc_option_list_clear_all_cb), option);
 
   button = gtk_button_new_with_label(_("Select Default"));
   gtk_box_pack_start(GTK_BOX(bbox), button, FALSE, FALSE, 0);
 
-  gtk_signal_connect(GTK_OBJECT(button), "clicked",
-		     GTK_SIGNAL_FUNC(default_button_cb), option);
+  g_signal_connect(G_OBJECT(button), "clicked",
+		   G_CALLBACK(gnc_option_default_cb), option);
 
   gnc_option_set_widget (option, clist);
 
@@ -963,28 +800,16 @@
 
 static void
 gnc_option_color_changed_cb(GnomeColorPicker *picker, guint arg1, guint arg2,
-                            guint arg3, guint arg4, gpointer data)
+                            guint arg3, guint arg4, GNCOption *option)
 {
-  GNCOption *option = data;
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(picker));
+  gnc_option_changed_widget_cb(GTK_WIDGET(picker), option);
 }
 
 static void
 gnc_option_font_changed_cb(GnomeFontPicker *picker, gchar *font_name,
-                           gpointer data)
+                           GNCOption *option)
 {
-  GNCOption *option = data;
-
-  gnc_option_set_changed (option, TRUE);
-
-  gnc_option_call_option_widget_changed_proc(option);
-
-  gnc_options_dialog_changed_internal (GTK_WIDGET(picker));
+  gnc_option_changed_widget_cb(GTK_WIDGET(picker), option);
 }
 
 static void
@@ -1065,12 +890,12 @@
   GtkWidget *page_content_box;
   GtkWidget* notebook_page;
   GtkWidget *reset_button;
-  GtkWidget *listitem;
+  GtkWidget *listitem = NULL;
   GtkWidget *buttonbox;
   gint num_options;
   const char *name;
   gint i, page_count, name_offset;
-  gboolean advanced, show_advanced;
+  gboolean advanced;
 
   name = gnc_option_section_name(section);
   if (!name)
@@ -1079,16 +904,12 @@
   if (strncmp(name, "__", 2) == 0)
     return -1;
   advanced = (strncmp(name, "_+", 2) == 0);
-  show_advanced = gnc_lookup_boolean_option("General",
-					    "Show Advanced Settings", FALSE);
   name_offset = (advanced) ? 2 : 0;
   page_label = gtk_label_new(_(name) + name_offset);
   gtk_widget_show(page_label);
 
   /* Build this options page */
   page_content_box = gtk_vbox_new(FALSE, 2);
-  gtk_notebook_append_page(GTK_NOTEBOOK(propertybox->notebook), 
-                           page_content_box, page_label);
 
   /* Build space for the content - the options box */
   options_box = gtk_vbox_new(FALSE, 5);
@@ -1113,39 +934,39 @@
 
   /* Install the lone reset button */
   reset_button = gtk_button_new_with_label (_("Defaults"));
-  gtk_signal_connect(GTK_OBJECT(reset_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_reset_cb),
-                     propertybox);
+  g_signal_connect(G_OBJECT(reset_button), "clicked",
+		   G_CALLBACK(gnc_options_dialog_reset_cb), propertybox);
   gtk_object_set_data(GTK_OBJECT(reset_button), "section", section);
   gtk_box_pack_end(GTK_BOX(buttonbox), reset_button, FALSE, FALSE, 0);
   gtk_widget_show_all(page_content_box);
-
-  /* Build the matching list item for selecting from large page sets */
-  listitem = gtk_list_item_new_with_label(_(name) + name_offset);
-  gtk_widget_show(listitem);
-  gtk_container_add(GTK_CONTAINER(propertybox->page_list), listitem);
+  gtk_notebook_append_page(GTK_NOTEBOOK(propertybox->notebook), 
+                           page_content_box, page_label);
 
   /* Switch to selection from a list if the page count threshhold is reached */
   page_count = gtk_notebook_page_num(GTK_NOTEBOOK(propertybox->notebook),
 				     page_content_box);
-  if (page_count > MAX_TAB_COUNT - 1) { /* Convert 1-based -> 0-based */
-    gtk_widget_show(propertybox->page_list);
-    gtk_notebook_set_show_tabs(GTK_NOTEBOOK(propertybox->notebook), FALSE);
-    gtk_notebook_set_show_border(GTK_NOTEBOOK(propertybox->notebook), FALSE);
-  }
-
-  /* Tweak "advanced" pages for later handling. */
-  if (advanced) {
-    notebook_page =
-      gtk_notebook_get_nth_page(GTK_NOTEBOOK(propertybox->notebook),
-				page_count);
-    gtk_object_set_data(GTK_OBJECT(notebook_page), "listitem", listitem);
-    gtk_object_set_data(GTK_OBJECT(notebook_page), "advanced",
-			GINT_TO_POINTER(advanced));
-
-    if (!show_advanced) {
-      gtk_widget_hide(notebook_page);
-      gtk_widget_hide(listitem);
+
+  if (propertybox->page_list) {
+    /* Build the matching list item for selecting from large page sets */
+    listitem = gtk_list_item_new_with_label(_(name) + name_offset);
+    gtk_widget_show(listitem);
+    gtk_container_add(GTK_CONTAINER(propertybox->page_list), listitem);
+
+    if (page_count > MAX_TAB_COUNT - 1) { /* Convert 1-based -> 0-based */
+      gtk_widget_show(propertybox->page_list);
+      gtk_notebook_set_show_tabs(GTK_NOTEBOOK(propertybox->notebook), FALSE);
+      gtk_notebook_set_show_border(GTK_NOTEBOOK(propertybox->notebook), FALSE);
+    }
+
+    /* Tweak "advanced" pages for later handling. */
+    if (advanced) {
+      notebook_page =
+	gtk_notebook_get_nth_page(GTK_NOTEBOOK(propertybox->notebook),
+				  page_count);
+
+      gtk_object_set_data(GTK_OBJECT(notebook_page), "listitem", listitem);
+      gtk_object_set_data(GTK_OBJECT(notebook_page), "advanced",
+			  GINT_TO_POINTER(advanced));
     }
   }
 
@@ -1185,7 +1006,7 @@
   propertybox->tips = gtk_tooltips_new();
   propertybox->option_db = odb;
 
-  gtk_object_ref (GTK_OBJECT (propertybox->tips));
+  g_object_ref (propertybox->tips);
   gtk_object_sink (GTK_OBJECT (propertybox->tips));
 
   num_sections = gnc_option_db_num_sections(odb);
@@ -1220,21 +1041,23 @@
     }
   }
 
+  gtk_notebook_popup_enable(GTK_NOTEBOOK(propertybox->notebook));
   if (default_page >= 0) {
-    gtk_notebook_set_page(GTK_NOTEBOOK(propertybox->notebook), default_page);
+    gtk_notebook_set_current_page(GTK_NOTEBOOK(propertybox->notebook), default_page);
     gtk_list_select_item(GTK_LIST(propertybox->page_list), default_page);
   } else {
     /* GTKList doesn't default to selecting the first item. */
     gtk_list_select_item(GTK_LIST(propertybox->page_list), 0);
   }
-  gnc_options_dialog_clear_changed(propertybox->container);
+  gnc_options_dialog_changed_internal(propertybox->dialog, FALSE);
+  gtk_widget_show(propertybox->dialog);
 }
 
 
 GtkWidget *
 gnc_options_dialog_widget(GNCOptionWin * win)
 {
-  return win->container;
+  return win->dialog;
 }
 
 GtkWidget *
@@ -1243,70 +1066,31 @@
   return win->notebook;
 }
 
-static void
-gnc_options_dialog_apply_stub_cb(GtkWidget * w, gpointer data)
-{
-  GNCOptionWin * window = data;
-
-  if (window->apply_cb)
-    window->apply_cb (window, window->apply_cb_data);
-
-  gnc_options_dialog_clear_changed (window->container);
-}
-
-static void
-gnc_options_dialog_help_stub_cb(GtkWidget * w, gpointer data)
-{
-  GNCOptionWin * window = data;
-
-  if(window->help_cb)
-    (window->help_cb)(window, window->help_cb_data);
-}
-
-static void
-gnc_options_dialog_destroy_stub_cb(GtkObject * obj, gpointer data)
-{
-  GNCOptionWin * window = data;
-
-  if (window->close_cb)
-    (window->close_cb)(window, window->close_cb_data);
-}
-
-static void
-gnc_options_dialog_cancel_stub_cb(GtkWidget * w, gpointer data)
+void
+gnc_options_dialog_response_cb(GtkDialog *dialog, gint response, GNCOptionWin *window)
 {
-  GNCOptionWin * window = data;
-  GtkWidget *container;
-
-  container = window->container;
-
-  gtk_widget_ref (container);
-
-  gtk_signal_handler_block_by_func(GTK_OBJECT(container),
-                                   GTK_SIGNAL_FUNC
-                                   (gnc_options_dialog_destroy_stub_cb),
-                                   data);
-
-  if (window->close_cb)
-    (window->close_cb)(window, window->close_cb_data);
-  else
-    gtk_widget_hide(container);
-
-  /* at this point, window may point to freed data */
-  if (!GTK_OBJECT_DESTROYED (container))
-    gtk_signal_handler_unblock_by_func(GTK_OBJECT(container),
-                                       GTK_SIGNAL_FUNC
-                                       (gnc_options_dialog_destroy_stub_cb),
-                                       data);
-
-  gtk_widget_unref (container);
-}
+  switch (response) {
+   case GTK_RESPONSE_HELP:
+    if(window->help_cb)
+      (window->help_cb)(window, window->help_cb_data);
+    break;
+
+   case GTK_RESPONSE_OK:
+   case GTK_RESPONSE_APPLY:
+    gnc_options_dialog_changed_internal (window->dialog, FALSE);
+    if (window->apply_cb)
+      window->apply_cb (window, window->apply_cb_data);
+    if (response == GTK_RESPONSE_APPLY)
+      break;
+    /* fall through */
 
-static void
-gnc_options_dialog_ok_cb(GtkWidget * w, gpointer data)
-{
-  gnc_options_dialog_apply_stub_cb(w, data);
-  gnc_options_dialog_cancel_stub_cb(w, data);
+   default:
+    if (window->close_cb) {
+      (window->close_cb)(window, window->close_cb_data);
+    } else {
+      gtk_widget_hide(window->dialog);
+    }
+  }
 }
 
 static void
@@ -1322,10 +1106,10 @@
 
   section = (GNCOptionSection*)val;
   gnc_option_db_section_reset_widgets (section);
-  gnc_options_dialog_changed_internal (win->container);
+  gnc_options_dialog_changed_internal (win->dialog, TRUE);
 }
 
-static void
+void
 gnc_options_dialog_list_select_cb(GtkWidget * list, GtkWidget * item,
 				  gpointer data)
 {
@@ -1336,112 +1120,77 @@
   g_return_if_fail (win);
 
   index = gtk_list_child_position(GTK_LIST(list), item);
-  gtk_notebook_set_page(GTK_NOTEBOOK(win->notebook), index);
+  gtk_notebook_set_current_page(GTK_NOTEBOOK(win->notebook), index);
 }
 
-GNCOptionWin *
-gnc_options_dialog_new(gboolean make_toplevel, gchar *title)
+void
+gnc_options_register_stocks (void)
 {
-  GNCOptionWin * retval = g_new0(GNCOptionWin, 1);
-  GtkWidget * vbox;
-  GtkWidget * hbox;
-  GtkWidget * buttonbox;
-
-  GtkWidget * ok_button=NULL;
-  GtkWidget * apply_button=NULL;
-  GtkWidget * help_button=NULL;
-  GtkWidget * cancel_button=NULL;
-  GtkWidget * separator = NULL;
-
-  retval->toplevel = make_toplevel;
-
-  vbox     =  gtk_vbox_new(FALSE, 5);
-  hbox     =  gtk_hbox_new(FALSE, 5);
-
-  if(make_toplevel) {
-    retval->container = gtk_window_new(GDK_WINDOW_TOPLEVEL);
-    if(title)
-    {
-      gtk_window_set_title(GTK_WINDOW(retval->container), title);
-    }
-  }
-  else {
-    retval->container = vbox;
-    gtk_widget_ref(vbox);
-    gtk_object_sink(GTK_OBJECT(vbox));
-  }
+#if 0
+	static gboolean done = FALSE;
+	
+	GtkStockItem items[] = {
+		{ GTK_STOCK_APPLY		,"gnc_option_apply_button",	0, 0, NULL },
+		{ GTK_STOCK_HELP		,"gnc_options_dialog_help",	0, 0, NULL },
+		{ GTK_STOCK_OK			,"gnc_options_dialog_ok",	0, 0, NULL },
+		{ GTK_STOCK_CANCEL		,"gnc_options_dialog_cancel",	0, 0, NULL },
+	};
 
-  buttonbox = gtk_hbutton_box_new ();
+	if (done) 
+	{
+		return;
+	}
+	done = TRUE;
 
-  gtk_button_box_set_layout (GTK_BUTTON_BOX (buttonbox),
-			     GTK_BUTTONBOX_EDGE);
+	gtk_stock_add (items, G_N_ELEMENTS (items));
+#endif
+}
 
-  gtk_button_box_set_spacing (GTK_BUTTON_BOX (buttonbox), 
-			      GNOME_PAD);
+/* gnc_options_dialog_new:
+ *
+ *   - Opens the preferences glade file
+ *   - Connects signals specified in the glade file
+ *   - Sets the window's title
+ *   - Initializes a new GtkNotebook, and adds it to the window
+ *
+ */
+GNCOptionWin *
+gnc_options_dialog_new(gchar *title)
+{
+  GNCOptionWin * retval;
+  GladeXML *xml;
+  GtkWidget * hbox;
 
-  gtk_container_set_border_width(GTK_CONTAINER (buttonbox), 5);
+  retval = g_new0(GNCOptionWin, 1);
+  xml = gnc_glade_xml_new ("preferences.glade", "Gnucash Options");
+  retval->dialog = glade_xml_get_widget (xml, "Gnucash Options");
+  retval->page_list = glade_xml_get_widget (xml, "page_list");
+
+  glade_xml_signal_autoconnect_full( xml,
+                                     gnc_glade_autoconnect_full_func,
+                                     retval );
 
-  apply_button = gnome_stock_button (GNOME_STOCK_BUTTON_APPLY);
-  help_button  = gnome_stock_button (GNOME_STOCK_BUTTON_HELP);
-  ok_button    = gnome_stock_button (GNOME_STOCK_BUTTON_OK);
-  cancel_button = gnome_stock_button (GNOME_STOCK_BUTTON_CANCEL);
-  separator = gtk_hseparator_new();
-
-  gtk_widget_set_sensitive (apply_button, FALSE);
-
-  gtk_object_set_data (GTK_OBJECT (retval->container),
-                       "gnc_option_apply_button", apply_button);
-
-  gtk_signal_connect(GTK_OBJECT(apply_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_apply_stub_cb),
-                     retval);
-
-  gtk_signal_connect(GTK_OBJECT(help_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_help_stub_cb),
-                     retval);
-
-  gtk_signal_connect(GTK_OBJECT(ok_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_ok_cb),
-                     retval);
-
-  gtk_signal_connect(GTK_OBJECT(cancel_button), "clicked",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_cancel_stub_cb),
-                     retval);
-
-  gtk_signal_connect(GTK_OBJECT(retval->container), "destroy",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_destroy_stub_cb),
-                     retval);
-
-  gtk_box_pack_start(GTK_BOX(buttonbox), ok_button, TRUE, TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(buttonbox), apply_button, TRUE, TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(buttonbox), help_button, TRUE, TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(buttonbox), cancel_button, TRUE, TRUE, 0);
-
-  retval->page_list = gtk_list_new();
-  gtk_signal_connect(GTK_OBJECT(retval->page_list), "select_child",
-                     GTK_SIGNAL_FUNC(gnc_options_dialog_list_select_cb),
-                     retval);
+  if (title)
+    gtk_window_set_title(GTK_WINDOW(retval->dialog), title);
 
+  /* glade doesn't suport a notebook with zero pages */
+  hbox = glade_xml_get_widget (xml, "notebook placeholder");
   retval->notebook = gtk_notebook_new();
-  gtk_box_pack_start(GTK_BOX(hbox), retval->page_list, TRUE, TRUE, 5);
+  gtk_widget_show(retval->notebook);
   gtk_box_pack_start(GTK_BOX(hbox), retval->notebook, TRUE, TRUE, 5);
-  gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 5);
-  gtk_box_pack_start(GTK_BOX(vbox), separator, TRUE, TRUE, 0);
-  gtk_box_pack_start(GTK_BOX(vbox), GTK_WIDGET(buttonbox), FALSE, TRUE, 0);
-
-  if(make_toplevel) {
-    gtk_container_add(GTK_CONTAINER(retval->container), vbox);
-  }
 
-  gtk_widget_show_all(vbox);
+  return retval;
+}
 
-  if(make_toplevel) {
-    gtk_widget_show_all(retval->container);
-  }
+/* Creates a new GNCOptionWin structure, but assumes you have your own
+   dialog widget you want to plugin */
+GNCOptionWin *
+gnc_options_dialog_new_w_dialog(gchar *title, GtkWidget *dialog)
+{
+  GNCOptionWin * retval;
 
-  /* Hide list until there are "too many" tabs. */
-  gtk_widget_hide(retval->page_list);
-  
+  retval = g_new0(GNCOptionWin, 1);
+  retval->dialog = dialog;
   return retval;
 }
 
@@ -1477,27 +1226,19 @@
   global_help_cb_data = cb_data;
 }
 
+/* This is for global program preferences. */
 void
 gnc_options_dialog_destroy(GNCOptionWin * win)
 {
   if (!win) return;
 
-  gtk_signal_disconnect_by_func(GTK_OBJECT(win->container), 
-                                GTK_SIGNAL_FUNC
-                                (gnc_options_dialog_destroy_stub_cb),
-                                win);
-  if(!win->toplevel) {
-    gtk_widget_unref(win->container);
-  }
-  else {
-    gtk_widget_destroy(win->container);
-  }
+  gtk_widget_destroy(win->dialog);
 
   if(win->tips) {
-    gtk_object_unref (GTK_OBJECT(win->tips));
+    g_object_unref (win->tips);
   }
 
-  win->container = NULL;
+  win->dialog = NULL;
   win->notebook = NULL;
   win->apply_cb = NULL;
   win->help_cb = NULL;
@@ -1507,122 +1248,43 @@
 }
 
 
-/* Global options dialog... this should house all of the config
- * options like where the docs reside, and whatever else is deemed
- * necessary */
-
-static void
-gnc_option_show_advanced_pages(GNCOptionWin * propertybox)
-{
-  GtkWidget *page, *listitem;
-  gboolean advanced, show_advanced;
-  gint i;
-
-  show_advanced = gnc_lookup_boolean_option("General",
-					    "Show Advanced Settings", FALSE);
-  i = 0;
-  while (TRUE) {
-    page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(propertybox->notebook), i++);
-    if (page == NULL)
-      break;
-    advanced =
-      GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(page), "advanced"));
-    if (advanced) {
-      listitem = gtk_object_get_data(GTK_OBJECT(page), "listitem");
-      if (show_advanced) {
-	gtk_widget_show(page);
-	gtk_widget_show(listitem);
-      } else {
-	gtk_widget_hide(page);
-	gtk_widget_hide(listitem);
-      }
-    }
-  };
-}
-
-static void
-gnc_options_dialog_apply_cb(GNCOptionWin *propertybox,
-                            gpointer user_data)
-{
-  GNCOptionDB *global_options = user_data;
-  gnc_option_db_commit(global_options);
-  gnc_option_show_advanced_pages(propertybox);
-}
-
-static void
-gnc_options_dialog_help_cb(GNCOptionWin *propertybox,
-			   gpointer user_data)
-{
-  if (global_help_cb)
-    global_help_cb (propertybox, global_help_cb_data);
-}
-
-static void
-gnc_options_dialog_close_cb(GNCOptionWin *propertybox,
-                            gpointer user_data)
-{
-  GNCOptionWin **options_dialog = user_data;
-
-  if (!GTK_OBJECT_DESTROYED (GTK_OBJECT (propertybox->container)))
-    gtk_widget_destroy (propertybox->container);
-
-  *options_dialog = NULL;
-}
-
-
-void
-gnc_show_options_dialog(void)
-{
-  static GNCOptionWin *options_dialog = NULL;
-  GNCOptionDB *global_options;
-
-  global_options = gnc_get_global_options();
-
-  if (gnc_option_db_num_sections(global_options) == 0)
-  {
-    gnc_warning_dialog(NULL, _("No options!"));
-    return;
-  }
-
-  if (gnc_option_db_dirty(global_options))
-  {
-    if (options_dialog != NULL)
-      gnc_options_dialog_destroy(options_dialog);
-
-    options_dialog = NULL;
-  }
-
-  if (options_dialog == NULL)
-  {
-    options_dialog = gnc_options_dialog_new(TRUE, NULL);
-
-    gnc_build_options_dialog_contents(options_dialog, global_options);
-    gnc_option_db_clean(global_options);
-
-    gtk_window_set_title(GTK_WINDOW(options_dialog->container), 
-                         _("GnuCash Preferences"));
-    
-    gnc_options_dialog_set_apply_cb(options_dialog, 
-                                    gnc_options_dialog_apply_cb,
-                                    global_options);
-
-    gnc_options_dialog_set_help_cb(options_dialog, 
-                                   gnc_options_dialog_help_cb,
-                                   global_options);
-
-    gnc_options_dialog_set_close_cb (options_dialog,
-                                     gnc_options_dialog_close_cb,
-                                     &options_dialog);
-  }
-
-  gtk_window_present(GTK_WINDOW(options_dialog->container));
-}
-
 /*****************************************************************/
 /* Option Registration                                           */
 
-/* SET WIDGET */
-
+/*************************
+ *       SET WIDGET      *
+ *************************
+ *
+ * gnc_option_set_ui_widget_<type>():
+ *
+ * You should create the widget representation for the option type,
+ * and set the top-level container widget for your control in
+ * *enclosing.  If you want to pack the widget into the page yourself,
+ * then you may -- just set *packed to TRUE.  Otherwise, the widget
+ * you return in *enclosing will be packed for you.  (*packed is
+ * initialized to FALSE, so if you're not setting it to TRUE, you
+ * don't have to touch it at all.)
+ *
+ * If you need to initialize the state of your control or to connect
+ * any signals to you widgets, then you should do so in this function.
+ * If you want to create a label for the widget you should use 'name'
+ * for the label text.
+ *
+ * Somewhere in this function, you should also call
+ * gnc_option_set_widget(option, value); where 'value' is the
+ * GtkWidget you will actually store the value in.
+ *
+ * Also call gnc_option_set_ui_value(option, FALSE);
+ *
+ * You probably want to end with something like:
+ *   gtk_widget_show_all(*enclosing);
+ *
+ * If you can can detect state changes for your widget's value, you should also
+ * gnc_option_changed_widget_cb() upon changes.
+ *
+ * The widget you return from this function should be the widget in
+ * which you're storing the option value.
+ */
 static GtkWidget *
 gnc_option_set_ui_widget_boolean (GNCOption *option, GtkBox *page_box,
 				  GtkTooltips *tooltips,
@@ -1638,8 +1300,8 @@
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "toggled",
-		     GTK_SIGNAL_FUNC(gnc_option_toggled_cb), option);
+  g_signal_connect(G_OBJECT(value), "toggled",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
   gtk_widget_show_all(*enclosing);
@@ -1669,8 +1331,8 @@
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(value), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -1688,6 +1350,7 @@
   GtkWidget *value;
   GtkWidget *frame;
   GtkWidget *scroll;
+  GtkTextBuffer* text_buffer;
 
   frame = gtk_frame_new(name);
 
@@ -1700,17 +1363,17 @@
   gtk_container_add(GTK_CONTAINER(frame), scroll);
 
   *enclosing = gtk_hbox_new(FALSE, 10);
-  value = gtk_text_new(NULL, NULL);
-  gtk_text_set_word_wrap(GTK_TEXT(value), TRUE);
-  gtk_text_set_editable(GTK_TEXT(value), TRUE);
-
+  value = gtk_text_view_new();
+  gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(value), GTK_WRAP_WORD);
+  gtk_text_view_set_editable(GTK_TEXT_VIEW(value), TRUE);
   gtk_container_add (GTK_CONTAINER (scroll), value);
 
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(value));
+  g_signal_connect(G_OBJECT(text_buffer), "changed",
+		   G_CALLBACK(gnc_option_changed_option_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), frame, TRUE, TRUE, 0);
   gtk_widget_show_all(*enclosing);
@@ -1740,11 +1403,11 @@
   gnc_option_set_ui_value(option, FALSE);
 
   if (documentation != NULL)
-    gtk_tooltips_set_tip(tooltips, GTK_COMBO(value)->entry,
+    gtk_tooltips_set_tip(tooltips, value,
 			 documentation, NULL);
 
-  gtk_signal_connect(GTK_OBJECT(GTK_COMBO(value)->entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(value), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -1781,8 +1444,8 @@
     gtk_tooltips_set_tip(tooltips, GNC_GENERAL_SELECT(value)->entry,
 			 documentation, NULL);
 
-  gtk_signal_connect(GTK_OBJECT(GNC_GENERAL_SELECT(value)->entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(GNC_GENERAL_SELECT(value)->entry), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -1858,26 +1521,26 @@
 				  GtkWidget **enclosing, gboolean *packed)
 {
   GtkWidget *value;
+  GtkTreeSelection *selection;
 
   *enclosing = gnc_option_create_account_widget(option, name);
   value = gnc_option_get_widget (option);
 
   gtk_tooltips_set_tip(tooltips, *enclosing, documentation, NULL);
 
-  gtk_box_pack_start(page_box, *enclosing, FALSE, FALSE, 5);
+  gtk_box_pack_start(page_box, *enclosing, TRUE, TRUE, 5);
   *packed = TRUE;
 
-  gtk_widget_realize(value);
+  //gtk_widget_realize(value);
 
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "select_account",
-		     GTK_SIGNAL_FUNC(gnc_option_account_cb), option);
-  gtk_signal_connect(GTK_OBJECT(value), "unselect_account",
-		     GTK_SIGNAL_FUNC(gnc_option_account_cb), option);
+  selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(value));
+  g_signal_connect(G_OBJECT(selection), "changed",
+		   G_CALLBACK(gnc_option_account_cb), option);
 
-  gtk_clist_set_row_height(GTK_CLIST(value), 0);
-  gtk_widget_set_usize(value, 0, GTK_CLIST(value)->row_height * 10);
+  //  gtk_clist_set_row_height(GTK_CLIST(value), 0);
+  //  gtk_widget_set_usize(value, 0, GTK_CLIST(value)->row_height * 10);
   gtk_widget_show_all(*enclosing);
   return value;
 }
@@ -1892,7 +1555,7 @@
   GtkWidget *value;
   GtkWidget *label;
   GList *acct_type_list;
-  char * colon_name;
+  gchar *colon_name;
 
   colon_name = g_strconcat(name, ":", NULL);
   label = gtk_label_new(colon_name);
@@ -1903,11 +1566,13 @@
   value = gnc_account_sel_new();
   gnc_account_sel_set_acct_filters(GNC_ACCOUNT_SEL(value), acct_type_list);
 
-  gtk_signal_connect(GTK_OBJECT(gnc_account_sel_gtk_entry(GNC_ACCOUNT_SEL(value))),
-		     "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(gnc_account_sel_gtk_entry(GNC_ACCOUNT_SEL(value))),
+		   "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
 
   gnc_option_set_widget (option, value);
+  /* DOCUMENT ME: Why is the only option type that sets use_default to
+     TRUE? */
   gnc_option_set_ui_value(option, TRUE);
 
   *enclosing = gtk_hbox_new(FALSE, 5);
@@ -1935,14 +1600,14 @@
   gtk_box_pack_start(page_box, *enclosing, FALSE, FALSE, 5);
   *packed = TRUE;
 
-  gtk_widget_realize(value);
+  //gtk_widget_realize(value);
 
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "select_row",
-		     GTK_SIGNAL_FUNC(gnc_option_list_select_cb), option);
-  gtk_signal_connect(GTK_OBJECT(value), "unselect_row",
-		     GTK_SIGNAL_FUNC(gnc_option_list_unselect_cb), option);
+  g_signal_connect(G_OBJECT(value), "select_row",
+		   G_CALLBACK(gnc_option_list_select_cb), option);
+  g_signal_connect(G_OBJECT(value), "unselect_row",
+		   G_CALLBACK(gnc_option_list_unselect_cb), option);
 
   num_lines = gnc_option_num_permissible_values(option);
   num_lines = MIN(num_lines, 9) + 1;
@@ -2013,10 +1678,11 @@
 
       string = g_strnfill(num_digits, '8');
       
-      width = gdk_text_measure(style->font, string, num_digits);
+      width = gdk_text_measure(gdk_font_from_description (style->font_desc), 
+                 string, num_digits);
 
       /* sync with gtkspinbutton.c. why doesn't it do this itself? */
-      width += 11 + (2 * style->klass->xthickness);
+      width += 11 + (2 * style->xthickness);
 
       g_free(string);
 
@@ -2027,8 +1693,8 @@
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(value), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
   
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -2064,8 +1730,8 @@
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "color-set",
-		     GTK_SIGNAL_FUNC(gnc_option_color_changed_cb), option);
+  g_signal_connect(G_OBJECT(value), "color-set",
+		   G_CALLBACK(gnc_option_color_changed_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -2098,8 +1764,8 @@
 
   gnc_option_set_ui_value(option, FALSE);
 
-  gtk_signal_connect(GTK_OBJECT(value), "font-set",
-		     GTK_SIGNAL_FUNC(gnc_option_font_changed_cb), option);
+  g_signal_connect(G_OBJECT(value), "font-set",
+		   G_CALLBACK(gnc_option_font_changed_cb), option);
 
   gtk_box_pack_start(GTK_BOX(*enclosing), label, FALSE, FALSE, 0);
   gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
@@ -2116,6 +1782,7 @@
 {
   GtkWidget *value;
   GtkWidget *label;
+  GtkWidget *entry;
   gchar *colon_name;
 
   ENTER("option %p(%s), name %s", option, gnc_option_name(option), name);
@@ -2129,11 +1796,9 @@
 				 FALSE);
   gnome_pixmap_entry_set_preview(GNOME_PIXMAP_ENTRY(value), FALSE);
 
-  gtk_signal_connect(GTK_OBJECT
-		     (gnome_pixmap_entry_gtk_entry
-		      (GNOME_PIXMAP_ENTRY(value))),
-		     "changed",
-		     GTK_SIGNAL_FUNC(gnc_option_changed_cb), option);
+  entry = gnome_pixmap_entry_gtk_entry (GNOME_PIXMAP_ENTRY(value));
+  g_signal_connect(G_OBJECT (entry), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
     
   gnc_option_set_widget (option, value);
   gnc_option_set_ui_value(option, FALSE);
@@ -2179,13 +1844,49 @@
   gnc_option_set_widget (option, *enclosing);
 
   gnc_option_set_ui_value(option, FALSE);
-  gtk_signal_connect(GTK_OBJECT(*enclosing), "format_changed",
-		     GTK_SIGNAL_FUNC(gnc_date_option_changed_cb), option);
+  g_signal_connect(G_OBJECT(*enclosing), "format_changed",
+		   G_CALLBACK(gnc_option_changed_option_cb), option);
   gtk_widget_show_all(*enclosing);
   return *enclosing;
 }
 
-/* SET VALUE */
+static GtkWidget *
+gnc_option_set_ui_widget_budget (GNCOption *option, GtkBox *page_box,
+                                 GtkTooltips *tooltips,
+                                 char *name, char *documentation,
+                                 /* Return values */
+                                 GtkWidget **enclosing, gboolean *packed)
+{
+  GtkWidget *value;
+
+  *enclosing = gtk_hbox_new(FALSE, 5);
+
+  value = gnc_option_create_budget_widget(option);
+
+  gnc_option_set_widget (option, value);
+  gnc_option_set_ui_value(option, FALSE);
+
+  /* Maybe connect destroy handler for tree model here? */
+  g_signal_connect(G_OBJECT(value), "changed",
+		   G_CALLBACK(gnc_option_changed_widget_cb), option);
+
+  gtk_box_pack_start(GTK_BOX(*enclosing), value, FALSE, FALSE, 0);
+  gtk_widget_show_all(*enclosing);
+  return value;
+}
+
+/*************************
+ *       SET VALUE       *
+ *************************
+ *
+ * gnc_option_set_ui_value_<type>():
+ *
+ *   In this function you should set the state of the gui widget to
+ * correspond to the value provided in 'value'.  You should return
+ * TRUE if there was an error, FALSE otherwise.
+ *
+ *
+ */
 
 static gboolean
 gnc_option_set_ui_value_boolean (GNCOption *option, gboolean use_default,
@@ -2207,8 +1908,7 @@
 {
   if (SCM_STRINGP(value))
   {
-    /* char *string = gh_scm2newstr(value, NULL); */
-    char *string = SCM_STRING_CHARS(value);
+    const gchar *string = SCM_STRING_CHARS(value);
     gtk_entry_set_text(GTK_ENTRY(widget), string);
     return FALSE;
   }
@@ -2218,16 +1918,19 @@
 
 static gboolean
 gnc_option_set_ui_value_text (GNCOption *option, gboolean use_default,
-				 GtkWidget *widget, SCM value)
+			      GObject *object, SCM value)
 {
+  GtkTextBuffer *buffer;
+
+  if (GTK_IS_TEXT_BUFFER(object))
+    buffer = GTK_TEXT_BUFFER(object);
+  else
+    buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(object));
+
   if (SCM_STRINGP(value))
   {
-    /* char *string = gh_scm2newstr(value, NULL); */
-    char *string = SCM_STRING_CHARS(value);
-    gint pos = 0;
-    gtk_editable_delete_text(GTK_EDITABLE(widget), 0, -1);
-    gtk_editable_insert_text(GTK_EDITABLE(widget),
-			     string, strlen (string), &pos);
+    const gchar *string = SCM_STRING_CHARS(value);
+    gtk_text_buffer_set_text (buffer, string, strlen (string));
     return FALSE;
   }
   else
@@ -2277,9 +1980,7 @@
     return TRUE;
   else
   {
-    gtk_option_menu_set_history(GTK_OPTION_MENU(widget), index);
-    gtk_object_set_data(GTK_OBJECT(widget), "gnc_multichoice_index",
-			GINT_TO_POINTER(index));
+    gtk_combo_box_set_active(GTK_COMBO_BOX(widget), index);
     return FALSE;
   }
 }
@@ -2307,10 +2008,7 @@
 	index = gnc_option_permissible_value_index(option, relative);
 	if (safe_strcmp(date_option_type, "relative") == 0)
 	{
-	  gtk_object_set_data(GTK_OBJECT(widget),
-			      "gnc_multichoice_index",
-			      GINT_TO_POINTER(index));
-	  gtk_option_menu_set_history(GTK_OPTION_MENU(widget), index);
+	  gtk_combo_box_set_active(GTK_COMBO_BOX(widget), index);
 	}
 	else if (safe_strcmp(date_option_type, "both") == 0)
 	{
@@ -2321,11 +2019,7 @@
 	  rel_date_widget = g_list_nth_data(widget_list,
 					    GNC_RD_WID_REL_WIDGET_POS);
 	  gnc_date_option_set_select_method(option, FALSE, TRUE);
-	  gtk_object_set_data(GTK_OBJECT(rel_date_widget),
-			      "gnc_multichoice_index",
-			      GINT_TO_POINTER(index));
-	  gtk_option_menu_set_history(GTK_OPTION_MENU(rel_date_widget),
-				      index);
+	  gtk_combo_box_set_active(GTK_COMBO_BOX(rel_date_widget), index);
 	}
 	else
 	{
@@ -2386,8 +2080,8 @@
 
   list = gnc_scm_list_to_glist(value);
 
-  gtk_clist_unselect_all(GTK_CLIST(widget));
-  gnc_account_tree_select_accounts(GNC_ACCOUNT_TREE(widget), list, TRUE);
+  gnc_tree_view_account_set_selected_accounts (GNC_TREE_VIEW_ACCOUNT(widget),
+					       list, TRUE);
 
   g_list_free(list);
   return FALSE;
@@ -2401,7 +2095,7 @@
 
   if (value != SCM_BOOL_F) {
     if (!gw_wcp_p(value))
-      scm_misc_error("gnc_optoin_set_ui_value_account_sel",
+      scm_misc_error("gnc_option_set_ui_value_account_sel",
 		     "Option Value not a gw:wcp.", value);
       
     acc = gw_wcp_get_ptr(value);
@@ -2492,8 +2186,7 @@
 {
   if (SCM_STRINGP(value))
   {
-    /* char *string = gh_scm2newstr(value, NULL); */
-    char *string = SCM_STRING_CHARS(value);
+    const gchar *string = SCM_STRING_CHARS(value);
     if ((string != NULL) && (*string != '\0'))
     {
       GnomeFontPicker *picker = GNOME_FONT_PICKER(widget);
@@ -2512,8 +2205,7 @@
   ENTER("option %p(%s)", option, gnc_option_name(option));
   if (SCM_STRINGP(value))
   {
-    /* char * string = gh_scm2newstr(value, NULL); */
-    char *string = SCM_STRING_CHARS(value);
+    const gchar *string = SCM_STRING_CHARS(value);
 
     if (string && *string)
     {
@@ -2530,6 +2222,31 @@
   return TRUE;
 }
 
+static gboolean gnc_option_set_ui_value_budget(
+    GNCOption *option, gboolean use_default, GtkWidget *widget, SCM value)
+{
+    GncBudget *bgt;
+    GtkComboBox *cb;
+    GtkTreeModel *tm;
+    GtkTreeIter iter;
+
+    if (value != SCM_BOOL_F) {
+        if (!gw_wcp_p(value))
+            scm_misc_error("gnc_option_set_ui_value_budget",
+                           "Option Value not a gw:wcp.", value);
+
+        bgt = gw_wcp_get_ptr(value);
+        cb = GTK_COMBO_BOX(widget);
+        tm = gtk_combo_box_get_model(cb);
+        gnc_tree_model_budget_get_iter_for_budget(tm, &iter, bgt);
+        gtk_combo_box_set_active_iter(cb, &iter);
+    }
+
+
+    //FIXME: Unimplemented.
+    return FALSE;
+}
+
 static gboolean
 gnc_option_set_ui_value_radiobutton (GNCOption *option, gboolean use_default,
 				     GtkWidget *widget, SCM value)
@@ -2570,7 +2287,7 @@
 				    GtkWidget *widget, SCM value)
 {
   GNCDateFormat * gdf = GNC_DATE_FORMAT(widget);
-  DateFormat format;
+  QofDateFormat format;
   GNCDateMonthFormat months;
   gboolean years;
   char *custom;
@@ -2590,7 +2307,19 @@
   return FALSE;
 }
 
-/* GET VALUE */
+/*************************
+ *       GET VALUE       *
+ *************************
+ *
+ * gnc_option_get_ui_value_<type>():
+ *
+ * 'widget' will be the widget returned from the
+ * gnc_option_set_ui_widget_<type>() function.
+ *
+ * You should return a SCM value corresponding to the current state of the
+ * gui widget.
+ *
+ */
 
 static SCM
 gnc_option_get_ui_value_boolean (GNCOption *option, GtkWidget *widget)
@@ -2619,7 +2348,7 @@
   char * string;
   SCM result;
 
-  string = gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1);
+  string = xxxgtk_textview_get_text (GTK_TEXT_VIEW(widget));
   result = scm_makfrom0str(string);
   g_free(string);
   return result;
@@ -2650,12 +2379,9 @@
 static SCM
 gnc_option_get_ui_value_multichoice (GNCOption *option, GtkWidget *widget)
 {
-  gpointer _index;
   int index;
 
-  _index = gtk_object_get_data(GTK_OBJECT(widget), "gnc_multichoice_index");
-  index = GPOINTER_TO_INT(_index);
-
+  index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
   return (gnc_option_permissible_value(option, index));
 }
 
@@ -2668,8 +2394,7 @@
 
   if(safe_strcmp(subtype, "relative") == 0)
   {
-    index = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(widget),
-						"gnc_multichoice_index"));
+    index = gtk_combo_box_get_active(GTK_COMBO_BOX(widget));
     type = scm_str2symbol("relative");
     val = gnc_option_permissible_value(option, index);
     result = scm_cons(type, val);
@@ -2705,8 +2430,7 @@
     }
     else 
     {
-      index = GPOINTER_TO_INT(gtk_object_get_data(GTK_OBJECT(rel_widget),
-						  "gnc_multichoice_index"));
+      index = gtk_combo_box_get_active(GTK_COMBO_BOX(rel_widget));
       val = gnc_option_permissible_value(option, index);
       result = scm_cons(scm_str2symbol("relative"), val);
     }
@@ -2718,12 +2442,12 @@
 static SCM
 gnc_option_get_ui_value_account_list (GNCOption *option, GtkWidget *widget)
 {
-  GNCAccountTree *tree;
+  GncTreeViewAccount *tree;
   GList *list;
   SCM result;
 
-  tree = GNC_ACCOUNT_TREE(widget);
-  list = gnc_account_tree_get_current_accounts(tree);
+  tree = GNC_TREE_VIEW_ACCOUNT(widget);
+  list = gnc_tree_view_account_get_selected_accounts (tree);
 
   /* handover list */
   result = gnc_glist_to_scm_list(list, scm_c_eval_string("<gnc:Account*>"));
@@ -2747,6 +2471,26 @@
 }
 
 static SCM
+gnc_option_get_ui_value_budget(GNCOption *option, GtkWidget *widget)
+{
+    GncBudget *bgt;
+    GtkComboBox *cb;
+    GtkTreeModel *tm;
+    GtkTreeIter iter;
+    gboolean success;
+
+    cb = GTK_COMBO_BOX(widget);
+    success = gtk_combo_box_get_active_iter(cb, &iter);
+    tm = gtk_combo_box_get_model(cb);
+    bgt = gnc_tree_model_budget_get_budget(tm, &iter);
+
+    if (!bgt)
+        return SCM_BOOL_F;
+
+    return gw_wcp_assimilate_ptr(bgt, scm_c_eval_string("<gnc:Budget*>"));
+}
+
+static SCM
 gnc_option_get_ui_value_list (GNCOption *option, GtkWidget *widget)
 {
   SCM result;
@@ -2808,7 +2552,7 @@
 gnc_option_get_ui_value_font (GNCOption *option, GtkWidget *widget)
 {
   GnomeFontPicker *picker = GNOME_FONT_PICKER(widget);
-  char * string;
+  const gchar * string;
 
   string = gnome_font_picker_get_font_name(picker);
   return (scm_makfrom0str(string));
@@ -2839,7 +2583,7 @@
 gnc_option_get_ui_value_dateformat (GNCOption *option, GtkWidget *widget)
 {
   GNCDateFormat *gdf = GNC_DATE_FORMAT(widget);
-  DateFormat format;
+  QofDateFormat format;
   GNCDateMonthFormat months;
   gboolean years;
   const char* custom;
@@ -2862,7 +2606,8 @@
     { "string", gnc_option_set_ui_widget_string,
       gnc_option_set_ui_value_string, gnc_option_get_ui_value_string },
     { "text", gnc_option_set_ui_widget_text,
-      gnc_option_set_ui_value_text, gnc_option_get_ui_value_text },
+      (GNCOptionUISetValue)gnc_option_set_ui_value_text,
+      gnc_option_get_ui_value_text },
     { "currency", gnc_option_set_ui_widget_currency,
       gnc_option_set_ui_value_currency, gnc_option_get_ui_value_currency },
     { "commodity", gnc_option_set_ui_widget_commodity,
@@ -2889,6 +2634,8 @@
       gnc_option_set_ui_value_radiobutton, gnc_option_get_ui_value_radiobutton },
     { "dateformat", gnc_option_set_ui_widget_dateformat,
       gnc_option_set_ui_value_dateformat, gnc_option_get_ui_value_dateformat },
+    { "budget", gnc_option_set_ui_widget_budget,
+      gnc_option_set_ui_value_budget, gnc_option_get_ui_value_budget },
     { NULL, NULL, NULL, NULL }
   };
   int i;
@@ -2903,19 +2650,27 @@
   g_return_if_fail (optionTable);
   g_return_if_fail (option);
 
+  /* FIXME: should protect against repeat insertion. */
   g_hash_table_insert (optionTable, (gpointer)(option->option_name), option);
 }
 
 GNCOptionDef_t * gnc_options_ui_get_option (const char *option_name)
 {
+  GNCOptionDef_t *retval;
   g_return_val_if_fail (optionTable, NULL);
   g_return_val_if_fail (option_name, NULL);
 
-  return g_hash_table_lookup (optionTable, option_name);
+  retval = g_hash_table_lookup (optionTable, option_name);
+  if (!retval) {
+      PERR("Option lookup for type '%s' failed!", option_name);
+  }
+  return retval;
 }
 
 void gnc_options_ui_initialize (void)
 {
+
+  //  gnc_options_register_stocks ();
   g_return_if_fail (optionTable == NULL);
   optionTable = g_hash_table_new (g_str_hash, g_str_equal);
 
Index: search-param.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/search-param.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/search-param.h -Lsrc/gnome-utils/search-param.h -u -r1.4 -r1.5
--- src/gnome-utils/search-param.h
+++ src/gnome-utils/search-param.h
@@ -25,15 +25,16 @@
 
 #include "GNCId.h"
 
-#define GNCSEARCH_PARAM(obj)	GTK_CHECK_CAST (obj, gnc_search_param_get_type (), GNCSearchParam)
-#define GNCSEARCH_PARAM_CLASS(klass)	GTK_CHECK_CLASS_CAST (klass, gnc_search_param_get_type (), GNCSearchParamClass)
-#define IS_GNCSEARCH_PARAM(obj)      GTK_CHECK_TYPE (obj, gnc_search_param_get_type ())
+#define GNC_TYPE_SEARCH_PARAM	 (gnc_search_param_get_type ())
+#define GNC_SEARCH_PARAM(o)	 (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SEARCH_PARAM, GNCSearchParam))
+#define GNCSEARCH_PARAM_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_SEARCH_PARAM, GNCSearchParamClass)
+#define GNC_IS_SEARCH_PARAM(o)	 (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SEARCH_PARAM))
 
 typedef struct _GNCSearchParam	GNCSearchParam;
 typedef struct _GNCSearchParamClass	GNCSearchParamClass;
 
 struct _GNCSearchParam {
-  GtkObject parent;
+  GObject parent;
   struct _GNCSearchParamPrivate *priv;
 
   const char *		title;
@@ -43,7 +44,7 @@
 };
 
 struct _GNCSearchParamClass {
-  GtkObjectClass parent_class;
+  GObjectClass parent_class;
 
   /* virtual methods */
 
@@ -51,7 +52,7 @@
 };
 
 /* These are internal functions */
-guint			gnc_search_param_get_type (void);
+GType			gnc_search_param_get_type (void);
 
 /* Create a new search param */
 GNCSearchParam *	gnc_search_param_new (void);
@@ -60,7 +61,7 @@
 /* use the param_path for this parameter.  This will automatically
  * compute the parameter type and the converter functions.
  */
-void		gnc_search_param_set_param_path (GNCSearchParam *param,
+void			gnc_search_param_set_param_path (GNCSearchParam *param,
 						 GNCIdTypeConst search_type,
 						 GSList *param_path);
 
@@ -88,7 +89,7 @@
  * it could result in an invalid Query Term, where the path and the predicate
  * don't match types properly.
  */
-void	gnc_search_param_override_param_type (GNCSearchParam *param,
+void			gnc_search_param_override_param_type (GNCSearchParam *param,
 					      GNCIdTypeConst param_type);
 
 
@@ -97,13 +98,13 @@
  */
 
 /* Create a paramter and prepend it to a GSList */
-GList *		gnc_search_param_prepend (GList *list, char const *title,
+GList *			gnc_search_param_prepend (GList *list, char const *title,
 					  GNCIdTypeConst type_override,
 					  GNCIdTypeConst search_type,
 					  const char *param, ...);
 					  
 
-GList *	gnc_search_param_prepend_with_justify (GList *list, char const *title,
+GList *			gnc_search_param_prepend_with_justify (GList *list, char const *title,
 					       GtkJustification justify,
 					       GNCIdTypeConst type_override,
 					       GNCIdTypeConst search_type,
Index: argv-list-converters.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/argv-list-converters.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/argv-list-converters.c -Lsrc/gnome-utils/argv-list-converters.c -u -r1.3 -r1.4
--- src/gnome-utils/argv-list-converters.c
+++ src/gnome-utils/argv-list-converters.c
@@ -25,7 +25,6 @@
 
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "argv-list-converters.h"
 
@@ -61,8 +60,7 @@
         next = SCM_CDR(next);
         if(SCM_STRINGP(scm_string))
         {
-            /* char *onestr = gh_scm2newstr(scm_string, 0); */
-            char *onestr = SCM_STRING_CHARS(scm_string);
+	    const gchar *onestr = SCM_STRING_CHARS(scm_string);
             ret[loc] = g_strdup (onestr);
         }
         else
Index: gncmod-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gncmod-gnome-utils.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/gnome-utils/gncmod-gnome-utils.c -Lsrc/gnome-utils/gncmod-gnome-utils.c -u -r1.13 -r1.14
--- src/gnome-utils/gncmod-gnome-utils.c
+++ src/gnome-utils/gncmod-gnome-utils.c
@@ -10,7 +10,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
@@ -21,6 +20,11 @@
 #include "gnc-err-popup.h"
 #include "gnc-gui-query.h"
 
+#include "gnc-druid-gnome.h"
+#include "gnc-druid-provider-edge-gnome.h"
+#include "gnc-druid-provider-file-gnome.h"
+#include "gnc-druid-provider-multifile-gnome.h"
+
 /* version of the gnc module system interface we require */
 int libgncmod_gnome_utils_LTX_gnc_module_system_interface = 0;
 
@@ -84,6 +88,12 @@
   if (refcount == 0) {
     gnc_options_ui_initialize ();
     gnc_html_initialize ();
+
+    /* register the druid pieces */
+    gnc_druid_gnome_register();
+    gnc_druid_provider_edge_gnome_register();
+    gnc_druid_provider_file_gnome_register();
+    gnc_druid_provider_multifile_gnome_register();
   }
 
   gnc_set_warning_message(gnc_warning_dialog_va);
Index: gnc-date-delta.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-delta.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-date-delta.c -Lsrc/gnome-utils/gnc-date-delta.c -u -r1.3 -r1.4
--- src/gnome-utils/gnc-date-delta.c
+++ src/gnome-utils/gnc-date-delta.c
@@ -70,80 +70,86 @@
  *
  * Returns the GtkType for the GNCDateDelta widget
  */
-guint
+GType
 gnc_date_delta_get_type (void)
 {
-  static guint date_delta_type = 0;
-
-  if (!date_delta_type){
-    GtkTypeInfo date_delta_info = {
-      "GNCDateDelta",
-      sizeof (GNCDateDelta),
+  static GType date_delta_type = 0;
+	
+  if (date_delta_type == 0) {
+    GTypeInfo date_delta_info = {
       sizeof (GNCDateDeltaClass),
-      (GtkClassInitFunc) gnc_date_delta_class_init,
-      (GtkObjectInitFunc) gnc_date_delta_init,
       NULL,
       NULL,
+      (GClassInitFunc) gnc_date_delta_class_init,
+      NULL,
+      NULL,
+      sizeof (GNCDateDelta),
+      0,
+      (GInstanceInitFunc) gnc_date_delta_init
     };
-
-    date_delta_type = gtk_type_unique (gtk_hbox_get_type (),
-                                       &date_delta_info);
+    
+    date_delta_type = g_type_register_static (gtk_hbox_get_type (),
+					      "GNCDateDelta",
+					      &date_delta_info,
+					      0);
   }
 	
   return date_delta_type;
 }
 
 static void
-gnc_date_delta_class_init (GNCDateDeltaClass *class)
+gnc_date_delta_class_init (GNCDateDeltaClass *klass)
 {
-  GtkObjectClass *object_class = (GtkObjectClass *) class;
-  GtkContainerClass *container_class = (GtkContainerClass *) class;
-
-  object_class = (GtkObjectClass*) class;
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
 
-  parent_class = gtk_type_class (gtk_hbox_get_type ());
+  parent_class = g_type_class_peek_parent (klass);
 
   date_delta_signals [VALUE_CHANGED] =
-    gtk_signal_new ("value_changed",
-                    GTK_RUN_FIRST, object_class->type, 
-                    GTK_SIGNAL_OFFSET (GNCDateDeltaClass,
-                                       value_changed),
-                    gtk_signal_default_marshaller,
-                    GTK_TYPE_NONE, 0);
+    g_signal_new ("value_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCDateDeltaClass, value_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
 
   date_delta_signals [UNITS_CHANGED] =
-    gtk_signal_new ("units_changed",
-                    GTK_RUN_FIRST, object_class->type, 
-                    GTK_SIGNAL_OFFSET (GNCDateDeltaClass,
-                                       units_changed),
-                    gtk_signal_default_marshaller,
-                    GTK_TYPE_NONE, 0);
+    g_signal_new ("units_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCDateDeltaClass, units_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
 
   date_delta_signals [POLARITY_CHANGED] =
-    gtk_signal_new ("polarity_changed",
-                    GTK_RUN_FIRST, object_class->type, 
-                    GTK_SIGNAL_OFFSET (GNCDateDeltaClass,
-                                       polarity_changed),
-                    gtk_signal_default_marshaller,
-                    GTK_TYPE_NONE, 0);
-
+    g_signal_new ("polarity_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCDateDeltaClass, polarity_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
+               
   date_delta_signals [DELTA_CHANGED] =
-    gtk_signal_new ("delta_changed",
-                    GTK_RUN_FIRST, object_class->type, 
-                    GTK_SIGNAL_OFFSET (GNCDateDeltaClass,
-                                       delta_changed),
-                    gtk_signal_default_marshaller,
-                    GTK_TYPE_NONE, 0);
-
-  gtk_object_class_add_signals (object_class, date_delta_signals,
-                                LAST_SIGNAL);
+    g_signal_new ("delta_changed",
+		  G_OBJECT_CLASS_TYPE (object_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCDateDeltaClass, delta_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
 
   container_class->forall = gnc_date_delta_forall;
-
-  class->value_changed    = NULL;
-  class->units_changed    = NULL;
-  class->polarity_changed = NULL;
-  class->delta_changed    = NULL;
 }
 
 static void
Index: dialog-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-utils.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/gnome-utils/dialog-utils.h -Lsrc/gnome-utils/dialog-utils.h -u -r1.9 -r1.10
--- src/gnome-utils/dialog-utils.h
+++ src/gnome-utils/dialog-utils.h
@@ -2,6 +2,7 @@
  * dialog-utils.h -- utility functions for creating dialogs         *
  *                   for GnuCash                                    *
  * Copyright (C) 1999-2000 Linas Vepstas                            *
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>         *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -26,8 +27,7 @@
 #define DIALOG_UTILS_H
 
 #include <glade/glade.h>
-#include <gnome.h>
-
+#include <gnome.h> 
 #include "Account.h"
 
 
@@ -52,26 +52,7 @@
 				   gint num_options);
 
 
-/********************************************************************\
- * Returns a GnomePixmap widget given a pixmap filename             *
- *                                                                  *
- * Args: Filename of pixmap file                                    *
- * Returns: GnomePixmap widget or NULL if there was a problem       *
- \*******************************************************************/
-GtkWidget * gnc_get_pixmap (const char *name);
-
-/********************************************************************\
- * Returns a GdkImlibImage object given a pixmap filename           *
- *                                                                  *
- * Args: Filename of pixmap file                                    *
- * Returns: GdkImlibImage or NULL if there was a problem            *
- \*******************************************************************/
-GdkImlibImage * gnc_get_gdk_imlib_image (const char *name);
-
-
 GtkToolbarStyle gnc_get_toolbar_style (void);
-GnomeMDIMode    gnc_get_mdi_mode(void);
-
 void gnc_get_deficit_color (GdkColor *color);
 void gnc_set_label_color (GtkWidget *label, gnc_numeric value);
 
@@ -85,7 +66,7 @@
  *       height - pointer to height                                 *
  * Returns: nothing                                                 *
  \*******************************************************************/
-void gnc_get_window_size (const char *prefix, int *width, int *height);
+void gnc_restore_window_size (const char *prefix, GtkWindow *window);
 
 /********************************************************************\
  * Save the window size into options whose names are determined     *
@@ -96,7 +77,7 @@
  *       height - height of the window to save                      *
  * Returns: nothing                                                 *
 \********************************************************************/
-void gnc_save_window_size (const char *prefix, int width, int height);
+void gnc_save_window_size (const char *section, GtkWindow *window);
 
 
 /********************************************************************\
@@ -111,7 +92,7 @@
 
 void gnc_option_menu_init (GtkWidget * option_menu);
 void gnc_option_menu_init_w_signal(GtkWidget * w,
-				   GtkSignalFunc f,
+				   GCallback f,
 				   gpointer cb_data);
 int  gnc_option_menu_get_active (GtkWidget * option_menu);
 
@@ -123,8 +104,6 @@
 \********************************************************************/
 void gnc_window_adjust_for_screen (GtkWindow * window);
 
-void gtk_window_present (GtkWindow * window); /* Remove me for GTK 2.0 */
-
 
 gboolean gnc_handle_date_accelerator (GdkEventKey *event,
                                       struct tm *tm,
@@ -150,33 +129,12 @@
 GladeXML * gnc_glade_xml_new (const char *filename, const char *root);
 GtkWidget * gnc_glade_lookup_widget (GtkWidget *widget, const char *name);
 void gnc_glade_autoconnect_full_func(const gchar *handler_name,
-				     GtkObject *signal_object,
+				     GObject *signal_object,
 				     const gchar *signal_name,
 				     const gchar *signal_data,
-				     GtkObject *connect_object,
+				     GObject *connect_object,
 				     gboolean after,
 				     gpointer user_data);
 
-/* Multibyte/wide char string helper functions. */
-
-/** Allocate new wide char string in dest_p. Return number of
- * wide chars or < 0 if error.  When the string is no longer
- * needed, free it with g_free().
- */
-gint         gnc_mbstowcs (GdkWChar **dest_p, const char *src);
-
-/** Return new multibyte string or NULL if failure. 
- * XXX how are we supposed to free this?? 
- * with g_free or something else ??
- */
-char *       gnc_wcstombs (const GdkWChar *src);
-
-/** Len of wide char string in chars */
-gint         gnc_wcslen   (const GdkWChar *src);
-
-/** Duplicate wide char string. 
- *  When the string is no longer needed, free it with g_free().
- */
-GdkWChar *   gnc_wcsdup   (const GdkWChar *src);
 
 #endif
Index: dialog-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-commodity.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/gnome-utils/dialog-commodity.c -Lsrc/gnome-utils/dialog-commodity.c -u -r1.17 -r1.18
--- src/gnome-utils/dialog-commodity.c
+++ src/gnome-utils/dialog-commodity.c
@@ -21,7 +21,9 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  ********************************************************************/
 
-/** @addtogroup UI
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GuiCommodity
     @{ */
 /** @file dialog-commodity.c
     @brief "select" and "new" commodity windows
@@ -36,14 +38,13 @@
 
 #include "dialog-commodity.h"
 #include "dialog-utils.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-gui-query.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "messages.h"
-#include "window-help.h"
 
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 struct select_commodity_window {
   GtkWidget * dialog;
@@ -100,9 +101,12 @@
 
 /* The commodity creation window */
 void gnc_ui_commodity_changed_cb(GtkWidget * dummy, gpointer user_data);
-void gnc_ui_commodity_ok_cb(GtkButton * button, gpointer user_data);
-void gnc_ui_commodity_help_cb(GtkButton * button, gpointer user_data);
 void gnc_ui_commodity_quote_info_cb(GtkWidget *w, gpointer data);
+gboolean gnc_ui_commodity_dialog_to_object(CommodityWindow * w);
+
+#if 0
+static void gnc_ui_select_commodity_response_cb (GtkDialog * dialog, gint response, gpointer data);
+#endif
 
 
 /********************************************************************
@@ -141,7 +145,7 @@
   win->default_mnemonic=mnemonic;
   
   if (parent)
-    gnome_dialog_set_parent(GNOME_DIALOG(win->dialog), GTK_WINDOW(parent));
+    gtk_window_set_transient_for (GTK_WINDOW (win->dialog), GTK_WINDOW (parent));
 
   if (user_message != NULL)
     initial = user_message;
@@ -165,14 +169,15 @@
   /* Run the dialog, handling the terminal conditions. */
   done = FALSE;
   while (!done) {
-    switch (value = gnome_dialog_run(GNOME_DIALOG(win->dialog))) {
-     case 0:	/* OK */
-      DEBUG("case 0");
+    switch (value = gtk_dialog_run(GTK_DIALOG(win->dialog))) {
+     case GTK_RESPONSE_OK:
+      DEBUG("case OK");
       retval = win->selection;
       done = TRUE;
       break;
-     case 1:	/* New */
-      DEBUG("case 1");
+     case GNC_RESPONSE_NEW:
+      DEBUG("case NEW");
+      gnc_ui_select_commodity_new_cb(NULL, win);
       break;
      default:	/* Cancel, Escape, Close, etc. */
       DEBUG("default: %d", value);
@@ -181,7 +186,7 @@
       break;
     }
   }
-  gnome_dialog_close(GNOME_DIALOG(win->dialog)); /* Close and destroy */
+  gtk_widget_destroy (GTK_WIDGET (win->dialog)); /* Close and destroy */
   g_free(win);
   
   return retval;
@@ -231,7 +236,14 @@
   retval->select_user_prompt = glade_xml_get_widget (xml, "select_user_prompt");
   retval->ok_button = glade_xml_get_widget (xml, "ok_button");
 
-  gtk_label_set_text ((GtkLabel *)retval->select_user_prompt, "");
+  gtk_label_set_text (GTK_LABEL (retval->select_user_prompt), "");
+
+#ifdef DRH
+  g_signal_connect (G_OBJECT (retval->dialog), "close",
+		    G_CALLBACK (select_commodity_close), retval);
+  g_signal_connect (G_OBJECT (retval->dialog), "response",
+		    G_CALLBACK (gnc_ui_select_commodity_response_cb), retval);
+#endif
 
   switch (mode) {
     case DIAG_COMM_ALL:
@@ -269,7 +281,7 @@
  *  Commodity Selection dialog.  It should not be used outside of the
  *  dialog-commodity.c file.
  *
- *  @param entry A pointer to the "new" button widget in the dialog.
+ *  @param button A pointer to the "new" button widget in the dialog.
  *
  *  @param user_data A pointer to the data structure describing the
  *  current state of the commodity picker.
@@ -333,7 +345,7 @@
 
   ok = (w->selection != NULL);
   gtk_widget_set_sensitive(w->ok_button, ok);
-  gnome_dialog_set_default(GNOME_DIALOG(w->dialog), ok ? 0 : 2);
+  gtk_dialog_set_default_response(GTK_DIALOG(w->dialog), ok ? 0 : 2);
   LEAVE("sensitive=%d, default = %d", ok, ok ? 0 : 2);
 }
 
@@ -425,6 +437,77 @@
  * gnc_ui_update_namespace_picker
  ********************************************************************/
 
+#if 0
+void
+gnc_ui_select_commodity_destroy(SelectCommodityWindow * w) {
+  g_return_if_fail (w != NULL);
+
+  gtk_widget_destroy (GTK_WIDGET (w->dialog));
+}
+
+/********************************************************************
+ * gnc_ui_select_commodity_ok_cb()
+ ********************************************************************/
+
+static void
+gnc_ui_select_commodity_response_cb (GtkDialog * dialog, gint response, gpointer data)
+{
+  SelectCommodityWindow * w = data;
+  const gchar *namespace;
+  const gchar *fullname;
+  gnc_commodity *commodity = NULL;
+
+  switch (response) {
+   case GTK_RESPONSE_OK:
+    namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+    fullname = gtk_entry_get_text (GTK_ENTRY (w->commodity_entry));
+
+    commodity = gnc_commodity_table_find_full (gnc_get_current_commodities (),
+					       namespace, fullname);
+
+    if (commodity != NULL) {
+      if (w->callback != NULL)
+	(w->callback) (commodity, w->callback_data);
+      gnc_ui_select_commodity_destroy (w);
+    } else {
+      gnc_warning_dialog (dialog,
+			 _("You must select a commodity.\n"
+			   "To create a new one, click \"New\""));
+    }
+    break;
+   case GNC_RESPONSE_NEW:
+    namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
+
+    commodity = gnc_ui_new_commodity_modal_full (namespace,
+						 w->dialog,
+						 w->default_exchange_code,
+						 w->default_fullname,
+						 w->default_mnemonic,
+						 w->default_fraction);
+    if (commodity != NULL) {
+      namespace =
+	gnc_ui_update_namespace_picker (w->namespace_combo,
+					gnc_commodity_get_namespace
+					(commodity), TRUE, FALSE);
+      gnc_ui_update_commodity_picker (w->commodity_combo,
+				      gnc_commodity_get_namespace (commodity),
+				      gnc_commodity_get_printname (commodity));
+    }
+    break;
+   default:
+    if (w->callback != NULL)
+      (w->callback) (NULL, w->callback_data);
+
+    gnc_ui_select_commodity_destroy (w);
+    break;
+  }
+}
+#endif
+
+/********************************************************************
+ * gnc_ui_update_namespace_picker
+ ********************************************************************/
+
 void
 gnc_ui_update_namespace_picker(GtkWidget * combobox, 
                                const char * init_string,
@@ -556,7 +639,7 @@
     ok = TRUE;
   }
   gtk_widget_set_sensitive(w->ok_button, ok);
-  gnome_dialog_set_default(GNOME_DIALOG(w->dialog), ok ? 0 : 1);
+  gtk_dialog_set_default_response(GTK_DIALOG(w->dialog), ok ? 0 : 1);
   LEAVE("sensitive=%d, default = %d", ok, ok ? 0 : 1);
 }
 
@@ -701,8 +784,8 @@
                                      retval );
 
   retval->dialog = glade_xml_get_widget (xml, "Commodity Dialog");
-  if (parent)
-    gnome_dialog_set_parent(GNOME_DIALOG(retval->dialog), GTK_WINDOW(parent));
+  if (parent != NULL)
+    gtk_window_set_transient_for (GTK_WINDOW (retval->dialog), GTK_WINDOW (parent));
   retval->edit_commodity = NULL;
 
   help_button = glade_xml_get_widget (xml, "help_button");
@@ -768,6 +851,10 @@
   }
 
 
+#ifdef DRH
+  g_signal_connect (G_OBJECT (retval->dialog), "close",
+		    G_CALLBACK (commodity_close), retval);
+#endif
   /* Fill in any data, top to bottom */
   
   gtk_entry_set_text (GTK_ENTRY (retval->fullname_entry), fullname ? fullname : "");
@@ -780,15 +867,6 @@
     gtk_spin_button_set_value (GTK_SPIN_BUTTON (retval->fraction_spinbutton),
 			       fraction);
 
-
-  /* Set up so <CR> activates default button */
-  gnome_dialog_editable_enters(GNOME_DIALOG(retval->dialog),
-			       GTK_EDITABLE(retval->fullname_entry));
-  gnome_dialog_editable_enters(GNOME_DIALOG(retval->dialog),
-			       GTK_EDITABLE(retval->mnemonic_entry));
-  gnome_dialog_editable_enters(GNOME_DIALOG(retval->dialog),
-			       GTK_EDITABLE(retval->code_entry));
-
   LEAVE(" ");
   return retval;
 }
@@ -875,15 +953,17 @@
   /* Run the dialog, handling the terminal conditions. */
   done = FALSE;
   while (!done) {
-    value = gnome_dialog_run(GNOME_DIALOG(win->dialog));
+    value = gtk_dialog_run(GTK_DIALOG(win->dialog));
     switch (value) {
-     case 0:	/* OK */
+     case GTK_RESPONSE_OK:
+      DEBUG("case OK");
+      done = gnc_ui_commodity_dialog_to_object(win);
       retval = win->edit_commodity;
-      done = TRUE;
-      DEBUG("case 0");
       break;
-     case 2:	/* Help */
-      DEBUG("case 2");
+     case GTK_RESPONSE_HELP:
+      DEBUG("case HELP");
+      if (help_callback)
+	help_callback ();
       break;
      default:	/* Cancel, Escape, Close, etc. */
       DEBUG("default: %d", value);
@@ -892,7 +972,7 @@
       break;
     }
   }
-  gnome_dialog_close(GNOME_DIALOG(win->dialog)); /* Close and destroy */
+  gtk_widget_destroy (GTK_WIDGET (win->dialog)); /* Close and destroy */
   g_free(win);
 
   LEAVE(" ");
@@ -959,20 +1039,19 @@
 
 
 /********************************************************************
- * gnc_ui_commodity_ok_cb()
+ * gnc_ui_commodity_dialog_to_object()
  ********************************************************************/
 
-void
-gnc_ui_commodity_ok_cb(GtkButton * button,
-                       gpointer user_data)
+gboolean
+gnc_ui_commodity_dialog_to_object(CommodityWindow * w)
 {
-  CommodityWindow * w = user_data;
   gnc_quote_source *source;
   QuoteSourceType type;
   const char * fullname  = gtk_entry_get_text(GTK_ENTRY(w->fullname_entry));
   const char * namespace = gnc_ui_namespace_picker_ns (w->namespace_combo);
   const char * mnemonic  = gtk_entry_get_text(GTK_ENTRY(w->mnemonic_entry));
   const char * code      = gtk_entry_get_text(GTK_ENTRY(w->code_entry));
+  QofBook * book = gnc_get_current_book ();
   int fraction = gtk_spin_button_get_value_as_int
     (GTK_SPIN_BUTTON(w->fraction_spinbutton));
   const char *string;
@@ -989,11 +1068,11 @@
       selection = gnc_option_menu_get_active (w->quote_tz_menu);
       string = gnc_timezone_menu_position_to_string(selection);
       gnc_commodity_set_quote_tz(c, string);
-      return;
+      return TRUE;
     }
     gnc_warning_dialog(w->dialog,
 		       _("You may not create a new national currency."));
-    return;
+    return FALSE;
   }
 
   if(fullname && fullname[0] &&
@@ -1005,11 +1084,11 @@
     if ((!w->edit_commodity && c) ||
         (w->edit_commodity && c && (c != w->edit_commodity))) {
       gnc_warning_dialog (w->dialog, _("That commodity already exists."));
-      return;
+      return FALSE;
     }
 
     if (!w->edit_commodity) {
-      c = gnc_commodity_new(fullname, namespace, mnemonic, code, fraction);
+      c = gnc_commodity_new(book, fullname, namespace, mnemonic, code, fraction);
       w->edit_commodity = c;
     }
     else {
@@ -1047,19 +1126,11 @@
 		       _("You must enter a non-empty \"Full name\", "
 			 "\"Symbol/abbreviation\",\n"
 			 "and \"Type\" for the commodity."));
+    return FALSE;
   }
   LEAVE(" ");
+  return TRUE;
 }
 
-
-/********************************************************************
- * gnc_ui_commodity_help_cb()
- ********************************************************************/
-
-void
-gnc_ui_commodity_help_cb(GtkButton * button,
-                         gpointer user_data)
-{
-  if (help_callback)
-    help_callback ();
-}
+/** @} */
+/** @} */
Index: gnc-html.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-html.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lsrc/gnome-utils/gnc-html.c -Lsrc/gnome-utils/gnc-html.c -u -r1.26 -r1.27
--- src/gnome-utils/gnc-html.c
+++ src/gnome-utils/gnc-html.c
@@ -46,19 +46,20 @@
 #include "Group.h"
 #include "dialog-utils.h"
 #include "print-session.h"
-#include "global-options.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-gpg.h"
 #include "gnc-gui-query.h"
 #include "gnc-html.h"
 #include "gnc-http.h"
 #include "gnc-html-history.h"
+#include "gnc-html-graph-gog.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "messages.h"
 
 
 struct gnc_html_struct {
+  GtkWidget   * window;            /* window this html goes into */
   GtkWidget   * container;         /* parent of the gtkhtml widget */
   GtkWidget   * html;              /* gtkhtml widget itself */
   gchar       * current_link;      /* link under mouse pointer */
@@ -84,7 +85,7 @@
 
 
 /* indicates the debugging module that this .o belongs to.  */
-static short module = MOD_HTML;
+static QofLogModule log_module = GNC_MOD_HTML;
 
 /* hashes for URLType -> protocol and protocol -> URLType */
 static GHashTable * gnc_html_type_to_proto_hash = NULL;
@@ -374,13 +375,19 @@
     { URL_TYPE_SCHEME, "gnc-scm" },
     { URL_TYPE_HELP, "gnc-help" },
     { URL_TYPE_XMLDATA, "gnc-xml" },
-    { URL_TYPE_ACTION, "gnc-action" },
     { URL_TYPE_PRICE, "gnc-price" },
+    { URL_TYPE_BUDGET, "gnc-budget" },
     { URL_TYPE_OTHER, "" },
     { NULL, NULL }};
 
+  PINFO( "initializing gnc_html..." );
+  printf( "initializing gnc_html...\n" );
+
   for (i = 0; types[i].type; i++)
     gnc_html_register_urltype (types[i].type, types[i].protocol);
+
+  // initialize graphing support
+  gnc_html_graph_gog_init();
 }
 
 
@@ -409,24 +416,12 @@
 http_allowed()
 {
   return TRUE;
-//return gnc_lookup_boolean_option("Network", "Allow http network access", 
-//                                 TRUE);
 }
 
 static gboolean
 https_allowed()
 {
   return TRUE;
-//return gnc_lookup_boolean_option("Network", "Allow https network access using OpenSSL", 
-//                                 TRUE);
-}
-
-static gboolean
-gnc_network_allowed()
-{
-  return FALSE;
-//return gnc_lookup_boolean_option("Network", "Enable GnuCash Network", 
-//                                 TRUE);
 }
 
 
@@ -444,16 +439,17 @@
   gnc_html * html = user_data; 
   URLType  type;
   char     * location = NULL;
-  char    ** p_location = &location;
   char     * label    = NULL;
   GList    * handles  = NULL;
-  GList   ** p_handles = &handles;
   GList    * current;
+  gpointer loc_tmp, handles_tmp;
   
   DEBUG("uri %s, ok %d, body %10.10s, body len %d", uri, completed_ok, body, body_len);
   g_hash_table_lookup_extended(html->request_info, uri, 
-                               (gpointer *)p_location, 
-                               (gpointer *)p_handles);
+                               &loc_tmp, &handles_tmp );
+
+  location = loc_tmp;
+  handles  = handles_tmp;
   
   /* handles will be NULL for an HTTP POST transaction, where we are
    * displaying the reply data. */
@@ -611,17 +607,19 @@
 
       if (!safe_strcmp (type, URL_TYPE_SECURE)) {
 	if(!https_allowed()) {
-	  gnc_error_dialog(NULL, _("Secure HTTP access is disabled.\n"
-			     "You can enable it in the Network section of\n"
-			     "the Preferences dialog."));
+	  gnc_error_dialog( html->window,
+                            _("Secure HTTP access is disabled.\n"
+                              "You can enable it in the Network section of\n"
+                              "the Preferences dialog."));
 	  break;
 	}
       }
 
       if(!http_allowed()) {
-	gnc_error_dialog(NULL, _("Network HTTP access is disabled.\n"
-			   "You can enable it in the Network section of\n"
-			   "the Preferences dialog."));
+	gnc_error_dialog( html->window,
+                          _("Network HTTP access is disabled.\n"
+                            "You can enable it in the Network section of\n"
+                            "the Preferences dialog."));
       } else {
 	char *fullurl;
       
@@ -895,49 +893,18 @@
   char     * location = NULL;
   char     * new_loc = NULL;
   char     * label = NULL;
-  char     ** action_parts;
   GHashTable * form_data;
   URLType  type;
-  GncHTMLActionCB cb;
 
   DEBUG(" ");
   form_data = gnc_html_unpack_form_data(encoded_form_data);
   type = gnc_html_parse_url(gnchtml, action, &location, &label);
   
-  if(!safe_strcmp (type, URL_TYPE_ACTION)) {
-    if(gnc_network_allowed()) {
-      if(gnc_html_action_handlers) {
-        action_parts = g_strsplit(location, "?", 2);
-        if(action_parts && action_parts[0]) {
-          gnc_html_merge_form_data(form_data, action_parts[1]);
-          cb = g_hash_table_lookup(gnc_html_action_handlers, action_parts[0]);
-          if(cb) {
-            cb(gnchtml, method, action_parts[0], form_data);
-          }
-          else {
-            PWARN ("no handler for gnc-network action '%s'\n",
-                   action ? action : "(null)");
-          }
-        }
-        else {
-          PWARN ("tried to split on ? but failed...\n");
-        }
-      }
-    }
-    else {
-      gnc_error_dialog(NULL, _("GnuCash Network is disabled and the link "
-                         "you have clicked requires it.\n"
-                         "You can enable it in the Network section\n"
-                         "of the Preferences dialog."));
-    }
+  if(!strcasecmp(method, "get")) {
+    gnc_html_generic_get_submit(gnchtml, action, form_data);
   }
-  else {
-    if(!strcasecmp(method, "get")) {
-      gnc_html_generic_get_submit(gnchtml, action, form_data);
-    }
-    else if(!strcasecmp(method, "post")) {
-      gnc_html_generic_post_submit(gnchtml, action, form_data);
-    }
+  else if(!strcasecmp(method, "post")) {
+    gnc_html_generic_post_submit(gnchtml, action, form_data);
   }
   
   g_free(location);
@@ -1038,11 +1005,10 @@
     if (!ok)
     {
       if (result.error_message)
-        gnc_error_dialog(NULL, result.error_message);
+        gnc_error_dialog( html->window, result.error_message);
       else
 	/* %s is a URL (some location somewhere). */
-        gnc_error_dialog(NULL,
-			 _("There was an error accessing %s."), location);
+        gnc_error_dialog( html->window, _("There was an error accessing %s."), location);
 
       if (html->load_cb)
         html->load_cb (html, result.url_type,
@@ -1100,18 +1066,20 @@
     do {
       if (!safe_strcmp (type, URL_TYPE_SECURE)) {
 	if(!https_allowed()) {
-	  gnc_error_dialog(NULL, _("Secure HTTP access is disabled.\n"
-			     "You can enable it in the Network section of\n"
-			     "the Preferences dialog."));
+	  gnc_error_dialog( html->window,
+                            _("Secure HTTP access is disabled.\n"
+                              "You can enable it in the Network section of\n"
+                              "the Preferences dialog."));
 	  break;
 	}
       }
 
       if (safe_strcmp (type, URL_TYPE_FILE)) {
 	if(!http_allowed()) {
-	  gnc_error_dialog(NULL, _("Network HTTP access is disabled.\n"
-			     "You can enable it in the Network section of\n"
-			     "the Preferences dialog."));
+	  gnc_error_dialog( html->window,
+                            _("Network HTTP access is disabled.\n"
+                              "You can enable it in the Network section of\n"
+                              "the Preferences dialog."));
 	  break;
 	}
       }
@@ -1129,13 +1097,6 @@
 
     } while (FALSE);
 
-  } else if (!safe_strcmp (type, URL_TYPE_ACTION)) {
-    gnc_html_history_append(html->history,
-                            gnc_html_history_node_new(type, location, label));
-    gnc_html_submit_cb(GTK_HTML(html->html), "get", 
-                       gnc_build_url(type, location, label), NULL,
-                       (gpointer)html);
-
   } else {
     PERR ("URLType %s not supported.", type);
   }
@@ -1170,10 +1131,11 @@
  ********************************************************************/
 
 gnc_html * 
-gnc_html_new(void)
+gnc_html_new( GtkWindow *parent )
 {
   gnc_html * retval = g_new0(gnc_html, 1);
   
+  retval->window    = GTK_WIDGET(parent);
   retval->container = gtk_scrolled_window_new(NULL, NULL);
   retval->html      = gtk_html_new();
 
@@ -1188,7 +1150,7 @@
   retval->http         = gnc_http_new();
   retval->history      = gnc_html_history_new();
 
-  gtk_widget_ref (retval->container);
+  g_object_ref (retval->container);
   gtk_object_sink (GTK_OBJECT (retval->container));
 
   /* signals */
@@ -1265,11 +1227,12 @@
   gnc_html_history_destroy(html->history);
 
   gtk_widget_destroy(html->container);
-  gtk_widget_unref(html->container);
+  g_object_unref(html->container);
 
   g_free(html->current_link);
   g_free(html->base_location);
 
+  html->window        = NULL;
   html->container     = NULL;
   html->html          = NULL;
   html->history       = NULL;
@@ -1336,7 +1299,7 @@
   if (!fh)
     return FALSE;
 
-  gtk_html_save (GTK_HTML(html->html), raw_html_receiver, fh);
+  gtk_html_save (GTK_HTML(html->html), GINT_TO_POINTER(raw_html_receiver), fh);
 
   fclose (fh);
 
@@ -1346,12 +1309,16 @@
 void
 gnc_html_print(gnc_html * html)
 {
-  PrintSession * ps = gnc_print_session_create(FALSE);
-  
-  gtk_html_print(GTK_HTML(html->html),
-                 GNOME_PRINT_CONTEXT(ps->meta));
-  gnc_print_session_done(ps, FALSE);
-  gnc_print_session_print(ps);
+  PrintSession *ps;
+
+  ps = gnc_print_session_create(FALSE);
+  if (ps == NULL) {
+    /* user cancelled */
+    return;
+  }
+
+  gtk_html_print(GTK_HTML(html->html), ps->context);
+  gnc_print_session_done(ps);
 }
 
 gnc_html_history * 
@@ -1396,7 +1363,7 @@
 
   if (!g_hash_table_lookup_extended(gnc_html_object_handlers,
                                     classid, 
-                                    (gpointer *)p_keyptr, 
+                                    (gpointer *)p_keyptr,
                                     (gpointer *)p_valptr))
     return;
 
Index: druid-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/druid-utils.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/druid-utils.c -Lsrc/gnome-utils/druid-utils.c -u -r1.3 -r1.4
--- src/gnome-utils/druid-utils.c
+++ src/gnome-utils/druid-utils.c
@@ -27,147 +27,117 @@
 #include "dialog-utils.h"
 #include "druid-utils.h"
 #include "gnc-engine-util.h"
-
-
-void
-gnc_druid_set_watermark_image (GnomeDruid *druid, char *image_path)
-{
-  GdkImlibImage *image;
-  GList         *pages = GNOME_DRUID(druid)->children;
-
-  while(pages != NULL) {
-
-    image = gnc_get_gdk_imlib_image(image_path); 
-
-    if (g_list_previous(pages) == NULL) {
-      gnome_druid_page_start_set_watermark
-        (GNOME_DRUID_PAGE_START(pages->data), image);
-    } else if (g_list_next(pages) == NULL) {
-      gnome_druid_page_finish_set_watermark
-        (GNOME_DRUID_PAGE_FINISH(pages->data), image);
-    } 
-
-    pages = g_list_next(pages);
-  }
-}
+#include "gnc-gnome-utils.h"
 
 void
-gnc_druid_set_title_image (GnomeDruid *druid, char *image_path)
+gnc_druid_set_watermark_images (GnomeDruid *druid,
+				const char *top_path,
+				const char *side_path)
 {
-  GtkWidget       *canvas;
-  GnomeCanvasItem *item;
-  GnomeCanvasItem *title_item;
-  GdkImlibImage   *image;
-  GList           *pages = GNOME_DRUID(druid)->children;
-	
-  while(pages != NULL) {
-
-    image = gnc_get_gdk_imlib_image(image_path); 
-
-    if (g_list_previous(pages) == NULL) {
-      canvas     = GNOME_DRUID_PAGE_START(pages->data)->canvas;
-      title_item = GNOME_DRUID_PAGE_START(pages->data)->title_item;
-    } else if (g_list_next(pages) == NULL) {
-      canvas     = GNOME_DRUID_PAGE_FINISH(pages->data)->canvas;
-      title_item = GNOME_DRUID_PAGE_FINISH(pages->data)->title_item;
+  GdkPixbuf     *top_pixbuf, *side_pixbuf;
+  GList         *page_list, *item;
+  GtkWidget     *page;
+
+  page_list = gtk_container_get_children(GTK_CONTAINER(druid));
+  top_pixbuf = gnc_gnome_get_gdkpixbuf(top_path);
+  side_pixbuf = gnc_gnome_get_gdkpixbuf(side_path);
+
+  for (item = page_list; item; item = g_list_next(item)) {
+    page = item->data;
+    if (GNOME_IS_DRUID_PAGE_EDGE (page)) {
+      GnomeDruidPageEdge *page_edge;
+
+      page_edge = GNOME_DRUID_PAGE_EDGE (page);
+      gnome_druid_page_edge_set_top_watermark (page_edge, top_pixbuf);
+      gnome_druid_page_edge_set_watermark (page_edge, side_pixbuf);
     } else {
-      canvas     = GNOME_DRUID_PAGE_STANDARD(pages->data)->canvas;
-      title_item = GNOME_DRUID_PAGE_STANDARD(pages->data)->title_item;
-    }
-
-    item = gnome_canvas_item_new (gnome_canvas_root (GNOME_CANVAS (canvas)),
-                                  gnome_canvas_image_get_type (),
-                                  "image", image,
-                                  "x", 0.0,
-                                  "y", 0.0,
-                                  "anchor", GTK_ANCHOR_NORTH_WEST,
-                                  "width", (gfloat) 462,
-                                  "height", (gfloat) 67,
-                                  NULL);
-
-    gnome_canvas_item_raise_to_top (title_item);
+      GnomeDruidPageStandard *page_standard;
 
-    pages = g_list_next(pages);
+      page_standard = GNOME_DRUID_PAGE_STANDARD (page);
+      gnome_druid_page_standard_set_top_watermark (page_standard, top_pixbuf);
+    }
   }
+
+  g_object_unref (G_OBJECT(side_pixbuf));
+  g_object_unref (G_OBJECT(top_pixbuf));
+  g_list_free(page_list);
 }
 
 void
 gnc_druid_set_logo_image (GnomeDruid *druid, char *image_path)
 {
-  GdkImlibImage   *image;
-  GList           *pages = GNOME_DRUID(druid)->children;
-	
-  while(pages != NULL) {
-
-    image = gnc_get_gdk_imlib_image(image_path); 
-
-    if (g_list_previous(pages) == NULL) {
-      gnome_druid_page_start_set_logo
-        (GNOME_DRUID_PAGE_START(pages->data), image);
-    } else if (g_list_next(pages) == NULL) {
-      gnome_druid_page_finish_set_logo
-        (GNOME_DRUID_PAGE_FINISH(pages->data), image);
+  GdkPixbuf     *logo_pixbuf;
+  GList         *page_list, *item;
+  GtkWidget     *page;
+
+  page_list = gtk_container_get_children(GTK_CONTAINER(druid));
+  logo_pixbuf = gnc_gnome_get_gdkpixbuf(image_path); 
+
+  for (item = page_list; item; item = g_list_next(item)) {
+    page = item->data;
+    if (GNOME_IS_DRUID_PAGE_EDGE (page))
+    {
+      GnomeDruidPageEdge *page_edge;
+
+      page_edge = GNOME_DRUID_PAGE_EDGE (page);
+      gnome_druid_page_edge_set_logo (page_edge, logo_pixbuf);
     } else {
-      gnome_druid_page_standard_set_logo
-        (GNOME_DRUID_PAGE_STANDARD(pages->data), image);
-    }
+      GnomeDruidPageStandard *page_standard;
 
-    pages = g_list_next(pages);
+      page_standard = GNOME_DRUID_PAGE_STANDARD (page);
+      gnome_druid_page_standard_set_logo (page_standard, logo_pixbuf);
+    }    
   }
+
+  g_object_unref (G_OBJECT(logo_pixbuf));
+  g_list_free(page_list);
 }
 
 void
 gnc_druid_set_colors (GnomeDruid *druid)
 {
-  GList *pages;
-  GdkColor color;
+  GList *pages = gtk_container_get_children (GTK_CONTAINER (druid));
+  GdkColor bluish;
+  GdkColor white;
   GdkColormap *cm;
 
   if (!druid) return;
   if (!GNOME_IS_DRUID (druid)) return;
 
-  color.red =   (gushort) (.60 * 65535);
-  color.green = (gushort) (.75 * 65535);
-  color.blue =  (gushort) (.60 * 65535);
+  bluish.red =   (gushort) (.40 * 65535);
+  bluish.green = (gushort) (.40 * 65535);
+  bluish.blue =  (gushort) (.60 * 65535);
+
+  white.red =   65535;
+  white.green = 65535;
+  white.blue =  65535;
 
   cm = gtk_widget_get_colormap (GTK_WIDGET (druid));
 
-  gdk_colormap_alloc_color(cm, &color, FALSE, TRUE);
-
-  pages = GNOME_DRUID(druid)->children;
+  gdk_colormap_alloc_color(cm, &bluish, FALSE, TRUE);
+  gdk_colormap_alloc_color(cm, &white, FALSE, TRUE);
 
   while (pages != NULL)
   {
     GnomeDruidPage *page = GNOME_DRUID_PAGE (pages->data);
 
-    if (GNOME_IS_DRUID_PAGE_START (page))
+    if (GNOME_IS_DRUID_PAGE_EDGE (page))
     {
-      GnomeDruidPageStart *page_start;
+      GnomeDruidPageEdge *page_edge;
 
-      page_start = GNOME_DRUID_PAGE_START (page);
-
-      gnome_druid_page_start_set_bg_color (page_start, &color);
-      gnome_druid_page_start_set_logo_bg_color (page_start, &color);
+      page_edge = GNOME_DRUID_PAGE_EDGE (page);
+      gnome_druid_page_edge_set_bg_color (page_edge, &bluish);
+      gnome_druid_page_edge_set_logo_bg_color (page_edge, &bluish);
     }
-    else if (GNOME_IS_DRUID_PAGE_STANDARD (page))
+    else 
     {
       GnomeDruidPageStandard *page_standard;
 
       page_standard = GNOME_DRUID_PAGE_STANDARD (page);
-
-      gnome_druid_page_standard_set_bg_color (page_standard, &color);
-      gnome_druid_page_standard_set_logo_bg_color (page_standard, &color);
-    }
-    else if (GNOME_IS_DRUID_PAGE_FINISH (page))
-    {
-      GnomeDruidPageFinish *page_finish;
-
-      page_finish = GNOME_DRUID_PAGE_FINISH (page);
-
-      gnome_druid_page_finish_set_bg_color (page_finish, &color);
-      gnome_druid_page_finish_set_logo_bg_color (page_finish, &color);
-    }
-
+      gnome_druid_page_standard_set_background (page_standard, &bluish);
+      gnome_druid_page_standard_set_logo_background (page_standard, &bluish);
+      gnome_druid_page_standard_set_title_foreground (page_standard, &white);
+    }    
     pages = g_list_next (pages);
   }
 }
Index: cursors.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/cursors.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/cursors.c -Lsrc/gnome-utils/cursors.c -u -r1.1 -r1.2
--- src/gnome-utils/cursors.c
+++ src/gnome-utils/cursors.c
@@ -22,6 +22,13 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
 \********************************************************************/
 
+/********************************************************************\
+ * 2003-03-16 TomF changes for gnucash-gnome2-dev, 8th batch	    *
+ * * src/gnome-utils/cursors.c					    *
+ *   Replace calls of deprecated gtk_container_get_toplevels by	    *
+ *   gtk_window_list_toplevels					    *
+\********************************************************************/
+
 #include "config.h"
 
 #include <gnome.h>
@@ -64,7 +71,7 @@
   }
 
   if (type != GNC_CURSOR_NORMAL)
-    gdk_cursor_destroy (cursor);
+    gdk_cursor_unref (cursor);
 }
 
 
@@ -85,9 +92,9 @@
     gnc_ui_set_cursor (w->window, GNC_CURSOR_BUSY, update_now);
   else
   {
-    GList *node;
+    GList *containerstop, *node;
 
-    for (node = gtk_container_get_toplevels (); node; node = node->next)
+    for (containerstop = node = gtk_window_list_toplevels (); node; node = node->next)
     {
       w = node->data;
 
@@ -96,6 +103,7 @@
 
       gnc_ui_set_cursor (w->window, GNC_CURSOR_BUSY, update_now);
     }
+    g_list_free (containerstop);
   }
 }
 
@@ -115,17 +123,18 @@
     gnc_ui_set_cursor (w->window, GNC_CURSOR_NORMAL, FALSE);
   else
   {
-    GList *node;
+    GList *containerstop, *node;
 
-    for (node = gtk_container_get_toplevels (); node; node = node->next)
+    for (containerstop = node = gtk_window_list_toplevels (); node; node = node->next)
     {
       w = GTK_WIDGET (node->data);
 
-      if (!w || !w->window)
+      if (!w || !GTK_IS_WIDGET (w) || GTK_WIDGET_NO_WINDOW(w))
         continue;
 
       gnc_ui_set_cursor (w->window, GNC_CURSOR_NORMAL, FALSE);
     }
+    g_list_free (containerstop);
   }
 }
 
Index: gnc-date-delta.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-delta.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/gnc-date-delta.h -Lsrc/gnome-utils/gnc-date-delta.h -u -r1.2 -r1.3
--- src/gnome-utils/gnc-date-delta.h
+++ src/gnome-utils/gnc-date-delta.h
@@ -33,9 +33,6 @@
 
 #include <gnome.h>
 
-BEGIN_GNOME_DECLS
-
-
 typedef enum {
   GNC_DATE_DELTA_DAYS,
   GNC_DATE_DELTA_WEEKS,
@@ -50,10 +47,10 @@
   GNC_DATE_DELTA_NUM_POLARITY
 } GNCDateDeltaPolarity;
 
-
-#define GNC_DATE_DELTA(obj)          GTK_CHECK_CAST (obj, gnc_date_delta_get_type(), GNCDateDelta)
-#define GNC_DATE_DELTA_CLASS(klass)  GTK_CHECK_CLASS_CAST (klass, gnc_date_delta_get_type(), GNCDateDeltaClass)
-#define GNC_IS_DATE_DELTA(obj)       GTK_CHECK_TYPE (obj, gnc_date_delta_get_type ())
+#define GNC_TYPE_DATE_DELTA           (gnc_date_delta_get_type())
+#define GNC_DATE_DELTA(obj)           G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_DATE_DELTA , GNCDateDelta)
+#define GNC_DATE_DELTA_CLASS(klass)   G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_DATE_DELTA, GNCDateDeltaClass)
+#define GNC_IS_DATE_DELTA(obj)        G_TYPE_CHECK_INSTANCE_TYPE (obj, GNC_TYPE_DATE_DELTA)
 
 typedef struct {
   GtkHBox hbox;
@@ -76,7 +73,7 @@
   void (*delta_changed) (GNCDateDelta *gdd);
 } GNCDateDeltaClass;
 
-guint gnc_date_delta_get_type (void);
+GType gnc_date_delta_get_type (void);
 
 GtkWidget *gnc_date_delta_new (gboolean show_polarity);
 
@@ -92,6 +89,4 @@
 
 void gnc_date_delta_show_polarity (GNCDateDelta *gdd, gboolean show_polarity);
 
-END_GNOME_DECLS
-
 #endif
Index: gnc-date-edit.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-edit.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome-utils/gnc-date-edit.c -Lsrc/gnome-utils/gnc-date-edit.c -u -r1.12 -r1.13
--- src/gnome-utils/gnc-date-edit.c
+++ src/gnome-utils/gnc-date-edit.c
@@ -57,8 +57,9 @@
 
 
 static void gnc_date_edit_init         (GNCDateEdit      *gde);
-static void gnc_date_edit_class_init   (GNCDateEditClass *class);
-static void gnc_date_edit_destroy      (GtkObject          *object);
+static void gnc_date_edit_class_init   (GNCDateEditClass *klass);
+static void gnc_date_edit_dispose      (GObject          *object);
+static void gnc_date_edit_finalize     (GObject          *object);
 static void gnc_date_edit_forall       (GtkContainer       *container,
                                         gboolean	    include_internals,
                                         GtkCallback	    callback,
@@ -76,24 +77,28 @@
  *
  * Returns the GtkType for the GNCDateEdit widget
  */
-guint
+GType
 gnc_date_edit_get_type (void)
 {
-	static guint date_edit_type = 0;
+	static GType date_edit_type = 0;
 
-	if (!date_edit_type){
-		GtkTypeInfo date_edit_info = {
-			"GNCDateEdit",
-			sizeof (GNCDateEdit),
+	if (date_edit_type == 0){
+		static const GTypeInfo date_edit_info = {
 			sizeof (GNCDateEditClass),
-			(GtkClassInitFunc) gnc_date_edit_class_init,
-			(GtkObjectInitFunc) gnc_date_edit_init,
 			NULL,
 			NULL,
+			(GClassInitFunc) gnc_date_edit_class_init,
+			NULL,
+			NULL,
+			sizeof (GNCDateEdit),
+			0, /* n_preallocs */
+			(GInstanceInitFunc) gnc_date_edit_init,
+			NULL,
 		};
 
-		date_edit_type = gtk_type_unique (gtk_hbox_get_type (),
-                                                  &date_edit_info);
+		date_edit_type = g_type_register_static (GTK_TYPE_HBOX,
+							"GNCDateEdit",
+							 &date_edit_info, 0);
 	}
 	
 	return date_edit_type;
@@ -146,7 +151,7 @@
 
 	qof_print_date_dmy_buff (buffer, 40, day, month + 1, year);
 	gtk_entry_set_text (GTK_ENTRY (gde->date_entry), buffer);
-	gtk_signal_emit (GTK_OBJECT (gde), date_edit_signals [DATE_CHANGED]);
+	g_signal_emit (G_OBJECT (gde), date_edit_signals [DATE_CHANGED], 0);
 }
 
 static void
@@ -176,7 +181,8 @@
 	    event->keyval != GDK_Escape)
 	  return date_accel_key_press(gde->date_entry, event, data);
 
-	gtk_signal_emit_stop_by_name (GTK_OBJECT (widget), "key_press_event");
+	gde = data;
+	g_signal_stop_emission_by_name (G_OBJECT (widget), "key_press_event");
 	hide_popup (gde);
 
 	return TRUE;
@@ -218,13 +224,18 @@
 {
 	gint x, y;
 	gint bwidth, bheight;
+	GtkRequisition req;
 
-	gtk_widget_size_request (gde->cal_popup, &gde->cal_popup->requisition);
+	gtk_widget_size_request (gde->cal_popup, &req);
 
 	gdk_window_get_origin (gde->date_button->window, &x, &y);
-	gdk_window_get_size (gde->date_button->window, &bwidth, &bheight);
 
-	x += bwidth - gde->cal_popup->requisition.width;
+	x += gde->date_button->allocation.x;
+	y += gde->date_button->allocation.y;
+	bwidth = gde->date_button->allocation.width;
+	bheight = gde->date_button->allocation.height;
+
+	x += bwidth - req.width;
 	y += bheight;
 
 	if (x < 0)
@@ -233,17 +244,16 @@
 	if (y < 0)
 		y = 0;
 
-	gtk_widget_set_uposition (gde->cal_popup, x, y);
+	gtk_window_move (GTK_WINDOW (gde->cal_popup), x, y);
 }
 
 static void
 select_clicked (GtkWidget *widget, GNCDateEdit *gde)
 {
 	struct tm mtm;
-        /*	GdkCursor *cursor; */
 
         /* This code is pretty much just copied from gtk_date_edit_get_date */
-      	scanDate (gtk_entry_get_text (GTK_ENTRY (gde->date_entry)),
+        qof_scan_date (gtk_entry_get_text (GTK_ENTRY (gde->date_entry)),
                   &mtm.tm_mday, &mtm.tm_mon, &mtm.tm_year);
 
         mtm.tm_mon--;
@@ -272,17 +282,6 @@
 	gtk_widget_grab_focus (gde->cal_popup);
 	gtk_grab_add (gde->cal_popup);
 
-#if 0
-	cursor = gnome_stock_cursor_new (GNOME_STOCK_CURSOR_DEFAULT);
-
-	gdk_pointer_grab (gde->cal_popup->window, TRUE,
-			  (GDK_BUTTON_PRESS_MASK
-			   | GDK_BUTTON_RELEASE_MASK
-			   | GDK_POINTER_MOTION_MASK),
-			  NULL, cursor, GDK_CURRENT_TIME);
-
-        gdk_cursor_destroy (cursor);
-#endif
 }
 
 typedef struct {
@@ -294,8 +293,7 @@
 set_time (GtkWidget *widget, hour_info_t *hit)
 {
 	gtk_entry_set_text (GTK_ENTRY (hit->gde->time_entry), hit->hour);
-	gtk_signal_emit (GTK_OBJECT (hit->gde),
-                         date_edit_signals [TIME_CHANGED]);
+	g_signal_emit (G_OBJECT (hit->gde), date_edit_signals [TIME_CHANGED], 0);
 }
 
 static void
@@ -341,11 +339,11 @@
 		item = gtk_menu_item_new_with_label (buffer);
 		gtk_menu_append (GTK_MENU (menu), item);
 #if 0
-		gtk_signal_connect (GTK_OBJECT (item), "activate",
-				    GTK_SIGNAL_FUNC (set_time), hit);
+		g_signal_connect (G_OBJECT (item), "activate",
+				  G_CALLBACK  (set_time), hit);
 #endif
-		gtk_signal_connect (GTK_OBJECT (item), "destroy",
-				    GTK_SIGNAL_FUNC (free_resources), hit);
+		g_signal_connect (G_OBJECT (item), "destroy",
+				  G_CALLBACK  (free_resources), hit);
 		gtk_widget_show (item);
 
 		submenu = gtk_menu_new ();
@@ -366,10 +364,10 @@
 
 			mins = gtk_menu_item_new_with_label (buffer);
 			gtk_menu_append (GTK_MENU (submenu), mins);
-			gtk_signal_connect (GTK_OBJECT (mins), "activate",
-					    GTK_SIGNAL_FUNC (set_time), hit);
-			gtk_signal_connect (GTK_OBJECT (item), "destroy",
-					    GTK_SIGNAL_FUNC (free_resources),
+			g_signal_connect (G_OBJECT (mins), "activate",
+					  G_CALLBACK  (set_time), hit);
+			g_signal_connect (G_OBJECT (item), "destroy",
+					  G_CALLBACK  (free_resources),
                                             hit);
 			gtk_widget_show (mins);
 		}
@@ -377,52 +375,68 @@
 }
 
 static void
-gnc_date_edit_class_init (GNCDateEditClass *class)
+gnc_date_edit_class_init (GNCDateEditClass *klass)
 {
-	GtkObjectClass *object_class = (GtkObjectClass *) class;
-	GtkContainerClass *container_class = (GtkContainerClass *) class;
-
-	object_class = (GtkObjectClass*) class;
+	GtkContainerClass *container_class = (GtkContainerClass *) klass;
+	GObjectClass *object_class = (GObjectClass *) klass;
 
-	parent_class = gtk_type_class (gtk_hbox_get_type ());
+	object_class = (GObjectClass*) klass;
+	
+	parent_class = g_type_class_ref(GTK_TYPE_HBOX);
 
 	date_edit_signals [TIME_CHANGED] =
-		gtk_signal_new ("time_changed",
-				GTK_RUN_FIRST, object_class->type, 
-				GTK_SIGNAL_OFFSET (GNCDateEditClass,
-                                                   time_changed),
-				gtk_signal_default_marshaller,
-                                GTK_TYPE_NONE, 0);
+		g_signal_new ("time_changed",
+			      G_TYPE_FROM_CLASS (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (GnomeDateEditClass, time_changed),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE, 0);
 
 	date_edit_signals [DATE_CHANGED] =
-		gtk_signal_new ("date_changed",
-				GTK_RUN_FIRST, object_class->type, 
-				GTK_SIGNAL_OFFSET (GNCDateEditClass,
-                                                   date_changed),
-				gtk_signal_default_marshaller,
-                                GTK_TYPE_NONE, 0);
-	
-	gtk_object_class_add_signals (object_class, date_edit_signals,
-                                      LAST_SIGNAL);
+		g_signal_new ("date_changed",
+			      G_TYPE_FROM_CLASS (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (GnomeDateEditClass, date_changed),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE, 0);
 
 	container_class->forall = gnc_date_edit_forall;
 
-	object_class->destroy = gnc_date_edit_destroy;
+	object_class->dispose = gnc_date_edit_dispose;
+	object_class->finalize = gnc_date_edit_finalize;
 
-	class->date_changed = NULL;
-	class->time_changed = NULL;
+	klass->date_changed = NULL;
+	klass->time_changed = NULL;
 }
 
 static void
 gnc_date_edit_init (GNCDateEdit *gde)
 {
+	gde->disposed = FALSE;
 	gde->lower_hour = 7;
 	gde->upper_hour = 19;
 	gde->flags = GNC_DATE_EDIT_SHOW_TIME;
 }
 
 static void
-gnc_date_edit_destroy (GtkObject *object)
+gnc_date_edit_finalize (GObject *object)
+{
+	GNCDateEdit *gde;
+
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (GNC_IS_DATE_EDIT (object));
+
+	gde = GNC_DATE_EDIT (object);
+
+
+	if (G_OBJECT_CLASS (parent_class)->finalize)
+		(* G_OBJECT_CLASS (parent_class)->finalize) (object);
+}
+
+static void
+gnc_date_edit_dispose (GObject *object)
 {
 	GNCDateEdit *gde;
 
@@ -431,10 +445,27 @@
 
 	gde = GNC_DATE_EDIT (object);
 
-	gtk_widget_destroy (gde->cal_popup);
+	if(gde->disposed)
+		return;
+
+	gde->disposed = TRUE;
+
+	/* Only explicitly destroy the toplevel elements */
+
+	gtk_widget_destroy (GTK_WIDGET(gde->date_entry));
+	gde->date_entry = NULL;
+
+	gtk_widget_destroy (GTK_WIDGET(gde->date_button));
+	gde->date_button= NULL;
 
-	if (GTK_OBJECT_CLASS (parent_class)->destroy)
-		(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+	gtk_widget_destroy (GTK_WIDGET(gde->time_entry));
+	gde->time_entry = NULL;
+
+	gtk_widget_destroy (GTK_WIDGET(gde->time_popup));
+	gde->time_popup = NULL;
+
+	if (G_OBJECT_CLASS (parent_class)->dispose)
+		(* G_OBJECT_CLASS (parent_class)->dispose) (object);
 }
 
 static void
@@ -529,7 +560,7 @@
 date_accel_key_press(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
 	GNCDateEdit *gde = data;
-        char *string;
+  	G_CONST_RETURN char *string;
         struct tm tm;
 
         string = gtk_entry_get_text (GTK_ENTRY (widget));
@@ -548,6 +579,7 @@
                                    1900 + tm.tm_year);
         gtk_calendar_select_day (GTK_CALENDAR (gde->calendar), tm.tm_mday);
 
+	g_signal_emit (G_OBJECT (gde), date_edit_signals [TIME_CHANGED], 0);
         return TRUE;
 }
 
@@ -577,7 +609,7 @@
 	gtk_signal_emit (GTK_OBJECT (gde), date_edit_signals [DATE_CHANGED]);
 	gtk_signal_emit (GTK_OBJECT (gde), date_edit_signals [TIME_CHANGED]);
 
-        return TRUE;
+        return FALSE;
 }
 
 static void
@@ -588,22 +620,22 @@
 	GtkWidget *arrow;
 
 	gde->date_entry  = gtk_entry_new ();
-	gtk_widget_set_usize (gde->date_entry, 90, 0);
+	gtk_entry_set_width_chars (GTK_ENTRY (gde->date_entry), 11);
 	gtk_box_pack_start (GTK_BOX (gde), gde->date_entry, TRUE, TRUE, 0);
-	gtk_widget_show (gde->date_entry);
-	gtk_signal_connect (GTK_OBJECT (gde->date_entry), "key_press_event",
-			    GTK_SIGNAL_FUNC(key_press_entry), gde);
-	gtk_signal_connect (GTK_OBJECT (gde->date_entry), "focus_out_event",
-			    GTK_SIGNAL_FUNC(date_focus_out_event), gde);
+	gtk_widget_show (GTK_WIDGET(gde->date_entry));
+	g_signal_connect (G_OBJECT (gde->date_entry), "key_press_event",
+			  G_CALLBACK (key_press_entry), gde);
+	g_signal_connect (G_OBJECT (gde->date_entry), "focus_out_event",
+			  G_CALLBACK (date_focus_out_event), gde);
 
 	gde->date_button = gtk_button_new ();
-	gtk_signal_connect (GTK_OBJECT (gde->date_button), "clicked",
-			    GTK_SIGNAL_FUNC (select_clicked), gde);
+	g_signal_connect (G_OBJECT (gde->date_button), "clicked",
+			  G_CALLBACK  (select_clicked), gde);
 	gtk_box_pack_start (GTK_BOX (gde), gde->date_button, FALSE, FALSE, 0);
 
 	hbox = gtk_hbox_new (FALSE, 3);
 	gtk_container_add (GTK_CONTAINER (gde->date_button), hbox);
-	gtk_widget_show (hbox);
+	gtk_widget_show (GTK_WIDGET(hbox));
 
 	/* Calendar label, only shown if the date editor has a time field */
 
@@ -611,16 +643,16 @@
 	gtk_misc_set_alignment (GTK_MISC (gde->cal_label), 0.0, 0.5);
 	gtk_box_pack_start (GTK_BOX (hbox), gde->cal_label, TRUE, TRUE, 0);
 	if (gde->flags & GNC_DATE_EDIT_SHOW_TIME)
-		gtk_widget_show (gde->cal_label);
+		gtk_widget_show (GTK_WIDGET(gde->cal_label));
 
 	arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
-	gtk_box_pack_start (GTK_BOX (hbox), arrow, FALSE, FALSE, 0);
-	gtk_widget_show (arrow);
+	gtk_box_pack_start (GTK_BOX (hbox), arrow, TRUE, FALSE, 0);
+	gtk_widget_show (GTK_WIDGET(arrow));
 
-	gtk_widget_show (gde->date_button);
+	gtk_widget_show (GTK_WIDGET(gde->date_button));
 
 	gde->time_entry = gtk_entry_new_with_max_length (12);
-	gtk_widget_set_usize (gde->time_entry, 88, 0);
+	gtk_widget_set_usize (GTK_WIDGET(gde->time_entry), 88, 0);
 	gtk_box_pack_start (GTK_BOX (gde), gde->time_entry, TRUE, TRUE, 0);
 
 	gde->time_popup = gtk_option_menu_new ();
@@ -630,25 +662,25 @@
 	 * realized, so that it uses the values that the user might supply in a
 	 * future call to gnc_date_edit_set_popup_range
 	 */
-	gtk_signal_connect (GTK_OBJECT (gde), "realize",
-			    GTK_SIGNAL_FUNC (fill_time_popup), gde);
+	g_signal_connect (G_OBJECT (gde), "realize",
+			  G_CALLBACK  (fill_time_popup), gde);
 
 	if (gde->flags & GNC_DATE_EDIT_SHOW_TIME) {
-		gtk_widget_show (gde->time_entry);
-		gtk_widget_show (gde->time_popup);
+		gtk_widget_show (GTK_WIDGET(gde->time_entry));
+		gtk_widget_show (GTK_WIDGET(gde->time_popup));
 	}
 
 	gde->cal_popup = gtk_window_new (GTK_WINDOW_POPUP);
-	gtk_widget_set_events (gde->cal_popup,
-			       gtk_widget_get_events (gde->cal_popup) |
+	gtk_widget_set_events (GTK_WIDGET(gde->cal_popup),
+			       gtk_widget_get_events (GTK_WIDGET(gde->cal_popup)) |
                                GDK_KEY_PRESS_MASK);
-	gtk_signal_connect (GTK_OBJECT (gde->cal_popup), "delete_event",
+	g_signal_connect (G_OBJECT (gde->cal_popup), "delete_event",
 			    (GtkSignalFunc) delete_popup,
 			    gde);
-	gtk_signal_connect (GTK_OBJECT (gde->cal_popup), "key_press_event",
+	g_signal_connect (G_OBJECT (gde->cal_popup), "key_press_event",
 			    (GtkSignalFunc) key_press_popup,
 			    gde);
-	gtk_signal_connect (GTK_OBJECT (gde->cal_popup), "button_press_event",
+	g_signal_connect (G_OBJECT (gde->cal_popup), "button_press_event",
 			    (GtkSignalFunc) button_press_popup,
 			    gde);
 	gtk_window_set_policy (GTK_WINDOW (gde->cal_popup),
@@ -657,7 +689,7 @@
 	frame = gtk_frame_new (NULL);
 	gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
 	gtk_container_add (GTK_CONTAINER (gde->cal_popup), frame);
-	gtk_widget_show (frame);
+	gtk_widget_show (GTK_WIDGET(frame));
 
 	gde->calendar = gtk_calendar_new ();
 	gtk_calendar_display_options
@@ -666,13 +698,13 @@
                   | GTK_CALENDAR_SHOW_HEADING
                   | ((gde->flags & GNC_DATE_EDIT_WEEK_STARTS_ON_MONDAY)
                      ? GTK_CALENDAR_WEEK_START_MONDAY : 0)));
-	gtk_signal_connect (GTK_OBJECT (gde->calendar), "day_selected",
-			    GTK_SIGNAL_FUNC (day_selected), gde);
-	gtk_signal_connect (GTK_OBJECT (gde->calendar),
+	g_signal_connect (G_OBJECT (gde->calendar), "day_selected",
+			  G_CALLBACK  (day_selected), gde);
+	g_signal_connect (G_OBJECT (gde->calendar),
                             "day_selected_double_click",
-			    GTK_SIGNAL_FUNC (day_selected_double_click), gde);
+			  G_CALLBACK  (day_selected_double_click), gde);
 	gtk_container_add (GTK_CONTAINER (frame), gde->calendar);
-        gtk_widget_show (gde->calendar);
+        gtk_widget_show (GTK_WIDGET(gde->calendar));
 }
 
 /**
@@ -701,6 +733,23 @@
         return gnc_date_edit_new (the_time.tv_sec, show_time, use_24_format);
 }
 
+
+/*
+ * Create a new GncDateEdit widget from a glade file.  The widget
+ * generated is set to today's date, and will not show a time as part
+ * of the date.  This function does not use any of the arguments
+ * passed by glade.
+ */
+GtkWidget *
+gnc_date_edit_new_glade (gchar *widget_name,
+			 gchar *string1, gchar *string2,
+			 gint int1, gint int2)
+{
+	/* None of the standard glade arguments are used. */
+        return gnc_date_edit_new(time(NULL), FALSE, FALSE);
+}
+
+
 /**
  * gnc_date_edit_new_flags:
  * @the_time: The initial time for the date editor.
@@ -715,7 +764,7 @@
 {
 	GNCDateEdit *gde;
 
-	gde = gtk_type_new (gnc_date_edit_get_type ());
+	gde = g_object_new (GNC_TYPE_DATE_EDIT, NULL, NULL);
 
 	gde->flags = flags;
 	create_children (gde);
@@ -734,7 +783,7 @@
 	g_assert(gde != NULL);
 	g_assert(GNC_IS_DATE_EDIT(gde));
 
-      	scanDate (gtk_entry_get_text (GTK_ENTRY (gde->date_entry)),
+      qof_scan_date (gtk_entry_get_text (GTK_ENTRY (gde->date_entry)),
                   &tm.tm_mday, &tm.tm_mon, &tm.tm_year);
 
 	tm.tm_mon--;
@@ -746,7 +795,7 @@
 		tm.tm_year -= 1900;
 
 	if (gde->flags & GNC_DATE_EDIT_SHOW_TIME) {
-		char *tokp, *temp;
+		char *tokp = NULL, *temp;
 
 		str = g_strdup (gtk_entry_get_text
                                 (GTK_ENTRY (gde->time_entry)));
@@ -918,22 +967,21 @@
 }
 
 /**
- * gnc_date_editable_enters:
- * @dialog: The gnome dialog this date editor lives in
+ * gnc_date_set_activates_default:
  * @gde: The date editor to modity
+ * @state: The new state for this widget.
  * 
  * Extracts the editable field from a GNCDateEdit widget, and sets it
  * up so that pressing the Enter key in this field as the same as
  * clicking the button that has the default.
  **/
 void
-gnc_date_editable_enters (GnomeDialog *dialog, GNCDateEdit *gde)
+gnc_date_editable_enters (GNCDateEdit *gde, gboolean state)
 {
-	if (!dialog || !gde)
+	if (!gde)
 		return;
 
-	gnome_dialog_editable_enters(GNOME_DIALOG(dialog),
-				     GTK_EDITABLE(gde->date_entry));
+    gtk_entry_set_activates_default(GTK_ENTRY(gde->date_entry), state);
 }
 
 
Index: gnc-general-select.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-general-select.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/gnome-utils/gnc-general-select.c -Lsrc/gnome-utils/gnc-general-select.c -u -r1.3 -r1.4
--- src/gnome-utils/gnc-general-select.c
+++ src/gnome-utils/gnc-general-select.c
@@ -45,7 +45,8 @@
 
 static void gnc_general_select_init         (GNCGeneralSelect      *gsl);
 static void gnc_general_select_class_init   (GNCGeneralSelectClass *class);
-static void gnc_general_select_destroy      (GtkObject             *object);
+static void gnc_general_select_dispose      (GObject               *object);
+static void gnc_general_select_finalize     (GObject               *object);
 
 static GtkHBoxClass *parent_class;
 static guint general_select_signals[LAST_SIGNAL];
@@ -56,24 +57,28 @@
  *
  * Returns the GtkType for the GNCGeneralSelect widget
  */
-guint
+GType
 gnc_general_select_get_type (void)
 {
-	static guint general_select_type = 0;
+	static GType general_select_type = 0;
 
-	if (!general_select_type){
-		GtkTypeInfo general_select_info = {
-			"GNCGeneralSelect",
-			sizeof (GNCGeneralSelect),
+	if (general_select_type == 0) {
+		static const GTypeInfo general_select_info = {
 			sizeof (GNCGeneralSelectClass),
-			(GtkClassInitFunc) gnc_general_select_class_init,
-			(GtkObjectInitFunc) gnc_general_select_init,
 			NULL,
 			NULL,
+			(GClassInitFunc) gnc_general_select_class_init,
+			NULL,
+			NULL,
+			sizeof (GNCGeneralSelect),
+			0,
+			(GInstanceInitFunc) gnc_general_select_init,
+			NULL,
 		};
 
-		general_select_type = gtk_type_unique (gtk_hbox_get_type (),
-                                                       &general_select_info);
+		general_select_type = g_type_register_static(GTK_TYPE_HBOX,
+							"GNCGeneralSelect",
+							 &general_select_info, 0);
 	}
 
 	return general_select_type;
@@ -104,29 +109,27 @@
 static void
 gnc_general_select_class_init (GNCGeneralSelectClass *klass)
 {
-	GtkObjectClass *object_class = (GtkObjectClass *) klass;
+	GObjectClass *object_class = (GObjectClass *) klass;
 	GtkContainerClass *container_class = (GtkContainerClass *) klass;
 
-	object_class = (GtkObjectClass*) klass;
+	object_class = (GObjectClass*) klass;
 
-	parent_class = gtk_type_class (gtk_hbox_get_type ());
+	parent_class = g_type_class_ref(GTK_TYPE_HBOX);
 
         general_select_signals[SELECTION_CHANGED] =
-                gtk_signal_new("changed",
-                               GTK_RUN_FIRST,
-                               object_class->type,
-                               GTK_SIGNAL_OFFSET(GNCGeneralSelectClass,
-                                                 changed),
-                               gtk_marshal_NONE__NONE,
-                               GTK_TYPE_NONE, 0);
-
-        gtk_object_class_add_signals(object_class,
-                                     general_select_signals,
-                                     LAST_SIGNAL);
+                g_signal_new("changed",
+                               G_TYPE_FROM_CLASS(object_class),
+                               G_SIGNAL_RUN_FIRST,
+                               G_STRUCT_OFFSET(GNCGeneralSelectClass,
+                                                changed),
+                               NULL, NULL,
+                               g_cclosure_marshal_VOID__VOID,
+                               G_TYPE_NONE, 0);
 
 	container_class->forall = gnc_general_select_forall;
 
-	object_class->destroy = gnc_general_select_destroy;
+	object_class->dispose = gnc_general_select_dispose;
+	object_class->finalize = gnc_general_select_finalize;
 
         klass->changed = NULL;
 }
@@ -134,11 +137,12 @@
 static void
 gnc_general_select_init (GNCGeneralSelect *gsl)
 {
+        gsl->disposed = FALSE;
         gsl->selected_item = NULL;
 }
 
 static void
-gnc_general_select_destroy (GtkObject *object)
+gnc_general_select_finalize (GObject *object)
 {
         GNCGeneralSelect *gsl;
 
@@ -147,11 +151,36 @@
 
         gsl = GNC_GENERAL_SELECT (object);
 
+
+	if (G_OBJECT_CLASS (parent_class)->finalize)
+		G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
+static void
+gnc_general_select_dispose (GObject *object)
+{
+        GNCGeneralSelect *gsl;
+
+	g_return_if_fail (object != NULL);
+	g_return_if_fail (GNC_IS_GENERAL_SELECT (object));
+
+        gsl = GNC_GENERAL_SELECT (object);
+
+        if(gsl->disposed)
+                return;
+
+        gsl->disposed = TRUE;
+
+
+        gtk_widget_destroy(GTK_WIDGET(gsl->entry));
         gsl->entry = NULL;
+
+        gtk_widget_destroy(GTK_WIDGET(gsl->button));
         gsl->button = NULL;
 
-	if (GTK_OBJECT_CLASS (parent_class)->destroy)
-		GTK_OBJECT_CLASS (parent_class)->destroy (object);
+
+	if (G_OBJECT_CLASS (parent_class)->dispose)
+		G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
 static void
@@ -189,8 +218,8 @@
 	  gsl->button = gtk_button_new_with_label (_("View..."));
 
 	gtk_box_pack_start (GTK_BOX (gsl), gsl->button, FALSE, FALSE, 0);
-        gtk_signal_connect (GTK_OBJECT (gsl->button), "clicked",
-                            select_cb, gsl);
+	g_signal_connect (G_OBJECT (gsl->button), "clicked",
+			  G_CALLBACK (select_cb), gsl);
         gtk_widget_show (gsl->button);
 }
 
@@ -212,7 +241,7 @@
 	g_return_val_if_fail (get_string != NULL, NULL);
 	g_return_val_if_fail (new_select != NULL, NULL);
 
-	gsl = gtk_type_new (gnc_general_select_get_type ());
+	gsl = g_object_new(GNC_TYPE_GENERAL_SELECT, NULL, NULL);
 
 	create_children (gsl, type);
 	gsl->get_string = get_string;
Index: dialog-commodity.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-commodity.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-utils/dialog-commodity.h -Lsrc/gnome-utils/dialog-commodity.h -u -r1.6 -r1.7
--- src/gnome-utils/dialog-commodity.h
+++ src/gnome-utils/dialog-commodity.h
@@ -21,7 +21,9 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  ********************************************************************/
 
-/** @addtogroup UI
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup GuiCommodity Commodity windows
     @{ */
 /** @file dialog-commodity.h
     @brief "select" and "new" commodity windows
@@ -34,7 +36,6 @@
 #include <gnome.h>
 
 #include "gnc-commodity.h"
-#include "gnc-engine.h"
 
 /** The dialog commodity types are used to determine what commodity
  *  namespaces the currency dialog will present to a user.  These
@@ -185,8 +186,7 @@
  */
 gnc_commodity * 
 gnc_ui_new_commodity_modal(const char * default_namespace, 
-                           GtkWidget * parent
-			   );
+                           GtkWidget * parent);
 
 /** Allow the user to edit the information about a commodity.  For
  *  currencies, only the price quote information may be changed.  For
@@ -259,3 +259,4 @@
 
 #endif
 /** @} */
+/** @} */
--- src/gnome-utils/gtkselect.c
+++ /dev/null
@@ -1,849 +0,0 @@
-/* gtkselect.c - select widget for gtk+
- * Copyright 1997 Paolo Molaro (from gtkcombo, where this was copied from)
- * Copyright 2000 Gordon Oliver
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include <string.h>
-
-#include "gtk/gtkarrow.h"
-#include "gtk/gtklabel.h"
-#include "gtk/gtklist.h"
-#include "gtk/gtkeventbox.h"
-#include "gtk/gtkbutton.h"
-#include "gtk/gtklistitem.h"
-#include "gtk/gtkscrolledwindow.h"
-#include "gtk/gtkmain.h"
-#include "gtk/gtksignal.h"
-#include "gtk/gtkwindow.h"
-#include "gdk/gdkkeysyms.h"
-#include "gtkselect.h"
-#include "gtk/gtkframe.h"
-#include "gtk/gtkbin.h"
-
-#define SELECT_LIST_MAX_HEIGHT	(400)
-#define	EMPTY_LIST_HEIGHT	(15)
-
-static void         gtk_select_class_init      (GtkSelectClass *klass);
-static void         gtk_select_init            (GtkSelect      *select);
-static void         gtk_select_destroy         (GtkObject     *select);
-static void         gtk_select_get_pos         (GtkSelect      *select, 
-                                               gint          *x, 
-                                               gint          *y, 
-                                               gint          *height, 
-                                               gint          *width);
-static void         gtk_select_popup_list      (GtkSelect      *select);
-static void         gtk_select_popup_button_press (GtkWidget        *button,
-						  GdkEventButton   *event,
-						  GtkSelect         *select);
-static void         gtk_select_popup_button_leave (GtkWidget        *button,
-						  GdkEventCrossing *event,
-						  GtkSelect         *select);
-static void         gtk_select_update_entry    (GtkList       *list, 
-                                               GtkSelect      *select);
-static gint         gtk_select_button_press    (GtkWidget     *widget,
-				               GdkEvent      *event,
-				               GtkSelect      *select);
-static gint         gtk_select_button_release  (GtkWidget     *widget,
-				               GdkEvent      *event,
-				               GtkSelect      *select);
-static gint         gtk_select_list_enter      (GtkWidget        *widget,
-				               GdkEventCrossing *event,
-				               GtkSelect         *select);
-static gint         gtk_select_list_key_press  (GtkWidget     *widget, 
-                                               GdkEventKey   *event, 
-                                               GtkSelect      *select);
-#if 0
-static gint         gtk_select_entry_key_press (GtkEntry      *widget, 
-                                               GdkEventKey   *event, 
-                                               GtkSelect      *select);
-#endif
-static void         gtk_select_size_allocate   (GtkWidget     *widget,
-					       GtkAllocation *allocation);
-
-static GtkHBoxClass *parent_class = NULL;
-
-static void
-gtk_select_class_init (GtkSelectClass * klass)
-{
-  GtkObjectClass *oclass;
-  GtkWidgetClass *widget_class;
-
-  parent_class = gtk_type_class (gtk_hbox_get_type ());
-  oclass = (GtkObjectClass *) klass;
-  widget_class = (GtkWidgetClass *) klass;
-
-  oclass->destroy = gtk_select_destroy;
-  
-  widget_class->size_allocate = gtk_select_size_allocate;
-}
-
-static void
-gtk_select_destroy (GtkObject * select)
-{
-  gtk_widget_destroy (GTK_SELECT (select)->popwin);
-  gtk_widget_unref (GTK_SELECT (select)->popwin);
-  gtk_widget_unref (GTK_SELECT (select)->empty);
-
-  if (GTK_OBJECT_CLASS (parent_class)->destroy)
-    (*GTK_OBJECT_CLASS (parent_class)->destroy) (select);
-}
-
-#if 0
-static int
-gtk_select_entry_key_press (GtkEntry * entry, GdkEventKey * event, GtkSelect * select)
-{
-  GList *li;
-
-  return FALSE;
-  if (!select->use_arrows || !GTK_LIST (select->list)->children)
-    return FALSE;
-
-  li = NULL;
-  //li = g_list_find (GTK_LIST (select->list)->children, gtk_select_find (select));
-
-  if ((event->keyval == GDK_Up)
-      || (event->keyval == GDK_KP_Up)
-      || ((event->state & GDK_MOD1_MASK) && ((event->keyval == 'p') || (event->keyval == 'P'))))
-    {
-      if (li)
-	li = li->prev;
-      if (!li && select->use_arrows_always)
-	{
-	  li = g_list_last (GTK_LIST (select->list)->children);
-	}
-      if (li)
-	{
-	  gtk_list_select_child (GTK_LIST (select->list), GTK_WIDGET (li->data));
-	  gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
-	  return TRUE;
-	}
-    }
-  else if ((event->keyval == GDK_Down)
-	   || (event->keyval == GDK_KP_Down)
-	   || ((event->state & GDK_MOD1_MASK) && ((event->keyval == 'n') || (event->keyval == 'N'))))
-    {
-      if (li)
-	li = li->next;
-      if (!li && select->use_arrows_always)
-	{
-	  li = GTK_LIST (select->list)->children;
-	}
-      if (li)
-	{
-	  gtk_list_select_child (GTK_LIST (select->list), GTK_WIDGET (li->data));
-	  gtk_signal_emit_stop_by_name (GTK_OBJECT (entry), "key_press_event");
-	  return TRUE;
-	}
-    }
-  return FALSE;
-}
-#endif
-
-static void
-gtk_select_get_pos (GtkSelect * select, gint * x, gint * y, gint * height, gint * width)
-{
-  GtkBin *popwin;
-  GtkWidget *widget;
-  GtkScrolledWindow *popup;
-  
-  gint real_height;
-  GtkRequisition list_requisition;
-  gboolean show_hscroll = FALSE;
-  gboolean show_vscroll = FALSE;
-  gint avail_height;
-  gint min_height;
-  gint alloc_width;
-  gint work_height;
-  gint old_height;
-  gint old_width;
-  
-  widget = GTK_WIDGET(select);
-  popup  = GTK_SCROLLED_WINDOW (select->popup);
-  popwin = GTK_BIN (select->popwin);
-  
-  gdk_window_get_origin (select->entry->window, x, y);
-  real_height = MIN (select->entry->requisition.height, 
-		     select->entry->allocation.height);
-  *y += real_height;
-  avail_height = gdk_screen_height () - *y;
-  
-  gtk_widget_size_request (select->list, &list_requisition);
-  min_height = MIN (list_requisition.height, 
-		    popup->vscrollbar->requisition.height);
-  if (!GTK_LIST (select->list)->children)
-    list_requisition.height += EMPTY_LIST_HEIGHT;
-  
-  alloc_width = (widget->allocation.width -
-		 2 * popwin->child->style->klass->xthickness -
-		 2 * GTK_CONTAINER (popwin->child)->border_width -
-		 2 * GTK_CONTAINER (select->popup)->border_width -
-		 2 * GTK_CONTAINER (GTK_BIN (popup)->child)->border_width - 
-		 2 * GTK_BIN (popup)->child->style->klass->xthickness);
-  
-  work_height = (2 * popwin->child->style->klass->ythickness +
-		 2 * GTK_CONTAINER (popwin->child)->border_width +
-		 2 * GTK_CONTAINER (select->popup)->border_width +
-		 2 * GTK_CONTAINER (GTK_BIN (popup)->child)->border_width +
-		 2 * GTK_BIN (popup)->child->style->klass->xthickness);
-  
-  do 
-    {
-      old_width = alloc_width;
-      old_height = work_height;
-      
-      if (!show_hscroll &&
-	  alloc_width < list_requisition.width)
-	{
-	  work_height += popup->hscrollbar->requisition.height +
-	    GTK_SCROLLED_WINDOW_CLASS 
-	    (GTK_OBJECT (select->popup)->klass)->scrollbar_spacing;
-	  show_hscroll = TRUE;
-	}
-      if (!show_vscroll && 
-	  work_height + list_requisition.height > avail_height)
-	{
-	  if (work_height + min_height > avail_height && 
-	      *y - real_height > avail_height)
-	    {
-	      *y -= (work_height + list_requisition.height + real_height);
-	      break;
-	    }
-	  alloc_width -= 
-	    popup->vscrollbar->requisition.width +
-	    GTK_SCROLLED_WINDOW_CLASS 
-	    (GTK_OBJECT (select->popup)->klass)->scrollbar_spacing;
-	  show_vscroll = TRUE;
-	}
-    } while (old_width != alloc_width || old_height != work_height);
-  
-  *width = widget->allocation.width;
-  if (show_vscroll)
-    *height = avail_height;
-  else
-    *height = work_height + list_requisition.height;
-  
-  if (*x < 0)
-    *x = 0;
-}
-
-static void
-gtk_select_popup_list (GtkSelect * select)
-{
-  gint height, width, x, y;
-  gint old_width, old_height;
-
-  old_width = select->popwin->allocation.width;
-  old_height  = select->popwin->allocation.height;
-
-  gtk_select_get_pos (select, &x, &y, &height, &width);
-
-  /* workaround for gtk_scrolled_window_size_allocate bug */
-  if (old_width != width || old_height != height)
-    {
-      gtk_widget_hide (GTK_SCROLLED_WINDOW (select->popup)->hscrollbar);
-      gtk_widget_hide (GTK_SCROLLED_WINDOW (select->popup)->vscrollbar);
-    }
-
-  gtk_widget_set_uposition (select->popwin, x, y);
-  gtk_widget_set_usize (select->popwin, width, height);
-  gtk_widget_realize (select->popwin);
-  gdk_window_resize (select->popwin->window, width, height);
-  gtk_widget_show (select->popwin);
-
-  gtk_widget_grab_focus (select->popwin);
-}
-
-static void        
-gtk_select_popup_button_press (GtkWidget        *button,
-			      GdkEventButton   *event,
-			      GtkSelect         *select)
-{
-  if (!GTK_WIDGET_HAS_FOCUS (select->entry))
-    gtk_widget_grab_focus (select->entry);
-  if (!select->current_button && (event->button == 1))
-    gtk_select_popup_list (select);
-
-  select->current_button = event->button;
-  
-  GTK_LIST (select->list)->drag_selection = TRUE;
-  gdk_pointer_grab (select->list->window, TRUE,
-		    GDK_POINTER_MOTION_HINT_MASK |
-		    GDK_BUTTON1_MOTION_MASK |
-		    GDK_BUTTON_RELEASE_MASK,
-		    NULL, NULL, event->time);
-  gtk_grab_add (select->list);
-}
-
-static void         
-gtk_select_popup_button_leave (GtkWidget        *button,
-			      GdkEventCrossing *event,
-			      GtkSelect         *select)
-{
-  if (select->current_button)
-    gtk_signal_emit_stop_by_name (GTK_OBJECT (button), "leave_notify_event");
-}
-
-static void
-gtk_select_update_button (GtkSelect *select)
-{
-  if (g_list_length (select->entries) > 1)
-    gtk_widget_show (select->button);
-  else if (g_list_length (select->entries) == 1 &&
-           select->selected == NULL)
-    gtk_widget_show (select->button);
-  else
-    gtk_widget_hide (select->button);
-}
-
-static void
-gtk_select_update_entry (GtkList * list, GtkSelect * select)
-{
-  GtkWidget *selected;
-  GtkWidget *old_selected;
-  GList *items;
-  int posn;
-
-  gtk_grab_remove (GTK_WIDGET (select));
-  gtk_signal_handler_block (GTK_OBJECT (list), select->list_change_id);
-  if (list->selection) {
-    selected = list->selection->data;
-    old_selected = select->selected;
-    if (old_selected) {
-      items = g_list_append(NULL, old_selected);
-      posn = g_list_index(select->entries, old_selected);
-      gtk_widget_ref(old_selected);
-      gtk_container_remove(GTK_CONTAINER(select->entry), old_selected);
-      if (old_selected != select->empty)
-	gtk_list_insert_items(list, items, posn);
-      gtk_widget_unref(old_selected);
-    } else {
-      gtk_container_remove(GTK_CONTAINER(select->entry), select->empty);
-    }
-    if (selected) {
-      select->selected = selected;
-      items = g_list_append(NULL, selected);
-      gtk_widget_ref(selected);
-      gtk_list_remove_items(list, items);
-      gtk_container_add(GTK_CONTAINER(select->entry), selected);
-      gtk_widget_unref(selected);
-    } else {
-      gtk_container_add(GTK_CONTAINER(select->entry), select->empty);
-      select->selected = NULL;
-    }
-  }
-
-  gtk_select_update_button (select);
-
-  gtk_signal_handler_unblock (GTK_OBJECT (list), select->list_change_id);
-}
-
-static gint
-gtk_select_button_press (GtkWidget * widget, GdkEvent * event, GtkSelect * select)
-{
-  GtkWidget *child;
-
-  child = gtk_get_event_widget (event);
-
-  /* We don't ask for button press events on the grab widget, so
-   *  if an event is reported directly to the grab widget, it must
-   *  be on a window outside the application (and thus we remove
-   *  the popup window). Otherwise, we check if the widget is a child
-   *  of the grab widget, and only remove the popup window if it
-   *  is not.
-   */
-  if (child != widget)
-    {
-      while (child)
-	{
-	  if (child == widget)
-	    return FALSE;
-	  child = child->parent;
-	}
-    }
-
-  gtk_widget_hide (select->popwin);
-  gtk_grab_remove (select->popwin);
-  gdk_pointer_ungrab (event->button.time);
-
-  return TRUE;
-}
-
-static gint
-gtk_select_button_release (GtkWidget * widget, GdkEvent * event, GtkSelect * select)
-{
-  GtkWidget *child;
-
-  if ((select->current_button != 0) && (event->button.button == 1))
-    {
-      /* This was the initial button press */
-
-      GdkEventCrossing tmp_event;
-
-      select->current_button = 0;
-
-      if (widget != select->button)
-	gtk_widget_event (select->button, event);
-
-      /* Un-pre-hightlight */
-      
-      tmp_event.type = GDK_LEAVE_NOTIFY;
-      tmp_event.window = select->button->window;
-      tmp_event.send_event = TRUE;
-      tmp_event.subwindow = NULL;
-      tmp_event.detail = GDK_NOTIFY_ANCESTOR;
-      
-      gtk_widget_event (select->button, (GdkEvent *)&tmp_event);
-
-      /* Check to see if we released inside the button */
-      child = gtk_get_event_widget ((GdkEvent*) event);
-
-      while (child && child != (select->button))
-	child = child->parent;
-
-      if (child == select->button)
-	{
-	  gtk_grab_add (select->popwin);
-	  gdk_pointer_grab (select->popwin->window, TRUE,
-			    GDK_BUTTON_PRESS_MASK | 
-			    GDK_BUTTON_RELEASE_MASK |
-			    GDK_POINTER_MOTION_MASK, 
-			    NULL, NULL, GDK_CURRENT_TIME);
-	  return FALSE;
-	}
-    }
-  else
-    {
-      /* The user has clicked inside the popwin and released */
-
-      if (GTK_WIDGET_HAS_GRAB (select->popwin))
-	{
-	  gtk_grab_remove (select->popwin);
-	  gdk_pointer_ungrab (event->button.time);
-	}
-    }
-  
-  gtk_widget_hide (select->popwin);
-
-  return TRUE;
-}
-
-static gint         
-gtk_select_list_enter (GtkWidget        *widget,
-		      GdkEventCrossing *event,
-		      GtkSelect         *select)
-{
-  GtkWidget *event_widget;
-
-  event_widget = gtk_get_event_widget ((GdkEvent*) event);
-  
-  if ((event_widget == select->list) &&
-      (select->current_button != 0) && 
-      (!GTK_WIDGET_HAS_GRAB (select->list)))
-    {
-      GdkEvent tmp_event;
-      gint x, y;
-      GdkModifierType mask;
-
-      gtk_grab_remove (select->popwin);
-
-      /* Transfer the grab over to the list by synthesizing
-       * a button press event
-       */
-      gdk_window_get_pointer (select->list->window, &x, &y, &mask);
-
-      tmp_event.button.type = GDK_BUTTON_PRESS;
-      tmp_event.button.window = select->list->window;
-      tmp_event.button.send_event = TRUE;
-      tmp_event.button.time = GDK_CURRENT_TIME; /* bad */
-      tmp_event.button.x = x;
-      tmp_event.button.y = y;
-      /* We leave all the XInput fields unfilled here, in the expectation
-       * that GtkList doesn't care.
-       */
-      tmp_event.button.button = select->current_button;
-      tmp_event.button.state = mask;
-
-      gtk_widget_event (select->list, &tmp_event);
-    }
-
-  return FALSE;
-}
-
-static int
-gtk_select_list_key_press (GtkWidget * widget, GdkEventKey * event, GtkSelect * select)
-{
-  if (event->keyval == GDK_Escape)
-    {
-      if (GTK_WIDGET_HAS_GRAB (select->popwin))
-	{
-	  gtk_grab_remove (select->popwin);
-	  gdk_pointer_ungrab (GDK_CURRENT_TIME);
-	}
-      else if (GTK_WIDGET_HAS_GRAB (select->list))
-	gtk_list_end_drag_selection (GTK_LIST (select->list));
-      gtk_widget_hide (select->popwin);
-      if (GTK_WIDGET_HAS_GRAB (select->button))
-	{
-	  select->current_button = 0;
-	  GTK_BUTTON (select->button)->in_button = FALSE;
-	  gtk_button_released (GTK_BUTTON (select->button));
-	  gtk_grab_remove (select->button);
-	}
-      return TRUE;
-    }
-  return FALSE;
-}
-
-static void
-gtk_select_init (GtkSelect * select)
-{
-  GtkWidget *arrow;
-  GtkWidget *frame;
-  GtkWidget *event_box;
-  GdkCursor *cursor;
-
-  select->use_arrows = 1;
-  select->entry = gtk_event_box_new ();
-  select->button = gtk_button_new ();
-  select->current_button = 0;
-  select->empty = gtk_label_new ("");
-  select->entries = NULL;
-  select->selected = NULL;
-  arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_OUT);
-  gtk_widget_show (arrow);
-  gtk_widget_ref(select->empty);
-  gtk_widget_show (select->empty);
-  gtk_container_add(GTK_CONTAINER(select->entry), select->empty);
-  gtk_container_add (GTK_CONTAINER (select->button), arrow);
-  gtk_box_pack_start (GTK_BOX (select), select->button, FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (select), select->entry, TRUE, TRUE, 0);
-  GTK_WIDGET_UNSET_FLAGS (select->button, GTK_CAN_FOCUS);
-  gtk_widget_show (select->entry);
-//  gtk_signal_connect (GTK_OBJECT (select->entry), "key_press_event",
-//		      (GtkSignalFunc) gtk_select_entry_key_press, select);
-  gtk_signal_connect_after (GTK_OBJECT (select->button), "button_press_event",
-			    (GtkSignalFunc) gtk_select_popup_button_press, select);
-  /*gtk_signal_connect_after (GTK_OBJECT (select->button), "button_release_event",
-    (GtkSignalFunc) gtk_select_button_release, select);*/
-  gtk_signal_connect (GTK_OBJECT (select->button), "leave_notify_event",
-		      (GtkSignalFunc) gtk_select_popup_button_leave, select);
-  /*gtk_signal_connect(GTK_OBJECT(select->button), "clicked",
-     (GtkSignalFunc)prelight_bug, select); */
-
-  select->popwin = gtk_window_new (GTK_WINDOW_POPUP);
-  gtk_widget_ref (select->popwin);
-  gtk_window_set_policy (GTK_WINDOW (select->popwin), 1, 1, 0);
-  
-  gtk_widget_set_events (select->popwin, GDK_KEY_PRESS_MASK);
-
-  event_box = gtk_event_box_new ();
-  gtk_container_add (GTK_CONTAINER (select->popwin), event_box);
-  gtk_widget_show (event_box);
-
-  gtk_widget_realize (event_box);
-  cursor = gdk_cursor_new (GDK_TOP_LEFT_ARROW);
-  gdk_window_set_cursor (event_box->window, cursor);
-  gdk_cursor_destroy (cursor);
-
-  frame = gtk_frame_new (NULL);
-  gtk_container_add (GTK_CONTAINER (event_box), frame);
-  gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
-  gtk_widget_show (frame);
-
-  select->popup = gtk_scrolled_window_new (NULL, NULL);
-  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (select->popup),
-				  GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-  GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (select->popup)->hscrollbar, GTK_CAN_FOCUS);
-  GTK_WIDGET_UNSET_FLAGS (GTK_SCROLLED_WINDOW (select->popup)->vscrollbar, GTK_CAN_FOCUS);
-  gtk_container_add (GTK_CONTAINER (frame), select->popup);
-  gtk_widget_show (select->popup);
-
-  select->list = gtk_list_new ();
-  /* We'll use enter notify events to figure out when to transfer
-   * the grab to the list
-   */
-  gtk_widget_set_events (select->list, GDK_ENTER_NOTIFY_MASK);
-
-  gtk_list_set_selection_mode(GTK_LIST(select->list), GTK_SELECTION_SINGLE);
-  gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (select->popup), select->list);
-  gtk_container_set_focus_vadjustment (GTK_CONTAINER (select->list),
-				       gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (select->popup)));
-  gtk_container_set_focus_hadjustment (GTK_CONTAINER (select->list),
-				       gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (select->popup)));
-  gtk_widget_show (select->list);
-
-  select->list_change_id = gtk_signal_connect (GTK_OBJECT (select->list),
-     					       "selection_changed",
-			     (GtkSignalFunc) gtk_select_update_entry, select);
-  gtk_signal_connect (GTK_OBJECT (select->popwin), "key_press_event",
-		      (GtkSignalFunc) gtk_select_list_key_press, select);
-  gtk_signal_connect (GTK_OBJECT (select->popwin), "button_press_event",
-		      GTK_SIGNAL_FUNC (gtk_select_button_press), select);
-
-  gtk_signal_connect_after (GTK_OBJECT (select->list), "button_release_event",
-			    GTK_SIGNAL_FUNC (gtk_select_button_release), select);
-  /* We connect here on the button, because we'll have a grab on it
-   * when the event occurs. But we are actually interested in enters
-   * for the select->list.
-   */
-  gtk_signal_connect (GTK_OBJECT (select->button), "enter_notify_event",
-		      GTK_SIGNAL_FUNC (gtk_select_list_enter), select);
-}
-
-guint
-gtk_select_get_type (void)
-{
-  static guint select_type = 0;
-
-  if (!select_type)
-    {
-      static const GtkTypeInfo select_info =
-      {
-	"GtkSelect",
-	sizeof (GtkSelect),
-	sizeof (GtkSelectClass),
-	(GtkClassInitFunc) gtk_select_class_init,
-	(GtkObjectInitFunc) gtk_select_init,
-	/* reserved_1 */ NULL,
-	/* reserved_2 */ NULL,
-        (GtkClassInitFunc) NULL,
-      };
-      select_type = gtk_type_unique (gtk_hbox_get_type (), &select_info);
-    }
-  return select_type;
-}
-
-GtkWidget *
-gtk_select_new (void)
-{
-  return GTK_WIDGET (gtk_type_new (gtk_select_get_type ()));
-}
-
-void
-gtk_select_set_use_arrows (GtkSelect * select, gint val)
-{
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-
-  select->use_arrows = val;
-}
-
-static void
-gtk_select_size_allocate (GtkWidget     *widget,
-			  GtkAllocation *allocation)
-{
-  GtkSelect *select;
-
-  g_return_if_fail (widget != NULL);
-  g_return_if_fail (GTK_IS_SELECT (widget));
-  g_return_if_fail (allocation != NULL);
-
-  GTK_WIDGET_CLASS (parent_class)->size_allocate (widget, allocation);
-  
-  select = GTK_SELECT (widget);
-
-  if (select->entry->allocation.height > select->entry->requisition.height)
-    {
-      GtkAllocation button_allocation;
-
-      button_allocation = select->button->allocation;
-      button_allocation.height = select->entry->requisition.height;
-      button_allocation.y = select->entry->allocation.y + 
-	(select->entry->allocation.height - select->entry->requisition.height) 
-	/ 2;
-      gtk_widget_size_allocate (select->button, &button_allocation);
-    }
-}
-
-void
-gtk_select_disable_activate (GtkSelect* select)
-{
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-}
-
-static GList *
-g_list_insert_list(GList *list, GList *items, gint position)
-{
-	GList *at;
-	GList *last;
-	int ll;
-
-	if (!items) {
-		return list;
-	}
-	ll = g_list_length(list);
-	if (ll <= position) {
-		return g_list_concat(list, items);
-	}
-	if (position == 0) {
-		return g_list_concat(items, list);
-	}
-	at = g_list_nth(list, position - 1);
-	last = g_list_last(items);
-	last->next = at->next;
-	if (at->next) {
-		at->next->prev = last;
-	}
-	at->next = items;
-	items->prev = at;
-	return list;
-}
-
-void
-gtk_select_insert_items (GtkSelect *select, GList *items, gint position)
-{
-  GList *copy;
-
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  copy = g_list_copy(items);
-  select->entries = g_list_insert_list(select->entries, items, position);
-  gtk_list_insert_items(GTK_LIST(select->list), copy, position);
-  gtk_select_update_button (select);
-}
-
-void
-gtk_select_append_items (GtkSelect *select, GList *items)
-{
-  GList *copy;
-
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  copy = g_list_copy(items);
-  select->entries = g_list_concat(select->entries, items);
-  gtk_list_append_items(GTK_LIST(select->list), copy);
-  gtk_select_update_button (select);
-}
-
-void
-gtk_select_prepend_items (GtkSelect *select, GList *items)
-{
-  GList *copy;
-
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  copy = g_list_copy(items);
-  select->entries = g_list_concat(items, select->entries);
-  gtk_list_prepend_items(GTK_LIST(select->list), copy);
-  gtk_select_update_button (select);
-}
-
-static void
-gtk_select_remove_items_internal (GtkSelect *select, GList *items,
-	       			  gboolean unref)
-{
-  GList *loop;
-  int do_free = 0;;
-
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  for (loop = items; loop; loop = loop->next) {
-    select->entries = g_list_remove(select->entries, loop->data);
-  }
-  if (select->selected && g_list_find(items, select->selected)) {
-    items = g_list_copy(items);
-    items = g_list_remove(items, select->selected);
-    do_free = 1;
-    if (!unref)
-      gtk_widget_ref(select->selected);
-    gtk_container_remove(GTK_CONTAINER(select->entry), select->selected);
-    gtk_container_add(GTK_CONTAINER(select->entry), select->empty);
-    select->selected = NULL;
-  }
-  if (unref)
-    gtk_list_remove_items(GTK_LIST(select->list), items);
-  else
-    gtk_list_remove_items_no_unref(GTK_LIST(select->list), items);
-  if (do_free)
-    g_list_free(items);
-
-  gtk_select_update_button (select);
-}
-
-void
-gtk_select_remove_items (GtkSelect *select, GList *items)
-{
-  gtk_select_remove_items_internal(select, items, TRUE);
-}
-
-void
-gtk_select_clear_items (GtkSelect *select, gint start, gint end)
-{
-  GList *sptr, *eptr;
-  int len;
-
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  if (select->entries == NULL) {
-    return;
-  }
-  len = g_list_length(select->entries);
-  if (end > len)
-    end = len;
-  if (start > end)
-    return;
-  sptr = g_list_nth(select->entries, start);
-  eptr = g_list_nth(select->entries, end);
-  if (sptr->prev)
-    sptr->prev->next = eptr;
-  if (eptr && eptr->prev)
-    eptr->prev->next = NULL;
-  if (eptr)
-    eptr->prev = sptr->prev;
-  if (sptr == select->entries)
-    select->entries = eptr;
-  if (select->selected && g_list_find(sptr, select->selected)) {
-    gtk_container_remove(GTK_CONTAINER(select->entry), select->selected);
-    gtk_container_add(GTK_CONTAINER(select->entry), select->empty);
-    select->selected = NULL;
-  }
-  gtk_list_remove_items(GTK_LIST(select->list), sptr);
-  g_list_free(sptr);
-}
-
-void
-gtk_select_select_item (GtkSelect *select, gint item)
-{
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  gtk_list_select_item(GTK_LIST(select->list), item);
-}
-
-void
-gtk_select_select_child (GtkSelect *select, GtkWidget *child)
-{
-  g_return_if_fail (select != NULL);
-  g_return_if_fail (GTK_IS_SELECT (select));
-  gtk_list_select_child(GTK_LIST(select->list), child);
-}
-
-gint
-gtk_select_child_position (GtkSelect *select, GtkWidget *child)
-{
-  g_return_val_if_fail (select != NULL, -1);
-  g_return_val_if_fail (GTK_IS_SELECT (select), -1);
-  return g_list_index(select->entries, child);
-}
--- src/gnome-utils/gnc-account-tree.c
+++ /dev/null
@@ -1,1228 +0,0 @@
-/********************************************************************\
- * account-tree.c -- The tree of accounts in the main window, and   *
- *                   associated helper and callback functions for   *
- *                   GnuCash.                                       *
- * Copyright (C) 1998,1999 Jeremy Collins	                    *
- * Copyright (C) 1998,1999 Linas Vepstas                            *
- * Copyright (C) 2000 Dave Peticolas <dave at krondo.com>              *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include <gnome.h>
-
-#include "Group.h"
-#include "dialog-utils.h"
-#include "gnc-account-tree.h"
-#include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
-#include "gnc-ui-util.h"
-#include "messages.h"
-
-#define ACCOUNT_TREE_CM_CLASS "account-tree"
-
-/* Signal codes */
-enum
-{
-  SELECT_ACCOUNT,
-  UNSELECT_ACCOUNT,
-  ACTIVATE_ACCOUNT,
-  LAST_SIGNAL
-};
-
-
-/** Static Globals ****************************************************/
-static GtkCTreeClass *parent_class = NULL;
-static guint account_tree_signals[LAST_SIGNAL];
-
-/* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
-
-
-/** Static function declarations **************************************/
-static void gnc_account_tree_init(GNCAccountTree *tree);
-static void gnc_account_tree_class_init(GNCAccountTreeClass *klass);
-static gint gnc_account_tree_key_press(GtkWidget *widget, GdkEventKey *event);
-static gint gnc_account_tree_button_press(GtkWidget *widget,
- 					  GdkEventButton *event);
-static void gnc_account_tree_select_row(GtkCTree *ctree,
-					GtkCTreeNode *row,
-					gint column);
-static void gnc_account_tree_unselect_row(GtkCTree *ctree,
-					  GtkCTreeNode *row,
-					  gint column);
-static GtkCTreeNode * gnc_account_tree_insert_row(GNCAccountTree *tree,
-						  GtkCTreeNode *parent,
-						  GtkCTreeNode *sibling,
-						  Account *acc);
-static void gnc_account_tree_fill(GNCAccountTree *tree,
-                                  GHashTable *expanded_accounts,
-				  GtkCTreeNode *parent,
-				  AccountGroup *accts);
-static void gnc_account_tree_update_column_visibility (GNCAccountTree *tree);
-static void gnc_account_tree_destroy(GtkObject *object);
-
-struct _acct_tree_defaults {
-  gboolean auto_resize;
-  GtkJustification justification;
-  const char *pref_name;
-  const char *field_name;
-} acct_tree_defaults[] = {
-  {/* NAME */		TRUE,  GTK_JUSTIFY_LEFT,  "name",		N_("Account Name")},
-  {/* TYPE */		FALSE, GTK_JUSTIFY_LEFT,  "type",		N_("Type")},
-  {/* COMMODITY */	FALSE, GTK_JUSTIFY_LEFT,  "commodity",		N_("Commodity")},
-  {/* CODE */		FALSE, GTK_JUSTIFY_LEFT,  "code",		N_("Account Code")},
-  {/* DESCRIPTION */	TRUE,  GTK_JUSTIFY_LEFT,  "description",	N_("Description")},
-  {/* PRESENT */	TRUE,  GTK_JUSTIFY_RIGHT, "present",		N_("Present")},
-  {/* PRESENT_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "present_report",	N_("Present (Report)")},
-  {/* BALANCE */	TRUE,  GTK_JUSTIFY_RIGHT, "balance",		N_("Balance")},
-  {/* BALANCE_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "balance_report",	N_("Balance (Report)")},
-  {/* CLEARED */	TRUE,  GTK_JUSTIFY_RIGHT, "cleared",		N_("Cleared")},
-  {/* CLEARED_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "cleared_report",	N_("Cleared (Report)")},
-  {/* RECNCLD */	TRUE,  GTK_JUSTIFY_RIGHT, "reconciled",		N_("Reconciled")},
-  {/* RECNCLD_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "reconciled_report",	N_("Reconciled (Report)")},
-  {/* FUTURE_MIN */	TRUE,  GTK_JUSTIFY_RIGHT, "future_min",		N_("Future Minimum")},
-  {/* FUT_MIN_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "future_min_report",	N_("Future Minimum (Report)")},
-  {/* TOTAL */		TRUE,  GTK_JUSTIFY_RIGHT, "total",		N_("Total")},
-  {/* TOTAL_REPORT */	TRUE,  GTK_JUSTIFY_RIGHT, "total_report",	N_("Total (Report)")},
-  {/* NOTES */		FALSE, GTK_JUSTIFY_LEFT,  "notes",		N_("Notes")},
-  {/* TAX_INFO */	FALSE, GTK_JUSTIFY_LEFT,  "tax-info",		N_("Tax Info")},
-};
-
-GtkType
-gnc_account_tree_get_type (void)
-{
-  static GtkType gnc_account_tree_type = 0;
-
-  if (!gnc_account_tree_type)
-  {
-    static const GtkTypeInfo gnc_account_tree_info =
-    {
-      "GNCAccountTree",
-      sizeof (GNCAccountTree),
-      sizeof (GNCAccountTreeClass),
-      (GtkClassInitFunc) gnc_account_tree_class_init,
-      (GtkObjectInitFunc) gnc_account_tree_init,
-      /* reserved_1 */ NULL,
-      /* reserved_2 */ NULL,
-      (GtkClassInitFunc) NULL
-    };
-
-    gnc_account_tree_type = gtk_type_unique (GTK_TYPE_CTREE,
-					     &gnc_account_tree_info);
-  }
-
-  return gnc_account_tree_type;
-}
-
-
-static void
-refresh_handler (GHashTable *changes, gpointer user_data)
-{
-  GNCAccountTree *tree = user_data;
-
-  gnc_account_tree_refresh (tree);
-}
-
-/********************************************************************\
- * gnc_account_tree_new                                             *
- *   creates the account tree                                       *
- *                                                                  *
- * Returns: the account tree widget, or NULL if there was a problem.*
-\********************************************************************/
-GtkWidget *
-gnc_account_tree_new (void)
-{
-  GtkWidget *tree;
-  gint component_id;
-
-  tree = GTK_WIDGET(gtk_type_new(gnc_account_tree_get_type()));
-
-  component_id = gnc_register_gui_component (ACCOUNT_TREE_CM_CLASS,
-                                             refresh_handler, NULL,
-                                             tree);
-
-  gnc_gui_component_watch_entity_type (component_id,
-                                       GNC_ID_ACCOUNT,
-                                       GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
-
-  return tree;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_new_with_root                                   *
- *   creates the account tree with a root                           *
- *   the root is always visible and has a NULL associated account   *
- *   for callbacks. All other fields are blank for the root.        *
- *                                                                  *
- * Args: root_name - the string used for the root                   *
- *                                                                  *
- * Returns: the account tree widget, or NULL if there was a problem.*
-\********************************************************************/
-
-GtkWidget *
-gnc_account_tree_new_with_root (Account * root)
-{
-  GNCAccountTree *tree;
-
-  tree = GNC_ACCOUNT_TREE (gnc_account_tree_new ());
-  tree->root_account = *xaccAccountGetGUID (root);
-
-  return GTK_WIDGET (tree);
-}
-
-
-static void
-gnc_account_tree_init (GNCAccountTree *tree)
-{
-  GtkStyle *style;
-  GdkFont *font;
-  gint width;
-  int i;
-
-  tree->root_account     = *xaccGUIDNULL ();
-  tree->current_accounts = NULL;
-  tree->ignore_unselect  = FALSE;
-  tree->view_filter      = NULL;
-  tree->view_filter_data = NULL;
-  tree->selectable_filter = NULL;
-  tree->selectable_filter_data = NULL;
-
-  gnc_init_account_view_info(&tree->avi);
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    tree->column_headings[i] = gettext(acct_tree_defaults[i].field_name);
-
-  gtk_ctree_construct(GTK_CTREE(tree),
-                      NUM_ACCOUNT_FIELDS, 0,
-                      (gchar **) tree->column_headings);
-
-  gtk_clist_set_shadow_type(GTK_CLIST(tree), GTK_SHADOW_IN);
-  gtk_clist_column_titles_passive(GTK_CLIST(tree));
-
-  style = gtk_widget_get_style(GTK_WIDGET(tree));
-  font = (style != NULL) ? style->font : NULL;
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++) {
-    gtk_clist_set_column_auto_resize(GTK_CLIST(tree), i,
-				     acct_tree_defaults[i].auto_resize);
-    gtk_clist_set_column_justification(GTK_CLIST(tree), i,
-				       acct_tree_defaults[i].justification);
-    if (font != NULL) {
-      width = gdk_string_width(font, tree->column_headings[i]);
-      gtk_clist_set_column_min_width(GTK_CLIST(tree), i, width + 5);
-    }
-  }
-
-  tree->deficit_style = NULL;
-
-  if (gnc_color_deficits())
-  {
-    GdkColormap *cm = gtk_widget_get_colormap(GTK_WIDGET(tree));
-    GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(tree));
-
-    tree->deficit_style = gtk_style_copy(style);
-    style = tree->deficit_style;
-
-    gnc_get_deficit_color(&style->fg[GTK_STATE_NORMAL]);
-
-    gdk_colormap_alloc_color(cm, &style->fg[GTK_STATE_NORMAL], FALSE, TRUE);
-  }
-}
-
-static void
-gnc_account_tree_class_init(GNCAccountTreeClass *klass)
-{
-  GtkObjectClass    *object_class;
-  GtkWidgetClass    *widget_class;
-  GtkContainerClass *container_class;
-  GtkCListClass     *clist_class;
-  GtkCTreeClass     *ctree_class;
-
-  object_class =    (GtkObjectClass*) klass;
-  widget_class =    (GtkWidgetClass*) klass;
-  container_class = (GtkContainerClass*) klass;
-  clist_class =     (GtkCListClass*) klass;
-  ctree_class =     (GtkCTreeClass*) klass;
-
-  parent_class = gtk_type_class(GTK_TYPE_CTREE);
-
-  account_tree_signals[SELECT_ACCOUNT] =
-    gtk_signal_new("select_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCAccountTreeClass,
-				     select_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  account_tree_signals[UNSELECT_ACCOUNT] =
-    gtk_signal_new("unselect_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCAccountTreeClass,
-				     unselect_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  account_tree_signals[ACTIVATE_ACCOUNT] =
-    gtk_signal_new("activate_account",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCAccountTreeClass,
-				     activate_account),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  gtk_object_class_add_signals(object_class,
-			       account_tree_signals,
-			       LAST_SIGNAL);
-
-  object_class->destroy = gnc_account_tree_destroy;
-
-  widget_class->key_press_event = gnc_account_tree_key_press;
-  widget_class->button_press_event = gnc_account_tree_button_press;
-
-  ctree_class->tree_select_row   = gnc_account_tree_select_row;
-  ctree_class->tree_unselect_row = gnc_account_tree_unselect_row;
-
-  klass->select_account   = NULL;
-  klass->unselect_account = NULL;
-  klass->activate_account = NULL;
-}
-
-/********************************************************************\
- * gnc_account_tree_save_expanded                                   *
- *   saves the expanded accounts in a hash table, indexed by        *
- *   account pointers. only expanded accounts go in the table       *
- *                                                                  *
- * Args: tree - the tree to save expanded accounts                  *
- * Returns: hash table containing expanded accounts                 *
-\********************************************************************/
-static GHashTable *
-gnc_account_tree_save_expanded(GNCAccountTree * tree)
-{
-  GtkCTree *ctree = GTK_CTREE(tree);
-  gboolean expanded;
-  GHashTable *ht;
-  GtkCTreeNode *node;
-  Account *account;
-  gint row = 0;
-
-  ht = g_hash_table_new(NULL, NULL);
-
-  while ((node = gtk_ctree_node_nth(ctree, row++)) != NULL)
-  {
-    gtk_ctree_get_node_info(ctree, node, NULL, NULL, NULL, NULL,
-                            NULL, NULL, NULL, &expanded);
-
-    if (!expanded)
-      continue;
-
-    account = gtk_ctree_node_get_row_data(ctree, node);
-    g_hash_table_insert(ht, account, account);
-  }
-
-  return ht;
-}
-
-/********************************************************************\
- * gnc_account_tree_refresh                                         *
- *   refreshes the account tree                                     *
- *                                                                  *
- * Args: tree - the tree to refresh                                 *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_refresh(GNCAccountTree * tree)
-{
-  GtkCList      *clist = GTK_CLIST(tree);
-  GHashTable    *expanded_accounts;
-  GList         *current_accounts;
-  GtkAdjustment *adjustment;
-  gfloat         save_value = 0.0;
-  Account       *root_account;
-
-  ENTER(" ");
-
-  adjustment = gtk_clist_get_vadjustment(GTK_CLIST(tree));
-  if (adjustment != NULL)
-    save_value = adjustment->value;
-
-  expanded_accounts = gnc_account_tree_save_expanded(tree);
-  current_accounts = tree->current_accounts;
-  tree->current_accounts = NULL;
-
-  gtk_clist_freeze(clist);
-
-  gtk_clist_clear(clist);
-
-  root_account = xaccAccountLookup (&tree->root_account,
-                                    gnc_get_current_book ());
-
-  gnc_account_tree_fill (tree, expanded_accounts,
-                         gnc_account_tree_insert_row (tree, NULL, NULL,
-                                                      root_account),
-                         gnc_get_current_group ());
-
-  gtk_clist_columns_autosize(clist);
-
-  gnc_account_tree_update_column_visibility(tree);
-
-  gnc_account_tree_select_accounts(tree, current_accounts, FALSE);
-
-  if (adjustment != NULL)
-  {
-    save_value = CLAMP(save_value, adjustment->lower,
-                       adjustment->upper - adjustment->page_size);
-    gtk_adjustment_set_value(adjustment, save_value);
-  }
-
-  gtk_clist_thaw(clist);
-
-  g_hash_table_destroy(expanded_accounts);
-  g_list_free(current_accounts);
-  LEAVE(" ");
-}
-
-
-/********************************************************************\
- * gnc_account_tree_set_view_info                                   *
- *   installs a new view information and refreshes the tree         *
- *                                                                  *
- * Args: tree - the tree to install new info                        *
- *       info - the view info structure                             *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_set_view_info(GNCAccountTree *tree, AccountViewInfo *info)
-{
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-  g_return_if_fail(info != NULL);
-
-  tree->avi = *info;
-
-  gnc_account_tree_refresh(tree);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_get_view_info                                   *
- *   retrieves the current view information for a tree              *
- *                                                                  *
- * Args: tree - the tree to get view info for                       *
- *       info - the view info structure to fill                     *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_get_view_info(GNCAccountTree *tree, AccountViewInfo *info)
-{
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-  g_return_if_fail(info != NULL);
-
-  *info = tree->avi;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_expand_account                                  *
- *   expand the account node                                        *
- *                                                                  *
- * Args: tree   - the tree to expand an account for                 *
- *       accout - the account to expand                             *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_expand_account(GNCAccountTree *tree, Account *account)
-{
-  GtkCTree *ctree;
-  GtkCTreeNode *node;
-
-  g_return_if_fail(tree != NULL);
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-
-  ctree = GTK_CTREE(tree);
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data(ctree, NULL, account);
-  if (node == NULL)
-    return;
-
-  gtk_ctree_expand(ctree, node);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_toggle_account_expansion                        *
- *   toggle the expansion status for the given account              *
- *                                                                  *
- * Args: tree    - the tree to toggle expansion status for          *
- *       account - the account to toggle expansion status           *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_toggle_account_expansion (GNCAccountTree *tree,
-                                           Account *account)
-{
-  GtkCTree *ctree;
-  GtkCTreeNode *node;
-
-  g_return_if_fail(tree != NULL);
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-
-  ctree = GTK_CTREE(tree);
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data(ctree, NULL, account);
-  if (node == NULL)
-    return;
-
-  gtk_ctree_toggle_expansion(ctree, node);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_expand_all                                      *
- *   fully expand the tree                                          *
- *                                                                  *
- * Args: tree   - the tree to fully expand                          *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_expand_all (GNCAccountTree *tree)
-{
-  GtkCTree *ctree;
-
-  g_return_if_fail (tree != NULL);
-  g_return_if_fail (IS_GNC_ACCOUNT_TREE(tree));
-
-  ctree = GTK_CTREE(tree);
-
-  gtk_ctree_expand_recursive (ctree, NULL);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_select_account                                  *
- *   select an account in the tree and expands the tree to make     *
- *   sure it could be visible. It may also scroll the tree to       *
- *   ensure it is visible                                           *
- *                                                                  *
- * Args: tree    - tree to be modified                              *
- *       account - account to be selected                           *
- *       show    - if true, scroll the tree                         *
- * Returns: true if the account was found                           *
-\********************************************************************/
-gboolean
-gnc_account_tree_select_account(GNCAccountTree *tree,
-                                Account        *account,
-                                gboolean        show)
-{
-  GtkCTree *ctree = GTK_CTREE(tree);
-  GtkCTreeNode *node, *n;
-  GtkCTreeRow  *row;
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data(ctree, NULL, account);
-
-  if (node == NULL)
-    return FALSE;
-
-  /* Select it */
-  gtk_ctree_select(ctree, node);
-
-  /* Expand all the parents */
-  row = GTK_CTREE_ROW(node);
-  while ((n = row->parent) != NULL)
-  {
-    gtk_ctree_expand(ctree, n);
-    row = GTK_CTREE_ROW(n);
-  }
-
-  if (!show)
-    return TRUE;
-
-  /* Make sure it's visible */
-  if (gtk_ctree_node_is_visible(ctree, node) != GTK_VISIBILITY_FULL)
-    gtk_ctree_node_moveto(ctree, node, 0, 0.5, 0.0);
-
-  return TRUE;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_select_subaccounts                              *
- *   select the account and all subaccounts of an account that are  *
- *   in the tree and expands the tree to ensure they are visible.   *
- *   It may also scroll the tree to ensure it is visible.           *
- *                                                                  *
- * Args: tree    - tree to be modified                              *
- *       account - account whose subaccountn are to be selected     *
- *       show    - if true, scroll the tree                         *
- * Returns: true if the account was found                           *
-\********************************************************************/
-gboolean
-gnc_account_tree_select_subaccounts (GNCAccountTree *tree,
-                                     Account *account,
-                                     gboolean show)
-{
-  GtkCTree *ctree = GTK_CTREE(tree);
-  GtkCTreeNode *node, *n;
-  GtkCTreeRow  *row;
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data (ctree, NULL, account);
-
-  if (node == NULL)
-    return FALSE;
-
-  /* Expand all the parents */
-  row = GTK_CTREE_ROW(node);
-  while ((n = row->parent) != NULL)
-  {
-    gtk_ctree_expand (ctree, n);
-    row = GTK_CTREE_ROW(n);
-  }
-
-  /* Expand them & select them */
-  gtk_ctree_expand_recursive (ctree, node);
-  gtk_ctree_select_recursive (ctree, node);
-
-  if (!show)
-    return TRUE;
-
-  /* Make sure it's visible */
-  if (gtk_ctree_node_is_visible (ctree, node) != GTK_VISIBILITY_FULL)
-    gtk_ctree_node_moveto (ctree, node, 0, 0.5, 0.0);
-
-  return TRUE;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_unselect_account                                *
- *   unselect an account in the tree                                *
- *                                                                  *
- * Args: tree    - tree to be modified                              *
- *       account - account to be unselected                         *
- *       show    - if true, scroll the tree                         *
- * Returns: true if the account was found                           *
-\********************************************************************/
-gboolean
-gnc_account_tree_unselect_account (GNCAccountTree *tree,
-                                   Account        *account,
-                                   gboolean       show)
-{
-  GtkCTree *ctree = GTK_CTREE(tree);
-  GtkCTreeNode *node;
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data(ctree, NULL, account);
-
-  if (node == NULL)
-    return FALSE;
-
-  /* unselect it */
-  gtk_ctree_unselect(ctree, node);
-
-  if (!show)
-    return TRUE;
-
-  /* Make sure it's visible */
-  if (gtk_ctree_node_is_visible(ctree, node) != GTK_VISIBILITY_FULL)
-    gtk_ctree_node_moveto(ctree, node, 0, 0.5, 0.0);
-
-  return TRUE;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_unselect_subaccounts                            *
- *   unselect an account and all its subaccounts in the tree        *
- *                                                                  *
- * Args: tree    - tree to be modified                              *
- *       account - account to be unselected recursively             *
- *       show    - if true, scroll the tree                         *
- * Returns: true if the account was found                           *
-\********************************************************************/
-gboolean
-gnc_account_tree_unselect_subaccounts (GNCAccountTree *tree,
-                                       Account *account,
-                                       gboolean show)
-{
-  GtkCTree *ctree = GTK_CTREE(tree);
-  GtkCTreeNode *node;
-
-  /* Get the node with the account */
-  node = gtk_ctree_find_by_row_data(ctree, NULL, account);
-
-  if (node == NULL)
-    return FALSE;
-
-  /* unselect it */
-  gtk_ctree_unselect_recursive (ctree, node);
-
-  if (!show)
-    return TRUE;
-
-  /* Make sure it's visible */
-  if (gtk_ctree_node_is_visible(ctree, node) != GTK_VISIBILITY_FULL)
-    gtk_ctree_node_moveto(ctree, node, 0, 0.5, 0.0);
-
-  return TRUE;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_select_accounts                                 *
- *   select a list of accounts in the tree, expanding the parents   *
- *   of each one. If 'show' is true, the last one is made visible.  *
- *                                                                  *
- * Args: tree         - tree to be modified                         *
- *       account_list - list of accounts to be selected             *
- *       show         - determines if last account is made visible  *
- * Returns: true if the last account was found in the list          *
-\********************************************************************/
-gboolean
-gnc_account_tree_select_accounts(GNCAccountTree *tree,
-                                 GList          *account_list,
-                                 gboolean        show_last)
-{
-  Account *account;
-  gboolean real_show;
-  gboolean result = FALSE;
-
-  gtk_clist_freeze(GTK_CLIST(tree));
-
-  while (account_list != NULL)
-  {
-    account = account_list->data;
-
-    real_show = (account_list->next == NULL) ? show_last : FALSE;
-
-    result = gnc_account_tree_select_account(tree, account, real_show);
-
-    account_list = account_list->next;
-  }
-
-  gtk_clist_thaw(GTK_CLIST(tree));
-
-  return result;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_show_income_expense                             *
- *   shows the income/expense accounts in a tree                    *
- *                                                                  *
- * Args: tree - tree to show income/expense accounts                *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_show_income_expense(GNCAccountTree *tree)
-{
-  tree->avi.include_type[EXPENSE] = TRUE;
-  tree->avi.include_type[INCOME] = TRUE;
-
-  gnc_account_tree_refresh(tree);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_hide_income_expense                             *
- *   hides the income/expense accounts in a tree                    *
- *                                                                  *
- * Args: tree - tree to hide income/expense accounts                *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_hide_income_expense(GNCAccountTree *tree)
-{
-  tree->avi.include_type[EXPENSE] = FALSE;
-  tree->avi.include_type[INCOME] = FALSE;
-
-  gnc_account_tree_refresh(tree);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_hide_all_but_names                              *
- *   hides all fields but the name in a tree                        *
- *                                                                  *
- * Args: tree - tree to hide all but names                          *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_hide_all_but_name(GNCAccountTree *tree)
-{
-  int i;
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    tree->avi.show_field[i] = (i == ACCOUNT_NAME);
-
-  gnc_account_tree_update_column_visibility(tree);
-}
-
-
-static void
-gnc_account_tree_update_column_visibility(GNCAccountTree *tree)
-{
-  gint i;
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    gtk_clist_set_column_visibility
-      (GTK_CLIST(tree), i, tree->avi.show_field[i]);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_get_current_account                             *
- *   returns the first account selected, or NULL if none            *
- *                                                                  *
- * Args: tree - tree to get current account from                    *
- * Returns: current account                                         *
-\********************************************************************/
-Account *
-gnc_account_tree_get_current_account (GNCAccountTree *tree)
-{
-  if (tree == NULL)
-    return NULL;
-
-  if (tree->current_accounts == NULL)
-    return NULL;
-
-  return tree->current_accounts->data;
-}
-
-
-/********************************************************************\
- * gnc_account_tree_get_current_accounts                            *
- *   returns a g_malloc'd GList of the selected accounts            *
- *                                                                  *
- * Args: tree - tree to get current accounts from                   *
- * Returns: GList of selected accounts                              *
-\********************************************************************/
-GList *
-gnc_account_tree_get_current_accounts (GNCAccountTree *tree)
-{
-  if (tree == NULL)
-    return NULL;
-
-  return g_list_copy(tree->current_accounts);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_get_focus_account                               *
- *   return the account at the focus row, or NULL if no focus       *
- *                                                                  *
- * Args: tree - tree to get focus account from                      *
- * Returns: Account at focus row or NULL                            *
-\********************************************************************/
-Account *
-gnc_account_tree_get_focus_account (GNCAccountTree *tree)
-{
-  GtkCTree *ctree;
-  GtkCTreeNode *node;
-  gint row;
-
-  if (!tree)
-    return NULL;
-
-  ctree = GTK_CTREE (tree);
-
-  row = GTK_CLIST(tree)->focus_row;
-  if (row < 0)
-    return NULL;
-
-  node = gtk_ctree_node_nth (ctree, row);
-  if (!node)
-    return NULL;
-
-  return gtk_ctree_node_get_row_data (ctree, node);
-}
-
-
-/********************************************************************\
- * gnc_account_tree_account_selected                                *
- *   return TRUE if the account is selected                         *
- *                                                                  *
- * Args: tree    - tree to check selection for                      *
- *       account - account to check selection for                   *
- * Returns: TRUE if account is selected                             *
-\********************************************************************/
-gboolean
-gnc_account_tree_account_selected (GNCAccountTree *tree,
-                                   Account *account)
-{
-  if (tree == NULL)
-    return FALSE;
-
-  return g_list_find (tree->current_accounts, account) != NULL;
-}
-
-
-/********************************************************************\
- * gnc_init_account_view_info                                       *
- *   initialize an account view info structure with default values  *
- *                                                                  *
- * Args: avi - structure to initialize                              *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_init_account_view_info(AccountViewInfo *avi)
-{
-  int i;
-
-  for (i = 0; i < NUM_ACCOUNT_TYPES; i++)
-    avi->include_type[i] = TRUE;
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    avi->show_field[i] = FALSE;
-
-  avi->show_field[ACCOUNT_NAME] = TRUE;
-  avi->show_field[ACCOUNT_DESCRIPTION] = TRUE;
-  avi->show_field[ACCOUNT_TOTAL] = TRUE;
-}
-
-/********************************************************************\
- * gnc_account_tree_set_view_filter                                 *
- *   sets the account view filter to use with the tree              *
- *                                                                  *
- * Args: tree      - the tree to set the filter on                  *
- *       filter    - the filter function to use                     *
- *       user_data - the user_data for the callback                 *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_set_view_filter(GNCAccountTree *tree,
-                                 AccountFilter filter,
-                                 gpointer user_data)
-{
-  g_return_if_fail(tree != NULL);
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-
-  tree->view_filter = filter;
-  tree->view_filter_data = user_data;
-}
-
-/********************************************************************\
- * gnc_account_tree_set_selectable_filter                           *
- *   sets the account selectable filter to use with the tree        *
- *                                                                  *
- * Args: tree      - the tree to set the filter on                  *
- *       filter    - the filter function to use                     *
- *       user_data - the user_data for the callback                 *
- * Returns: nothing                                                 *
-\********************************************************************/
-void
-gnc_account_tree_set_selectable_filter (GNCAccountTree *tree,
-                                        AccountFilter filter,
-                                        gpointer user_data)
-{
-  g_return_if_fail(tree != NULL);
-  g_return_if_fail(IS_GNC_ACCOUNT_TREE(tree));
-
-  tree->selectable_filter = filter;
-  tree->selectable_filter_data = user_data;
-}
-
-const char *
-gnc_ui_account_get_field_name (AccountFieldCode field)
-{
-  g_return_val_if_fail ((field >= 0) && (field < NUM_ACCOUNT_FIELDS), NULL);
-
-  return(gettext(acct_tree_defaults[field].field_name));
-}
-
-const char *
-gnc_ui_account_get_pref_name (AccountFieldCode field)
-{
-  g_return_val_if_fail ((field >= 0) && (field < NUM_ACCOUNT_FIELDS), NULL);
-
-  return(gettext(acct_tree_defaults[field].field_name));
-}
-
-AccountFieldCode
-gnc_ui_account_pref_name_to_code (const char *pref_name)
-{
-  gint i;
-  g_return_val_if_fail ((pref_name != NULL), ACCOUNT_NAME);
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    if (safe_strcmp(acct_tree_defaults[i].pref_name, pref_name) == 0)
-      return i;
-  return(ACCOUNT_NAME);
-}
-
-static gint
-gnc_account_tree_key_press(GtkWidget *widget, GdkEventKey *event)
-{
-  GNCAccountTree *tree = GNC_ACCOUNT_TREE(widget);
-  Account *account = gnc_account_tree_get_current_account(tree);
-
-  if ((event->keyval == GDK_Return) && (account != NULL))
-  {
-    gtk_signal_emit(GTK_OBJECT(tree),
-                    account_tree_signals[ACTIVATE_ACCOUNT],
-                    account);
-
-    return TRUE;
-  }
-
-  if (GTK_WIDGET_CLASS(parent_class)->key_press_event != NULL)
-    return GTK_WIDGET_CLASS(parent_class)->key_press_event(widget, event);
-
-  return FALSE;
-}
-
-static gint
-gnc_account_tree_button_press(GtkWidget *widget,
-			      GdkEventButton *event)
-{
-  GtkCTree *ctree = GTK_CTREE(widget);
-  GtkCList *clist = GTK_CLIST(widget);
-  GtkCTreeNode *node;
-  Account *account;
-  gint x, y, row, column;
-	
-  if (event->window == clist->clist_window)
-  {
-    x = event->x;
-    y = event->y;
-
-    if (!gtk_clist_get_selection_info(clist, x, y, &row, &column))
-      return FALSE;
-
-    if (event->type == GDK_2BUTTON_PRESS)
-    {
-      node = gtk_ctree_node_nth(ctree, row);
-      account = gtk_ctree_node_get_row_data(ctree, node);
-
-      GNC_ACCOUNT_TREE(ctree)->ignore_unselect = TRUE;
-
-      gtk_signal_emit(GTK_OBJECT(widget),
-		      account_tree_signals[ACTIVATE_ACCOUNT],
-                      account);
-
-      return TRUE;
-    }
-  }
-
-  if (GTK_WIDGET_CLASS(parent_class)->button_press_event != NULL)
-    return GTK_WIDGET_CLASS(parent_class)->button_press_event(widget, event);
-
-  return FALSE;
-}
-
-static void
-gnc_account_tree_select_row(GtkCTree *ctree,
-			    GtkCTreeNode *row,
-			    gint column)
-{
-  GNCAccountTree *tree = GNC_ACCOUNT_TREE(ctree);
-  Account *account;
-  GList *node;
-
-  tree->ignore_unselect = FALSE;
-
-  account = gtk_ctree_node_get_row_data(ctree, GTK_CTREE_NODE(row));
-
-  if (account != NULL)
-  {
-    node = g_list_find(tree->current_accounts, account);
-
-    if (node == NULL)
-      tree->current_accounts = g_list_prepend(tree->current_accounts, account);
-
-    gtk_signal_emit(GTK_OBJECT(ctree),
-                    account_tree_signals[SELECT_ACCOUNT],
-                    account);
-  }
-
-  GTK_CTREE_CLASS(parent_class)->tree_select_row(ctree, row, column);
-}
-
-static void
-gnc_account_tree_unselect_row(GtkCTree *ctree,
-			      GtkCTreeNode *row,
-			      gint column)
-{
-  GNCAccountTree *tree = GNC_ACCOUNT_TREE(ctree);
-  Account *account;
-  GList *node;
-
-  if (tree->ignore_unselect)
-  {
-    tree->ignore_unselect = FALSE;
-    return;
-  }
-
-  account = gtk_ctree_node_get_row_data(ctree, GTK_CTREE_NODE(row));
-
-  node = g_list_find(tree->current_accounts, account);
-  while (node != NULL)
-  {
-    tree->current_accounts = g_list_remove_link(tree->current_accounts, node);
-    g_list_free_1(node);
-
-    node = g_list_find(tree->current_accounts, account);
-  }
-
-  gtk_signal_emit(GTK_OBJECT(ctree),
-		  account_tree_signals[UNSELECT_ACCOUNT],
-		  account);
-
-  GTK_CTREE_CLASS(parent_class)->tree_unselect_row(ctree, row, column);
-}
-
-static void
-gnc_account_tree_fill(GNCAccountTree *tree,
-                      GHashTable     *expanded_accounts,
-		      GtkCTreeNode   *parent,
-                      AccountGroup   *accts)
-{
-  AccountGroup *acc_children;
-  GNCAccountType type;
-  GtkCTreeNode *node;
-  GList *list;
-  GList *n;
-
-  ENTER ("grp=%p", accts);
-
-  list = xaccGroupGetAccountList (accts);
-
-  /* Add each account to the tree */  
-  for (n = list; n; n = n->next)
-  {
-    Account *account = n->data;
-
-    if (tree->view_filter != NULL)
-      if (!tree->view_filter(account, tree->view_filter_data))
-        continue;
-
-    type = xaccAccountGetType(account);
-
-    if (!tree->avi.include_type[type])
-      continue;
-
-    node = gnc_account_tree_insert_row(tree, parent, NULL, account);
-
-    if (tree->selectable_filter != NULL)
-    {
-      gboolean selectable;
-
-      selectable = tree->selectable_filter (account,
-                                            tree->selectable_filter_data);
-
-      gtk_ctree_node_set_selectable (GTK_CTREE(tree), node, selectable);
-    }
-
-    if (g_hash_table_lookup(expanded_accounts, account) != NULL)
-      gtk_ctree_expand(GTK_CTREE(tree), node);
-
-    /* If this account has children,
-     * then we need to build a subtree and fill it. */
-    acc_children = xaccAccountGetChildren(account);
-    if (xaccAccountGetChildren(account) != NULL)
-      gnc_account_tree_fill(tree, expanded_accounts, node, acc_children);
-  }
-  LEAVE(" ");
-}
-
-static GtkCTreeNode *
-gnc_account_tree_insert_row(GNCAccountTree *tree,
-			    GtkCTreeNode *parent,
-			    GtkCTreeNode *sibling,
-			    Account *acc)
-{
-  gchar *text[NUM_ACCOUNT_FIELDS + 1];
-  gboolean negative[NUM_ACCOUNT_FIELDS + 1];
-  GtkCTreeNode *node;
-  gint i;
-
-  if (acc == NULL)
-    return NULL;
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-  {
-    if (tree->avi.show_field[i])
-      text[i] = gnc_ui_account_get_field_value_string(acc, i, &negative[i]);
-    else
-      text[i] = NULL;
-
-    /* Since string fields like notes can be NULL */
-    if (!text[i])
-      text[i] = g_strdup("");
-  }
-
-  text[NUM_ACCOUNT_FIELDS] = NULL;
-
-  node = gtk_ctree_insert_node(GTK_CTREE(tree), parent, sibling,
-			       text, 0, NULL, NULL, NULL, NULL,
-			       FALSE, FALSE);
-
-  for (i = 0; i < NUM_ACCOUNT_FIELDS; i++)
-    g_free(text[i]);
-
-  if (gnc_color_deficits())
-  {
-    GtkStyle *style, *deficit_style, *normal_style;
-    deficit_style = tree->deficit_style;
-    normal_style = gtk_widget_get_style(GTK_WIDGET(tree));
-
-    for (i = 0; i < NUM_ACCOUNT_FIELDS; i++) {
-      style = negative[i] ? deficit_style : normal_style;
-      if (style != NULL) {
-	gtk_ctree_node_set_cell_style(GTK_CTREE(tree), node, i, style);
-      }
-    }
-  }
-
-  /* Set the user_data for the tree item to the account it */
-  /* represents.                                           */
-  gtk_ctree_node_set_row_data(GTK_CTREE(tree), node, acc);
-
-  return node;
-}
-
-static void
-gnc_account_tree_destroy(GtkObject *object)
-{
-  GNCAccountTree *tree = GNC_ACCOUNT_TREE(object);
-
-  gnc_unregister_gui_component_by_data (ACCOUNT_TREE_CM_CLASS, tree);
-
-  if (tree->deficit_style != NULL)
-  {
-    gtk_style_unref(tree->deficit_style);
-    tree->deficit_style = NULL;
-  }
-
-  g_list_free(tree->current_accounts);
-  tree->current_accounts = NULL;
-
-  if (GTK_OBJECT_CLASS(parent_class)->destroy)
-    (* GTK_OBJECT_CLASS(parent_class)->destroy) (object);
-}
Index: gnc-frequency.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-frequency.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/gnome-utils/gnc-frequency.c -Lsrc/gnome-utils/gnc-frequency.c -u -r1.21 -r1.22
--- src/gnome-utils/gnc-frequency.c
+++ src/gnome-utils/gnc-frequency.c
@@ -31,11 +31,11 @@
 #include "FreqSpec.h"
 #include "dialog-utils.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-frequency.h"
 #include "gnc-ui-util.h"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 /** Private Defs ********************/
 
@@ -103,46 +103,48 @@
 
 /** Implementations ********************/
 
-guint
+GType
 gnc_frequency_get_type()
 {
-        static guint gncfreq_type = 0;
-        if ( ! gncfreq_type ) {
-                GtkTypeInfo gncfreq_info =
-                        {
-                                "GNCFrequency",
-                                sizeof(GNCFrequency),
-                                sizeof(GNCFrequencyClass),
-                                (GtkClassInitFunc)gnc_frequency_class_init,
-                                (GtkObjectInitFunc)gnc_frequency_init,
-                                (GtkArgSetFunc)NULL,
-                                (GtkArgGetFunc)NULL
-                        };
-    
-                gncfreq_type = gtk_type_unique( gtk_vbox_get_type(), &gncfreq_info );
+	static GType gncfreq_type = 0;
+        if (gncfreq_type == 0) {
+                static GTypeInfo gncfreq_info = {
+			sizeof(GNCFrequencyClass),
+			NULL,
+			NULL,
+			(GClassInitFunc)gnc_frequency_class_init,
+			NULL,
+			NULL,
+			sizeof(GNCFrequency),
+			0,
+			(GInstanceInitFunc)gnc_frequency_init
+		};
+
+                gncfreq_type = g_type_register_static (GTK_TYPE_VBOX,
+						       "GNCFrequency",
+						       &gncfreq_info, 0);
         }
-        return gncfreq_type;
+
+	return gncfreq_type;
 }
 
 static void
 gnc_frequency_class_init( GNCFrequencyClass *klass )
 {
-        GtkObjectClass *objectClass;
+	GObjectClass *object_class;
+	
+	object_class = G_OBJECT_CLASS (klass);
 
-
-        objectClass = (GtkObjectClass*)klass;
         gnc_frequency_signals[GNCFREQ_CHANGED] =
-                gtk_signal_new( "changed",
-                                GTK_RUN_FIRST,
-                                objectClass->type,
-                                GTK_SIGNAL_OFFSET( GNCFrequencyClass, changed ),
-                                gtk_signal_default_marshaller, GTK_TYPE_NONE, 0 );
-
-        gtk_object_class_add_signals( objectClass,
-                                      gnc_frequency_signals,
-                                      LAST_SIGNAL );
-
-        klass->changed = NULL;
+		g_signal_new ("changed",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (GNCFrequencyClass, changed),
+			      NULL,
+			      NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE,
+			      0);
 }
 
 void
Index: druid-utils.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/druid-utils.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/druid-utils.h -Lsrc/gnome-utils/druid-utils.h -u -r1.2 -r1.3
--- src/gnome-utils/druid-utils.h
+++ src/gnome-utils/druid-utils.h
@@ -24,12 +24,12 @@
 #ifndef DRUID_UTILS_H
 #define DRUID_UTILS_H
 
-#include <gnome.h>
+#include <libgnomeui/gnome-druid.h>
 
-void gnc_druid_set_title_image (GnomeDruid *druid, char *image_path);
+void gnc_druid_set_watermark_images (GnomeDruid *druid,
+				     const char *top_path,
+				     const char *side_path);
 void gnc_druid_set_logo_image (GnomeDruid *druid, char *image_path);
-void gnc_druid_set_watermark_image (GnomeDruid *druid, char *image_path);
-
 void gnc_druid_set_colors (GnomeDruid *druid);
 
 #endif
Index: gnc-dense-cal.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-dense-cal.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/gnome-utils/gnc-dense-cal.c -Lsrc/gnome-utils/gnc-dense-cal.c -u -r1.14 -r1.15
--- src/gnome-utils/gnc-dense-cal.c
+++ src/gnome-utils/gnc-dense-cal.c
@@ -31,7 +31,7 @@
 #include "gnc-dense-cal.h"
 
 /* For PERR, only... */
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 /**
  * Todo:
@@ -96,11 +96,12 @@
 
 static guint gnc_dense_cal_signals[LAST_SIGNAL] = { 0 };
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 static void gnc_dense_cal_class_init (GncDenseCalClass *class);
 static void gnc_dense_cal_init (GncDenseCal *dcal);
-static void gnc_dense_cal_destroy (GtkObject *object);
+static void gnc_dense_cal_finalize (GObject *object);
+static void gnc_dense_cal_dispose (GObject *object);
 static void gnc_dense_cal_realize (GtkWidget *widget);
 static void gnc_dense_cal_draw_to_buffer( GncDenseCal *dcal );
 static gint gnc_dense_cal_expose( GtkWidget      *widget,
@@ -143,7 +144,7 @@
  **/
 static int num_weeks_per_col( GncDenseCal *dcal );
 
-/** hotspot calculation **/
+/* hotspot calculation */
 static gint wheres_this( GncDenseCal *dcal, int x, int y );
 
 static void recompute_x_y_scales( GncDenseCal *dcal );
@@ -199,51 +200,57 @@
 }
 
 
-GtkType
+GType
 gnc_dense_cal_get_type ()
 {
-        static GtkType dense_cal_type = 0;
+        static GType dense_cal_type = 0;
 
-        if (!dense_cal_type)
-        {
-                static const GtkTypeInfo dense_cal_info =
-                        {
-                                "GncDenseCal",
-                                sizeof (GncDenseCal),
+        if (dense_cal_type == 0) {
+                static const GTypeInfo dense_cal_info = {
                                 sizeof (GncDenseCalClass),
-                                (GtkClassInitFunc) gnc_dense_cal_class_init,
-                                (GtkObjectInitFunc) gnc_dense_cal_init,
-                                /* reserved_1 */ NULL,
-                                /* reserved_1 */ NULL,
-                                (GtkClassInitFunc) NULL
-                        };
-
-                dense_cal_type =
-                        gtk_type_unique (GTK_TYPE_WIDGET, &dense_cal_info);
+				NULL,
+				NULL,
+                                (GClassInitFunc) gnc_dense_cal_class_init,
+				NULL,
+				NULL,
+                                sizeof (GncDenseCal),
+				0,  /* n_preallocs */
+                                (GInstanceInitFunc) gnc_dense_cal_init,
+                                NULL
+		};
+
+                dense_cal_type = g_type_register_static(GTK_TYPE_WIDGET,
+						"GncDenseCal",
+						&dense_cal_info, 0);
         }
 
         return dense_cal_type;
 }
 
 static void
-gnc_dense_cal_class_init (GncDenseCalClass *class)
+gnc_dense_cal_class_init (GncDenseCalClass *klass)
 {
-        GtkObjectClass *object_class;
+        GObjectClass *object_class;
         GtkWidgetClass *widget_class;
 
-        object_class = (GtkObjectClass*) class;
-        widget_class = (GtkWidgetClass*) class;
-        parent_class = gtk_type_class (gtk_widget_get_type ());
+        object_class =  G_OBJECT_CLASS (klass);
+        widget_class = GTK_WIDGET_CLASS (klass);
+
+        parent_class = g_type_class_peek_parent (klass);
 
         gnc_dense_cal_signals[MARKS_LOST_SIGNAL] =
-                gtk_signal_new( MARKS_LOST_SIGNAL_NAME,
-                                GTK_RUN_LAST,
-                                object_class->type,
-                                GTK_SIGNAL_OFFSET( GncDenseCalClass, marks_lost_cb ),
-                                gtk_signal_default_marshaller, GTK_TYPE_NONE, 0 );
-        gtk_object_class_add_signals (object_class, gnc_dense_cal_signals, LAST_SIGNAL);
+                g_signal_new (MARKS_LOST_SIGNAL_NAME,
+			      G_OBJECT_CLASS_TYPE (object_class),
+                              G_SIGNAL_RUN_LAST,
+                              G_STRUCT_OFFSET (GncDenseCalClass, marks_lost_cb),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE,
+			      0);
+
+        object_class->finalize = gnc_dense_cal_finalize;
+        object_class->dispose = gnc_dense_cal_dispose;
 
-        object_class->destroy = gnc_dense_cal_destroy;
         widget_class->realize = gnc_dense_cal_realize;
         widget_class->expose_event = gnc_dense_cal_expose;
         widget_class->size_request = gnc_dense_cal_size_request;
@@ -257,6 +264,7 @@
 {
         gboolean colorAllocSuccess;
 
+        dcal->disposed = FALSE;
         dcal->initialized = FALSE;
         dcal->markData = NULL;
         dcal->numMarks = 0;
@@ -314,11 +322,14 @@
                 gint i;
                 gint maxWidth, maxHeight, maxAscent, maxLBearing;
                 gint lbearing, rbearing, width, ascent, descent;
+		GtkStyle *style;
 
                 dcal->monthLabelFont = gdk_font_load( LABEL_FONT_NAME );
                 g_assert( dcal->monthLabelFont );
 
-                dcal->dayLabelFont = GTK_WIDGET(dcal)->style->font;
+		/* FIXME GNOME 2 port (rework the complete font code) */
+                style = gtk_widget_get_style(GTK_WIDGET(dcal));
+                dcal->dayLabelFont = gtk_style_get_font(style);
                 gdk_font_ref( dcal->dayLabelFont );
                 g_assert( dcal->dayLabelFont );
 
@@ -355,8 +366,8 @@
 
                 tmpDate = g_date_new();
                 g_date_set_time( tmpDate, time(NULL) );
-                gnc_dense_cal_set_month( dcal, g_date_month(tmpDate) );
-                gnc_dense_cal_set_year( dcal, g_date_year(tmpDate) );
+                gnc_dense_cal_set_month( dcal, g_date_get_month(tmpDate) );
+                gnc_dense_cal_set_year( dcal, g_date_get_year(tmpDate) );
                 g_date_free( tmpDate );
         }
 
@@ -375,7 +386,6 @@
                             / 3.0 ),
                      gdk_string_height( dcal->dayLabelFont, "88" ) + 2 );
         dcal->dayLabelHeight = gdk_string_height( dcal->monthLabelFont, "88" );
-        
         dcal->initialized = TRUE;
 }
 
@@ -383,7 +393,7 @@
 gnc_dense_cal_new(void)
 {
         GncDenseCal *dcal;
-        dcal = gtk_type_new (gnc_dense_cal_get_type ());
+        dcal = g_object_new(GNC_TYPE_DENSE_CAL, NULL, NULL);
 
         return GTK_WIDGET (dcal);
 }
@@ -394,7 +404,7 @@
         GDate *tmpDate;
 
         tmpDate = g_date_new_dmy( 1, dcal->month, dcal->year );
-        dcal->firstOfMonthOffset = g_date_weekday( tmpDate ) % 7;
+        dcal->firstOfMonthOffset = g_date_get_weekday( tmpDate ) % 7;
         g_date_free( tmpDate );
 }
 
@@ -463,7 +473,7 @@
 }
 
 static void
-gnc_dense_cal_destroy (GtkObject *object)
+gnc_dense_cal_dispose (GObject *object)
 {
         int i;
         GncDenseCal *dcal;
@@ -472,28 +482,57 @@
 
         dcal = GNC_DENSE_CAL(object);
 
+	if(dcal->disposed)
+		return;
+
+	dcal->disposed = TRUE;
+
         if ( GTK_WIDGET_REALIZED( dcal->transPopup ) ) {
                 gtk_widget_hide( GTK_WIDGET(dcal->transPopup) );
                 gtk_widget_destroy( GTK_WIDGET(dcal->transPopup) );
                 dcal->transPopup = NULL;
         }
 
-        if ( dcal->drawbuf )
+        if ( dcal->drawbuf ) {
                 gdk_pixmap_unref( dcal->drawbuf );
+		dcal->drawbuf = NULL;
+	}
 
         /* FIXME: we have a bunch of cleanup to do, here. */
         /* monthLabelFont, dayLabelFont */
-        gdk_font_unref( dcal->monthLabelFont );
-        gdk_font_unref( dcal->dayLabelFont );
+        if ( dcal->monthLabelFont ) {
+		gdk_font_unref( dcal->monthLabelFont );
+		dcal->monthLabelFont = NULL;
+	}
+        if ( dcal->dayLabelFont ) {
+		gdk_font_unref( dcal->dayLabelFont );
+		dcal->dayLabelFont = NULL;
+	}
         /* month labels */
-        for ( i=0; i < 12; i++ ) {
-                gdk_pixmap_unref( dcal->monthLabels[i] );
+	if ( dcal->monthLabels[0] ) {
+        	for ( i=0; i < 12; i++ ) {
+                	gdk_pixmap_unref( dcal->monthLabels[i] );
+                	dcal->monthLabels[i] = NULL;
+		}
         }
         /* mark data */
         gdc_free_all_mark_data( dcal );
 
-        if (GTK_OBJECT_CLASS (parent_class)->destroy)
-                (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
+        if (G_OBJECT_CLASS (parent_class)->dispose)
+                (* G_OBJECT_CLASS (parent_class)->dispose) (object);
+}
+
+static void
+gnc_dense_cal_finalize (GObject *object)
+{
+        GncDenseCal *dcal;
+        g_return_if_fail (object != NULL);
+        g_return_if_fail (GNC_IS_DENSE_CAL (object));
+
+        dcal = GNC_DENSE_CAL(object);
+
+        if (G_OBJECT_CLASS (parent_class)->finalize)
+                (* G_OBJECT_CLASS (parent_class)->finalize) (object);
 }
 
 static void
@@ -661,11 +700,11 @@
 
         g_date_clear( &date, 1 );
         g_date_set_dmy( &date, 1, dcal->month, dcal->year );
-        start_week = g_date_sunday_week_of_year(&date);
+        start_week = g_date_get_sunday_week_of_year(&date);
         g_date_add_months( &date, dcal->numMonths );
-        end_week = g_date_sunday_week_of_year(&date);
-        if ( g_date_year(&date) != dcal->year ) {
-                end_week += g_date_sunday_weeks_in_year( dcal->year );
+        end_week = g_date_get_sunday_week_of_year(&date);
+        if ( g_date_get_year(&date) != dcal->year ) {
+                end_week += g_date_get_sunday_weeks_in_year( dcal->year );
         }
         dcal->num_weeks = end_week - start_week + 1;
 }
@@ -962,11 +1001,11 @@
                 g_date_set_dmy( &d, 1, dcal->month, dcal->year );
                 eoc = d;
                 g_date_add_months( &eoc, dcal->numMonths );
-                for ( doc = 0; g_date_julian(&d) < g_date_julian(&eoc);
+                for ( doc = 0; g_date_get_julian(&d) < g_date_get_julian(&eoc);
                       g_date_add_days( &d, 1 ), doc++ ) {
                         doc_coords( dcal, doc, &x1, &y1, &x2, &y2 );
                         memset( dayNumBuf, 0, 3 );
-                        snprintf( dayNumBuf, 3, "%d", g_date_day( &d ) );
+                        snprintf( dayNumBuf, 3, "%d", g_date_get_day( &d ) );
                         numW = gdk_string_width( dcal->dayLabelFont, dayNumBuf );
                         numH = gdk_string_height( dcal->dayLabelFont, dayNumBuf );
                         w = (x2 - x1)+1;
@@ -1044,10 +1083,16 @@
         doc = wheres_this( dcal, evt->x, evt->y );
         dcal->showPopup = ~(dcal->showPopup);
         if ( dcal->showPopup && doc >= 0 ) {
-                gdk_window_move( GTK_WIDGET(dcal->transPopup)->window,
-                                 evt->x_root+5, evt->y_root+5 );
+                // Do the move twice in case the WM is ignoring the first one
+                // because the window hasn't been shown, yet.  The WM is free
+                // to ignore our move and place windows according to it's own
+                // strategy, but hopefully it'll listen to us.  Certainly the
+                // second move after show_all'ing the window should do the
+                // trick with a bit of flicker.
+                gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root+5, evt->y_root+5);
                 populate_hover_window( dcal, doc );
                 gtk_widget_show_all( GTK_WIDGET(dcal->transPopup) );
+                gtk_window_move(GTK_WINDOW(dcal->transPopup), evt->x_root+5, evt->y_root+5);
         } else {
                 gtk_widget_hide( GTK_WIDGET(dcal->transPopup) );
         }
@@ -1200,10 +1245,10 @@
                                                   - ((i-1)
                                                      * dcal->monthsPerCol) ) ) );
                 g_date_subtract_days( end, 1 );
-                startWeek = g_date_sunday_week_of_year( start );
-                endWeek = g_date_sunday_week_of_year( end );
+                startWeek = g_date_get_sunday_week_of_year( start );
+                endWeek = g_date_get_sunday_week_of_year( end );
                 if ( endWeek < startWeek ) {
-                        endWeek += g_date_sunday_weeks_in_year( g_date_year(start) );
+                        endWeek += g_date_get_sunday_weeks_in_year( g_date_get_year(start) );
                 }
                 num_weeks_toRet = MAX( num_weeks_toRet, (endWeek - startWeek)+1 );
         }
@@ -1244,19 +1289,19 @@
                                 ((dcal->month - 1 + monthOffset) % 12) + 1,
                                 dcal->year + floor((dcal->month-1+monthOffset)/12) );
                 /* get the week of the top of the column */
-                startWk = g_date_sunday_week_of_year( startD );
+                startWk = g_date_get_sunday_week_of_year( startD );
                 /* get the week of the end of the previous months */
                 *endD = *startD;
                 g_date_add_months( endD, previousMonthsInCol );
                 g_date_subtract_days( endD, 1 );
-                endWk = g_date_sunday_week_of_year( endD );
+                endWk = g_date_get_sunday_week_of_year( endD );
                 if ( endWk < startWk ) {
-                        endWk += g_date_sunday_weeks_in_year( g_date_year(startD) );
+                        endWk += g_date_get_sunday_weeks_in_year( g_date_get_year(startD) );
                 }
                 /* determine how many weeks are before the month we're
                  * interested in. */
                 weekRow = endWk - startWk;
-                if ( g_date_weekday(endD) == G_DATE_SATURDAY ) {
+                if ( g_date_get_weekday(endD) == G_DATE_SATURDAY ) {
                         weekRow++;
                 }
         }
@@ -1269,7 +1314,7 @@
         g_date_subtract_days( endD, 1 );
         /* Get the first week. */
         {
-                start = g_date_weekday( startD ) % 7;
+                start = g_date_get_weekday( startD ) % 7;
                 rect = g_new0( GdkRectangle, 1 );
                 rect->x = dcal->leftPadding
                         + MINOR_BORDER_SIZE
@@ -1290,8 +1335,8 @@
         {
                 gint i, weekStart, weekEnd;
 
-                weekStart = g_date_sunday_week_of_year(startD)+1;
-                weekEnd = g_date_sunday_week_of_year(endD);
+                weekStart = g_date_get_sunday_week_of_year(startD)+1;
+                weekEnd = g_date_get_sunday_week_of_year(endD);
                 for ( i=weekStart; i<weekEnd; i++ ) {
                         rect = g_new0( GdkRectangle, 1 );
                         rect->x = dcal->leftPadding
@@ -1321,10 +1366,10 @@
                         + MINOR_BORDER_SIZE
                         + dcal->dayLabelHeight
                         + ((weekRow
-                            + (g_date_sunday_week_of_year(endD)
-                               - g_date_sunday_week_of_year(startD)))
+                            + (g_date_get_sunday_week_of_year(endD)
+                               - g_date_get_sunday_week_of_year(startD)))
                            * week_height(dcal));
-                rect->width = ((g_date_weekday(endD) % 7)+1) * day_width(dcal);
+                rect->width = ((g_date_get_weekday(endD) % 7)+1) * day_width(dcal);
                 rect->height = week_height(dcal);
 
                 *outList = g_list_append( *outList, (gpointer)rect );
@@ -1345,19 +1390,19 @@
         /* FIXME: add range checks */
         g_date_set_dmy( &d, 1, dcal->month, dcal->year );
         g_date_add_days( &d, dayOfCal );
-        docMonth = g_date_month( &d );
-        if ( g_date_year( &d ) != dcal->year ) {
+        docMonth = g_date_get_month( &d );
+        if ( g_date_get_year( &d ) != dcal->year ) {
                 docMonth += 12;
         }
         colNum  = floor( (float)(docMonth - dcal->month) / (float)dcal->monthsPerCol );
-        dayCol  = g_date_weekday( &d ) % 7;
-        d_week_of_cal = g_date_sunday_week_of_year( &d );
+        dayCol  = g_date_get_weekday( &d ) % 7;
+        d_week_of_cal = g_date_get_sunday_week_of_year( &d );
         g_date_set_dmy( &d, 1, dcal->month, dcal->year );
         g_date_add_months( &d, (colNum * dcal->monthsPerCol) );
-        top_of_col_week_of_cal = g_date_sunday_week_of_year( &d );
+        top_of_col_week_of_cal = g_date_get_sunday_week_of_year( &d );
         if ( d_week_of_cal < top_of_col_week_of_cal ) {
                 d_week_of_cal +=
-                        g_date_sunday_weeks_in_year( dcal->year );
+                        g_date_get_sunday_weeks_in_year( dcal->year );
         }
         weekRow = d_week_of_cal - top_of_col_week_of_cal;
 
@@ -1444,7 +1489,7 @@
         g_date_set_dmy( &startD, 1, dcal->month, dcal->year );
         d = startD;
         g_date_add_months( &d, (colNum * dcal->monthsPerCol) );
-        dayCol -= (g_date_weekday(&d) % 7);
+        dayCol -= (g_date_get_weekday(&d) % 7);
         if ( weekRow == 0 ) {
                 if ( dayCol < 0 ) {
 		    /*DEBUG( "Before the beginning of the first month." );*/
@@ -1458,21 +1503,21 @@
                 GDate ccd;
                 g_date_set_dmy( &ccd, 1, dcal->month, dcal->year );
                 g_date_add_months( &ccd, (colNum+1) * dcal->monthsPerCol );
-                if ( g_date_julian(&d) >= g_date_julian(&ccd) ) {
+                if ( g_date_get_julian(&d) >= g_date_get_julian(&ccd) ) {
 		    /*DEBUG( "%d outside of column range [%d]",
-		      g_date_julian(&d), g_date_julian(&ccd) );*/
+		      g_date_get_julian(&d), g_date_get_julian(&ccd) );*/
                         return -1;
                 }
         }
 
-        dayOfCal = g_date_julian(&d) - g_date_julian(&startD);
+        dayOfCal = g_date_get_julian(&d) - g_date_get_julian(&startD);
 
         /* one more check before returning... */
         g_date_subtract_months( &d, dcal->numMonths );
-        if ( g_date_julian(&d) >= g_date_julian(&startD) ) {
+        if ( g_date_get_julian(&d) >= g_date_get_julian(&startD) ) {
                 /* we're past the end of the displayed calendar, thus -1 */
                 DEBUG( "%d >= %d",
-                       g_date_julian( &d ), g_date_julian( &startD ) );
+                       g_date_get_julian( &d ), g_date_get_julian( &startD ) );
                 return -1;
         }
 
@@ -1488,15 +1533,15 @@
 
         g_date_set_dmy( &soc, 1, dcal->month, dcal->year );
         /* ensure not before calendar start. */
-        if ( g_date_julian(d) < g_date_julian(&soc) ) {
+        if ( g_date_get_julian(d) < g_date_get_julian(&soc) ) {
                 return -1;
         }
         /* do computation here, since we're going to change the
          * start-of-calendar date. */
-        toRet = g_date_julian(d) - g_date_julian(&soc);
+        toRet = g_date_get_julian(d) - g_date_get_julian(&soc);
         /* ensure not after end of visible calendar. */
         g_date_add_months( &soc, dcal->numMonths );
-        if ( g_date_julian(d) > g_date_julian(&soc) ) {
+        if ( g_date_get_julian(d) > g_date_get_julian(&soc) ) {
                 return -1;
         }
         /* return pre-computed value. */
Index: dialog-transfer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-transfer.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/gnome-utils/dialog-transfer.c -Lsrc/gnome-utils/dialog-transfer.c -u -r1.22 -r1.23
--- src/gnome-utils/dialog-transfer.c
+++ src/gnome-utils/dialog-transfer.c
@@ -24,22 +24,22 @@
 
 #include "config.h"
 
-#include <gnome.h>
+#include <gtk/gtk.h>
 
 #include "dialog-transfer.h"
 #include "dialog-utils.h"
-#include "global-options.h"
-#include "gnc-account-tree.h"
 #include "gnc-amount-edit.h"
 #include "gnc-book.h"
 #include "gnc-component-manager.h"
 #include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-euro.h"
 #include "gnc-exp-parser.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-gui-query.h"
-#include "gnc-ui.h"
 #include "gnc-pricedb.h"
+#include "gnc-tree-view-account.h"
+#include "gnc-ui.h"
 #include "messages.h"
 #include "Transaction.h"
 #include "Account.h"
@@ -48,6 +48,7 @@
 #define DIALOG_TRANSFER_CM_CLASS "dialog-transfer"
 
 #define PRECISION 1000000
+
 typedef enum
 {
   XFER_DIALOG_FROM,
@@ -56,7 +57,7 @@
 
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 struct _xferDialog
 {
@@ -71,16 +72,16 @@
   GtkWidget * conv_reverse;
 
   GtkWidget *	from_window;
-  GNCAccountTree * from;
+  GtkTreeView * from_tree_view;
   gnc_commodity *	from_commodity;
   GtkWidget *	to_window;
-  GNCAccountTree * to;
+  GtkTreeView * to_tree_view;
   gnc_commodity *	to_commodity;
 
   QuickFill * qf;     /* Quickfill on transfer descriptions, 
                          defaults to matching on the "From" account. */
 
-  gboolean quickfill_to;  /* match on the "To" account instead. */
+  XferDirection quickfill;	/* direction match on the account instead. */
 
   /* stored data for the description quickfill functionality */
   gint desc_start_selection;
@@ -88,8 +89,10 @@
   gint desc_cursor_position;
   gboolean desc_didquickfill;
 
-  GtkWidget * from_transfer_frame;
-  GtkWidget * to_transfer_frame;
+  GtkWidget * transferinfo_label;
+
+  GtkWidget * from_transfer_label;
+  GtkWidget * to_transfer_label;
 
   GtkWidget * from_currency_label;
   GtkWidget * to_currency_label;
@@ -97,7 +100,7 @@
   GtkWidget * from_show_button;
   GtkWidget * to_show_button;
 
-  GtkWidget * curr_transfer_frame;
+  GtkWidget * curr_xfer_table;
 
   GtkWidget * price_edit;
   GtkWidget * to_amount_edit;
@@ -115,13 +118,6 @@
    */
   gnc_numeric * exch_rate;
 
-  /* a place to store the result quality (ok or cancel) because gnome_dialog_run
-   * doesn't seem to work right for this function.  <-- That's probably because
-   * the dialog is being closed and deleted out from under the gnome_dialog_run
-   * function.
-   */
-  gboolean *	result_p;
-
   /* Callback funtion to notify of the newly created Transaction */
   gnc_xfer_dialog_cb transaction_cb;
   /* , and its user_data */
@@ -140,6 +136,13 @@
 static void gnc_xfer_update_to_amount (XferDialog *xferData);
 static void gnc_xfer_dialog_update_conv_info(XferDialog *xferData);
 
+static Account *gnc_transfer_dialog_get_selected_account (XferDialog *dialog,
+							  XferDirection direction);
+static void gnc_transfer_dialog_set_selected_account (XferDialog *dialog,
+						      Account *account,
+						      XferDirection direction);
+void gnc_xfer_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data);
+void gnc_xfer_dialog_close_cb(GtkDialog *dialog, gpointer data);
 
 /** Implementations **********************************************/
 
@@ -206,12 +209,7 @@
 static void
 gnc_xfer_dialog_toggle_cb(GtkToggleButton *button, gpointer data)
 {
-  GNCAccountTree *tree = GNC_ACCOUNT_TREE(data);
-
-  if (gtk_toggle_button_get_active(button))
-    gnc_account_tree_show_income_expense(tree);
-  else
-    gnc_account_tree_hide_income_expense(tree);
+  gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT (data));
 }
 
 static void
@@ -264,17 +262,17 @@
   gboolean curr_active;
 
   from_account = 
-    gnc_account_tree_get_current_account(GNC_ACCOUNT_TREE(xferData->from));
+    gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
 
   to_account = 
-    gnc_account_tree_get_current_account(GNC_ACCOUNT_TREE(xferData->to));
+    gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
 
   curr_active = (xferData->exch_rate ||
 		 ((from_account != NULL) && (to_account != NULL)))
 		 && !gnc_commodity_equiv(xferData->from_commodity,
 					 xferData->to_commodity);
 
-  gtk_widget_set_sensitive(xferData->curr_transfer_frame, curr_active);
+  gtk_widget_set_sensitive(xferData->curr_xfer_table, curr_active);
   gtk_widget_set_sensitive(xferData->price_edit,
 			   curr_active && gtk_toggle_button_get_active
 			   (GTK_TOGGLE_BUTTON(xferData->price_radio)));
@@ -327,13 +325,8 @@
   Split *split;
   Transaction *trans;
   Account *account;
-  
-  if( xferData->quickfill_to )
-    account = gnc_account_tree_get_current_account(
-                                      GNC_ACCOUNT_TREE(xferData->to));
-  else
-    account = gnc_account_tree_get_current_account(
-                                      GNC_ACCOUNT_TREE(xferData->from));
+
+  account = gnc_transfer_dialog_get_selected_account (xferData, xferData->quickfill);
 
   /* get a new QuickFill to use */
   gnc_quickfill_destroy( xferData->qf );
@@ -352,14 +345,15 @@
 
 
 static void
-gnc_xfer_dialog_from_tree_select_cb(GNCAccountTree *tree,
-				    Account *account, gpointer data)
+gnc_xfer_dialog_from_tree_selection_changed_cb (GtkTreeSelection *selection,
+						gpointer data)
 {
   XferDialog *xferData = data;
   GNCPrintAmountInfo print_info;
   gnc_commodity *commodity;
+  Account *account;
 
-  account = gnc_account_tree_get_current_account(tree);
+  account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
   commodity = xaccAccountGetCommodity(account);
   gtk_label_set_text(GTK_LABEL(xferData->from_currency_label), 
 		     gnc_commodity_get_printname(commodity));
@@ -376,20 +370,20 @@
                                 xaccAccountGetCommoditySCU (account));
 
   /* Reload the xferDialog quickfill if it is based on the from account */
-  if( !xferData->quickfill_to )
+  if (xferData->quickfill == XFER_DIALOG_FROM)
     gnc_xfer_dialog_reload_quickfill(xferData);
 }
 
 
 static void
-gnc_xfer_dialog_to_tree_select_cb(GNCAccountTree *tree,
-				  Account *account, gpointer data)
+gnc_xfer_dialog_to_tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
 {
   XferDialog *xferData = data;
   GNCPrintAmountInfo print_info;
   gnc_commodity *commodity;
+  Account *account;
 
-  account = gnc_account_tree_get_current_account(tree);
+  account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
   commodity = xaccAccountGetCommodity(account);
   gtk_label_set_text(GTK_LABEL(xferData->to_currency_label),
 		     gnc_commodity_get_printname(commodity));
@@ -406,37 +400,41 @@
                                 xaccAccountGetCommoditySCU (account));
 
   /* Reload the xferDialog quickfill if it is based on the to account */
-  if( xferData->quickfill_to )
+  if (xferData->quickfill == XFER_DIALOG_TO)
     gnc_xfer_dialog_reload_quickfill(xferData);
 }
 
+static gboolean
+gnc_xfer_dialog_show_inc_exp_visible_cb (Account *account,
+					 gpointer data)
+{
+  GtkCheckButton *show_button;
+  GNCAccountType type;
+
+  g_return_val_if_fail (GTK_IS_CHECK_BUTTON (data), FALSE);
+
+  show_button = GTK_CHECK_BUTTON (data);
+  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (show_button))) {
+    return TRUE;
+  }
+
+  type = xaccAccountGetType(account);
+  return ((type != INCOME) && (type != EXPENSE)); 
+}
 
 static void
-gnc_xfer_dialog_fill_tree_frame(XferDialog *xferData,
-                                XferDirection direction)
+gnc_xfer_dialog_fill_tree_view(XferDialog *xferData,
+			       XferDirection direction)
 {
+  GtkTreeView *tree_view;
   const char *show_inc_exp_message = _("Show the income and expense accounts");
-  GNCAccountTree *atree;
-  GtkWidget *scroll_win;
+  GtkWidget *scroll_win, *box;
   GtkWidget *button;
-  GtkWidget *tree;
+  GtkTreeSelection *selection;
   gboolean  use_accounting_labels;
 
-  use_accounting_labels = gnc_lookup_boolean_option("Accounts",
-						    "Use accounting labels",
-						    FALSE);
-
-  tree = gnc_account_tree_new();
-  atree = GNC_ACCOUNT_TREE (tree);
-
-  if (direction == XFER_DIALOG_TO)
-    xferData->to = atree;
-  else
-    xferData->from = atree;
-  gtk_clist_column_titles_hide(GTK_CLIST(tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(tree));
-  gnc_account_tree_hide_income_expense(GNC_ACCOUNT_TREE(tree));
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(tree));
+  use_accounting_labels = gnc_gconf_get_bool(GCONF_GENERAL,
+					     KEY_ACCOUNTING_LABELS, NULL);
 
   /* In "normal" mode (non accounting terms) the account where the
    * money comes from is displayed on the left side and the account
@@ -450,59 +448,59 @@
    * trees when in "accountant" mode. -- Herbert Thoma, 2004-01-18
    */
   if(use_accounting_labels) {
+    box = gnc_glade_lookup_widget (xferData->dialog,
+				   (direction == XFER_DIALOG_TO) ?
+				   "left_tree_box" : "right_tree_box");
+    button = gnc_glade_lookup_widget (xferData->dialog,
+				      (direction == XFER_DIALOG_TO) ?
+				      "left_show_button" : "right_show_button");
     scroll_win = gnc_glade_lookup_widget (xferData->dialog,
 					  (direction == XFER_DIALOG_TO) ?
 					  "left_trans_window" : "right_trans_window");
   }
   else {
+    box = gnc_glade_lookup_widget (xferData->dialog,
+				   (direction == XFER_DIALOG_TO) ?
+				   "right_tree_box" : "left_tree_box");
+    button = gnc_glade_lookup_widget (xferData->dialog,
+				      (direction == XFER_DIALOG_TO) ?
+				      "right_show_button" : "left_show_button");
     scroll_win = gnc_glade_lookup_widget (xferData->dialog,
 					  (direction == XFER_DIALOG_TO) ?
 					  "right_trans_window" : "left_trans_window");
   }
 
-  if (direction == XFER_DIALOG_TO)
-    xferData->to_window = scroll_win;
-  else
-    xferData->from_window = scroll_win;
+  tree_view = GTK_TREE_VIEW(gnc_tree_view_account_new(FALSE));
+  gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(tree_view));
+  gnc_tree_view_account_set_filter (GNC_TREE_VIEW_ACCOUNT (tree_view),
+				    gnc_xfer_dialog_show_inc_exp_visible_cb,
+				    button, /* user data */
+				    NULL    /* destroy callback */);
+ /* Have to force the filter once. Alt is to show income/expense by default. */
+  gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT (tree_view));
+  gtk_widget_show(GTK_WIDGET(tree_view));
 
-  gtk_container_add(GTK_CONTAINER(scroll_win), tree);
+  selection = gtk_tree_view_get_selection (tree_view);
+  gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
 
-  {
-    GtkStyle *st = gtk_widget_get_style(tree);
-    GdkFont *font = NULL;
-    gint height;
-
-    if (st != NULL)
-      font = st->font;
-
-    if (font != NULL)
-    {
-      height = gdk_char_height(font, 'X');
-      gtk_widget_set_usize(scroll_win, 0, (height + 6) * 10);
-    }
-  }
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), FALSE);
+  gtk_tooltips_set_tip (xferData->tips, GTK_WIDGET (button), show_inc_exp_message, NULL);
 
-  if(use_accounting_labels) {
-    button = gnc_glade_lookup_widget (xferData->dialog,
-				      (direction == XFER_DIALOG_TO) ?
-				      "left_show_button" : "right_show_button");
-  }
-  else {
-    button = gnc_glade_lookup_widget (xferData->dialog,
-				      (direction == XFER_DIALOG_TO) ?
-				      "right_show_button" : "left_show_button");
+  if (direction == XFER_DIALOG_TO) {
+    xferData->to_tree_view = tree_view;
+    xferData->to_window = scroll_win;
+    xferData->to_show_button = GTK_WIDGET (button);
+    g_signal_connect (G_OBJECT (selection), "changed",
+		      G_CALLBACK (gnc_xfer_dialog_to_tree_selection_changed_cb), xferData);
+  } else {
+    xferData->from_tree_view = tree_view;
+    xferData->from_window = scroll_win;
+    xferData->from_show_button = GTK_WIDGET (button);
+    g_signal_connect (G_OBJECT (selection), "changed",
+		      G_CALLBACK (gnc_xfer_dialog_from_tree_selection_changed_cb), xferData);
   }
-
-  if (direction == XFER_DIALOG_TO)
-    xferData->to_show_button = button;
-  else
-    xferData->from_show_button = button;
-
-  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
-  gtk_tooltips_set_tip(xferData->tips, button, show_inc_exp_message, NULL);
-
-  gtk_signal_connect(GTK_OBJECT(button), "toggled",
-		     GTK_SIGNAL_FUNC(gnc_xfer_dialog_toggle_cb), tree);
+  g_signal_connect (G_OBJECT (button), "toggled",
+		    G_CALLBACK (gnc_xfer_dialog_toggle_cb), tree_view);
 }
 
 
@@ -535,20 +533,20 @@
 static gboolean
 gnc_xfer_dialog_quickfill( XferDialog *xferData )
 {
-  char *desc;
+  const char *desc;
   Account *match_account;  /* the matched text was from this account */
   Split *split;            /* the split to autocomplete from */
   Split *other = NULL;     /* the other split of the transaction */
   Account *other_acct = NULL;   /* the Account of the other split */
   gboolean changed = FALSE;
 
-  if( !xferData )
+  ENTER("xferData=%p", xferData);
+  if( !xferData ) {
+    LEAVE("bad args");
     return( FALSE );
+  }
 
-  if( xferData->quickfill_to )
-    match_account = gnc_account_tree_get_current_account( xferData->to );
-  else
-    match_account = gnc_account_tree_get_current_account( xferData->from );
+  match_account = gnc_transfer_dialog_get_selected_account (xferData, xferData->quickfill);
 
   desc = gtk_entry_get_text( GTK_ENTRY(xferData->description_entry) );
 
@@ -557,8 +555,11 @@
 
   split = xaccAccountFindSplitByDesc( match_account, desc );
 
-  if( !split )
+  if( !split ) {
+    LEAVE("split not found");
     return( FALSE );
+  }
+  DEBUG("split=%p", split);
 
   /* Now update any blank fields of the transfer dialog with
    * the memo and amount from the split, and the description
@@ -568,7 +569,9 @@
   if( gnc_numeric_zero_p(
            gnc_amount_edit_get_amount(GNC_AMOUNT_EDIT(xferData->amount_edit))))
   {
-    gnc_numeric amt = xaccSplitGetValue( split );
+    gnc_numeric amt;
+    DEBUG("updating amount");
+    amt = xaccSplitGetValue( split );
 
     /* If we've matched a previous transfer, it will appear
      * to be negative in the from account.
@@ -584,6 +587,7 @@
 
   if( !safe_strcmp(gtk_entry_get_text(GTK_ENTRY(xferData->memo_entry)),"" ))
   {
+    DEBUG("updating memo");
     gtk_entry_set_text( GTK_ENTRY(xferData->memo_entry),
                         xaccSplitGetMemo( split ) );
     changed = TRUE;
@@ -597,18 +601,15 @@
   if( ( other = xaccSplitGetOtherSplit( split ) ) &&
       ( other_acct = xaccSplitGetAccount( other ) ) )
   {
-    GNCAccountTree *other_tree;
     GNCAccountType other_type;
     GtkWidget *other_button;
     
-    if( xferData->quickfill_to )
-    {
-      other_tree = xferData->from;
+    DEBUG("updating other split");
+    if (xferData->quickfill == XFER_DIALOG_FROM) {
       other_button = xferData->from_show_button;
     }
     else
     {
-      other_tree = xferData->to;
       other_button = xferData->to_show_button;
     }
 
@@ -620,7 +621,7 @@
     if( (other_type == EXPENSE) || (other_type == INCOME) )
       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_button), TRUE);
 
-    gnc_account_tree_select_account(other_tree, other_acct, TRUE);
+    gnc_transfer_dialog_set_selected_account (xferData, other_acct, xferData->quickfill);
 
     changed = TRUE;
   }
@@ -641,12 +642,13 @@
                                gint *start_pos,
                                XferDialog *xferData)
 {
-  GdkWChar *change_text_w, *old_text_w, *new_text_w;
-  int change_text_len, old_text_len, new_text_len, old_pos;
-  char *new_text;
+  GString *change_text_gs, *new_text_gs;
+  glong old_text_chars, new_text_chars;
   const char *old_text, *match_str = NULL;
   QuickFill *match;
   int i;
+  const char *c;
+  gunichar uc;
 
   xferData->desc_didquickfill = FALSE;
 
@@ -657,85 +659,71 @@
   if (!old_text)
     old_text = "";
 
-  old_text_len = gnc_mbstowcs (&old_text_w, old_text);
-  if (old_text_len < 0)
+  /* If we are inserting in the middle, do nothing */
+  old_text_chars = g_utf8_strlen (old_text, -1);
+  if( *start_pos < old_text_chars )
     return;
 
-   /* If we are inserting in the middle, do nothing */
-  if( *start_pos < old_text_len )
-    return;
+  change_text_gs = g_string_new_len (insert_text, insert_text_len);
 
-  /* insert_text is not NULL-terminated, how annoying */
+  /* Construct what the new value of the text entry will be */
+  new_text_gs = g_string_new ("");
+  
+  i = 0;
+  c = old_text;
+  //Copy old text up to insert position
+  while ( *c && ( i < *start_pos ) )
   {
-    char *temp;
-
-    temp = g_new (char, insert_text_len + 1);
-    strncpy (temp, insert_text, insert_text_len);
-    temp[insert_text_len] = '\0';
-
-    change_text_w = g_new0 (GdkWChar, insert_text_len + 1);
-    change_text_len = gdk_mbstowcs (change_text_w, temp,
-                                    insert_text_len);
-
-    g_free (temp);
+    uc = g_utf8_get_char ( c );
+    g_string_append_unichar ( new_text_gs, uc );
+    c = g_utf8_next_char ( c );
+    i++;      
   }
 
-  if (change_text_len < 0)
+  //Copy inserted text
+  g_string_append ( new_text_gs, change_text_gs->str );
+
+  //Copy old text after insert position
+  while ( *c )
   {
-    PERR ("bad change text conversion");
-    g_free (change_text_w);
-      return;
+    uc = g_utf8_get_char ( c );
+    g_string_append_unichar ( new_text_gs, uc );
+    c = g_utf8_next_char ( c );
   }
 
-  old_pos = *start_pos;
-
-  /* Construct what the new value of the text entry will be */
-  new_text_len = old_text_len + change_text_len;
-  new_text_w = g_new0 (GdkWChar, new_text_len + 1);
-
-  for (i = 0; i < *start_pos; i++)
-          new_text_w[i] = old_text_w[i];
-
-  for (i = *start_pos; i < *start_pos + change_text_len; i++)
-          new_text_w[i] = change_text_w[i - *start_pos];
-
-  for (i = *start_pos + change_text_len; i < new_text_len; i++)
-          new_text_w[i] = old_text_w[i - change_text_len];
-
-  new_text_w[new_text_len] = 0;
-
-  new_text = gnc_wcstombs (new_text_w);
-
-  if( ( match = gnc_quickfill_get_string_match( xferData->qf, new_text_w ) )
+  if( ( match = gnc_quickfill_get_string_match( xferData->qf, new_text_gs->str ) )
    && ( match_str = gnc_quickfill_string( match ) ) 
-   && safe_strcmp( new_text, old_text ) )
+   && safe_strcmp( new_text_gs->str, old_text ) )
   {
-    gtk_signal_handler_block_by_data (GTK_OBJECT (entry), xferData );
+    g_signal_handlers_block_matched (G_OBJECT (entry),
+				     G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, xferData);
 
     gtk_entry_set_text( entry, match_str );
 
-    gtk_signal_handler_unblock_by_data (GTK_OBJECT (entry), xferData );
+    g_signal_handlers_unblock_matched (G_OBJECT (entry),
+				       G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, xferData);
 
     /* stop the current insert */
-    gtk_signal_emit_stop_by_name( GTK_OBJECT( entry ), "insert_text" );
+    g_signal_stop_emission_by_name (G_OBJECT (entry), "insert_text");
 
     /* This doesn't seem to fix the selection problems, why? */
-    gtk_entry_select_region( entry, 0, 0 );
-    gtk_editable_claim_selection( GTK_EDITABLE(entry),
-                                  FALSE,
-                                  GDK_CURRENT_TIME );
+    gtk_editable_select_region (GTK_EDITABLE(entry), 0, 0);
+#if DRH_NEEDS_INVESTIGATION
+    gtk_old_editable_claim_selection (GTK_OLD_EDITABLE (entry), FALSE, GDK_CURRENT_TIME);
+#endif
 
     /* Store off data for the key_press_cb or
      * the button_release_cb to make use of. */
-    xferData->desc_cursor_position = new_text_len;
-    xferData->desc_start_selection = new_text_len;
+    new_text_chars = g_utf8_strlen (new_text_gs->str, -1);
+    xferData->desc_cursor_position = new_text_chars;
+    xferData->desc_start_selection = new_text_chars;
     xferData->desc_end_selection = -1;
     xferData->desc_didquickfill = TRUE;
   }
 
-  g_free( new_text );
-  g_free( new_text_w );
-
+  g_string_free (change_text_gs, TRUE);
+  g_string_free (new_text_gs, TRUE);
+  
 }
 
 /* This common post-key press and post-button release handler fixes
@@ -746,11 +734,16 @@
 common_post_quickfill_handler(guint32 time, XferDialog *xferData )
 {
   GtkEntry *entry = GTK_ENTRY(xferData->description_entry);
-  gint current_pos   = gtk_editable_get_position( GTK_EDITABLE(entry) );
-  gint current_start = GTK_EDITABLE(entry)->selection_start_pos;
-  gint current_end   = GTK_EDITABLE(entry)->selection_end_pos;
+  gint current_pos;
+  gint current_start;
+  gint current_end;
   gboolean did_something = FALSE;   /* was the selection or position changed? */
 
+  ENTER(" ");
+  current_pos = gtk_editable_get_position( GTK_EDITABLE(entry) );
+  gtk_editable_get_selection_bounds( GTK_EDITABLE(entry),
+				     &current_start,
+				     &current_end);
   if( current_pos != xferData->desc_cursor_position )
   {
     gtk_entry_set_position( entry, xferData->desc_cursor_position );
@@ -764,7 +757,9 @@
   {
     gtk_entry_select_region( entry, xferData->desc_start_selection,
                                     xferData->desc_end_selection );
-    gtk_editable_claim_selection( GTK_EDITABLE(entry), TRUE, time );
+#if DRH_NEEDS_INVESTIGATION
+    gtk_old_editable_claim_selection( GTK_OLD_EDITABLE(entry), TRUE, time );
+#endif
     did_something = TRUE;
   }
 
@@ -781,6 +776,7 @@
    */
   xferData->desc_didquickfill = FALSE;
 
+  LEAVE("did_something=%d", did_something);
   return( did_something );
 }
 
@@ -795,6 +791,7 @@
    * the entry's key press handler, but in some cases that doesn't
    * seem to work right, so handle it here.
    */
+  ENTER(" ");
   switch( event->keyval )
   {
     case GDK_Left:        /* right/left cause a focus change which is bad */
@@ -825,8 +822,10 @@
          * field.  Unselect the current field, though.
          */
         gtk_entry_select_region( GTK_ENTRY(xferData->description_entry), 0, 0 );
-        gtk_editable_claim_selection( GTK_EDITABLE(xferData->description_entry),
-                                      FALSE, event->time );
+#if DRH_NEEDS_INVESTIGATION
+        gtk_old_editable_claim_selection( GTK_OLD_EDITABLE(xferData->description_entry),
+                                          FALSE, event->time );
+#endif
       }
       break;
   }
@@ -838,8 +837,9 @@
     done_with_input = common_post_quickfill_handler( event->time, xferData );
 
   if( done_with_input )
-    gtk_signal_emit_stop_by_name( GTK_OBJECT(entry), "key_press_event" );
+    g_signal_stop_emission_by_name (G_OBJECT (entry), "key_press_event");
 
+  LEAVE("done=%d", done_with_input);
   return( done_with_input );
 }
 
@@ -925,9 +925,9 @@
   gnc_numeric amount, price, to_amount;
   Account *account;
 
-  account = gnc_account_tree_get_current_account(xferData->to);
+  account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
   if (account == NULL)
-    account = gnc_account_tree_get_current_account(xferData->from);
+    account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
 
   if (account == NULL)
   {
@@ -998,9 +998,9 @@
   gnc_numeric price;
   Account *account;
 
-  account = gnc_account_tree_get_current_account(xferData->to);
+  account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
   if (account == NULL)
-    account = gnc_account_tree_get_current_account(xferData->from);
+    account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
 
   gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->to_amount_edit));
 
@@ -1013,44 +1013,6 @@
 }
 
 
-static void
-gnc_xfer_dialog_select_account(XferDialog *xferData, Account *account,
-                               XferDirection direction)
-{
-  GNCAccountTree *tree;
-  GtkWidget *show_button;
-  gboolean is_income_expense;
-  GNCAccountType type;
-
-  if (xferData == NULL)
-    return;
-  if (account == NULL)
-    return;
-
-  switch (direction)
-  {
-    case XFER_DIALOG_FROM:
-      tree = xferData->from;
-      show_button = xferData->from_show_button;
-      break;
-    case XFER_DIALOG_TO:
-      tree = xferData->to;
-      show_button = xferData->to_show_button;
-      break;
-    default:
-      return;
-  }
-
-  type = xaccAccountGetType(account);
-  is_income_expense = (type == EXPENSE) || (type == INCOME);
-
-  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(show_button),
-                               is_income_expense);
-
-  gnc_account_tree_select_account(tree, account, TRUE);
-}
-
-
 /********************************************************************\
  * gnc_xfer_dialog_select_from_account                              *
  *   select the from account in a xfer dialog                       *
@@ -1062,7 +1024,7 @@
 void
 gnc_xfer_dialog_select_from_account(XferDialog *xferData, Account *account)
 {
-  gnc_xfer_dialog_select_account(xferData, account, XFER_DIALOG_FROM);
+  gnc_transfer_dialog_set_selected_account (xferData, account, XFER_DIALOG_FROM);
 }
 
 
@@ -1077,7 +1039,7 @@
 void
 gnc_xfer_dialog_select_to_account(XferDialog *xferData, Account *account)
 {
-  gnc_xfer_dialog_select_account(xferData, account, XFER_DIALOG_TO);
+  gnc_transfer_dialog_set_selected_account (xferData, account, XFER_DIALOG_TO);
 }
 
 void
@@ -1114,7 +1076,7 @@
                                   XferDirection direction,
 				  gboolean hide)
 {
-  GNCAccountTree *tree;
+  GtkTreeView *tree_view;
   GtkWidget *show_button;
   GtkWidget *scroll_win;
 
@@ -1124,12 +1086,12 @@
   switch (direction)
   {
     case XFER_DIALOG_FROM:
-      tree = xferData->from;
+      tree_view = xferData->from_tree_view;
       scroll_win = xferData->from_window;
       show_button = xferData->from_show_button;
       break;
     case XFER_DIALOG_TO:
-      tree = xferData->to;
+      tree_view = xferData->to_tree_view;
       scroll_win = xferData->to_window;
       show_button = xferData->to_show_button;
       break;
@@ -1137,7 +1099,7 @@
       return;
   }
 
-  gtk_widget_set_sensitive( GTK_WIDGET(tree), FALSE );
+  gtk_widget_set_sensitive( GTK_WIDGET(tree_view), FALSE );
   gtk_widget_set_sensitive( GTK_WIDGET(show_button), FALSE );
 
   if (hide) {
@@ -1206,7 +1168,7 @@
 /********************************************************************\
  * gnc_xfer_dialog_is_exchange_dialog                               *
  *   set the dialog as an "exchange-dialog", which means that the   *
- *   Transfer Information frame is read-only (and the dialog        *
+ *   Transfer Information table is read-only (and the dialog        *
  *   will NOT create a transaction when it is closed)               *
  *                                                                  *
  * Args:   xferData - xfer dialog structure                         *
@@ -1249,9 +1211,9 @@
   if (xferData == NULL)
     return;
 
-  account = gnc_account_tree_get_current_account(xferData->from);
+  account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
   if (account == NULL)
-    account = gnc_account_tree_get_current_account(xferData->to);
+    account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
 
   gnc_amount_edit_set_amount (GNC_AMOUNT_EDIT (xferData->amount_edit), amount);
 }
@@ -1343,8 +1305,8 @@
   gnc_xfer_update_to_amount (xferData);
 }
 
-static void
-gnc_xfer_dialog_ok_cb(GtkWidget * widget, gpointer data)
+void
+gnc_xfer_dialog_response_cb (GtkDialog *dialog, gint response, gpointer data)
 {
   XferDialog *xferData = data;
   Account *to_account;
@@ -1352,7 +1314,7 @@
   gnc_commodity *from_commodity;
   gnc_commodity *to_commodity;
   gnc_numeric amount, to_amount;
-  char * string;
+  const char *string;
   Timespec ts;
 
   gboolean curr_trans;
@@ -1362,8 +1324,14 @@
   Split *to_split;
 
   ENTER(" ");
-  from_account = gnc_account_tree_get_current_account(xferData->from);
-  to_account   = gnc_account_tree_get_current_account(xferData->to);
+  if (response != GTK_RESPONSE_OK) {
+    gnc_close_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
+    LEAVE("cancel, etc.");
+    return;
+  }
+
+  from_account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_FROM);
+  to_account = gnc_transfer_dialog_get_selected_account (xferData, XFER_DIALOG_TO);
 
   if (xferData->exch_rate == NULL)
   {
@@ -1419,6 +1387,7 @@
   if (!gnc_amount_edit_evaluate (GNC_AMOUNT_EDIT (xferData->amount_edit)))
   {
     gnc_parse_error_dialog (xferData, _("You must enter a valid amount."));
+    LEAVE("no account");
     return;
   }
 
@@ -1605,28 +1574,13 @@
   /* Refresh everything */
   gnc_resume_gui_refresh ();
 
-  /* Tell the caller that this is "ok" */
-  if (xferData->result_p)
-    *(xferData->result_p) = TRUE;
-
   DEBUG("close component");
   gnc_close_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
   LEAVE("ok");
 }
 
-
-static void
-gnc_xfer_dialog_cancel_cb(GtkWidget * widget, gpointer data)
-{
-  XferDialog *xferData = data; 
-
-  DEBUG("close component");
-  gnc_close_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
-}
-
-
-static int
-gnc_xfer_dialog_close_cb(GnomeDialog *dialog, gpointer data)
+void
+gnc_xfer_dialog_close_cb(GtkDialog *dialog, gpointer data)
 {
   XferDialog * xferData = data;
   GtkWidget *entry;
@@ -1636,18 +1590,22 @@
     xferData->transaction_cb(NULL, xferData->transaction_user_data);
 
   entry = gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT(xferData->amount_edit));
-  gtk_signal_disconnect_by_data(GTK_OBJECT(entry), xferData);
+  g_signal_handlers_disconnect_matched (G_OBJECT (entry), G_SIGNAL_MATCH_DATA,
+					0, 0, NULL, NULL, xferData);
 
   entry = gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT(xferData->price_edit));
-  gtk_signal_disconnect_by_data(GTK_OBJECT(entry), xferData);
+  g_signal_handlers_disconnect_matched (G_OBJECT (entry), G_SIGNAL_MATCH_DATA,
+					0, 0, NULL, NULL, xferData);
 
   entry = gnc_amount_edit_gtk_entry(GNC_AMOUNT_EDIT(xferData->to_amount_edit));
-  gtk_signal_disconnect_by_data(GTK_OBJECT(entry), xferData);
+  g_signal_handlers_disconnect_matched (G_OBJECT (entry), G_SIGNAL_MATCH_DATA,
+					0, 0, NULL, NULL, xferData);
 
   entry = xferData->description_entry;
-  gtk_signal_disconnect_by_data(GTK_OBJECT(entry), xferData);
+  g_signal_handlers_disconnect_matched (G_OBJECT (entry), G_SIGNAL_MATCH_DATA,
+					0, 0, NULL, NULL, xferData);
 
-  gtk_object_unref (GTK_OBJECT (xferData->tips));
+  g_object_unref (xferData->tips);
 
   DEBUG("unregister component");
   gnc_unregister_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
@@ -1658,21 +1616,18 @@
   g_free(xferData);
 
   DEBUG("xfer dialog destroyed");
-
-  return FALSE;
 }
 
 
 static void
-gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData)
+gnc_xfer_dialog_create(GtkWidget *parent, XferDialog *xferData)
 {
   GtkWidget *dialog;
   GladeXML  *xml;
   gboolean  use_accounting_labels;
 
-  use_accounting_labels = gnc_lookup_boolean_option("Accounts",
-						    "Use accounting labels",
-						    FALSE);
+  use_accounting_labels = gnc_gconf_get_bool(GCONF_GENERAL,
+					     KEY_ACCOUNTING_LABELS, NULL);
 
   ENTER(" ");
   xml = gnc_glade_xml_new ("transfer.glade", "Transfer Dialog");
@@ -1682,27 +1637,20 @@
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(parent));
-
-  /* default to ok */
-  gnome_dialog_set_default(GNOME_DIALOG(dialog), 0);
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
-  gnome_dialog_button_connect(GNOME_DIALOG(dialog), 0,
-                              GTK_SIGNAL_FUNC(gnc_xfer_dialog_ok_cb),
-                              xferData);
-
-  gnome_dialog_button_connect(GNOME_DIALOG(dialog), 1,
-                              GTK_SIGNAL_FUNC(gnc_xfer_dialog_cancel_cb),
-                              xferData);
-
-  gtk_signal_connect(GTK_OBJECT(dialog), "close",
-                     GTK_SIGNAL_FUNC(gnc_xfer_dialog_close_cb), xferData);
+  glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, xferData);
 
   xferData->tips = gtk_tooltips_new();
 
-  gtk_object_ref (GTK_OBJECT (xferData->tips));
+  g_object_ref (xferData->tips);
   gtk_object_sink (GTK_OBJECT (xferData->tips));
 
+  /* default to quickfilling off of the "From" account. */
+  xferData->quickfill = XFER_DIALOG_FROM;
+
+  xferData->transferinfo_label = glade_xml_get_widget (xml, "transferinfo-label");
+
   /* amount & date widgets */
   {
     GtkWidget *amount;
@@ -1717,16 +1665,16 @@
     xferData->amount_edit = amount;
 
     entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (amount));
-    gtk_signal_connect(GTK_OBJECT(entry), "focus-out-event",
-                       GTK_SIGNAL_FUNC(gnc_xfer_amount_update_cb), xferData);
+    g_signal_connect (G_OBJECT (entry), "focus-out-event",
+		      G_CALLBACK (gnc_xfer_amount_update_cb), xferData);
 
-    date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
+    date = gnc_date_edit_new(time (NULL), FALSE, FALSE);
     hbox = glade_xml_get_widget (xml, "date_hbox");
 
     gtk_box_pack_end(GTK_BOX(hbox), date, TRUE, TRUE, 0);
     xferData->date_entry = date;
-    gtk_signal_connect(GTK_OBJECT(date), "date_changed",
-		       GTK_SIGNAL_FUNC(gnc_xfer_date_changed_cb), xferData);
+    g_signal_connect (G_OBJECT (date), "date_changed",
+		      G_CALLBACK (gnc_xfer_date_changed_cb), xferData);
   }
 
   {
@@ -1734,54 +1682,46 @@
 
     entry = glade_xml_get_widget (xml, "num_entry");
     xferData->num_entry = entry;
-    gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
 
     entry = glade_xml_get_widget (xml, "description_entry");
     xferData->description_entry = entry;
 
     /* Get signals from the Description for quickfill. */
-    gtk_signal_connect(GTK_OBJECT(entry), "insert_text",
-                       GTK_SIGNAL_FUNC(gnc_xfer_description_insert_cb),
-                       xferData);
-    gtk_signal_connect(GTK_OBJECT(entry), "button_release_event",
-                       GTK_SIGNAL_FUNC(gnc_xfer_description_button_release_cb),
-                       xferData);
-    gtk_signal_connect_after
-      (GTK_OBJECT(entry), "key_press_event",
-       GTK_SIGNAL_FUNC(gnc_xfer_description_key_press_cb), xferData);
+    g_signal_connect (G_OBJECT (entry), "insert_text",
+		      G_CALLBACK (gnc_xfer_description_insert_cb), xferData);
+    g_signal_connect (G_OBJECT (entry), "button_release_event",
+		      G_CALLBACK (gnc_xfer_description_button_release_cb), xferData);
+    g_signal_connect_after (G_OBJECT (entry), "key_press_event",
+			    G_CALLBACK (gnc_xfer_description_key_press_cb), xferData);
 
     entry = glade_xml_get_widget (xml, "memo_entry");
     xferData->memo_entry = entry;
-    gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
   }
 
   /* from and to */
   {
-    GtkWidget *label, *frame;
-
-    gnc_xfer_dialog_fill_tree_frame(xferData, XFER_DIALOG_TO);
-    gnc_xfer_dialog_fill_tree_frame(xferData, XFER_DIALOG_FROM);
+    GtkWidget *label;
+    gchar *text;
 
-    gtk_signal_connect(GTK_OBJECT(xferData->from), "select_account",
-		       GTK_SIGNAL_FUNC(gnc_xfer_dialog_from_tree_select_cb),
-		       xferData);
-    gtk_signal_connect(GTK_OBJECT(xferData->to), "select_account",
-		       GTK_SIGNAL_FUNC(gnc_xfer_dialog_to_tree_select_cb),
-		       xferData);
+    gnc_xfer_dialog_fill_tree_view (xferData, XFER_DIALOG_TO);
+    gnc_xfer_dialog_fill_tree_view (xferData, XFER_DIALOG_FROM);
 
     /* Reverse from and to account trees when in "accountant" mode,
-       see comment in function gnc_xfer_dialog_fill_tree_frame */
+       see comment in function gnc_xfer_dialog_fill_tree_table */
     if(use_accounting_labels) {
-      frame = glade_xml_get_widget (xml, "right_trans_frame");
-      xferData->from_transfer_frame = frame;
+      label = glade_xml_get_widget (xml, "right_trans_label");
+      xferData->from_transfer_label = label;
 
-      frame = glade_xml_get_widget (xml, "left_trans_frame");
-      xferData->to_transfer_frame = frame;
+      label = glade_xml_get_widget (xml, "left_trans_label");
+      xferData->to_transfer_label = label;
 
-      gtk_frame_set_label(GTK_FRAME(xferData->from_transfer_frame),
-			  _("Credit Account"));
-      gtk_frame_set_label(GTK_FRAME(xferData->to_transfer_frame),
-			  _("Debit Account"));
+      text = g_strconcat ("<b>", _("Credit Account"), "</b>", NULL);
+      gtk_label_set_markup (GTK_LABEL (xferData->from_transfer_label), text);
+      g_free (text);
+
+      text = g_strconcat ("<b>", _("Debit Account"), "</b>", NULL);
+      gtk_label_set_markup (GTK_LABEL (xferData->to_transfer_label), text);
+      g_free (text);
 
       label = glade_xml_get_widget (xml, "right_currency_label");
       xferData->from_currency_label = label;
@@ -1790,16 +1730,18 @@
       xferData->to_currency_label = label;
     }
     else {
-      frame = glade_xml_get_widget (xml, "left_trans_frame");
-      xferData->from_transfer_frame = frame;
+      label = glade_xml_get_widget (xml, "left_trans_label");
+      xferData->from_transfer_label = label;
 
-      frame = glade_xml_get_widget (xml, "right_trans_frame");
-      xferData->to_transfer_frame = frame;
+      label = glade_xml_get_widget (xml, "right_trans_label");
+      xferData->to_transfer_label = label;
 
-      gtk_frame_set_label(GTK_FRAME(xferData->from_transfer_frame),
-			  _("Transfer From"));
-      gtk_frame_set_label(GTK_FRAME(xferData->to_transfer_frame),
-			  _("Transfer To"));
+      text = g_strconcat ("<b>", _("Transfer From"), "</b>", NULL);
+      gtk_label_set_markup (GTK_LABEL (xferData->from_transfer_label), text);
+      g_free (text);
+
+      text = g_strconcat ("<b>", _("Transfer To"), "</b>", NULL);
+      gtk_label_set_markup (GTK_LABEL (xferData->to_transfer_label), text);
 
       label = glade_xml_get_widget (xml, "left_currency_label");
       xferData->from_currency_label = label;
@@ -1817,14 +1759,14 @@
 
   /* optional intermediate currency account */
   {
-    GtkWidget *frame;
+    GtkWidget *table;
     GtkWidget *entry;
     GtkWidget *edit;
     GtkWidget *hbox;
     GtkWidget *button;
 
-    frame = glade_xml_get_widget (xml, "curr_transfer_frame");
-    xferData->curr_transfer_frame = frame;
+    table = glade_xml_get_widget (xml, "curr_transfer_table");
+    xferData->curr_xfer_table = table;
 
     edit = gnc_amount_edit_new();
     gnc_amount_edit_set_print_info(GNC_AMOUNT_EDIT(edit),
@@ -1834,31 +1776,29 @@
     gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 0);
     xferData->price_edit = edit;
     entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (edit));
-    gtk_signal_connect(GTK_OBJECT(entry), "focus-out-event",
-                       GTK_SIGNAL_FUNC(gnc_xfer_price_update_cb), xferData);
-    gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
+    g_signal_connect (G_OBJECT (entry), "focus-out-event",
+		      G_CALLBACK (gnc_xfer_price_update_cb), xferData);
+    gtk_entry_set_activates_default(GTK_ENTRY (entry), TRUE);
 
     edit = gnc_amount_edit_new();
-    hbox = glade_xml_get_widget (xml, "to_amount_hbox");
+    hbox = glade_xml_get_widget (xml, "right_amount_hbox");
     gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 0);
     xferData->to_amount_edit = edit;
     entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (edit));
-    gtk_signal_connect(GTK_OBJECT(entry), "focus-out-event",
-                       GTK_SIGNAL_FUNC(gnc_xfer_to_amount_update_cb),
-		       xferData);
-    gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry));
+    g_signal_connect (G_OBJECT (entry), "focus-out-event",
+		      G_CALLBACK (gnc_xfer_to_amount_update_cb), xferData);
+    gtk_entry_set_activates_default(GTK_ENTRY(entry), TRUE);
 
     button = glade_xml_get_widget (xml, "price_radio");
     xferData->price_radio = button;
-    gtk_signal_connect(GTK_OBJECT(xferData->price_radio), "toggled",
-		       GTK_SIGNAL_FUNC(price_amount_radio_toggled_cb),
-		       xferData);
+    g_signal_connect (G_OBJECT (xferData->price_radio), "toggled",
+		      G_CALLBACK (price_amount_radio_toggled_cb), xferData);
 
     button = glade_xml_get_widget (xml, "amount_radio");
     xferData->amount_radio = button;
-    gtk_signal_connect(GTK_OBJECT(xferData->amount_radio), "toggled",
-		       GTK_SIGNAL_FUNC(price_amount_radio_toggled_cb),
-		       xferData);
+    g_signal_connect(G_OBJECT(xferData->amount_radio), "toggled",
+		     G_CALLBACK(price_amount_radio_toggled_cb),
+		     xferData);
     if(use_accounting_labels) {
       gtk_label_set_text(GTK_LABEL(GTK_BIN(xferData->amount_radio)->child),
 			 _("Debit Amount:"));
@@ -1868,14 +1808,6 @@
 			 _("To Amount:"));
     }
   }
-
-  gtk_clist_set_selection_mode(GTK_CLIST(xferData->from),
-                               GTK_SELECTION_BROWSE);
-  gtk_clist_set_selection_mode(GTK_CLIST(xferData->to),
-                               GTK_SELECTION_BROWSE);
-
-  /* default to quickfilling off of the "From" account. */
-  xferData->quickfill_to = FALSE;
   LEAVE(" ");
 }
 
@@ -1883,9 +1815,15 @@
 close_handler (gpointer user_data)
 {
   XferDialog *xferData = user_data;
+  GtkWidget *dialog;
 
-  DEBUG(" ");
-  gnome_dialog_close (GNOME_DIALOG (xferData->dialog));
+  ENTER(" ");
+  dialog = GTK_WIDGET (xferData->dialog);
+
+  gtk_widget_hide (dialog);
+  gnc_xfer_dialog_close_cb(GTK_DIALOG(dialog), xferData);
+  gtk_widget_destroy (dialog);
+  LEAVE(" ");
 }
 
 /********************************************************************\
@@ -1910,6 +1848,7 @@
   xferData->desc_start_selection = 0;
   xferData->desc_end_selection = 0;
   xferData->desc_didquickfill = FALSE;
+  xferData->quickfill = XFER_DIALOG_FROM;
   xferData->transaction_cb = NULL;
 
   if (initial) {
@@ -1949,7 +1888,7 @@
 {
   if( xferData ) {
     DEBUG("close component");
-    gnc_close_gui_component_by_data (DIALOG_TRANSFER_CM_CLASS, xferData);
+    gtk_dialog_response( GTK_DIALOG(xferData->dialog), GTK_RESPONSE_NONE );
   }
 }
 
@@ -1963,46 +1902,38 @@
 }
 
 void
-gnc_xfer_dialog_set_information_frame_label( XferDialog *xferData,
-                                             const gchar *label )
+gnc_xfer_dialog_set_information_label( XferDialog *xferData,
+				       const gchar *text )
 {
-  if( xferData && label )
-  {
-    GtkWidget *frame = gnc_glade_lookup_widget (xferData->dialog,
-                                                "transferinfo-frame" );
-    gtk_frame_set_label( GTK_FRAME(frame), label );
-  }
+  if(xferData && text)
+    gtk_label_set_label (GTK_LABEL (xferData->transferinfo_label), text);
 }
 
 
 static void
-gnc_xfer_dialog_set_account_frame_label( XferDialog *xferData,
-                                         const gchar *label,
-                                         XferDirection direction)
+gnc_xfer_dialog_set_account_label( XferDialog *xferData,
+				   const gchar *text,
+				   XferDirection direction )
 {
-  if( xferData && label )
-  {
-    /* "frame34" is the from frame, "frame35" is the to frame */
-    GtkWidget *frame = gnc_glade_lookup_widget (xferData->dialog,
-                                             ( direction == XFER_DIALOG_FROM ?
-                                               "transferfrom-frame" :
-                                               "transferto-frame" ));
-    gtk_frame_set_label( GTK_FRAME(frame), label );
-  }
+  if(xferData && text)
+    gtk_label_set_text (GTK_LABEL ((direction == XFER_DIALOG_FROM ?
+				    xferData->from_transfer_label :
+				    xferData->to_transfer_label)),
+		    	text);
 }
 
 void
-gnc_xfer_dialog_set_from_account_frame_label( XferDialog *xferData,
-                                              const gchar *label )
+gnc_xfer_dialog_set_from_account_label( XferDialog *xferData,
+					const gchar *label )
 {
-  gnc_xfer_dialog_set_account_frame_label( xferData, label, XFER_DIALOG_FROM );
+  gnc_xfer_dialog_set_account_label (xferData, label, XFER_DIALOG_FROM);
 }
 
 void
-gnc_xfer_dialog_set_to_account_frame_label( XferDialog *xferData,
-                                            const gchar *label )
+gnc_xfer_dialog_set_to_account_label( XferDialog *xferData,
+				      const gchar *label )
 {
-  gnc_xfer_dialog_set_account_frame_label( xferData, label, XFER_DIALOG_TO );
+  gnc_xfer_dialog_set_account_label (xferData, label, XFER_DIALOG_TO);
 }
 
 void
@@ -2039,21 +1970,20 @@
     GtkWidget *box    = gnc_glade_lookup_widget (xferData->dialog,
                                                  "transfermain-vbox" );
     gtk_box_pack_end( GTK_BOX(box), button, FALSE, FALSE, 0 );
-    gtk_signal_connect( GTK_OBJECT(button), "clicked",
-                        GTK_SIGNAL_FUNC( callback ), user_data );
+    g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (callback), user_data);
     gtk_widget_show( button );
   }
 }
 
-void gnc_xfer_dialog_toggle_currency_frame( XferDialog *xferData, 
-                                            gboolean show_frame )
+void gnc_xfer_dialog_toggle_currency_table( XferDialog *xferData, 
+                                            gboolean show_table )
 {
-  if( xferData && xferData->curr_transfer_frame )
+  if (xferData && xferData->curr_xfer_table)
   {
-    if( show_frame )
-      gtk_widget_show( xferData->curr_transfer_frame );
+    if (show_table)
+      gtk_widget_show(xferData->curr_xfer_table);
     else
-      gtk_widget_hide( xferData->curr_transfer_frame );
+      gtk_widget_hide(xferData->curr_xfer_table);
   }
 }
 
@@ -2071,14 +2001,37 @@
  */
 gboolean gnc_xfer_dialog_run_until_done( XferDialog *xferData )
 {
-  gboolean result_ok = FALSE;
+  GtkDialog *dialog;
+  gint count, response;
 
-  if( NULL == xferData ) return FALSE;
-  
-  xferData->result_p = &result_ok;
-  while( TRUE )
-  {
-    gnome_dialog_run( GNOME_DIALOG(xferData->dialog) );
+  ENTER("xferData=%p", xferData);
+  if( xferData == NULL ) {
+    LEAVE("bad args");
+    return( FALSE );
+  }
+
+  dialog = GTK_DIALOG (xferData->dialog);
+
+  /*
+   * We need to call the response_cb function by hand.  Calling it
+   * automatically on a button click can destroy the window, and
+   * that's bad mojo whole gtk_dialog_run is still in control.
+   */
+  count = g_signal_handlers_disconnect_by_func(dialog,
+					       gnc_xfer_dialog_response_cb,
+					       xferData);
+  g_assert(count == 1);
+
+  while( TRUE ) {
+    DEBUG("calling gtk_dialog_run");
+    response = gtk_dialog_run (dialog);
+    DEBUG("gtk_dialog_run returned %d", response);
+    gnc_xfer_dialog_response_cb (dialog, response, xferData);
+
+    if (response != GTK_RESPONSE_OK) {
+      LEAVE("not ok");
+      return FALSE;
+    }
 
     /* See if the dialog is still there.  For various reasons, the
      * user could have hit OK but remained in the dialog.  We don't
@@ -2086,18 +2039,18 @@
      * off this dialog, so if the dialog is still there we'll just
      * run it again.
      */
-
-    DEBUG("find component");
     if( !gnc_find_first_gui_component( DIALOG_TRANSFER_CM_CLASS,
-                                         find_xfer, xferData ) )
+				       find_xfer, xferData ) )
       {
-        /* no more dialog, and OK was clicked, so assume it's all good */
-        xferData->result_p = NULL;
-        return( result_ok );
+	/* no more dialog, and OK was clicked, so assume it's all good */
+	LEAVE("ok");
+	return TRUE;
       }
-      /* else run the dialog again */
+    
+    /* else run the dialog again */
   }
-  return FALSE;
+
+  g_assert_not_reached();
 }
 
 
@@ -2109,14 +2062,72 @@
 gnc_xfer_dialog_quickfill_to_account(XferDialog *xferData,
                                      gboolean qf_to_account )
 {
-  gboolean old = xferData->quickfill_to;
-  xferData->quickfill_to = qf_to_account;
+  XferDirection old = xferData->quickfill;
+
+  xferData->quickfill = qf_to_account ? XFER_DIALOG_TO : XFER_DIALOG_FROM;
 
   /* reload the quickfill if necessary */
-  if( old != qf_to_account )
+  if( old != xferData->quickfill )
     gnc_xfer_dialog_reload_quickfill( xferData );
 }
 
+static Account *
+gnc_transfer_dialog_get_selected_account (XferDialog *dialog,
+					  XferDirection direction)
+{
+  GtkTreeView *tree_view;
+  Account *account;
+
+  switch (direction) {
+   case XFER_DIALOG_FROM:
+    tree_view = dialog->from_tree_view;
+    break;
+   case XFER_DIALOG_TO:
+    tree_view = dialog->to_tree_view;
+    break;
+   default:
+    g_assert_not_reached ();
+    return NULL;
+  }
+
+  account = gnc_tree_view_account_get_selected_account  (GNC_TREE_VIEW_ACCOUNT (tree_view));
+  return account;
+}
+
+static void
+gnc_transfer_dialog_set_selected_account (XferDialog *dialog,
+					  Account *account,
+					  XferDirection direction)
+{
+  GtkTreeView *tree_view;
+  GtkCheckButton *show_button;
+  GNCAccountType type;
+
+  if (account == NULL)
+    return;
+
+  switch (direction) {
+   case XFER_DIALOG_FROM:
+    tree_view = dialog->from_tree_view;
+    show_button = GTK_CHECK_BUTTON (dialog->from_show_button);
+    break;
+   case XFER_DIALOG_TO:
+    tree_view = dialog->to_tree_view;
+    show_button = GTK_CHECK_BUTTON (dialog->to_show_button);
+    break;
+   default:
+    g_assert_not_reached ();
+    return;
+  }
+
+  type = xaccAccountGetType (account);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (show_button),
+				(type == EXPENSE) || (type == INCOME));
+
+  gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT (tree_view),
+					      account);
+}
+
 
 void gnc_xfer_dialog_set_txn_cb(XferDialog *xferData,
 				gnc_xfer_dialog_cb handler, 
@@ -2126,4 +2137,3 @@
   xferData->transaction_cb = handler;
   xferData->transaction_user_data = user_data;
 }
-
Index: gnc-menu-extensions.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-menu-extensions.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome-utils/gnc-menu-extensions.c -Lsrc/gnome-utils/gnc-menu-extensions.c -u -r1.12 -r1.13
--- src/gnome-utils/gnc-menu-extensions.c
+++ src/gnome-utils/gnc-menu-extensions.c
@@ -22,25 +22,14 @@
 
 #include "config.h"
 
+#include <ctype.h>
 #include <gnome.h>
 
 #include "guile-util.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-menu-extensions.h"
 #include "gnc-ui.h"
 
-typedef struct _ExtensionInfo ExtensionInfo;
-struct _ExtensionInfo
-{
-  SCM extension;
-  gchar *window;
-  gchar *path;
-
-  GnomeUIInfo info[2];
-
-  gpointer extra_info;
-};
-
 typedef struct _Getters Getters;
 struct _Getters
 {
@@ -52,11 +41,17 @@
 };
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 static GSList *extension_list = NULL;
 static Getters getters = {0, 0, 0, 0, 0};
 
+GSList *
+gnc_extensions_get_menu_list (void)
+{
+  return extension_list;
+}
+
 static void
 initialize_getters()
 {
@@ -75,62 +70,58 @@
 }
 
 
-static GnomeUIInfoType
-gnc_extension_type(ExtensionInfo *ext_info)
+static gboolean
+gnc_extension_type (SCM extension, GtkUIManagerItemType *type)
 {
-  GnomeUIInfoType type;
   char *string;
 
   initialize_getters();
 
-  string = gnc_guile_call1_symbol_to_string(getters.type, ext_info->extension);
+  string = gnc_guile_call1_symbol_to_string(getters.type, extension);
   if (string == NULL)
   {
     PERR("bad type");
-    return GNOME_APP_UI_ENDOFINFO;
+    return FALSE;
   }
 
-  if (safe_strcmp(string, "menu-item") == 0)
-    type = GNOME_APP_UI_ITEM;
-  else if (safe_strcmp(string, "menu") == 0)
-    type = GNOME_APP_UI_SUBTREE;
-  else if (safe_strcmp(string, "separator") == 0)
-    type = GNOME_APP_UI_SEPARATOR;
-  else
-  {
+  if (safe_strcmp(string, "menu-item") == 0) {
+    *type = GTK_UI_MANAGER_MENUITEM;
+  } else if (safe_strcmp(string, "menu") == 0) {
+    *type = GTK_UI_MANAGER_MENU;
+  } else if (safe_strcmp(string, "separator") == 0) {
+    *type = GTK_UI_MANAGER_SEPARATOR;
+  } else {
     PERR("bad type");
-    type = GNOME_APP_UI_ENDOFINFO;
+    return FALSE;
   }
 
   free(string);
 
-  return type;
+  return TRUE;
 }
 
-
 /* returns malloc'd name */
 static char *
-gnc_extension_name(ExtensionInfo *ext_info)
+gnc_extension_name (SCM extension)
 {
   initialize_getters();
 
-  return gnc_guile_call1_to_string(getters.name, ext_info->extension);
+  return gnc_guile_call1_to_string(getters.name, extension);
 }
 
 
 /* returns malloc'd docs */
 static char *
-gnc_extension_documentation(ExtensionInfo *ext_info)
+gnc_extension_documentation (SCM extension)
 {
   initialize_getters();
 
-  return gnc_guile_call1_to_string(getters.documentation, ext_info->extension);
+  return gnc_guile_call1_to_string(getters.documentation, extension);
 }
 
-
 /* returns g_malloc'd path */
 static void
-gnc_extension_path(SCM extension, char **window, char **fullpath)
+gnc_extension_path (SCM extension, char **fullpath)
 {
   SCM path;
   gchar **strings;
@@ -139,21 +130,15 @@
   initialize_getters();
 
   path = gnc_guile_call1_to_list(getters.path, extension);
-  if (path == SCM_UNDEFINED) {
-    *window = g_strdup("");
-    *fullpath = g_strdup("");
-    return;
-  }
-
-  if (SCM_NULLP(path)) {
-    *window = g_strdup("");
+  if ((path == SCM_UNDEFINED) || SCM_NULLP(path)) {
     *fullpath = g_strdup("");
     return;
   }
 
-  strings = g_new0(gchar *, scm_ilength(path) + 1);
+  strings = g_new0(gchar *, scm_ilength(path) + 2);
+  strings[0] = "/menubar";
 
-  i = 0;
+  i = 1;
   while (!SCM_NULLP(path))
   {
     SCM item;
@@ -163,8 +148,7 @@
 
     if (SCM_STRINGP(item))
     {
-      /* strings[i] = gh_scm2newstr(item, NULL); */
-      strings[i] = SCM_STRING_CHARS (item);
+      strings[i] = g_strdup(SCM_STRING_CHARS(item));
     }
     else
     {
@@ -172,7 +156,6 @@
 
       PERR("not a string");
 
-      *window = g_strdup("");
       *fullpath = g_strdup("");
       return;
     }
@@ -180,114 +163,98 @@
     i++;
   }
 
-  if (i > 0) {
-    *window = g_strdup(strings[0]);
-    *fullpath = g_strjoinv("/", strings+1);
-  } else {
-    *window = g_strdup(WINDOW_NAME_MAIN);
-    *fullpath = g_strjoinv("/", strings);
-  }
+  *fullpath = g_strjoinv("/", strings);
 
   g_free(strings);
 }
 
+/******************** New Menu Item ********************/
 
-static void
-gnc_extension_run_script(ExtensionInfo *ext_info)
+static gchar*
+gnc_ext_gen_action_name (const gchar *name)
 {
-  SCM script;
+  //gchar *extName;
+  const gchar *extChar;
+  GString *actionName;
 
-  initialize_getters();
+  actionName = g_string_sized_new( strlen( name ) + 7 );
 
-  script = gnc_guile_call1_to_procedure(getters.script, ext_info->extension);
-  if (script == SCM_UNDEFINED)
-  {
-    PERR("not a procedure.");
-    return;
+  // 'Mum & ble' => 'Mumble'
+  for ( extChar = name; *extChar != '\0'; extChar++ ) {
+    if ( ! isalpha( *extChar ) )
+      continue;
+    g_string_append_c( actionName, *extChar );
   }
 
-  scm_call_0(script);
+  // 'Mumble + 'Action' => 'MumbleAction'
+  g_string_append_printf( actionName, "Action" );
+
+  return g_string_free(actionName, FALSE);
 }
 
+/******************** Callback ********************/
 
-static void
-gnc_extension_cb(GtkWidget *w, gpointer data)
+void
+gnc_extension_invoke_cb (SCM extension, SCM window)
 {
-  ExtensionInfo *ext_info = data;
+  SCM script;
 
-  if (ext_info == NULL)
+  initialize_getters();
+
+  script = gnc_guile_call1_to_procedure(getters.script, extension);
+  if (script == SCM_UNDEFINED)
+  {
+    PERR("not a procedure.");
     return;
+  }
 
-  gnc_extension_run_script(ext_info);
+  scm_call_1(script, window);
 }
 
+/******************** New Menu Item ********************/
 
-static ExtensionInfo *
-gnc_create_extension_info(SCM extension)
+static gboolean
+gnc_create_extension_info (SCM extension)
 {
-  GnomeUIInfo *info;
   ExtensionInfo *ext_info;
-  char *string;
+  gchar *typeStr;
 
   ext_info = g_new0(ExtensionInfo, 1);
   ext_info->extension = extension;
-  gnc_extension_path(extension, &ext_info->window, &ext_info->path);
-
-  ext_info->info[0].type = gnc_extension_type(ext_info);
-
-  switch (ext_info->info[0].type)
-  {
-    case GNOME_APP_UI_ITEM:
-      ext_info->info[0].moreinfo = gnc_extension_cb;
-
-      string = gnc_extension_documentation(ext_info);
-      ext_info->info[0].hint = g_strdup(string);
-      if (string != NULL)
-        free(string);
-
-      string = gnc_extension_name(ext_info);
-      ext_info->info[0].label = g_strdup(string);
-      if (string != NULL)
-        free(string);
-
-      break;
-
-    case GNOME_APP_UI_SUBTREE:
-      info = g_new(GnomeUIInfo, 1);
-      info->type = GNOME_APP_UI_ENDOFINFO;
-      ext_info->info[0].moreinfo = info;
-      ext_info->extra_info = info;
-
-      string = gnc_extension_name(ext_info);
-      ext_info->info[0].label = g_strdup(string);
-      if (string != NULL)
-        free(string);
-
-      break;
-
-    case GNOME_APP_UI_SEPARATOR:
-      ext_info->info[0].type = GNOME_APP_UI_SEPARATOR;
-      break;
-
-    default:
-      PERR("bad item type");
-      g_free(ext_info);
-      return NULL;
-  }
-
-  ext_info->info[0].user_data = ext_info;
-  ext_info->info[0].pixmap_type = GNOME_APP_PIXMAP_NONE;
-  ext_info->info[1].type = GNOME_APP_UI_ENDOFINFO;
+  gnc_extension_path(extension, &ext_info->path);
+  if (!gnc_extension_type( extension, &ext_info->type )) {
+    /* Can't parse the type passed to us.  Bail now. */
+    g_free(ext_info);
+    return FALSE;
+  }
+
+  /* Get all the pieces */
+  ext_info->ae.label = gnc_extension_name(extension);
+  ext_info->ae.name = gnc_ext_gen_action_name(ext_info->ae.label);
+  ext_info->ae.tooltip = gnc_extension_documentation(extension);
+  ext_info->ae.stock_id = "";
+  ext_info->ae.accelerator = NULL;
+  ext_info->ae.callback = NULL;
+
+  switch (ext_info->type) {
+    case GTK_UI_MANAGER_MENU: typeStr = "menu"; break;
+    case GTK_UI_MANAGER_MENUITEM: typeStr = "menuitem"; break;
+    default: typeStr = "unk"; break;
+  }
+  ext_info->typeStr = typeStr;
+
+  DEBUG( "extension: %s/%s [%s] tip [%s] type %s\n",
+	 ext_info->path, ext_info->ae.label, ext_info->ae.name,
+	 ext_info->ae.tooltip, ext_info->typeStr );
 
   scm_gc_protect_object(extension);
-  
+
   /* need to append so we can run them in order */
   extension_list = g_slist_append(extension_list, ext_info);
 
-  return ext_info;
+  return TRUE;
 }
 
-
 static void
 cleanup_extension_info(gpointer extension_info, gpointer not_used)
 {
@@ -296,243 +263,67 @@
   if (ext_info->extension)
     scm_gc_unprotect_object(ext_info->extension);
 
-  g_free(ext_info->info[0].label);
-  g_free(ext_info->info[0].hint);
-  g_free(ext_info->extra_info);
+  g_free((gchar *)ext_info->ae.name);
+  g_free((gchar *)ext_info->ae.label);
+  g_free((gchar *)ext_info->ae.tooltip);
   g_free(ext_info->path);
   g_free(ext_info);
 }
 
 
 void
-gnc_add_scm_extension(SCM extension)
+gnc_add_scm_extension (SCM extension)
 {
-  ExtensionInfo *ext_info;
-  ext_info = gnc_create_extension_info(extension);
-  if (ext_info == NULL)
+  if (!gnc_create_extension_info(extension))
   {
     PERR("bad extension");
     return;
   }
 }
 
-void
-gnc_add_c_extension(GnomeUIInfo *info, gchar *path)
-{
-  ExtensionInfo *ext_info;
-  char *separator;
-
-  ext_info = g_new0(ExtensionInfo, 1);
-  separator = index(path, '/');
-  if (separator) {
-    ext_info->window = g_strndup(path, separator-path);
-    ext_info->path = g_strdup(separator+1);
-  } else {
-    ext_info->window = g_strdup(WINDOW_NAME_MAIN);
-    ext_info->path = g_strdup(path);
-  }
-
-  ext_info->info[0] = *info;
-  ext_info->info[0].label = g_strdup(info->label);
-  ext_info->info[0].hint  = g_strdup(info->hint);
-  ext_info->info[1].type  = GNOME_APP_UI_ENDOFINFO;
-
-  /* need to append so we can run them in order */
-  extension_list = g_slist_append(extension_list, ext_info);
-}
-
+/******************** Install Menus ********************/
 
-/* This code is directly copied from libgnomeui's gnome-app-helper.c
- * without modifications. */
-static gint
-g_strncmp_ignore_char( const gchar *first, const gchar *second, gint length, gchar ignored )
-{
-    gint i, j;
-    for ( i = 0, j = 0; i < length; i++, j++ )
-	{
-	    while ( first[i] == ignored && i < length ) i++;
-	    while ( second[j] == ignored ) j++;
-	    if ( i == length )
-		return 0;
-	    if ( first[i] < second[j] )
-		return -1;
-	    if ( first[i] > second[j] )
-		return 1;
-	}
-    return 0;
-}
-
-/* This code is copied from libgnomeui's gnome-app-helper.c
- * originally. */
-static const gchar *
-gnc_gnome_app_helper_gettext (const gchar *str)
-{
-    const char *s;
-
-    /* First try to look up the string in gettext domain gnome-libs,
-     * since this is where the original gnome stock labels have been
-     * translated. */
-    s = dgettext ("gnome-libs", str);
-    if ( s == str )
-	s = gettext (str);
-
-    return s;
-}
-
-/* This code is directly copied from libgnomeui's gnome-app-helper.c,
- * except for the call to the translation lookup . */
-/**
- * gnome_app_find_menu_pos
- * @parent: Root menu shell widget containing menu items to be searched
- * @path: Specifies the target menu item by menu path
- * @pos: (output) returned item position
- *
- * Description:
- * finds menu item described by path starting
- * in the GtkMenuShell top and returns its parent GtkMenuShell and the
- * position after this item in pos:  gtk_menu_shell_insert(p, w, pos)
- * would then insert widget w in GtkMenuShell p right after the menu item
- * described by path.
- **/
-static GtkWidget *
-gnc_gnome_app_find_menu_pos (GtkWidget *parent, const gchar *path, gint *pos)
-{
-    GtkBin *item;
-    gchar *label = NULL;
-    GList *children;
-    gchar *name_end;
-    gchar *part;
-    const gchar *transl;
-    gint p;
-    int  path_len;
-
-    g_return_val_if_fail (parent != NULL, NULL);
-    g_return_val_if_fail (path != NULL, NULL);
-    g_return_val_if_fail (pos != NULL, NULL);
-
-    children = GTK_MENU_SHELL (parent)->children;
-
-    name_end = strchr(path, '/');
-    if(name_end == NULL)
-	path_len = strlen(path);
-    else
-	path_len = name_end - path;
+typedef struct {
+  GtkUIManager *uiMerge;
+  GtkActionGroup *group;
+  guint merge_id;
+} setup_data;
 
-    if (path_len == 0) {
-
-	if (children && GTK_IS_TEAROFF_MENU_ITEM(children->data))
-	    /* consider the position after the tear off item as the topmost one. */
-	    *pos = 1;
-	else
-	    *pos = 0;
-	return parent;
-    }
-
-    /* this ugly thing should fix the localization problems */
-    part = g_malloc(path_len + 1);
-    if(!part)
-	return NULL;
-    strncpy(part, path, path_len);
-    part[path_len] = '\0';
-    transl = gnc_gnome_app_helper_gettext (part);
-    path_len = strlen(transl);
-
-    p = 0;
-
-    while (children){
-	item = GTK_BIN (children->data);
-	children = children->next;
-	label = NULL;
-	p++;
-
-	if (GTK_IS_TEAROFF_MENU_ITEM(item))
-	    label = NULL;
-	else if (!item->child)          /* this is a separator, right? */
-	    label = "<Separator>";
-	else if (GTK_IS_LABEL (item->child))  /* a simple item with a label */
-	    label = GTK_LABEL (item->child)->label;
-	else
-	    label = NULL; /* something that we just can't handle */
-	/*fprintf(stderr, "Transl '%s', Label '%s'\n", transl, label);*/
-	if (label && (g_strncmp_ignore_char (transl, label, path_len, '_') == 0)){
-	    if (name_end == NULL) {
-		*pos = p;
-		g_free(part);
-		return parent;
-	    }
-	    else if (GTK_MENU_ITEM (item)->submenu) {
-		g_free(part);
-		return gnc_gnome_app_find_menu_pos
-		    (GTK_MENU_ITEM (item)->submenu,
-		     (gchar *)(name_end + 1), pos);
-	    }
-	    else {
-		g_free(part);
-		return NULL;
-	    }
-	}
-    }
-
-    g_free(part);
-    return NULL;
-}
-
-/* This code is more or less copied from libgnomeui's gnome-app-helper.c . */
-void
-gnc_gnome_app_insert_menus (GnomeApp *app, const gchar *path, GnomeUIInfo *menuinfo)
+static void
+gnc_extensions_menu_setup_one (ExtensionInfo *ext_info,
+			       setup_data *data)
 {
-    GtkWidget *menu_shell;
-    gint pos;
+  DEBUG("Adding %s/%s [%s] as [%s]\n", ext_info->path, ext_info->ae.label,
+        ext_info->ae.name, ext_info->typeStr);
 
-    menu_shell = gnc_gnome_app_find_menu_pos(app->menubar, path, &pos);
-    if(menu_shell == NULL) {
-	g_warning("gnc_gnome_app_insert_menus: couldn't find "
-		  "insertion point for menus!");
-	return;
-    }
-
-    /* create menus and insert them */
-    gnome_app_fill_menu (GTK_MENU_SHELL (menu_shell), menuinfo, 
-			 app->accel_group, TRUE, pos);
+  gtk_action_group_add_actions(data->group, &ext_info->ae, 1,
+			       ext_info->extension);
+  gtk_ui_manager_add_ui(data->uiMerge, data->merge_id, ext_info->path,
+			ext_info->ae.label, ext_info->ae.name,
+			ext_info->type, FALSE);
+  gtk_ui_manager_ensure_update(data->uiMerge);
 }
 
 void
-gnc_extensions_menu_setup(GnomeApp * app, gchar *window)
+gnc_extensions_menu_setup (GtkUIManager *uiMerge )
 {
-  GSList        * l = NULL;
-  ExtensionInfo * info;
+  setup_data data;
 
-  for(l=extension_list; l; l=l->next) {
-    info = l->data;
-    if ((strcmp(info->window, window) != 0) &&
-	(strcmp(info->window, WINDOW_NAME_ALL) != 0))
-      continue;
-    /* fprintf(stderr, "Inserting extension menu at path '%s'\n", info->path); */
-    gnc_gnome_app_insert_menus(app, info->path, info->info);
-    gnome_app_install_menu_hints(app, info->info); 
-  }
-}
+  ENTER(" ");
 
-void
-gnc_extensions_menu_setup_with_data(GnomeApp * app, 
-				    gchar *window, gpointer user_data)
-{
-  GSList        * l = NULL;
-  ExtensionInfo * info;
+  data.uiMerge = uiMerge;
+  data.group = gtk_action_group_new("MainWindowActionsN");
+  gtk_ui_manager_insert_action_group(uiMerge, data.group, 0);
+  data.merge_id = gtk_ui_manager_new_merge_id(uiMerge);
 
-  for(l=extension_list; l; l=l->next) {
-    info = l->data;
-    if ((strcmp(info->window, window) != 0) &&
-	(strcmp(info->window, WINDOW_NAME_ALL) != 0))
-      continue;
-    /* fprintf(stderr, "Inserting extension menu/w/d at path '%s'\n", info->path); */
-    gnome_app_insert_menus_with_data(app, info->path, info->info, user_data);
-    gnome_app_install_menu_hints(app, info->info); 
-  }
+  g_slist_foreach(extension_list, (GFunc)gnc_extensions_menu_setup_one, &data);
+  LEAVE(" ");
 }
 
+/******************** Shutdown ********************/
+
 void
-gnc_extensions_shutdown(void)
+gnc_extensions_shutdown (void)
 {
   g_slist_foreach(extension_list, cleanup_extension_info, NULL);
 
Index: QuickFill.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/QuickFill.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/QuickFill.h -Lsrc/gnome-utils/QuickFill.h -u -r1.4 -r1.5
--- src/gnome-utils/QuickFill.h
+++ src/gnome-utils/QuickFill.h
@@ -19,16 +19,11 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-
-#ifndef QUICKFILL_H
-#define QUICKFILL_H
-
-#include "config.h"
-
-#include <gdk/gdk.h>
-#include <glib.h>
-
+/** @addtogroup GUI
+@{
+*/
 /** @addtogroup QuickFill
+
    QuickFill is meant to be used by the GUI to auto-complete 
    (e.g. tab-complete) typed user input.  
    Quickfill is implemented as a heirarchical tree 
@@ -43,14 +38,23 @@
    QuickFill works with national-language i18n'ed/l10n'ed multi-byte 
    and wide-char strings, as well as plain-old C-locale strings.
    @{
-  
+*/
+/**
    @file QuickFill.h
-   @breif Quickfill is used to auto-complete typed user entries.
+   @brief Quickfill is used to auto-complete typed user entries.
    @author Copyright (C) 1997 Robin D. Clark
    @author Copyright (C) 1998,2004 Linas Vepstas <linas at linas.org>
    @author Copyright (C) 2000 Dave Peticolas
  */
 
+#ifndef QUICKFILL_H
+#define QUICKFILL_H
+
+#include "config.h"
+
+#include <gdk/gdk.h>
+#include <glib.h>
+
 typedef enum
 {
   QUICKFILL_LIFO,
@@ -64,6 +68,7 @@
 
 QuickFill *  gnc_quickfill_new (void);
 void         gnc_quickfill_destroy (QuickFill *qf);
+void         gnc_quickfill_purge (QuickFill *qf);
 
 /** For the given node 'qf', return the best-guess matching string.
  */
@@ -78,7 +83,7 @@
  *  The best-guess matching string can be retreived with 
  *  gnc_quickfill_string().
  */
-QuickFill *  gnc_quickfill_get_char_match (QuickFill *qf, GdkWChar wc);
+QuickFill *  gnc_quickfill_get_char_match (QuickFill *qf, gunichar c);
 
 /** Return a subnode in the tree whose strings all match the 
  *  string 'str' as the next substring.  Thus, for example, if
@@ -93,23 +98,13 @@
  *  use the gnc_mbstowcs() routine.
  */
 QuickFill *  gnc_quickfill_get_string_match (QuickFill *qf,
-                                             const GdkWChar *str);
+                                             const char *str);
 
 /** Same as gnc_quickfill_get_string_match(), except that the
  *  string length is explicilty specified.
  */
 QuickFill *  gnc_quickfill_get_string_len_match (QuickFill *qf,
-                                                 const GdkWChar *str, int len);
-
-/** Same as gnc_quickfill_get_string_match(), except that the
- *  desired match string is specified as a traditional string
- *  (may be single or multi-byte).  The input string is converted
- *  to wide-chars before the actual macthing is performed.
- *  (This routine is a utility wrapper for
- *  gnc_quickfill_get_string_match ()).
- */
-QuickFill *  gnc_quickfill_get_string_match_mb (QuickFill *qf,
-                                                const char *str);
+                                                 const char *str, int len);
 
 /** Walk a 'unique' part of the quickfill tree.  This routine is
  *  typically used to assist in the tab-completion of strings.  
@@ -129,10 +124,6 @@
 /** Add the string "text" to the collection of searchable strings. */
 void         gnc_quickfill_insert (QuickFill *root, const char *text,
                                    QuickFillSort sort_code);
-
-/** Add the string "text" to the collection of searchable strings. */
-void         gnc_quickfill_insert_wc (QuickFill *root, const GdkWChar *text,
-                                      QuickFillSort sort_code);
-
+/** @} */
 /** @} */
 #endif /* QUICKFILL_H */
Index: gnc-splash.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-splash.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/gnc-splash.c -Lsrc/gnome-utils/gnc-splash.c -u -r1.1 -r1.2
--- src/gnome-utils/gnc-splash.c
+++ src/gnome-utils/gnc-splash.c
@@ -24,7 +24,7 @@
 
 #include <gnome.h>
 
-#include "dialog-utils.h"
+#include "gnc-gnome-utils.h"
 #include "gnc-splash.h"
 #include "gnc-version.h"
 
@@ -51,7 +51,9 @@
 
   if (splash) return;
 
-  splash = gtk_window_new (GTK_WINDOW_DIALOG);
+  splash = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_type_hint (GTK_WINDOW (splash), GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
+  gtk_window_set_skip_taskbar_hint (GTK_WINDOW (splash), TRUE);
 
   gtk_signal_connect (GTK_OBJECT (splash), "destroy",
                       GTK_SIGNAL_FUNC (splash_destroy_cb), NULL);
@@ -59,7 +61,7 @@
   gtk_window_set_title (GTK_WINDOW (splash), "GnuCash");
   gtk_window_set_position (GTK_WINDOW (splash), GTK_WIN_POS_CENTER);
 
-  pixmap = gnc_get_pixmap ("gnucash_splash.png");
+  pixmap = gnc_gnome_get_pixmap ("gnucash_splash.png");
 
   if (!pixmap)
   {
@@ -88,7 +90,9 @@
   gtk_box_pack_start (GTK_BOX (vbox), progress, FALSE, FALSE, 0);
   gtk_container_add (GTK_CONTAINER (splash), vbox);
 
+  gtk_window_set_auto_startup_notification (FALSE);
   gtk_widget_show_all (splash);
+  gtk_window_set_auto_startup_notification (TRUE);
 
   /* make sure splash is up */
   while (gtk_events_pending ())
Index: misc-gnome-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/misc-gnome-utils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/gnome-utils/misc-gnome-utils.c -Lsrc/gnome-utils/misc-gnome-utils.c -u -r1.2 -r1.3
--- src/gnome-utils/misc-gnome-utils.c
+++ src/gnome-utils/misc-gnome-utils.c
@@ -22,8 +22,6 @@
 #include "misc-gnome-utils.h"
 
 /* ============================================================== */
-#ifdef GNOME2_PORT_IS_READY
-/* Use the following for the gnome2 port only -- */
 
 void
 xxxgtk_textview_set_text (GtkTextView *text, const char *str)
@@ -45,25 +43,4 @@
 }
 
 
-#else /*GNOME2_PORT_IS_READY */
-/* ============================================================== */
-
-void
-xxxgtk_text_set_text (GtkText *text, const char *str)
-{
-	gint pos=0;
-	if (!str) str = "";
-	gtk_editable_delete_text (GTK_EDITABLE (text), 0, -1);
-	gtk_editable_insert_text (GTK_EDITABLE (text), str,
-                            strlen(str), &pos);
-
-}
-
-const char *
-xxxgtk_text_get_text (GtkText *text)
-{
- 	return gtk_editable_get_chars (GTK_EDITABLE(text), 0, -1);
-}
-
-#endif
 /* ===================== END OF FILE ============================ */
Index: dialog-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-utils.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -Lsrc/gnome-utils/dialog-utils.c -Lsrc/gnome-utils/dialog-utils.c -u -r1.18 -r1.19
--- src/gnome-utils/dialog-utils.c
+++ src/gnome-utils/dialog-utils.c
@@ -2,6 +2,7 @@
  * dialog-utils.c -- utility functions for creating dialogs         *
  *                   for GnuCash                                    *
  * Copyright (C) 1999-2000 Linas Vepstas                            *
+ * Copyright (C) 2005 David Hampton <hampton at employees.org>         *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -32,18 +33,23 @@
 #include <dlfcn.h>
 
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "gnc-commodity.h"
 #include "messages.h"
 #include "Group.h"
 #include "gnc-dir.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-euro.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
+#define WINDOW_POSITION		"window_position"
+#define WINDOW_GEOMETRY		"window_geometry"
+
+#define DESKTOP_GNOME_INTERFACE "/desktop/gnome/interface"
+#define KEY_TOOLBAR_STYLE	"toolbar_style"
 
 /* =========================================================== */
 
@@ -67,12 +73,12 @@
 {
   GtkTooltips *tips = data;
 
-  gtk_object_unref (GTK_OBJECT (tips));
+  g_object_unref (tips);
 }
 
 /********************************************************************\
- * gnc_ui_create_option_button                                      *
- *   create an option button given the option structure             *
+ * gnc_build_option_menu:                                           *
+ *   create an GTK "option menu" given the option structure         *
  *                                                                  *
  * Args: option_info - the option structure to use                  *
  *       num_options - the number of options                        *
@@ -95,7 +101,7 @@
 
   tooltips = gtk_tooltips_new();
 
-  gtk_object_ref (GTK_OBJECT (tooltips));
+  g_object_ref (tooltips);
   gtk_object_sink (GTK_OBJECT (tooltips));
 
   for (i = 0; i < num_options; i++)
@@ -134,53 +140,6 @@
 
 
 /********************************************************************\
- * gnc_get_pixmap                                                   *
- *   returns a GnomePixmap widget given a pixmap filename           *
- *                                                                  *
- * Args: none                                                       *
- * Returns: GnomePixmap widget or NULL if there was a problem       *
- \*******************************************************************/
-GtkWidget *
-gnc_get_pixmap (const char *name)
-{
-  GtkWidget *pixmap;
-  char *fullname;
-
-  g_return_val_if_fail (name != NULL, NULL);
-
-  fullname = g_strconcat (GNC_PIXMAP_DIR, "/", name, NULL);
-  pixmap = gnome_pixmap_new_from_file (fullname);
-  g_free (fullname);
-
-  return pixmap;
-}
-
-
-/********************************************************************\
- * gnc_get_imlib_image                                              *
- *   returns a GdkImlibImage object given a pixmap filename         *
- *                                                                  *
- * Args: none                                                       *
- * Returns: GnomePixmap widget or NULL if there was a problem       *
- \*******************************************************************/
-GdkImlibImage *
-gnc_get_gdk_imlib_image (const char *name)
-{
-  GdkImlibImage *image;
-
-  char *fullname;
-
-  g_return_val_if_fail (name != NULL, NULL);
-
-  fullname = g_strconcat (GNC_PIXMAP_DIR, "/", name, NULL);
-  image = gdk_imlib_load_image (fullname);
-  g_free (fullname);
-
-  return image;
-}
-
-
-/********************************************************************\
  * gnc_get_toolbar_style                                            *
  *   returns the current toolbar style for gnucash toolbars         *
  *                                                                  *
@@ -193,51 +152,24 @@
   GtkToolbarStyle tbstyle = GTK_TOOLBAR_BOTH;
   char *style_string;
 
-  style_string = gnc_lookup_multichoice_option("General",
-                                               "Toolbar Buttons",
-                                               "icons_and_text");
-
-  if (safe_strcmp(style_string, "icons_and_text") == 0)
-    tbstyle = GTK_TOOLBAR_BOTH;
-  else if (safe_strcmp(style_string, "icons_only") == 0)
-    tbstyle = GTK_TOOLBAR_ICONS;
-  else if (safe_strcmp(style_string, "text_only") == 0)
-    tbstyle = GTK_TOOLBAR_TEXT;
+  style_string = gnc_gconf_get_string(GCONF_GENERAL,
+				      KEY_TOOLBAR_STYLE, NULL);
+  if (!style_string || strcmp(style_string, "system") == 0) {
+    if (style_string)
+      g_free(style_string);
+    style_string = gnc_gconf_get_string(DESKTOP_GNOME_INTERFACE,
+					KEY_TOOLBAR_STYLE, NULL);
+  }
 
-  if (style_string != NULL)
-    free(style_string);
+  if (style_string == NULL)
+    return GTK_TOOLBAR_BOTH;
+  tbstyle = gnc_enum_from_nick(GTK_TYPE_TOOLBAR_STYLE, style_string,
+			       GTK_TOOLBAR_BOTH);
+  free(style_string);
 
   return tbstyle;
 }
 
-/********************************************************************
- * gnc_get_mdi_mode                                                 *
- * returns the current Gnome MDI mode preference                    *
- ********************************************************************/
-GnomeMDIMode 
-gnc_get_mdi_mode(void) {
-  GnomeMDIMode mode = GNOME_MDI_DEFAULT_MODE;
-  char * mode_string = gnc_lookup_multichoice_option("_+Advanced",
-                                                     "Application MDI mode",
-                                                     "");
-  if(!safe_strcmp(mode_string, "mdi-notebook")) {
-    mode = GNOME_MDI_NOTEBOOK;
-  }
-  else if(!safe_strcmp(mode_string, "mdi-toplevel")) {
-    mode = GNOME_MDI_TOPLEVEL;    
-  }
-  else if(!safe_strcmp(mode_string, "mdi-modal")) {
-    mode = GNOME_MDI_MODAL;    
-  }
-  else if(!safe_strcmp(mode_string, "mdi-default")) {
-    mode = GNOME_MDI_DEFAULT_MODE;    
-  }
-
-  if(mode_string) free(mode_string);
-  return mode;
-}
-
-
 /********************************************************************\
  * gnc_get_deficit_color                                            *
  *   fill in the 3 color values for the color of deficit values     *
@@ -269,7 +201,7 @@
   GdkColormap *cm;
   GtkStyle *style;
 
-  if (!gnc_color_deficits())
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, "red_for_negative", NULL))
     return;
 
   cm = gtk_widget_get_colormap(GTK_WIDGET(label));
@@ -290,12 +222,12 @@
 
   gtk_widget_set_style(label, style);
 
-  gtk_style_unref(style);
+  g_object_unref(style);
 }
 
 
 /********************************************************************\
- * gnc_get_window_size                                              *
+ * gnc_restore_window_size                                          *
  *   returns the window size to use for the given option prefix,    *
  *   if window sizes are being saved, otherwise returns 0 for both. *
  *                                                                  *
@@ -305,32 +237,35 @@
  * Returns: nothing                                                 *
  \*******************************************************************/
 void
-gnc_get_window_size(const char *prefix, int *width, int *height)
+gnc_restore_window_size(const char *section, GtkWindow *window)
 {
-  int w, h;
-  char *name;
-
-  if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-  {
-    name = g_strconcat(prefix, "_width", NULL);
-    w = gnc_lookup_number_option("__gui", name, 0.0);
-    g_free(name);
-
-    name = g_strconcat(prefix, "_height", NULL);
-    h = gnc_lookup_number_option("__gui", name, 0.0);
-    g_free(name);
-  }
-  else
-  {
-    w = 0;
-    h = 0;
-  }
+  GSList *coord_list;
+  gint coords[2];
 
-  if (width != NULL)
-    *width = w;
+  g_return_if_fail(section != NULL);
+  g_return_if_fail(window != NULL);
 
-  if (height != NULL)
-    *height = h;
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
+    return;
+  
+  coord_list = gnc_gconf_get_list(section, WINDOW_POSITION,
+				  GCONF_VALUE_INT, NULL);
+  if (coord_list) {
+    coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
+    coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
+    gtk_window_move(window, coords[0], coords[1]);
+    g_slist_free(coord_list);
+  }
+
+  coord_list = gnc_gconf_get_list(section, WINDOW_GEOMETRY,
+				  GCONF_VALUE_INT, NULL);
+  if (coord_list) {
+    coords[0] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 0));
+    coords[1] = GPOINTER_TO_INT(g_slist_nth_data(coord_list, 1));
+    if ((coords[0] != 0) && (coords[1] != 0))
+      gtk_window_resize(window, coords[0], coords[1]);
+    g_slist_free(coord_list);
+  }
 }
 
 
@@ -345,26 +280,34 @@
  * Returns: nothing                                                 *
 \********************************************************************/
 void
-gnc_save_window_size(const char *prefix, int width, int height)
+gnc_save_window_size(const char *section, GtkWindow *window)
 {
-  char *name;
-  gboolean save;
+  GSList *coord_list = NULL;
+  gint coords[2];
 
-  save = gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", FALSE);
+  g_return_if_fail(section != NULL);
+  g_return_if_fail(window != NULL);
 
-  name = g_strconcat(prefix, "_width", NULL);
-  if (save)
-    gnc_set_number_option("__gui", name, width);
-  else
-    gnc_set_option_default("__gui", name);
-  g_free(name);
+  if (GTK_OBJECT_FLAGS(window) & GTK_IN_DESTRUCTION)
+    return;
 
-  name = g_strconcat(prefix, "_height", NULL);
-  if (save)
-    gnc_set_number_option("__gui", name, height);
-  else
-    gnc_set_option_default("__gui", name);
-  g_free(name);
+  if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
+    return;
+
+  gtk_window_get_size(GTK_WINDOW(window), &coords[0], &coords[1]);
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
+  gnc_gconf_set_list(section, WINDOW_GEOMETRY, GCONF_VALUE_INT,
+		     coord_list, NULL);
+  g_slist_free(coord_list);
+  coord_list = NULL;
+
+  gtk_window_get_position(GTK_WINDOW(window), &coords[0], &coords[1]);
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[0]));
+  coord_list = g_slist_append(coord_list, GUINT_TO_POINTER(coords[1]));
+  gnc_gconf_set_list(section, WINDOW_POSITION, GCONF_VALUE_INT,
+		     coord_list, NULL);
+  g_slist_free(coord_list);
 }
 
 
@@ -427,23 +370,23 @@
 
 typedef struct {
   int i;
-  GtkSignalFunc f;
+  GCallback f;
   gpointer cb_data;
 } menu_init_data;
 
 static void
 gnc_option_menu_set_one_item (gpointer loop_data, gpointer user_data)
 {
-  GtkObject *item = GTK_OBJECT(loop_data);
+  GObject *item = G_OBJECT(loop_data);
   menu_init_data *args = (menu_init_data *) user_data;
   
-  gtk_object_set_data(item, "option_index", GINT_TO_POINTER(args->i++));
-  gtk_signal_connect(item, "activate", args->f, args->cb_data);
+  g_object_set_data(item, "option_index", GINT_TO_POINTER(args->i++));
+  g_signal_connect(item, "activate", args->f, args->cb_data);
 }
 
 
 void
-gnc_option_menu_init_w_signal(GtkWidget * w, GtkSignalFunc f, gpointer cb_data)
+gnc_option_menu_init_w_signal(GtkWidget * w, GCallback f, gpointer cb_data)
 {
   GtkWidget * menu;
   menu_init_data foo;
@@ -512,29 +455,6 @@
   gtk_widget_queue_resize(GTK_WIDGET(window));
 }
 
-/*
- * This routine must be removed when GnuCash is ported to GTK 2.0.  It
- * replicates the functionality (as much as possible) of that routine
- * using functions available in GTK 1.4.
- */
-void
-gtk_window_present (GtkWindow *window)
-{
-  GtkWidget *widget;
-
-  g_return_if_fail (GTK_IS_WINDOW (window));
-
-  widget = GTK_WIDGET (window);
-
-  if (GTK_WIDGET_VISIBLE (window)) {
-      g_assert (widget->window != NULL);
-      gdk_window_show(widget->window); 	/* De-iconify */
-      gdk_window_raise(widget->window);	/* Bring to front */
-  } else {
-      gtk_widget_show (widget);
-  }
-}
-
 gboolean
 gnc_handle_date_accelerator (GdkEventKey *event,
                              struct tm *tm,
@@ -580,24 +500,20 @@
     case GDK_minus:
       if ((strlen (date_str) != 0) && (dateSeparator () == '-'))
       {
-        GdkWChar *wcs;
-        int count;
-        int len;
-        int i;
-
-        len = gnc_mbstowcs (&wcs, date_str);
-        if (len < 0)
-          return FALSE;
+        const char *c;
+        gunichar uc;
+        int count = 0;
 
         /* rough check for existing date */
-        for (i = count = 0; i < len; i++)
+        c = date_str;
+        while (*c)
         {
-          if (wcs[i] == '-')
+          uc = g_utf8_get_char (c);
+          if (uc == '-')
             count++;
+          c = g_utf8_next_char (c);          
         }
 
-        g_free (wcs);
-
         if (count < 2)
           return FALSE;
       }
@@ -735,13 +651,15 @@
   GList *list;
   GList *node;
   GdkGC *gc;
+  GdkFont *font;
 
   if (check_info->mask)
     return;
 
   style = gtk_widget_get_style (widget);
+  font = gdk_font_from_description(style->font_desc);
 
-  font_height = style->font->ascent + style->font->descent;
+  font_height = font->ascent + font->descent;
   check_size = (font_height > 0) ? font_height - 3 : 9;
 
   check_info->mask = gdk_pixmap_new (NULL, check_size, check_size, 1);
@@ -925,7 +843,7 @@
   if (!style)
     return;
 
-  font = style->font;
+  font = gdk_font_from_description (style->font_desc);
   if (!font)
     return;
 
@@ -951,9 +869,17 @@
   gtk_clist_columns_autosize (list);
 }
 
+/*   Glade Stuff
+ *
+ *
+ */
 
 static gboolean glade_inited = FALSE;
 
+/* gnc_glade_xml_new: a convenience wrapper for glade_xml_new
+ *   - takes care of glade initialization, if needed
+ *   - takes care of finding the directory for glade files
+ */
 GladeXML *
 gnc_glade_xml_new (const char *filename, const char *root)
 {
@@ -971,13 +897,16 @@
 
   fname = g_strconcat (GNC_GLADE_DIR, "/", filename, NULL);
 
-  xml = glade_xml_new (fname, root);
+  xml = glade_xml_new (fname, root, NULL);
 
   g_free (fname);
 
   return xml;
 }
 
+/* gnc_glade_lookup_widget:  Given a root (or at least ancestor) widget,
+ *   find the child widget with the given name.
+ */
 GtkWidget *
 gnc_glade_lookup_widget (GtkWidget *widget, const char *name)
 {
@@ -998,14 +927,14 @@
 
 void
 gnc_glade_autoconnect_full_func(const gchar *handler_name,
-				GtkObject *signal_object,
+				GObject *signal_object,
 				const gchar *signal_name,
 				const gchar *signal_data,
-				GtkObject *other_object,
+				GObject *other_object,
 				gboolean signal_after,
 				gpointer user_data)
 {
-  GtkSignalFunc func;
+  GCallback func;
   GtkSignalFunc *p_func = &func;
 
   if (allsymbols == NULL) {
@@ -1024,98 +953,14 @@
 
   if (other_object) {
     if (signal_after)
-      gtk_signal_connect_object_after(signal_object, signal_name, func,
-				      other_object);
+      g_signal_connect_object (signal_object, signal_name, func,
+			       other_object, G_CONNECT_AFTER | G_CONNECT_SWAPPED);
     else
-      gtk_signal_connect_object(signal_object, signal_name, func,
-				other_object);
+      g_signal_connect_swapped (signal_object, signal_name, func, other_object);
   } else {
     if (signal_after)
-      gtk_signal_connect_after(signal_object, signal_name, func, user_data);
+      g_signal_connect_after(signal_object, signal_name, func, user_data);
     else
-      gtk_signal_connect(signal_object, signal_name, func, user_data);
-  }
-}
-
-
-gint
-gnc_mbstowcs (GdkWChar **dest_p, const char *src)
-{
-  GdkWChar *dest;
-  gint src_len;
-  gint retval;
-
-  if (!src)
-    return -1;
-
-  src_len = strlen (src);
-
-  dest = g_new0 (GdkWChar, src_len + 1);
-
-  retval = gdk_mbstowcs (dest, src, src_len);
-
-  if (retval < 0)
-  {
-    PERR ("bad multi-byte conversion");
-  }
-
-  if (dest_p)
-    *dest_p = dest;
-  else
-    g_free (dest);
-
-  return retval;
-}
-
-char *
-gnc_wcstombs (const GdkWChar *src)
-{
-  char *retval;
-
-  if (!src)
-    return NULL;
-
-  retval = gdk_wcstombs (src);
-  if (!retval)
-  {
-    PERR ("bad multi-byte conversion");
+      g_signal_connect(signal_object, signal_name, func, user_data);
   }
-
-  return retval;
-}
-
-gint
-gnc_wcslen (const GdkWChar *src)
-{
-  int len = 0;
-
-  if (!src)
-    return 0;
-
-  while (src[len])
-    len++;
-
-  return len;
-}
-
-GdkWChar *
-gnc_wcsdup (const GdkWChar *src)
-{
-  GdkWChar *dest;
-  int len;
-  int i;
-
-  if (!src)
-    return NULL;
-
-  len = gnc_wcslen (src);
-
-  dest = g_new (GdkWChar, len + 1);
-
-  for (i = 0; i < len; i++)
-    dest[i] = src[i];
-
-  dest[len] = 0;
-
-  return dest;
 }
Index: dialog-account.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-account.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome-utils/dialog-account.c -Lsrc/gnome-utils/dialog-account.c -u -r1.12 -r1.13
--- src/gnome-utils/dialog-account.c
+++ src/gnome-utils/dialog-account.c
@@ -2,6 +2,7 @@
  * dialog-account.c -- window for creating and editing accounts for *
  *                     GnuCash                                      *
  * Copyright (C) 2000 Dave Peticolas <dave at krondo.com>              *
+ * Copyright (C) 2003,2005 David Hampton <hampton at employees.org>    *
  *                                                                  *
  * This program is free software; you can redistribute it and/or    *
  * modify it under the terms of the GNU General Public License as   *
@@ -31,26 +32,23 @@
 #include "dialog-account.h"
 #include "dialog-commodity.h"
 #include "dialog-utils.h"
-#include "global-options.h"
-#include "gnc-account-tree.h"
 #include "gnc-amount-edit.h"
 #include "gnc-general-select.h"
 #include "gnc-commodity.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-component-manager.h"
-#include "gnc-date-edit.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
 #include "gnc-gui-query.h"
 #include "gnc-session.h"
+#include "gnc-tree-view-account.h"
 #include "gnc-ui.h"
 #include "gnc-ui-util.h"
 #include "messages.h"
-#include "window-help.h"
 
 
 #define DIALOG_NEW_ACCOUNT_CM_CLASS "dialog-new-account"
 #define DIALOG_EDIT_ACCOUNT_CM_CLASS "dialog-edit-account"
+#define GCONF_SECTION "dialogs/account"
 
 typedef enum
 {
@@ -59,14 +57,15 @@
 } AccountDialogType;
 
 
-struct _AccountWindow
+typedef struct _AccountWindow
 {
+  gboolean modal;
   GtkWidget *dialog;
 
   AccountDialogType dialog_type;
 
   GUID    account;
-  Account *top_level_account;
+  Account *top_level_account; /* owned by the model */
   Account *created_account;
 
   GList *subaccount_names;
@@ -78,7 +77,7 @@
   GtkWidget * name_entry;
   GtkWidget * description_entry;
   GtkWidget * code_entry;
-  GtkWidget * notes_text;
+  GtkTextBuffer * notes_text_buffer;
 
   GtkWidget * commodity_edit;
   dialog_commodity_mode commodity_mode;
@@ -86,7 +85,7 @@
   
   GList * valid_types;
   GtkWidget * type_list;
-  GtkWidget * parent_tree;
+  GtkTreeView * parent_tree;
 
   GtkWidget * opening_balance_edit;
   GtkWidget * opening_balance_date_edit;
@@ -100,14 +99,11 @@
   GtkWidget * placeholder_button;
 
   gint component_id;
-};
+} AccountWindow;
 
 
 /** Static Globals *******************************************************/
-static short module = MOD_GUI;
-
-static gint last_width = 0;
-static gint last_height = 0;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 static int last_used_account_type = BANK;
 
@@ -115,13 +111,7 @@
 
 /** Declarations *********************************************************/
 static void gnc_account_window_set_name (AccountWindow *aw);
-static AccountWindow *
-gnc_ui_new_account_window_internal (Account *base_account,
-                                    GList *subaccount_names,
-				    GList *valid_types,
-				    gnc_commodity * default_commodity);
 static void make_account_changes(GHashTable *change_type);
-static void gnc_ui_refresh_account_window (AccountWindow *aw);
 
 
 /** Implementation *******************************************************/
@@ -169,14 +159,18 @@
 static void
 gnc_account_to_ui(AccountWindow *aw)
 {
-  Account *account = aw_get_account (aw);
+  Account *account;
   gnc_commodity * commodity;
   const char *string;
   gboolean tax_related, placeholder, nonstd_scu;
-  gint pos = 0, index;
+  gint index;
 
-  if (!account)
+  ENTER("%p", aw);
+  account = aw_get_account (aw);
+  if (!account) {
+    LEAVE("no account");
     return;
+  }
 
   string = xaccAccountGetName (account);
   if (string == NULL) string = "";
@@ -207,9 +201,7 @@
   string = xaccAccountGetNotes (account);
   if (string == NULL) string = "";
 
-  gtk_editable_delete_text (GTK_EDITABLE (aw->notes_text), 0, -1);
-  gtk_editable_insert_text (GTK_EDITABLE (aw->notes_text), string,
-                            strlen(string), &pos);
+  gtk_text_buffer_set_text (aw->notes_text_buffer, string, strlen(string));
 
   tax_related = xaccAccountGetTaxRelated (account);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->tax_related_button),
@@ -218,6 +210,10 @@
   placeholder = xaccAccountGetPlaceholder (account);
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (aw->placeholder_button),
                                 placeholder);
+
+  gtk_tree_view_collapse_all (aw->parent_tree);
+  gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT(aw->parent_tree), account);
+  LEAVE(" ");
 }
 
 
@@ -276,7 +272,7 @@
 static void
 gnc_ui_to_account(AccountWindow *aw)
 {
-  Account *account = aw_get_account (aw);
+  Account *account;
   gnc_commodity *commodity;
   Account *parent_account;
   const char *old_string;
@@ -286,9 +282,13 @@
   gboolean use_equity, nonstd;
   time_t date;
   gint index, old_scu, new_scu;
+  GtkTextIter start, end;
 
-  if (!account)
+  account = aw_get_account (aw);
+  if (!account) {
+    LEAVE("no account");
     return;
+  }
 
   xaccAccountBeginEdit (account);
 
@@ -328,7 +328,9 @@
   if (safe_strcmp (string, old_string) != 0)
     xaccAccountSetCode (account, string);
 
-  string = gtk_editable_get_chars (GTK_EDITABLE(aw->notes_text), 0, -1);
+  gtk_text_buffer_get_start_iter (aw->notes_text_buffer, &start);
+  gtk_text_buffer_get_end_iter (aw->notes_text_buffer, &end);
+  string = gtk_text_buffer_get_text (aw->notes_text_buffer, &start, &end, FALSE);
   old_string = xaccAccountGetNotes (account);
   if (safe_strcmp (string, old_string) != 0)
     xaccAccountSetNotes (account, string);
@@ -341,8 +343,7 @@
     gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (aw->placeholder_button));
   xaccAccountSetPlaceholder (account, placeholder);
 
-  parent_account =
-    gnc_account_tree_get_current_account (GNC_ACCOUNT_TREE(aw->parent_tree));
+  parent_account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
   if (parent_account == aw->top_level_account)
     parent_account = NULL;
 
@@ -362,14 +363,16 @@
   balance = gnc_amount_edit_get_amount
     (GNC_AMOUNT_EDIT (aw->opening_balance_edit));
 
-  if (gnc_numeric_zero_p (balance))
+  if (gnc_numeric_zero_p (balance)) {
+    LEAVE("zero balance");
     return;
+  }
 
   if (gnc_reverse_balance (account))
     balance = gnc_numeric_neg (balance);
 
-  date = gnc_date_edit_get_date
-    (GNC_DATE_EDIT (aw->opening_balance_date_edit));
+  date = gnome_date_edit_get_time (
+		  GNOME_DATE_EDIT (aw->opening_balance_date_edit));
 
   use_equity = gtk_toggle_button_get_active
     (GTK_TOGGLE_BUTTON (aw->opening_equity_radio));
@@ -385,15 +388,17 @@
   }
   else
   {
-    Account *transfer;
+    Account *transfer = NULL;
 
-    transfer = gnc_account_tree_get_current_account
-      (GNC_ACCOUNT_TREE (aw->transfer_tree));
-    if (!transfer)
+    transfer = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->transfer_tree));
+    if (!transfer) {
+      LEAVE("no transfer account");
       return;
+    }
 
     gnc_account_create_transfer_balance (account, transfer, balance, date);
   }
+    LEAVE(" ");
 }
 
 
@@ -401,6 +406,7 @@
 gnc_finish_ok (AccountWindow *aw,
                GHashTable *change_type)
 {
+  ENTER("aw %p, hash table %p", aw, change_type);
   gnc_suspend_gui_refresh ();
 
   /* make the account changes */
@@ -440,11 +446,11 @@
                                       commodity);
     gnc_account_commodity_from_type (aw, FALSE);
 
-    gnc_account_tree_select_account (GNC_ACCOUNT_TREE(aw->parent_tree),
-                                     parent, TRUE);
+    /*gnc_account_tree_select_account (GNC_ACCOUNT_TREE(aw->parent_tree),
+                                     parent, TRUE);*/
 
     gnc_resume_gui_refresh ();
-
+    LEAVE("1");
     return;
   }
 
@@ -455,6 +461,7 @@
   aw->account = *xaccGUIDNULL ();
 
   gnc_close_gui_component (aw->component_id);
+  LEAVE("2");
 }
 
 
@@ -492,36 +499,25 @@
 
 /* helper function to perform changes to accounts */
 static void
-change_func (gpointer key, gpointer value, gpointer field_code)
+change_func (gpointer key, gpointer value, gpointer unused)
 {
   Account *account = key;
-  AccountFieldCode field = GPOINTER_TO_INT(field_code);
-
+  int type;
+ 
   if (account == NULL)
     return;
 
   xaccAccountBeginEdit(account);
 
-  switch (field)
-  {
-    case ACCOUNT_TYPE:
-      {
-        int type = GPOINTER_TO_INT(value);
+  type = GPOINTER_TO_INT(value);
 
-        if (type == xaccAccountGetType(account))
-          break;
+  if (type == xaccAccountGetType(account))
+    return;
 
-        /* Just refreshing won't work. */
-        aw_call_destroy_callbacks (account);
+  /* Just refreshing won't work. */
+  aw_call_destroy_callbacks (account);
 
-        xaccAccountSetType(account, type);
-      }
-      break;
-
-    default:
-      PERR ("unexpected account field code");
-      break;
-  }
+  xaccAccountSetType(account, type);
 
   xaccAccountCommitEdit(account);
 }
@@ -532,15 +528,13 @@
 make_account_changes(GHashTable *change_type)
 {
   if (change_type != NULL)
-    g_hash_table_foreach(change_type, change_func,
-                         GINT_TO_POINTER(ACCOUNT_TYPE));
+    g_hash_table_foreach(change_type, change_func, NULL);
 }
 
 
 typedef struct
 {
   Account *account;
-  AccountFieldCode field;
   GtkCList *list;
   guint count;
 } FillStruct;
@@ -554,7 +548,6 @@
   gchar *account_field_name;
   gchar *account_field_value;
   gchar *value_str;
-  gboolean dummy;
 
   if (fs == NULL) return;
   if (fs->account == account) return;
@@ -563,27 +556,16 @@
   if(!full_name)
     full_name = g_strdup("");
 
-  account_field_name = g_strdup(gnc_ui_account_get_field_name(fs->field));
+  account_field_name = g_strdup("Type");
   if (!account_field_name)
     account_field_name = g_strdup("");
 
   account_field_value =
-    gnc_ui_account_get_field_value_string(account, fs->field, &dummy);
+    g_strdup (xaccAccountGetTypeStr(xaccAccountGetType(account)));
   if (!account_field_value)
     account_field_value = g_strdup("");
 
-  switch (fs->field)
-  {
-    case ACCOUNT_TYPE:
-      value_str = g_strdup(xaccAccountGetTypeStr(GPOINTER_TO_INT(value)));
-      break;
-    default:
-      g_warning("unexpected field type");
-      g_free(full_name);
-      g_free(account_field_name);
-      g_free(account_field_value);
-      return;
-  }
+  value_str = g_strdup(xaccAccountGetTypeStr(GPOINTER_TO_INT(value)));
 
   {  
     gchar *strings[5];
@@ -606,7 +588,7 @@
 
 static guint
 fill_list(Account *account, GtkCList *list,
-          GHashTable *change, AccountFieldCode field)
+          GHashTable *change)
 {
   FillStruct fs;
 
@@ -614,7 +596,6 @@
     return 0;
 
   fs.account = account;
-  fs.field = field;
   fs.list = list;
   fs.count = 0;
 
@@ -626,8 +607,8 @@
 
 /* Present a dialog of proposed account changes for the user's ok */
 static gboolean
-extra_change_verify(AccountWindow *aw,
-                    GHashTable *change_type)
+extra_change_verify (AccountWindow *aw,
+                     GHashTable *change_type)
 {
   Account *account;
   GtkCList *list;
@@ -651,7 +632,7 @@
   list = GTK_CLIST(gtk_clist_new_with_titles(4, titles));
 
   size = 0;
-  size += fill_list(account, list, change_type, ACCOUNT_TYPE);
+  size += fill_list(account, list, change_type);
 
   if (size == 0)
   {
@@ -671,19 +652,18 @@
     GtkWidget *frame;
     GtkWidget *vbox;
 
-    dialog = gnome_dialog_new(_("Verify Changes"),
-                              GNOME_STOCK_BUTTON_OK,
-                              GNOME_STOCK_BUTTON_CANCEL,
-                              NULL);
-
-    gnome_dialog_set_default(GNOME_DIALOG(dialog), 0);
-    gnome_dialog_set_close(GNOME_DIALOG(dialog), FALSE);
-    gnome_dialog_close_hides(GNOME_DIALOG(dialog), FALSE);
-    gnome_dialog_set_parent(GNOME_DIALOG(dialog), GTK_WINDOW(aw->dialog));
-    gtk_window_set_policy(GTK_WINDOW(dialog), TRUE, TRUE, TRUE);
-    gtk_window_set_default_size(GTK_WINDOW(dialog), 0, 300);
+    dialog = gtk_dialog_new_with_buttons (_("Verify Changes"),
+		    			  GTK_WINDOW(aw->dialog),
+					  GTK_DIALOG_DESTROY_WITH_PARENT |
+					  GTK_DIALOG_MODAL,
+					  GTK_STOCK_OK, GTK_RESPONSE_OK,
+					  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+					  NULL);
 
-    vbox = GNOME_DIALOG(dialog)->vbox;
+    gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+    gtk_window_set_default_size (GTK_WINDOW (dialog), 0, 300);
+
+    vbox = GTK_DIALOG (dialog)->vbox;
 
     label = gtk_label_new(_("The following changes must be made. Continue?"));
     gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
@@ -702,7 +682,7 @@
 
     gtk_widget_show_all(vbox);
 
-    result = (gnome_dialog_run(GNOME_DIALOG(dialog)) == 0);
+    result = (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK);
 
     gtk_widget_destroy(dialog);
   }
@@ -745,8 +725,6 @@
   gboolean has_children;
   gboolean change_all;
 
-  GNCAccountTree *tree;
-
   Account *new_parent;
   Account *account;
   AccountGroup *children;
@@ -757,11 +735,13 @@
   gnc_commodity * commodity;
 
   /* check for valid name */
+  ENTER("aw %p", aw);
   name = gtk_entry_get_text(GTK_ENTRY(aw->name_entry));
   if (safe_strcmp(name, "") == 0)
   {
     const char *message = _("The account must be given a name.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
@@ -770,17 +750,18 @@
   {
     const char *message = _("You must select an account type.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
-  tree = GNC_ACCOUNT_TREE(aw->parent_tree);
-  new_parent = gnc_account_tree_get_current_account(tree);
+  new_parent = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
 
   /* Parent check, probably not needed, but be safe */
   if (!gnc_filter_parent_accounts(new_parent, aw))
   {
     const char *message = _("You must choose a valid parent account.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
@@ -791,12 +772,15 @@
   {
     const char *message = _("You must choose a commodity.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
   account = aw_get_account (aw);
-  if (!account)
+  if (!account) {
+    LEAVE(" ");
     return;
+  }
 
   change_type = g_hash_table_new (NULL, NULL);
 
@@ -853,6 +837,7 @@
   if (!extra_change_verify(aw, change_type))
   {
     g_hash_table_destroy(change_type);
+    LEAVE(" ");
     return;
   }
 
@@ -863,6 +848,7 @@
   gnc_finish_ok (aw, change_type);
 
   g_hash_table_destroy (change_type);
+    LEAVE(" ");
 }
 
 
@@ -872,19 +858,21 @@
   const gnc_commodity * commodity;
   Account *parent_account;
   gnc_numeric balance;
-  char *name;
+  const gchar *name;
 
   /* check for valid name */
+  ENTER("aw %p", aw);
   name = gtk_entry_get_text(GTK_ENTRY(aw->name_entry));
   if (safe_strcmp(name, "") == 0)
   {
     const char *message = _("The account must be given a name.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
-  parent_account =
-    gnc_account_tree_get_current_account(GNC_ACCOUNT_TREE(aw->parent_tree));
+  parent_account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
+
   if (parent_account == aw->top_level_account)
     parent_account = NULL;
 
@@ -922,6 +910,7 @@
     {
       const char *message = _("There is already an account with that name.");
       gnc_error_dialog(aw->dialog, message);
+      LEAVE(" ");
       return;
     }
   }
@@ -931,6 +920,7 @@
   {
     const char *message = _("You must select an account type.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
@@ -942,6 +932,7 @@
   {
     const char *message = _("You must choose a commodity.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
@@ -950,6 +941,7 @@
     const char *message = _("You must enter a valid opening balance "
                             "or leave it blank.");
     gnc_error_dialog(aw->dialog, message);
+    LEAVE(" ");
     return;
   }
 
@@ -965,81 +957,79 @@
 
     if (!use_equity)
     {
-      Account *transfer;
-
-      transfer = gnc_account_tree_get_current_account
-        (GNC_ACCOUNT_TREE (aw->transfer_tree));
+      Account *transfer = NULL;
 
+      transfer = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->transfer_tree));
       if (!transfer)
       {
         const char *message = _("You must select a transfer account or choose"
                                 "\nthe opening balances equity account.");
         gnc_error_dialog(aw->dialog, message);
+	LEAVE(" ");
         return;
       }
     }
   }
 
   gnc_finish_ok (aw, NULL);
+  LEAVE(" ");
 }
 
-
 static void
-gnc_account_window_ok_cb(GtkWidget * widget, gpointer data)
-{
-  AccountWindow *aw = data; 
-
-  switch (aw->dialog_type)
-  {
-    case NEW_ACCOUNT:
-      gnc_new_account_ok (aw);
-      break;
-    case EDIT_ACCOUNT:
-      gnc_edit_account_ok (aw);
-      break;
-    default:
-      return;
-  }
-}
-
-
-static void
-gnc_account_window_cancel_cb(GtkWidget * widget, gpointer data)
-{
-  AccountWindow *aw = data; 
-
-  gnc_close_gui_component (aw->component_id);
-}
-
-
-static void 
-gnc_account_window_help_cb(GtkWidget *widget, gpointer data)
-{
-  AccountWindow *aw = data;
-  char *help_file;
-
-  switch (aw->dialog_type)
-  {
-    case NEW_ACCOUNT:
-      help_file = HH_ACC;
-      break;
-    case EDIT_ACCOUNT:
-      help_file = HH_ACCEDIT;
-      break;
-    default:
-      return;
-  }
-
-  helpWindow(NULL, NULL, help_file);
+gnc_account_window_response_cb (GtkDialog *dialog,
+	       			gint response,
+			       	gpointer data)
+{
+	AccountWindow *aw = data; 
+
+	ENTER("dialog %p, response %d, aw %p", dialog, response, aw);
+	switch (response) {
+		case GTK_RESPONSE_OK:
+			switch (aw->dialog_type) {
+				case NEW_ACCOUNT:
+					DEBUG("new acct dialog, OK");
+					gnc_new_account_ok (aw);
+					break;
+				case EDIT_ACCOUNT:
+					DEBUG("edit acct dialog, OK");
+					gnc_edit_account_ok (aw);
+					break;
+				default:
+					g_assert_not_reached ();
+					return;
+			}
+			break;
+		case GTK_RESPONSE_HELP:
+			switch (aw->dialog_type) {
+				case NEW_ACCOUNT:
+					DEBUG("new acct dialog, HELP");
+					gnc_gnome_help(HF_USAGE, HL_ACC);
+					break;
+				case EDIT_ACCOUNT:
+					DEBUG("edit acct dialog, HELP");
+					gnc_gnome_help(HF_USAGE, HL_ACCEDIT);
+					break;
+				default:
+					g_assert_not_reached ();
+					return;
+			}
+			break;
+		case GTK_RESPONSE_CANCEL:
+		default:
+			DEBUG("CANCEL");
+			gnc_close_gui_component (aw->component_id);
+			break;
+	}
+	LEAVE(" ");
 }
 
-
 static void
 gnc_account_window_destroy_cb (GtkObject *object, gpointer data)
 {
   AccountWindow *aw = data;
   Account *account;
 
+  ENTER("object %p, aw %p", object, aw);
   account = aw_get_account (aw);
 
   gnc_suspend_gui_refresh ();
@@ -1063,12 +1053,12 @@
     default:
       PERR ("unexpected dialog type\n");
       gnc_resume_gui_refresh ();
+      LEAVE(" ");
       return;
   }
 
   gnc_unregister_gui_component (aw->component_id);
 
-  xaccAccountDestroy (aw->top_level_account);
   aw->top_level_account = NULL;
 
   gnc_resume_gui_refresh ();
@@ -1084,6 +1074,7 @@
 
   g_list_free (aw->valid_types);
   g_free (aw);
+  LEAVE(" ");
 }
 
 
@@ -1188,11 +1179,11 @@
 
   gtk_clist_sort(GTK_CLIST(aw->type_list));
 
-  gtk_signal_connect(GTK_OBJECT(aw->type_list), "select-row",
-		     GTK_SIGNAL_FUNC(gnc_type_list_select_cb), aw);
+  g_signal_connect(GTK_OBJECT(aw->type_list), "select-row",
+		   G_CALLBACK(gnc_type_list_select_cb), aw);
 
-  gtk_signal_connect(GTK_OBJECT(aw->type_list), "unselect-row",
-		     GTK_SIGNAL_FUNC(gnc_type_list_unselect_cb), aw);
+  g_signal_connect(GTK_OBJECT(aw->type_list), "unselect-row",
+		   G_CALLBACK(gnc_type_list_unselect_cb), aw);
 
   switch (aw->dialog_type)
   {
@@ -1210,99 +1201,6 @@
   gtk_clist_moveto(GTK_CLIST(aw->type_list), row, 0, 0.5, 0);
 }
 
-
-static void
-gnc_type_list_row_set_active(GtkCList *type_list, gint type, gboolean state)
-{
-  GtkStyle *style = gtk_widget_get_style(GTK_WIDGET(type_list));
-  gint row = gtk_clist_find_row_from_data(type_list, (gpointer)type);
-
-  if (state)
-  {
-    gtk_clist_set_selectable(type_list, row, TRUE);
-    gtk_clist_set_background(type_list, row, &style->white);
-  }
-  else
-  {
-    gtk_clist_unselect_row(type_list, row, 0);
-    gtk_clist_set_selectable(type_list, row, FALSE);
-    gtk_clist_set_background(type_list, row, &style->dark[GTK_STATE_NORMAL]);
-  }
-}
-
-
-static void
-gnc_parent_tree_select(GNCAccountTree *tree,
-                       Account * account, 
-                       gpointer data)
-{
-  AccountWindow *aw = data;
-  GNCAccountType parent_type;
-  gboolean  compatible;
-  gint      type;
-
-  gnc_account_window_set_name (aw);
-
-  if (aw->dialog_type == EDIT_ACCOUNT)
-    return;
-
-  account = gnc_account_tree_get_current_account(tree);
-
-  /* Deleselect any or select top account */
-  if (account == NULL || account == aw->top_level_account)
-    if (aw->valid_types)
-    {
-      GList *node;
-      for (node = aw->valid_types; node; node = node->next)
-      {
-	type = ((GNCAccountType)(node->data));
-	gnc_type_list_row_set_active(GTK_CLIST(aw->type_list), type, TRUE);
-      }
-    }
-    else
-      for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
-	gnc_type_list_row_set_active(GTK_CLIST(aw->type_list), type, TRUE);
-
-  else /* Some other account was selected */
-  {
-    parent_type = xaccAccountGetType(account);
-
-    /* set the allowable account types for this parent */
-    if (aw->valid_types)
-    {
-      GList *node;
-      for (node = aw->valid_types; node; node = node->next)
-      {
-	type = ((GNCAccountType)(node->data));
-	compatible = xaccAccountTypesCompatible (parent_type, type);
-	gnc_type_list_row_set_active (GTK_CLIST(aw->type_list), type,
-				      compatible);
-      }
-    }
-    else
-    {
-      for (type = 0; type < NUM_ACCOUNT_TYPES; type++)
-      {
-	compatible = xaccAccountTypesCompatible(parent_type, type);
-	gnc_type_list_row_set_active(GTK_CLIST(aw->type_list), type,
-				     compatible);
-      }
-    }
-
-    /* now select a new account type if the account class has changed */
-    compatible = xaccAccountTypesCompatible(parent_type, aw->type);
-    if (!compatible)
-    {
-      gint row;
-      aw->type = parent_type;
-      row = gtk_clist_find_row_from_data(GTK_CLIST(aw->type_list),
-					 (gpointer)parent_type);
-      gtk_clist_select_row(GTK_CLIST(aw->type_list), row, 0);
-      gtk_clist_moveto(GTK_CLIST(aw->type_list), row, 0, 0.5, 0);
-    }
-  }
-}
-
 static void
 gnc_account_name_changed_cb(GtkWidget *widget, gpointer data)
 {
@@ -1316,6 +1214,7 @@
 {
   AccountWindow *aw = data;
   gnc_commodity *currency;
+  GtkTreeSelection *selection;
 
   currency = (gnc_commodity *) gnc_general_select_get_selected (gsl);
   if (!currency)
@@ -1326,17 +1225,34 @@
   gnc_amount_edit_set_print_info (GNC_AMOUNT_EDIT (aw->opening_balance_edit),
                                   gnc_commodity_print_info (currency, FALSE));
 
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE (aw->transfer_tree));
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (aw->transfer_tree));
+  gtk_tree_selection_unselect_all (selection);
 }
 
 static gboolean
-account_commodity_filter (Account *account, gpointer user_data)
+account_commodity_filter (GtkTreeSelection *selection,
+			  GtkTreeModel *unused_model,
+			  GtkTreePath *s_path,
+			  gboolean path_currently_selected,
+			  gpointer user_data)
 {
-  AccountWindow *aw = user_data;
   gnc_commodity *commodity;
+  AccountWindow *aw;
+  Account *account;
 
-  if (!account)
+  g_return_val_if_fail (GTK_IS_TREE_SELECTION (selection), FALSE);
+
+  aw = user_data;
+
+  if (path_currently_selected) {
+    /* already selected, don't waste time. */
+    return TRUE;
+  }
+
+  account = gnc_tree_view_account_get_account_from_path (GNC_TREE_VIEW_ACCOUNT (aw->transfer_tree), s_path);
+  if (!account) {
     return FALSE;
+  }
 
   commodity = (gnc_commodity *)
     gnc_general_select_get_selected (GNC_GENERAL_SELECT (aw->commodity_edit));
@@ -1365,47 +1281,43 @@
 static void
 gnc_account_window_create(AccountWindow *aw)
 {
-  GnomeDialog *awd;
+  GtkDialog *awd;
   GtkWidget *amount;
-  GtkWidget *date;
-  GtkObject *awo;
+  GObject *awo;
   GtkWidget *box;
   GladeXML  *xml;
+  GtkTreeSelection *selection;
 
+  ENTER("aw %p, modal %d", aw, aw->modal);
   xml = gnc_glade_xml_new ("account.glade", "Account Dialog");
 
   aw->dialog = glade_xml_get_widget (xml, "Account Dialog");
-  awo = GTK_OBJECT (aw->dialog);
-  awd = GNOME_DIALOG (awo);
+  awo = G_OBJECT (aw->dialog);
+  awd = GTK_DIALOG (awo);
 
-  gtk_object_set_data (awo, "dialog_info", aw);
+  g_object_set_data (awo, "dialog_info", aw);
 
   /* default to ok */
-  gnome_dialog_set_default(awd, 0);
+  gtk_dialog_set_default_response (awd, GTK_RESPONSE_OK);
 
-  gtk_signal_connect(awo, "destroy",
-                     GTK_SIGNAL_FUNC(gnc_account_window_destroy_cb), aw);
+  g_signal_connect (awo, "destroy",
+                    G_CALLBACK (gnc_account_window_destroy_cb), aw);
 
-  gnome_dialog_button_connect
-    (awd, 0, GTK_SIGNAL_FUNC(gnc_account_window_ok_cb), aw);
-  gnome_dialog_button_connect
-    (awd, 1, GTK_SIGNAL_FUNC(gnc_account_window_cancel_cb), aw);
-  gnome_dialog_button_connect
-    (awd, 2, GTK_SIGNAL_FUNC(gnc_account_window_help_cb), aw);
+  if (!aw->modal)
+    g_signal_connect (awo, "response",
+		      G_CALLBACK (gnc_account_window_response_cb), aw);
+  else 
+    gtk_window_set_modal (GTK_WINDOW (aw->dialog), TRUE);
 
   aw->notebook = glade_xml_get_widget (xml, "account_notebook");
 
   aw->name_entry = glade_xml_get_widget (xml, "name_entry");
-  gtk_signal_connect(GTK_OBJECT (aw->name_entry), "changed",
-		     GTK_SIGNAL_FUNC(gnc_account_name_changed_cb), aw);
+  g_signal_connect (G_OBJECT (aw->name_entry), "changed",
+		    G_CALLBACK (gnc_account_name_changed_cb), aw);
 
   aw->description_entry = glade_xml_get_widget (xml, "description_entry");
   aw->code_entry =        glade_xml_get_widget (xml, "code_entry");
-  aw->notes_text =        glade_xml_get_widget (xml, "notes_text");
-
-  gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->name_entry));
-  gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->description_entry));
-  gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->code_entry));
+  aw->notes_text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (glade_xml_get_widget (xml, "notes_text")));
 
   box = glade_xml_get_widget (xml, "commodity_hbox");
   aw->commodity_edit = gnc_general_select_new (GNC_GENERAL_SELECT_TYPE_SELECT,
@@ -1413,39 +1325,23 @@
 					       gnc_commodity_edit_new_select,
 					       &aw->commodity_mode);
   gtk_box_pack_start(GTK_BOX(box), aw->commodity_edit, TRUE, TRUE, 0);
+  gtk_widget_show (aw->commodity_edit);
 
-  gtk_signal_connect (GTK_OBJECT (aw->commodity_edit), "changed",
-                      GTK_SIGNAL_FUNC (commodity_changed_cb), aw);
+  g_signal_connect (G_OBJECT (aw->commodity_edit), "changed",
+                    G_CALLBACK (commodity_changed_cb), aw);
 
   aw->account_scu = glade_xml_get_widget (xml, "account_scu");
   gnc_option_menu_init(aw->account_scu);
 
   box = glade_xml_get_widget (xml, "parent_scroll");
 
-  aw->top_level_account = xaccMallocAccount(gnc_get_current_book ());
-  xaccAccountBeginEdit (aw->top_level_account);
-  xaccAccountSetName(aw->top_level_account, _("New top level account"));
-
-  aw->parent_tree = gnc_account_tree_new_with_root(aw->top_level_account);
-  gtk_clist_column_titles_hide(GTK_CLIST(aw->parent_tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(aw->parent_tree));
-
-  /* hack alert -- why do we need to refresh just to put up an account 
-   * edit window?  This refresh triggers a massive retraversal
-   * of the price database (presumably to compute account balances)
-   * and can suck up a lot of cpu juice from the SQL backend as 
-   * a result.  We should only refresh the account names, not
-   * the balances here.
-   */
-  gnc_account_tree_refresh(GNC_ACCOUNT_TREE(aw->parent_tree));
-  gnc_account_tree_expand_account(GNC_ACCOUNT_TREE(aw->parent_tree),
-                                  aw->top_level_account);
+  //  group = gnc_book_get_group (gnc_get_current_book ());
+  aw->parent_tree = gnc_tree_view_account_new(TRUE);
   gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->parent_tree));
-
-  gtk_signal_connect(GTK_OBJECT (aw->parent_tree), "select_account",
-		     GTK_SIGNAL_FUNC(gnc_parent_tree_select), aw);
-  gtk_signal_connect(GTK_OBJECT (aw->parent_tree), "unselect_account",
-		     GTK_SIGNAL_FUNC(gnc_parent_tree_select), aw);
+  gnc_tree_view_configure_columns (GNC_TREE_VIEW(aw->parent_tree), NULL);
+  gtk_widget_show(GTK_WIDGET(aw->parent_tree));
+  aw->top_level_account =
+    gnc_tree_view_account_get_top_level (GNC_TREE_VIEW_ACCOUNT(aw->parent_tree));
 
   aw->tax_related_button = glade_xml_get_widget (xml, "tax_related_button");
   aw->placeholder_button = glade_xml_get_widget (xml, "placeholder_button");
@@ -1455,45 +1351,39 @@
   aw->opening_balance_edit = amount;
   gtk_box_pack_start(GTK_BOX(box), amount, TRUE, TRUE, 0);
   gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE);
+  gtk_widget_show (amount);
 
   box = glade_xml_get_widget (xml, "opening_balance_date_box");
-  date = gnc_date_edit_new(time(NULL), FALSE, FALSE);
-  aw->opening_balance_date_edit = date;
-  gtk_box_pack_start(GTK_BOX(box), date, TRUE, TRUE, 0);
+  aw->opening_balance_date_edit = glade_xml_get_widget (xml, "opening_balance_date_edit");
 
   aw->opening_balance_page =
     gtk_notebook_get_nth_page (GTK_NOTEBOOK (aw->notebook), 1);
 
   aw->opening_equity_radio = glade_xml_get_widget (xml,
                                                    "opening_equity_radio");
-  gtk_signal_connect (GTK_OBJECT (aw->opening_equity_radio), "toggled",
-                      GTK_SIGNAL_FUNC (opening_equity_cb), aw);
+  g_signal_connect (G_OBJECT (aw->opening_equity_radio), "toggled",
+                    G_CALLBACK (opening_equity_cb), aw);
 
   aw->transfer_account_frame =
     glade_xml_get_widget (xml, "transfer_account_frame");
 
   box = glade_xml_get_widget (xml, "transfer_account_scroll");
 
-  aw->transfer_tree = gnc_account_tree_new ();
-  gtk_clist_column_titles_hide (GTK_CLIST (aw->transfer_tree));
-  gnc_account_tree_hide_all_but_name(GNC_ACCOUNT_TREE(aw->parent_tree));
-
-  gnc_account_tree_set_selectable_filter (GNC_ACCOUNT_TREE (aw->transfer_tree),
-                                          account_commodity_filter, aw);
+  aw->transfer_tree = GTK_WIDGET(gnc_tree_view_account_new(FALSE));
+  selection = gtk_tree_view_get_selection (GTK_TREE_VIEW(aw->transfer_tree));
+  gtk_tree_selection_set_select_function(selection, account_commodity_filter, aw, NULL);
 
   gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->transfer_tree));
+  gtk_widget_show (GTK_WIDGET(aw->transfer_tree));
 
   /* This goes at the end so the select callback has good data. */
   aw->type_list = glade_xml_get_widget (xml, "type_list");
   gnc_account_type_list_create (aw);
 
-  if (last_width == 0)
-    gnc_get_window_size("account_win", &last_width, &last_height);
-
-  gtk_window_set_default_size(GTK_WINDOW(aw->dialog),
-                              last_width, last_height);
+  gnc_restore_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
 
   gtk_widget_grab_focus(GTK_WIDGET(aw->name_entry));
+  LEAVE(" ");
 }
 
 
@@ -1502,14 +1392,15 @@
 {
   Account *parent_account;
   char *fullname;
-  char *name;
+  const gchar *name;
 
   name = gtk_entry_get_text (GTK_ENTRY(aw->name_entry));
   if (!name || *name == '\0')
     name = _("<No name>");
 
-  parent_account =
-    gnc_account_tree_get_current_account (GNC_ACCOUNT_TREE(aw->parent_tree));
+  parent_account = NULL;
+
+  parent_account = gnc_tree_view_account_get_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree));
   if (parent_account == aw->top_level_account)
     parent_account = NULL;
 
@@ -1574,12 +1465,30 @@
 {
   AccountWindow *aw = user_data;
 
-  gdk_window_get_geometry (GTK_WIDGET(aw->dialog)->window, NULL, NULL,
-                           &last_width, &last_height, NULL);
+  ENTER("aw %p, modal %d", aw, aw->modal);
+  gnc_save_window_size (GCONF_SECTION, GTK_WINDOW(aw->dialog));
+
+  gtk_widget_destroy (GTK_WIDGET (aw->dialog));
+  LEAVE(" ");
+}
+
+
+/********************************************************************\
+ * gnc_ui_refresh_account_window                                    *
+ *   refreshes the edit window                                      *
+ *                                                                  *
+ * Args:   aw - the account window to refresh                       *
+ * Return: none                                                     *
+\********************************************************************/
+static void
+gnc_ui_refresh_account_window (AccountWindow *aw)
+{
+  if (aw == NULL)
+    return;
 
-  gnc_save_window_size ("account_win", last_width, last_height);
+/*  gnc_account_tree_refresh (GNC_ACCOUNT_TREE(aw->parent_tree));*/
 
-  gnome_dialog_close (GNOME_DIALOG (aw->dialog));
+  gnc_account_window_set_name (aw);
 }
 
 
@@ -1615,7 +1524,8 @@
 gnc_ui_new_account_window_internal (Account *base_account,
                                     GList *subaccount_names,
 				    GList *valid_types,
-				    gnc_commodity * default_commodity)
+				    gnc_commodity * default_commodity,
+				    gboolean modal)
 {
   gnc_commodity *commodity;
   AccountWindow *aw;
@@ -1623,6 +1533,7 @@
 
   aw = g_new0 (AccountWindow, 1);
 
+  aw->modal = modal;
   aw->dialog_type = NEW_ACCOUNT;
   aw->valid_types = g_list_copy (valid_types);
 
@@ -1663,10 +1574,15 @@
                                     commodity);
   gnc_account_commodity_from_type (aw, FALSE);
 
-  gtk_widget_show_all (aw->dialog);
+  gtk_widget_show (aw->dialog);
+
+  if (base_account == NULL) {
+	  base_account = aw->top_level_account;
+  }
 
-  gnc_account_tree_select_account (GNC_ACCOUNT_TREE(aw->parent_tree),
-                                   base_account, TRUE);
+  gtk_tree_view_collapse_all (aw->parent_tree);
+  gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT (aw->parent_tree),
+					      base_account);
 
   gnc_window_adjust_for_screen (GTK_WINDOW(aw->dialog));
 
@@ -1674,7 +1590,8 @@
 
   aw->component_id = gnc_register_gui_component (DIALOG_NEW_ACCOUNT_CM_CLASS,
                                                  refresh_handler,
-                                                 close_handler, aw);
+                                                 modal ? NULL : close_handler,
+						 aw);
 
   gnc_gui_component_set_session (aw->component_id, gnc_get_current_session());
   gnc_gui_component_watch_entity_type (aw->component_id,
@@ -1684,50 +1601,6 @@
 }
 
 
-/********************************************************************\
- * gnc_ui_new_account_window                                        *
- *   opens up a window to create a new account.                     *
- *                                                                  * 
- * Args:   group - not used                                         *
- * Return: AccountWindow object                                     *
- \*******************************************************************/
-AccountWindow *
-gnc_ui_new_account_window (AccountGroup *this_is_not_used) 
-{
-  /* FIXME get_current_account went away. */
-  return gnc_ui_new_account_window_internal (NULL, NULL, NULL, NULL);
-}
-
-AccountWindow *
-gnc_ui_new_account_window_with_default(AccountGroup *this_is_not_used,
-                                       Account * parent)  {
-  return gnc_ui_new_account_window_internal (parent, NULL, NULL, NULL);
-}
-
-static
-void
-g_list_free_adapter( gpointer p )
-{
-  g_list_free( (GList*)p );
-}
-
-AccountWindow *
-gnc_ui_new_account_with_types( AccountGroup *unused,
-                               GList *valid_types )
-{
-  GList *validTypesCopy = g_list_copy( valid_types );
-  AccountWindow *toRet;
-  toRet = gnc_ui_new_account_window_internal( NULL, NULL, validTypesCopy, NULL );
-  if ( validTypesCopy != NULL ) {
-    /* Attach it with "[...]_full" so we can set the appropriate
-     * GtkDestroyNotify func. */
-    gtk_object_set_data_full( GTK_OBJECT(toRet->dialog), "validTypesListCopy",
-                              validTypesCopy, g_list_free_adapter );
-  }
-  return toRet;
-}
-
-
 static GList *
 gnc_split_account_name (const char *in_name, Account **base_account)
 {
@@ -1784,20 +1657,9 @@
 }
 
 
-static int
-from_name_close_cb (GnomeDialog *dialog, gpointer data)
-{
-  AccountWindow *aw;
-  Account **created_account = data;
-
-  aw = gtk_object_get_data (GTK_OBJECT (dialog), "dialog_info");
-
-  *created_account = aw->created_account;
-
-  gtk_main_quit ();
-
-  return FALSE;
-}
+/************************************************************
+ *              Entry points for a Modal Dialog             *
+ ************************************************************/
 
 Account *
 gnc_ui_new_accounts_from_name_window (const char *name)
@@ -1819,10 +1681,13 @@
 {
   AccountWindow *aw;
   Account *base_account;
-  Account *created_account;
+  Account *created_account = NULL;
   GList * subaccount_names;
   GList * node;
+  gint response;
 
+  ENTER("name %s, valid %p, commodity %p, account %p",
+	name, valid_types, default_commodity, parent);
   if (!name || *name == '\0')
   {
     subaccount_names = NULL;
@@ -1836,22 +1701,31 @@
       base_account=parent;
     }
   aw = gnc_ui_new_account_window_internal (base_account, subaccount_names, 
-					   valid_types, default_commodity);
+					   valid_types, default_commodity,
+					   TRUE);
 
   for (node = subaccount_names; node; node = node->next)
     g_free (node->data);
   g_list_free (subaccount_names);
 
-  gtk_signal_connect(GTK_OBJECT (aw->dialog), "close",
-                     GTK_SIGNAL_FUNC (from_name_close_cb), &created_account);
+  do {
+    response = gtk_dialog_run (GTK_DIALOG(aw->dialog));
 
-  gtk_window_set_modal (GTK_WINDOW (aw->dialog), TRUE);
+    /* This can destroy the dialog */
+    gnc_account_window_response_cb (GTK_DIALOG(aw->dialog), response, (gpointer)aw);
 
-  gtk_main ();
+    if (response == GTK_RESPONSE_OK)
+      created_account = aw->created_account;
+  } while ((response == GTK_RESPONSE_HELP) || (response == GNC_RESPONSE_NEW));
 
+  close_handler(aw);
+  LEAVE("created %s (%p)", xaccAccountGetName(created_account), created_account);
   return created_account;
 }
 
+/************************************************************
+ *            Entry points for a non-Modal Dialog           *
+ ************************************************************/
 
 static gboolean
 find_by_account (gpointer find_data, gpointer user_data)
@@ -1865,29 +1739,31 @@
   return guid_equal (&aw->account, xaccAccountGetGUID (account));
 }
 
-/********************************************************************\
- * gnc_ui_edit_account_window                                       *
- *   opens up a window to edit an account                           * 
- *                                                                  * 
- * Args:   account - the account to edit                            * 
- * Return: EditAccountWindow object                                 *
-\********************************************************************/
-AccountWindow *
+/*
+ * opens up a window to edit an account
+ * 
+ * Args:   account - the account to edit
+ * Return: EditAccountWindow object
+ */
+void
 gnc_ui_edit_account_window(Account *account)
 {
   AccountWindow * aw;
   Account *parent;
 
   if (account == NULL)
-    return NULL;
+    return;
 
   aw = gnc_find_first_gui_component (DIALOG_EDIT_ACCOUNT_CM_CLASS,
                                      find_by_account, account);
-  if (aw)
-    return aw;
+  if (aw) {
+    gtk_window_present(GTK_WINDOW(aw->dialog));
+    return;
+  }
 
   aw = g_new0 (AccountWindow, 1);
 
+  aw->modal = FALSE;
   aw->dialog_type = EDIT_ACCOUNT;
   aw->account = *xaccAccountGetGUID (account);
   aw->subaccount_names = NULL;
@@ -1905,8 +1781,8 @@
   parent = xaccAccountGetParentAccount (account);
   if (parent == NULL)
     parent = aw->top_level_account;
-  gnc_account_tree_select_account(GNC_ACCOUNT_TREE(aw->parent_tree),
-                                  parent, TRUE);
+
+  gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT(aw->parent_tree), parent);
 
   gnc_account_window_set_name (aw);
 
@@ -1921,47 +1797,55 @@
                                        GNC_ID_ACCOUNT,
                                        GNC_EVENT_MODIFY | GNC_EVENT_DESTROY);
 
-  return aw;
+  gtk_window_present(GTK_WINDOW(aw->dialog));
 }
 
 
-/********************************************************************\
- * gnc_ui_refresh_account_window                                    *
- *   refreshes the edit window                                      *
- *                                                                  *
- * Args:   aw - the account window to refresh                       *
- * Return: none                                                     *
-\********************************************************************/
-static void
-gnc_ui_refresh_account_window (AccountWindow *aw)
+/*
+ * opens up a window to create a new account
+ * 
+ * Args:   group - not used
+ */
+void
+gnc_ui_new_account_window (AccountGroup *this_is_not_used) 
 {
-  if (aw == NULL)
-    return;
-
-  gnc_account_tree_refresh (GNC_ACCOUNT_TREE(aw->parent_tree));
-
-  gnc_account_window_set_name (aw);
+  /* FIXME get_current_account went away. */
+  gnc_ui_new_account_window_internal (NULL, NULL, NULL, NULL, FALSE);
 }
 
-
-/********************************************************************\
- * gnc_ui_edit_account_window_raise                                 *
- *   shows and raises an account editing window                     *
- *                                                                  *
- * Args:   aw - the edit window structure                           *
-\********************************************************************/
+/*
+ * opens up a window to create a new account
+ * 
+ * Args:   group - not used
+ *        parent - The initial parent for the new account
+ */
 void
-gnc_ui_edit_account_window_raise(AccountWindow * aw)
+gnc_ui_new_account_window_with_default(AccountGroup *this_is_not_used,
+                                       Account * parent)
 {
-  if (aw == NULL)
-    return;
+  gnc_ui_new_account_window_internal (parent, NULL, NULL, NULL, FALSE);
+}
 
-  if (aw->dialog == NULL)
-    return;
+void
+gnc_ui_new_account_with_types( AccountGroup *unused,
+                               GList *valid_types )
+{
+  GList *validTypesCopy = g_list_copy( valid_types );
+  AccountWindow *aw;
 
-  gtk_window_present (GTK_WINDOW(aw->dialog));
+  aw = gnc_ui_new_account_window_internal( NULL, NULL, validTypesCopy, NULL, FALSE );
+  if ( validTypesCopy != NULL ) {
+    /* Attach it with "[...]_full" so we can set the appropriate
+     * GtkDestroyNotify func. */
+    gtk_object_set_data_full( GTK_OBJECT(aw->dialog), "validTypesListCopy",
+                              validTypesCopy, (GDestroyNotify)g_list_free );
+  }
 }
 
+/************************************************************
+ *             Callbacks for a non-Modal Dialog             *
+ ************************************************************/
+
 /*
  * register a callback that get's called when the account has changed
  * so significantly that you need to destroy yourself.  In particular
Index: gnc-date-format.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-date-format.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/gnome-utils/gnc-date-format.c -Lsrc/gnome-utils/gnc-date-format.c -u -r1.4 -r1.5
--- src/gnome-utils/gnc-date-format.c
+++ src/gnome-utils/gnc-date-format.c
@@ -40,6 +40,7 @@
 #include "gnc-date-format.h"
 #include "dialog-utils.h"
 
+/* Perhaps it's better just to use MAX_DATE_LENGTH defined in gnc-date.h */
 #define MAX_DATE_LEN 80
 
 enum {
@@ -48,7 +49,9 @@
 };
 
 struct _GNCDateFormatPriv {
-  GtkWidget*	format_omenu;
+  GtkWidget*	format_combobox;
+
+  GtkWidget*    label;
 
   GtkWidget*	months_label;
   GtkWidget*	months_number;
@@ -62,9 +65,6 @@
   GtkWidget*	custom_entry;
 
   GtkWidget*	sample_label;
-
-  GtkWidget*	table;
-  GtkWidget*	label_box;
 };
 
 static guint date_format_signals [LAST_SIGNAL] = { 0 };
@@ -72,7 +72,7 @@
 
 static void gnc_date_format_init         (GNCDateFormat      *gdf);
 static void gnc_date_format_class_init   (GNCDateFormatClass *class);
-static void gnc_date_format_destroy      (GtkObject          *object);
+static void gnc_date_format_finalize     (GObject            *object);
 static void gnc_date_format_compute_format(GNCDateFormat *gdf);
 
 /* Used by glade_xml_signal_autoconnect_full */
@@ -85,24 +85,28 @@
  *
  * Returns the GtkType for the GNCDateFormat widget
  */
-guint
+GType
 gnc_date_format_get_type (void)
 {
-  static guint date_format_type = 0;
+  static GType date_format_type = 0;
 
   if (!date_format_type){
-    GtkTypeInfo date_format_info = {
-      "GNCDateFormat",
-      sizeof (GNCDateFormat),
+    static const GTypeInfo date_format_info = {
       sizeof (GNCDateFormatClass),
-      (GtkClassInitFunc) gnc_date_format_class_init,
-      (GtkObjectInitFunc) gnc_date_format_init,
       NULL,
       NULL,
+      (GClassInitFunc) gnc_date_format_class_init,
+      NULL,
+      NULL,
+      sizeof (GNCDateFormat),
+      0,
+      (GInstanceInitFunc) gnc_date_format_init,
+      NULL,
     };
 
-    date_format_type = gtk_type_unique (gtk_hbox_get_type (),
-					&date_format_info);
+    date_format_type = g_type_register_static(GTK_TYPE_HBOX,
+				        "GNCDateFormat",
+					&date_format_info, 0);
   }
 	
   return date_format_type;
@@ -110,35 +114,31 @@
 
 
 static void
-gnc_date_format_class_init (GNCDateFormatClass *class)
+gnc_date_format_class_init (GNCDateFormatClass *klass)
 {
-  GtkObjectClass *object_class = (GtkObjectClass *) class;
+  GObjectClass   *gobject_class = (GObjectClass *) klass;
 
-  object_class = (GtkObjectClass*) class;
-
-  parent_class = gtk_type_class (gtk_hbox_get_type ());
+  parent_class = g_type_class_peek_parent(klass);
 
   date_format_signals [FORMAT_CHANGED] =
-    gtk_signal_new ("format_changed",
-		    GTK_RUN_FIRST, object_class->type, 
-		    GTK_SIGNAL_OFFSET (GNCDateFormatClass,
-				       format_changed),
-		    gtk_signal_default_marshaller,
-		    GTK_TYPE_NONE, 0);
-
-  gtk_object_class_add_signals (object_class, date_format_signals,
-				LAST_SIGNAL);
+    g_signal_new ("format_changed",
+		  G_OBJECT_CLASS_TYPE (gobject_class),
+		  G_SIGNAL_RUN_FIRST,
+		  G_STRUCT_OFFSET (GNCDateFormatClass, format_changed),
+		  NULL,
+		  NULL,
+		  g_cclosure_marshal_VOID__VOID,
+		  G_TYPE_NONE,
+		  0);
 
-  object_class->destroy = gnc_date_format_destroy;
-
-  class->format_changed = NULL;
+  gobject_class->finalize = gnc_date_format_finalize;
 }
 
 static void
 gnc_date_format_init (GNCDateFormat *gdf)
 {
   GladeXML *xml;
-  GtkWidget *dialog;
+  GtkWidget *dialog, *table;
 
   g_return_if_fail(gdf);
   g_return_if_fail(GNC_IS_DATE_FORMAT(gdf));
@@ -150,8 +150,8 @@
   glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func, gdf);
 
   /* pull in all the child widgets */
-  gdf->label = glade_xml_get_widget(xml, "widget_label");
-  gdf->priv->format_omenu = glade_xml_get_widget(xml, "format_omenu");
+  gdf->priv->label = glade_xml_get_widget(xml, "widget_label");
+  gdf->priv->format_combobox = glade_xml_get_widget(xml, "format_combobox");
 
   gdf->priv->months_label = glade_xml_get_widget(xml, "months_label");
   gdf->priv->months_number = glade_xml_get_widget(xml, "month_number_button");
@@ -166,28 +166,24 @@
 
   gdf->priv->sample_label = glade_xml_get_widget(xml, "sample_label");
 
-  gdf->priv->table = glade_xml_get_widget(xml, "date_format_table");
-  gdf->priv->label_box = glade_xml_get_widget(xml, "label_box");
-
-  /* Initialize the format menu */
-  gnc_option_menu_init_w_signal(gdf->priv->format_omenu,
-				gnc_ui_date_format_changed_cb, gdf);
-
   /* Set initial format to gnucash default */
-  gnc_date_format_set_format(gdf, getDateFormat());
+  gnc_date_format_set_format(gdf, qof_date_format_get());
 
   /* pull in the dialog and table widgets and play the reconnect game */
   dialog = glade_xml_get_widget(xml, "GNC Date Format");
 
-  gtk_object_ref(GTK_OBJECT(gdf->priv->table));
-  gtk_container_remove(GTK_CONTAINER(dialog), gdf->priv->table);
-  gtk_container_add(GTK_CONTAINER(gdf), gdf->priv->table);
-  /* XXX: do I need to unref the table? */
+  table = glade_xml_get_widget(xml, "date_format_table");
+  g_object_ref(G_OBJECT(table));
+  gtk_container_remove(GTK_CONTAINER(dialog), table);
+  gtk_container_add(GTK_CONTAINER(gdf), table);
+  g_object_unref(G_OBJECT(table));
+
+  /* Destroy the now empty window */
   gtk_widget_destroy(dialog);
 }
 
 static void
-gnc_date_format_destroy (GtkObject *object)
+gnc_date_format_finalize (GObject *object)
 {
   GNCDateFormat *gdf;
 
@@ -198,8 +194,8 @@
 
   g_free(gdf->priv);
 
-  if (GTK_OBJECT_CLASS(parent_class)->destroy)
-    (* GTK_OBJECT_CLASS(parent_class)->destroy) (object);
+  if (G_OBJECT_CLASS(parent_class)->finalize)
+    (* G_OBJECT_CLASS(parent_class)->finalize) (object);
 }
 
 
@@ -217,15 +213,14 @@
   return gnc_date_format_new_with_label (NULL);
 }
 
-GtkWidget
-*gnc_date_format_new_without_label (void)
+GtkWidget *
+gnc_date_format_new_without_label (void)
 {
   GtkWidget *widget = gnc_date_format_new_with_label(NULL);
   GNCDateFormat *gdf = GNC_DATE_FORMAT(widget);
 
-  gtk_container_remove(GTK_CONTAINER(gdf->priv->table), gdf->priv->label_box);
-  gdf->label = NULL;
-  gtk_widget_queue_resize(gdf->priv->table);
+  gtk_widget_destroy(gdf->priv->label);
+  gdf->priv->label = NULL;
 
   return widget;
 }
@@ -244,32 +239,32 @@
 {
   GNCDateFormat *gdf;
 
-  gdf = gtk_type_new (gnc_date_format_get_type ());
+  gdf = g_object_new(GNC_TYPE_DATE_FORMAT, NULL);
 
   if (label)
-    gtk_label_set_text(GTK_LABEL(gdf->label), label);
+    gtk_label_set_text(GTK_LABEL(gdf->priv->label), label);
 
   gnc_date_format_compute_format(gdf);
   return GTK_WIDGET(gdf);
 }
 
 void
-gnc_date_format_set_format (GNCDateFormat *gdf, DateFormat format)
+gnc_date_format_set_format (GNCDateFormat *gdf, QofDateFormat format)
 {
   g_return_if_fail(gdf);
   g_return_if_fail(GNC_IS_DATE_FORMAT(gdf));
 
-  gtk_option_menu_set_history(GTK_OPTION_MENU(gdf->priv->format_omenu), format);
+  gtk_combo_box_set_active(GTK_COMBO_BOX(gdf->priv->format_combobox), format);
   gnc_date_format_compute_format(gdf);
 }
 
-DateFormat
+QofDateFormat
 gnc_date_format_get_format (GNCDateFormat *gdf)
 {
-  g_return_val_if_fail (gdf, DATE_FORMAT_LOCALE);
-  g_return_val_if_fail (GNC_IS_DATE_FORMAT(gdf), DATE_FORMAT_LOCALE);
+  g_return_val_if_fail (gdf, QOF_DATE_FORMAT_LOCALE);
+  g_return_val_if_fail (GNC_IS_DATE_FORMAT(gdf), QOF_DATE_FORMAT_LOCALE);
 
-  return gnc_option_menu_get_active(gdf->priv->format_omenu);
+  return gtk_combo_box_get_active(GTK_COMBO_BOX(gdf->priv->format_combobox));
 }
 
 void
@@ -376,8 +371,7 @@
   g_return_if_fail(gdf);
   g_return_if_fail(GNC_IS_DATE_FORMAT(gdf));
 
-  gnome_dialog_editable_enters(GNOME_DIALOG(dialog),
-			       GTK_EDITABLE(gdf->priv->custom_entry));
+  gtk_entry_set_activates_default(GTK_ENTRY(gdf->priv->custom_entry), TRUE);
 }
 
 void
@@ -424,21 +418,23 @@
   g_return_if_fail(gdf);
   g_return_if_fail(GNC_IS_DATE_FORMAT(gdf));
 
-  sel_option = gnc_option_menu_get_active(gdf->priv->format_omenu);
+  sel_option =
+    gtk_combo_box_get_active(GTK_COMBO_BOX(gdf->priv->format_combobox));
 
   switch (sel_option) {
-   case DATE_FORMAT_CUSTOM:
+   case QOF_DATE_FORMAT_CUSTOM:
     format = g_strdup(gtk_entry_get_text(GTK_ENTRY(gdf->priv->custom_entry)));
     enable_year = enable_month = check_modifiers = FALSE;
     enable_custom = TRUE;
     break;
 
-   case DATE_FORMAT_LOCALE:
-    format = g_strdup(getDateFormatString(DATE_FORMAT_LOCALE));
+   case QOF_DATE_FORMAT_LOCALE:
+   case QOF_DATE_FORMAT_UTC:
+    format = g_strdup(qof_date_format_get_string(sel_option));
     enable_year = enable_month = check_modifiers = enable_custom = FALSE;
     break;
 
-   case DATE_FORMAT_ISO:
+   case QOF_DATE_FORMAT_ISO:
     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(gdf->priv->months_number), TRUE);
     enable_year = check_modifiers = TRUE;
     enable_month = enable_custom = FALSE;
@@ -458,9 +454,9 @@
   /* Update the format string based upon the user's preferences */
   if (check_modifiers) {
     if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gdf->priv->months_number))) {
-      format = g_strdup(getDateFormatString(sel_option));
+      format = g_strdup(qof_date_format_get_string(sel_option));
     } else {
-      format = g_strdup(getDateTextFormatString(sel_option));
+      format = g_strdup(qof_date_text_format_get_string(sel_option));
       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gdf->priv->months_name))) {
 	c = strchr(format, 'b');
 	if (c)
@@ -501,5 +497,5 @@
   gnc_date_format_refresh(gdf);
 
   /* Emit a signal that we've changed */
-  gtk_signal_emit(GTK_OBJECT(gdf), date_format_signals[FORMAT_CHANGED]);
+  g_signal_emit(G_OBJECT(gdf), date_format_signals[FORMAT_CHANGED], 0);
 }
Index: dialog-transfer.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/dialog-transfer.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/gnome-utils/dialog-transfer.h -Lsrc/gnome-utils/dialog-transfer.h -u -r1.5 -r1.6
--- src/gnome-utils/dialog-transfer.h
+++ src/gnome-utils/dialog-transfer.h
@@ -48,9 +48,9 @@
 /*********** Access routines ***********/
 void gnc_xfer_dialog_set_title( XferDialog *, const gchar * );
 
-/** Set the label of the topmost frame */
-void gnc_xfer_dialog_set_information_frame_label( XferDialog *,
-                                                  const gchar * );
+/** Set the label of the topmost table */
+void gnc_xfer_dialog_set_information_label( XferDialog *,
+					    const gchar * );
 
 /** Add a button with a user-specified label and "clicked" callback.
  * For now this doesn't offer a lot of flexibility, but it doesn't have to.
@@ -60,12 +60,12 @@
                                                 GtkSignalFunc callback,
                                                 gpointer user_data );
 
-void gnc_xfer_dialog_toggle_currency_frame( XferDialog *xferData,
-                                            gboolean show_frame );
+void gnc_xfer_dialog_toggle_currency_table ( XferDialog *xferData,
+					     gboolean show_table );
 
-void gnc_xfer_dialog_set_from_account_frame_label( XferDialog *,
-                                                   const gchar * );
-void gnc_xfer_dialog_set_to_account_frame_label( XferDialog *, const gchar * );
+void gnc_xfer_dialog_set_from_account_label( XferDialog *,
+					     const gchar * );
+void gnc_xfer_dialog_set_to_account_label( XferDialog *, const gchar * );
 
 /** Set the buttons for "Show Income/Expense" */
 void gnc_xfer_dialog_set_from_show_button_active( XferDialog *, gboolean );
@@ -148,7 +148,7 @@
 
 /**
  *   Set the dialog as an "exchange-dialog", which means that the   
- *   Transfer Information frame is read-only (and the dialog        
+ *   Transfer Information table read-only (and the dialog        
  *   will NOT create a transaction when it is closed).               
  *
  * In other words: Indicate that this is just trying to obtain the
Index: search-param.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/search-param.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/gnome-utils/search-param.c -Lsrc/gnome-utils/search-param.c -u -r1.6 -r1.7
--- src/gnome-utils/search-param.c
+++ src/gnome-utils/search-param.c
@@ -28,7 +28,7 @@
 #include <stdarg.h>
 #include <gnome.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "GNCId.h"
 #include "QueryCore.h"
 #include "QueryObject.h"
@@ -37,9 +37,8 @@
 
 static void gnc_search_param_class_init	(GNCSearchParamClass *class);
 static void gnc_search_param_init	(GNCSearchParam *gspaper);
-static void gnc_search_param_finalise	(GtkObject *obj);
+static void gnc_search_param_finalize	(GObject *obj);
 
-#define _PRIVATE(x) (((GNCSearchParam *)(x))->priv)
 struct _GNCSearchParamPrivate {
   GSList *		converters;
   GSList *		param_path;
@@ -49,7 +48,7 @@
   gpointer		lookup_arg;
 };
 
-static GtkObjectClass *parent_class;
+static GObjectClass *parent_class;
 
 enum {
   LAST_SIGNAL
@@ -59,44 +58,39 @@
 static guint signals[LAST_SIGNAL] = { 0 };
 #endif
 
-guint
+GType
 gnc_search_param_get_type (void)
 {
-  static guint type = 0;
-	
-  if (!type) {
-    GtkTypeInfo type_info = {
-      "GNCSearchParam",
-      sizeof(GNCSearchParam),
+  static GType type = 0;
+
+  if (type == 0) {
+    static GTypeInfo type_info = {
       sizeof(GNCSearchParamClass),
-      (GtkClassInitFunc)gnc_search_param_class_init,
-      (GtkObjectInitFunc)gnc_search_param_init,
-      (GtkArgSetFunc)NULL,
-      (GtkArgGetFunc)NULL
+      NULL,
+      NULL,
+      (GClassInitFunc)gnc_search_param_class_init,
+      NULL,
+      NULL,
+      sizeof(GNCSearchParam),
+      0,
+      (GInstanceInitFunc)gnc_search_param_init
     };
-		
-    type = gtk_type_unique(gtk_object_get_type (), &type_info);
+
+    type = g_type_register_static (G_TYPE_OBJECT, "GNCSearchParam",
+				   &type_info, 0);
   }
-	
+
   return type;
 }
 
 static void
-gnc_search_param_class_init (GNCSearchParamClass *class)
+gnc_search_param_class_init (GNCSearchParamClass *klass)
 {
-  GtkObjectClass *object_class;
-	
-  object_class = (GtkObjectClass *)class;
-  parent_class = gtk_type_class (gtk_object_get_type ());
-
-  object_class->finalize = gnc_search_param_finalise;
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  /* override methods */
+  parent_class = g_type_class_peek_parent (klass);
 
-  /* signals */
-#if LAST_SIGNAL > 0
-  gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
-#endif
+  object_class->finalize = gnc_search_param_finalize;
 }
 
 static void
@@ -106,15 +100,24 @@
 }
 
 static void
-gnc_search_param_finalise (GtkObject *obj)
+gnc_search_param_finalize (GObject *obj)
 {
-  GNCSearchParam *o = (GNCSearchParam *)obj;
+  GNCSearchParam *o;
+
+  g_return_if_fail (obj != NULL);
+  g_return_if_fail (GNC_IS_SEARCH_PARAM (obj));	
+
+  o = GNC_SEARCH_PARAM (obj);
+
+  g_return_if_fail (o->priv != NULL);
+	
   g_slist_free (o->priv->param_path);
   o->priv->param_path = NULL;
   g_slist_free (o->priv->converters);
   o->priv->converters = NULL;
   g_free(o->priv);
-  ((GtkObjectClass *)(parent_class))->finalize(obj);
+
+  G_OBJECT_CLASS (parent_class)->finalize(obj);
 }
 
 /**
@@ -127,7 +130,7 @@
 GNCSearchParam *
 gnc_search_param_new (void)
 {
-  GNCSearchParam *o = (GNCSearchParam *)gtk_type_new(gnc_search_param_get_type ());
+  GNCSearchParam *o = (GNCSearchParam *)g_object_new(gnc_search_param_get_type (), NULL);
   return o;
 }
 
@@ -136,7 +139,7 @@
 {
   GNCSearchParam *n;
 
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (param), NULL);
 
   n = gnc_search_param_new ();
   n->title = param->title;
@@ -154,10 +157,11 @@
   GNCIdTypeConst type = NULL;
   GSList *converters = NULL;
 
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_if_fail (GNC_IS_SEARCH_PARAM (param));
 
-  if (param->priv->param_path)
+  if (param->priv->param_path) {
     g_slist_free (param->priv->param_path);
+  }
   param->priv->param_path = g_slist_copy (param_path);
 
   /* Compute the parameter type */
@@ -167,7 +171,7 @@
       gncQueryObjectGetParameter (search_type, param_name);
 
     /* If it doesn't exist, then we've reached the end */
-    if (!objDef)
+    if (objDef == NULL)
       break;
 
     /* Save the converter */
@@ -181,8 +185,9 @@
   param->priv->type = type;
 
   /* Save the converters */
-  if (param->priv->converters)
+  if (param->priv->converters) {
     g_slist_free (param->priv->converters);
+  }
   param->priv->converters = g_slist_reverse (converters);
 }
 
@@ -190,8 +195,9 @@
 gnc_search_param_override_param_type (GNCSearchParam *param,
 				      GNCIdTypeConst param_type)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
-  g_assert (param_type != NULL && *param_type != '\0');
+  g_return_if_fail (GNC_IS_SEARCH_PARAM (param));
+  g_return_if_fail (param_type != NULL && *param_type != '\0');
+
   param->priv->type = param_type;
   /* XXX: What about the converters? */
 }
@@ -199,15 +205,15 @@
 GSList *
 gnc_search_param_get_param_path (GNCSearchParam *param)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
-
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (param), NULL);
+	
   return g_slist_copy (param->priv->param_path);
 }
 
 GSList *
 gnc_search_param_get_converters (GNCSearchParam *param)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (param), NULL);
 
   return param->priv->converters;
 }
@@ -215,7 +221,7 @@
 GNCIdTypeConst
 gnc_search_param_get_param_type (GNCSearchParam *param)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (param), NULL);
 
   return param->priv->type;
 }
@@ -223,7 +229,7 @@
 void
 gnc_search_param_set_title (GNCSearchParam *param, const char *title)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_if_fail (GNC_IS_SEARCH_PARAM (param));
 
   param->title = title;
 }
@@ -231,7 +237,7 @@
 void
 gnc_search_param_set_justify (GNCSearchParam *param, GtkJustification justify)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_return_if_fail (GNC_IS_SEARCH_PARAM (param));
 
   param->justify = justify;
 }
@@ -239,7 +245,7 @@
 void
 gnc_search_param_set_passive (GNCSearchParam *param, gboolean value)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_assert (GNC_IS_SEARCH_PARAM (param));
 
   param->passive = value;
 }
@@ -247,7 +253,7 @@
 void
 gnc_search_param_set_non_resizeable (GNCSearchParam *param, gboolean value)
 {
-  g_assert (IS_GNCSEARCH_PARAM (param));
+  g_assert (GNC_IS_SEARCH_PARAM (param));
 
   param->non_resizeable = value;
 }
@@ -255,10 +261,10 @@
 gboolean
 gnc_search_param_type_match (GNCSearchParam *a, GNCSearchParam *b)
 {
-  g_assert (IS_GNCSEARCH_PARAM (a));
-  g_assert (IS_GNCSEARCH_PARAM (b));
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (a), FALSE);
+  g_return_val_if_fail (GNC_IS_SEARCH_PARAM (b), FALSE);
 
-  if (a->priv->type == b->priv->type ||
+  if (a->priv->type == b->priv->type || 
       !safe_strcmp (a->priv->type, b->priv->type))
     return TRUE;
 
@@ -351,7 +357,7 @@
   g_return_if_fail (param);
   g_return_if_fail (param_type && *param_type);
   g_return_if_fail (fcn);
-  g_return_if_fail (IS_GNCSEARCH_PARAM(param));
+  g_return_if_fail (GNC_IS_SEARCH_PARAM(param));
 
   param->priv->lookup_fcn = fcn;
   param->priv->lookup_arg = arg;
@@ -363,7 +369,7 @@
 gnc_search_param_compute_value (GNCSearchParam *param, gpointer object)
 {
   g_return_val_if_fail(param, NULL);
-  g_return_val_if_fail(IS_GNCSEARCH_PARAM(param), NULL);
+  g_return_val_if_fail(GNC_IS_SEARCH_PARAM(param), NULL);
 
   if (param->priv->lookup_fcn)
   {
Index: account-quickfill.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/account-quickfill.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/account-quickfill.h -Lsrc/gnome-utils/account-quickfill.h -u -r1.1 -r1.2
--- src/gnome-utils/account-quickfill.h
+++ src/gnome-utils/account-quickfill.h
@@ -19,7 +19,11 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup Account_Quickfill Quickfill Account Names
+/** @addtogroup QuickFill auto-complete typed user input.
+   @{
+*/
+/** @addtogroup Account_QuickFill Account Names
+
     For systems with a large number of accounts (>500), the creation 
     of the account name quickfill can take a significant amount of 
     time (tens of seconds in bad cases).  This routine will build 
@@ -73,3 +77,4 @@
 #endif
 
 /** @} */
+/** @} */
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/Makefile.am,v
retrieving revision 1.56
retrieving revision 1.57
diff -Lsrc/gnome-utils/Makefile.am -Lsrc/gnome-utils/Makefile.am -u -r1.56 -r1.57
--- src/gnome-utils/Makefile.am
+++ src/gnome-utils/Makefile.am
@@ -1,22 +1,60 @@
-SUBDIRS = . test
+SUBDIRS = schemas . test ui
 PWD := $(shell pwd)
 
 pkglib_LTLIBRARIES = libgncmod-gnome-utils.la libgw-gnome-utils.la
 
+# Note that src/gnome-utils CANNOT depend on src/gnome!
+if USE_LIBGOFFICE
 AM_CFLAGS = \
+  -DPREFIX=\"${prefix}\" \
+  -DSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
+  -DDATADIR=\"${GNC_SHAREDIR}\" \
+  -DLIBDIR=\"${GNC_LIBDIR}\" \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/engine \
+  -I${top_srcdir}/src/backend/file \
   -I${top_srcdir}/src/network-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src \
-  ${GUILE_INCS} \
   ${LIBGUPPI_CFLAGS} \
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GNOME_PRINT_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
+  ${GTKHTML_CFLAGS} \
+  ${GUILE_INCS} \
+  ${G_WRAP_COMPILE_ARGS} \
+  ${GSF_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${LIBGOFFICE_CFLAGS}
+else
+AM_CFLAGS = \
+  -DPREFIX=\"${prefix}\" \
+  -DSYSCONFDIR=\"${GNC_CONFIGDIR}\" \
+  -DDATADIR=\"${GNC_SHAREDIR}\" \
+  -DLIBDIR=\"${GNC_LIBDIR}\" \
+  -I${top_srcdir}/src/core-utils \
+  -I${top_srcdir}/src/gnc-module \
+  -I${top_srcdir}/src/engine \
+  -I${top_srcdir}/src/backend/file \
+  -I${top_srcdir}/src/network-utils \
+  -I${top_srcdir}/src/app-utils \
+  -I${top_srcdir}/lib/goffice \
+  -I${top_srcdir}/lib/goffice/split \
+  -I${top_srcdir}/lib \
+  -I${top_srcdir}/src \
+  ${LIBGUPPI_CFLAGS} \
+  ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
-  ${G_WRAP_COMPILE_ARGS}
+  ${GLIB_CFLAGS} \
+  ${GLADE_CFLAGS} \
+  ${GUILE_INCS} \
+  ${GNOME_PRINT_CFLAGS} \
+  ${G_WRAP_COMPILE_ARGS} \
+  ${QOF_CFLAGS} \
+  ${GSF_CFLAGS}
+endif
 
 libgncmod_gnome_utils_la_SOURCES = \
   QuickFill.c \
@@ -26,12 +64,14 @@
   dialog-account.c \
   dialog-commodity.c \
   dialog-options.c \
+  dialog-preferences.c \
   dialog-query-list.c \
+  dialog-reset-warnings.c \
   dialog-transfer.c \
   dialog-utils.c \
   druid-utils.c \
+  druid-gconf-setup.c \
   gnc-account-sel.c \
-  gnc-account-tree.c \
   gnc-amount-edit.c \
   gnc-commodity-edit.c \
   gnc-currency-edit.c \
@@ -39,23 +79,50 @@
   gnc-date-edit.c \
   gnc-date-format.c \
   gnc-dense-cal.c \
+  gnc-druid-gnome.c \
+  gnc-druid-provider-edge-gnome.c \
+  gnc-druid-provider-file-gnome.c \
+  gnc-druid-provider-multifile-gnome.c \
+  gnc-embedded-window.c \
+  gnc-file.c \
   gnc-frequency.c \
+  gnc-recurrence.c \
   gnc-general-select.c \
   gnc-gnome-utils.c \
   gnc-gui-query.c \
-  gnc-html-history.c \
+  gnc-html-graph-gog.c \
   gnc-html-guppi.c \
+  gnc-html-history.c \
   gnc-html.c \
-  gnc-mdi-utils.c \
+  gnc-icons.c \
+  gnc-main-window.c \
   gnc-menu-extensions.c \
+  gnc-plugin-file-history.c \
+  gnc-plugin-manager.c \
+  gnc-plugin-menu-additions.c \
+  gnc-plugin-page.c \
+  gnc-plugin.c \
+  gnc-period-select.c \
   gnc-query-list.c \
   gnc-splash.c \
+  gnc-tree-model.c \
+  gnc-tree-model-account-types.c \
+  gnc-tree-model-account.c \
+  gnc-tree-model-commodity.c \
+  gnc-tree-model-example-account.c \
+  gnc-tree-model-price.c \
+  gnc-tree-model-selection.c \
+  gnc-tree-view-account.c \
+  gnc-tree-view-commodity.c \
+  gnc-tree-view-price.c \
+  gnc-tree-view.c \
+  gnc-window.c \
   gncmod-gnome-utils.c \
-  gtkselect.c \
   misc-gnome-utils.c \
   print-session.c \
   search-param.c \
-  window-help.c
+  gnc-dialog.c \
+  gnc-tree-model-budget.c
 
 gncincludedir = ${GNC_INCLUDE_DIR}
 gncinclude_HEADERS = \
@@ -63,13 +130,15 @@
   account-quickfill.h \
   dialog-account.h \
   dialog-commodity.h \
+  dialog-preferences.h \
   dialog-options.h \
   dialog-query-list.h \
+  dialog-reset-warnings.h \
   dialog-transfer.h \
   dialog-utils.h \
   druid-utils.h \
+  druid-gconf-setup.h \
   gnc-account-sel.h \
-  gnc-account-tree.h \
   gnc-amount-edit.h \
   gnc-commodity-edit.h \
   gnc-currency-edit.h \
@@ -77,51 +146,104 @@
   gnc-date-edit.h \
   gnc-date-format.h \
   gnc-dense-cal.h \
+  gnc-druid-gnome-ui.h \
+  gnc-embedded-window.h \
+  gnc-file.h \
   gnc-frequency.h \
+  gnc-recurrence.h \
   gnc-general-select.h \
   gnc-gnome-utils.h \
   gnc-gui-query.h \
-  gnc-html-history.h \
+  gnc-html-graph-gog.h \
   gnc-html-guppi.h \
+  gnc-html-history.h \
   gnc-html.h \
-  gnc-mdi-utils.h \
+  gnc-icons.h \
+  gnc-main-window.h \
   gnc-menu-extensions.h \
+  gnc-plugin-file-history.h \
+  gnc-plugin-manager.h \
+  gnc-plugin-menu-additions.h \
+  gnc-plugin-page.h \
+  gnc-plugin.h \
+  gnc-period-select.h \
   gnc-query-list.h \
   gnc-splash.h \
-  gtkselect.h \
+  gnc-tree-model.h \
+  gnc-tree-model-account-types.h \
+  gnc-tree-model-account.h \
+  gnc-tree-model-commodity.h \
+  gnc-tree-model-example-account.h \
+  gnc-tree-model-price.h \
+  gnc-tree-model-selection.h \
+  gnc-tree-view-account.h \
+  gnc-tree-view-commodity.h \
+  gnc-tree-view-price.h \
+  gnc-tree-view.h \
+  gnc-window.h \
   misc-gnome-utils.h \
   print-session.h \
-  window-help.h
+  gnc-dialog.h \
+  gnc-tree-model-budget.h
 
 noinst_HEADERS = \
   argv-list-converters.h \
   gnc-dir.h \
+  gnc-druid-gnome.h \
+  gnc-druid-provider-edge-gnome.h \
+  gnc-druid-provider-file-gnome.h \
+  gnc-druid-provider-multifile-gnome.h \
   gnc-version.h \
   gw-gnome-utils.h \
   search-param.h
 
-libgncmod_gnome_utils_la_LDFLAGS = -module
-
+if USE_LIBGOFFICE
 libgncmod_gnome_utils_la_LIBADD = \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/calculation/libgncmod-calculation.la \
   ${top_builddir}/src/network-utils/libgncmod-network-utils.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ${LIBGUPPI_LIBS} \
+  ${GNOME_LIBS} \
+  ${GNOME_PRINT_LIBS} \
+  ${GTKHTML_LIBS} \
   ${GUILE_LIBS} \
+  ${GDK_PIXBUF_LIBS} \
+  ${GLADE_LIBS} \
+  ${GUILE_LIBS} \
+  ${GLIB_LIBS} \
+  ${DB_LIBS} \
+  ${GSF_LIBS} \
+  ${QOF_LIBS} \
+  ${LIBGOFFICE_LIBS} \
+  ${XML_LIBS}
+else
+libgncmod_gnome_utils_la_LIBADD = \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
+  ${top_builddir}/src/gnc-module/libgncmodule.la \
+  ${top_builddir}/src/engine/libgncmod-engine.la \
+  ${top_builddir}/src/calculation/libgncmod-calculation.la \
+  ${top_builddir}/src/network-utils/libgncmod-network-utils.la \
+  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ${top_builddir}/lib/goffice/libgoffice.la \
   ${LIBGUPPI_LIBS} \
-  ${GNOMEUI_LIBS} \
-  ${GNOME_LIBDIR} \
+  ${GNOME_LIBS} \
   ${GNOME_PRINT_LIBS} \
   ${GTKHTML_LIBS} \
+  ${GUILE_LIBS} \
   ${GDK_PIXBUF_LIBS} \
   ${GLADE_LIBS} \
   ${GUILE_LIBS} \
   ${GLIB_LIBS} \
-  ${DB_LIBS}
+  ${DB_LIBS} \
+  ${GSF_LIBS} \
+  ${QOF_LIBS} \
+  ${XML_LIBS}
+endif
 
 libgw_gnome_utils_la_SOURCES = gw-gnome-utils.c
-libgw_gnome_utils_la_LDFLAGS = -module
 
 gwmoddir = ${GNC_GWRAP_LIBDIR}
 gwmod_DATA = gw-gnome-utils.scm gw-gnome-utils-spec.scm
@@ -136,8 +258,13 @@
 glade_DATA = \
   commodity.glade \
   dialog-query-list.glade \
+  dialog-reset-warnings.glade \
+  druid-provider-multifile.glade \
   exchange-dialog.glade \
+  druid-gconf-setup.glade \
   gnc-date-format.glade \
+  gnc-gui-query.glade \
+  preferences.glade \
   transfer.glade
 
 EXTRA_DIST = \
@@ -157,7 +284,7 @@
 	sed < $< > $@.tmp \
 	    -e 's:@-GNC_ACCOUNTS_DIR-@:${GNC_ACCOUNTS_DIR}:g' \
 	    -e 's:@-GNC_GLADE_DIR-@:${GNC_GLADE_DIR}:g' \
-	    -e 's:@-GNC_PIXMAP_DIR-@:${GNC_PIXMAP_DIR}:g'
+	    -e 's:@-GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY-@:${GCONF_SCHEMA_CONFIG_SOURCE_DIRONLY}:g'
 	mv $@.tmp $@
 
 gnc-version.h: _gnc-version.h
@@ -207,3 +334,14 @@
 BUILT_SOURCES += gw-gnome-utils.scm gw-gnome-utils.c gw-gnome-utils.h
 DISTCLEANFILES = gnucash g-wrapped .scm-links ${SCM_FILE_LINKS} \
                  gw-gnome-utils.html
+
+#
+# I hate inconsistent standards. Autotools puts help files into
+# ${datadir}/gnome/help/${program} while the gnome2 libraries expect
+# them in ${pkgdatadir}/gnome/help/${program}.
+#
+install-data-hook:
+	ln -sf ../gnome ${DESTDIR}/${pkgdatadir}
+
+uninstall-hook:
+	rm -f ${DESTDIR}/${pkgdatadir}/gnome
Index: gnc-query-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-query-list.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/gnome-utils/gnc-query-list.c -Lsrc/gnome-utils/gnc-query-list.c -u -r1.12 -r1.13
--- src/gnome-utils/gnc-query-list.c
+++ src/gnome-utils/gnc-query-list.c
@@ -137,11 +137,15 @@
 gnc_query_list_new(GList *param_list, Query *query)
 {
   GNCQueryList *list;
+  gint columns;
 
   g_return_val_if_fail(param_list, NULL);
   g_return_val_if_fail(query, NULL);
 
-  list = GNC_QUERY_LIST(gtk_type_new(gnc_query_list_get_type()));
+  columns = g_list_length(param_list);
+  list = GNC_QUERY_LIST(g_object_new(gnc_query_list_get_type(),
+				     "n_columns", columns,
+				     NULL));
 
   gnc_query_list_construct(list, param_list, query);
 
@@ -261,8 +265,7 @@
     titles[i] = (gchar *)param->title;
   }
 
-  /* construct the clist */
-  gtk_clist_construct (clist, list->num_columns, titles);
+  gtk_clist_column_titles_show (clist);
   gtk_clist_set_shadow_type (clist, GTK_SHADOW_IN);
 
   /* build all the column titles */
@@ -290,6 +293,7 @@
 
   style = gtk_widget_get_style (GTK_WIDGET(list));
 
+#if 0
   {
     GdkFont *font = NULL;
     gint width;
@@ -308,6 +312,7 @@
       }
     }
   }
+#endif
   g_free(titles);
 }
 
@@ -327,28 +332,26 @@
   parent_class = gtk_type_class(GTK_TYPE_CLIST);
 
   query_list_signals[LINE_TOGGLED] =
-    gtk_signal_new("line_toggled",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCQueryListClass,
-				     line_toggled),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
+    g_signal_new("line_toggled",
+		 G_TYPE_FROM_CLASS (object_class),
+		 G_SIGNAL_RUN_FIRST,
+		 G_STRUCT_OFFSET(GNCQueryListClass, line_toggled),
+		 NULL, NULL,
+		 g_cclosure_marshal_VOID__POINTER,
+		 G_TYPE_NONE,
+		 1,
+		 G_TYPE_POINTER);
 
   query_list_signals[DOUBLE_CLICK_ENTRY] =
-    gtk_signal_new("double_click_entry",
-		   GTK_RUN_FIRST,
-		   object_class->type,
-		   GTK_SIGNAL_OFFSET(GNCQueryListClass,
-				     double_click_entry),
-		   gtk_marshal_NONE__POINTER,
-		   GTK_TYPE_NONE, 1,
-		   GTK_TYPE_POINTER);
-
-  gtk_object_class_add_signals(object_class,
-			       query_list_signals,
-			       LAST_SIGNAL);
+    g_signal_new("double_click_entry",
+		 G_TYPE_FROM_CLASS (object_class),
+		 G_SIGNAL_RUN_FIRST,
+		 G_STRUCT_OFFSET(GNCQueryListClass, double_click_entry),
+		 NULL, NULL,
+		 g_cclosure_marshal_VOID__POINTER,
+		 G_TYPE_NONE,
+		 1,
+		 G_TYPE_POINTER);
 
   object_class->destroy = gnc_query_list_destroy;
 
@@ -490,7 +493,7 @@
 
   /* sync with gtkclist.c */
   title_height = (clist->column_title_area.height +
-                  (GTK_WIDGET(list)->style->klass->ythickness +
+                  (GTK_WIDGET(list)->style->ythickness +
                    GTK_CONTAINER(list)->border_width) * 2);
   list_height = (clist->row_height * num_rows) + (num_rows + 1);
 
@@ -764,7 +767,6 @@
   gchar *strings[list->num_columns + 1];
   GList *entries, *item;
   const GUID *guid;
-  const QofParam *gup;
   gint i;
 
   /* Clear all watches */
@@ -777,6 +779,7 @@
   {
     GList *node;
     gint row;
+    const QofParam *gup;
     QofParam *qp= NULL;
 
     for (i = 0, node = list->column_params; node; node = node->next)
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/test/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/gnome-utils/test/.cvsignore -Lsrc/gnome-utils/test/.cvsignore -u -r1.1 -r1.2
--- src/gnome-utils/test/.cvsignore
+++ src/gnome-utils/test/.cvsignore
@@ -3,3 +3,5 @@
 .deps
 .libs
 test-link-module
+test-gnc-dialog
+test-gnc-recurrence
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/test/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/gnome-utils/test/Makefile.am -Lsrc/gnome-utils/test/Makefile.am -u -r1.16 -r1.17
--- src/gnome-utils/test/Makefile.am
+++ src/gnome-utils/test/Makefile.am
@@ -1,5 +1,9 @@
 TESTS =  \
-  test-link-module test-load-module 
+  test-link-module test-load-module test-gnc-recurrence test-gnc-dialog
+
+##lib_LTLIBRARIES = libgncgnome.la
+
+
 
 GNC_TEST_DEPS := @GNC_TEST_SRFI_LOAD_CMD@ \
   --gnc-module-dir ${top_builddir}/src/gnc-module \
@@ -23,12 +27,23 @@
   $(shell ${top_srcdir}/src/gnc-test-env --no-exports ${GNC_TEST_DEPS})
 
 noinst_PROGRAMS = \
-  test-link-module
+  test-link-module test-gnc-recurrence test-gnc-dialog
 
 INCLUDES= \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/engine \
+  -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/gnc-module \
-  ${GLIB_CFLAGS} ${GUILE_INCS}
+  -I${top_srcdir}/src/app-utils \
+  ${GLIB_CFLAGS} ${GUILE_INCS} ${GNOME_CFLAGS} ${GLADE_CFLAGS}
+
+test_gnc_recurrence_SOURCES=test-gnc-recurrence.c
+test_gnc_recurrence_LDADD = ${GNOME_LIBS} \
+  ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la
+
+test_gnc_dialog_LDADD = ${GNOME_LIBS} \
+  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la
 
 test_link_module_SOURCES=test-link-module.c
 test_link_module_LDADD= \
Index: import-backend.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-backend.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/import-export/import-backend.c -Lsrc/import-export/import-backend.c -u -r1.30 -r1.31
--- src/import-export/import-backend.c
+++ src/import-export/import-backend.c
@@ -34,25 +34,25 @@
 
 #include <stdlib.h> 
 #include <math.h>
+#include "gnc-gconf-utils.h"
 #include "import-backend.h"
 #include "import-utilities.h"
 #include "Account.h"
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "Query.h"
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "gnc-ui-util.h"
 
-#define IMPORT_PAGE	"Online Banking & Importing" /* from app-utils/prefs.scm */
-#define BAYES_OPTION	"Use Bayesian Matching?"
+#define GCONF_SECTION "dialogs/import/generic_matcher"
+#define BAYES_OPTION  "use_bayes"
 
 /********************************************************************\
  *   Constants   *
 \********************************************************************/
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /********************************************************************\
  *   Constants, should idealy be defined a user preference dialog    *
@@ -106,7 +106,7 @@
 {
   Transaction * trans;
   Split * split;
-  //GNC_match_probability probability;
+  /*GNC_match_probability probability;*/
   gint probability;
 };
 
@@ -130,7 +130,7 @@
 gnc_import_TransInfo_is_balanced (const GNCImportTransInfo *info)
 {
  g_assert (info);
- if(gnc_numeric_equal(xaccTransGetImbalance(gnc_import_TransInfo_get_trans(info)),gnc_numeric_zero()))
+ if(gnc_numeric_zero_p(xaccTransGetImbalance(gnc_import_TransInfo_get_trans(info))))
    {
      return TRUE;
    }
@@ -242,8 +242,8 @@
 {
   if (info) {
     g_list_free (info->match_list);
-    /*If the transaction is still open, it must be destroyed*/
-    if(xaccTransIsOpen(info->trans)==TRUE)
+    /*If the transaction exists and is still open, it must be destroyed*/
+    if(info->trans && xaccTransIsOpen(info->trans))
       {
         xaccTransDestroy(info->trans);
         xaccTransCommitEdit(info->trans);
@@ -282,6 +282,7 @@
   gchar * red_color_str = g_strdup_printf("r c red");
   gchar * black_color_str = g_strdup_printf("b c black");
   gchar * xpm[2+num_colors+height];
+  gint add_threshold, clear_threshold;
 
   g_assert(settings);
   g_assert(widget);
@@ -302,7 +303,9 @@
   xpm[3]=yellow_color_str;
   xpm[4]=red_color_str; 
   xpm[5]=black_color_str;
-  
+  add_threshold = gnc_import_Settings_get_add_threshold(settings);
+  clear_threshold = gnc_import_Settings_get_clear_threshold(settings);
+
   for(i=0;i<height;i++)
     {
       xpm[num_colors+1+i]= g_new0(char,(width_each_bar*score)+width_first_bar+1);
@@ -325,11 +328,11 @@
 		{
 		  strcat(xpm[num_colors+1+i],black_first_bar);
 		}
-	      else if (j<=gnc_import_Settings_get_add_threshold(settings))
+	      else if (j <= add_threshold)
 		{
 		  strcat(xpm[num_colors+1+i],red_bar);
 		}
-	      else if (j>=gnc_import_Settings_get_clear_threshold(settings))
+	      else if (j >= clear_threshold)
 		{
 		  strcat(xpm[num_colors+1+i],green_bar);
 		}
@@ -461,7 +464,7 @@
 	     (xaccSplitGetAccount
 	      (gnc_import_TransInfo_get_fsplit (info))));
 
-  useBayes = gnc_lookup_boolean_option(IMPORT_PAGE, BAYES_OPTION, TRUE);
+  useBayes = gnc_gconf_get_bool(GCONF_SECTION, BAYES_OPTION, NULL);
   if(useBayes)
     {
       /* get the tokens for this transaction* */
@@ -530,7 +533,7 @@
 		   (gnc_import_TransInfo_get_fsplit (trans_info))));
 
   /* see what matching system we are currently using */
-  useBayes = gnc_lookup_boolean_option(IMPORT_PAGE, BAYES_OPTION, TRUE);
+  useBayes = gnc_gconf_get_bool(GCONF_SECTION, BAYES_OPTION, NULL);
   if(useBayes)
     {
       /* tokenize this transaction */
@@ -586,6 +589,7 @@
       double downloaded_split_amount, match_split_amount;
       time_t match_time, download_time;
       int datediff_day;
+      Transaction *new_trans = gnc_import_TransInfo_get_trans (trans_info);
     
       /* Matching heuristics */
     
@@ -596,9 +600,11 @@
       /*DEBUG(" downloaded_split_amount=%f", downloaded_split_amount);*/
       match_split_amount = gnc_numeric_to_double(xaccSplitGetAmount(split));
       /*DEBUG(" match_split_amount=%f", match_split_amount);*/
-      if(gnc_numeric_equal(xaccSplitGetAmount
-			   (gnc_import_TransInfo_get_fsplit (trans_info)),
-			   xaccSplitGetAmount(split)))
+      if(downloaded_split_amount == match_split_amount)
+	/*if (gnc_numeric_equal(xaccSplitGetAmount
+	  (gnc_import_TransInfo_get_fsplit (trans_info)),
+	  xaccSplitGetAmount(split))) 
+	  -- gnc_numeric_equal is an expensive function call */
 	{
 	  prob = prob+3;
 	  /*DEBUG("heuristics:  probability + 3 (amount)");*/
@@ -623,8 +629,7 @@
       
       /* Date heuristics */
       match_time = xaccTransGetDate (xaccSplitGetParent (split));
-      download_time = 
-	xaccTransGetDate (gnc_import_TransInfo_get_trans (trans_info));
+      download_time = xaccTransGetDate (new_trans);
       datediff_day = abs(match_time - download_time)/86400;
       /* Sorry, there are not really functions around at all that
 	 provide for less hacky calculation of days of date
@@ -655,10 +660,9 @@
 	}
       
       /* Check number heuristics */  
-      if(strlen(xaccTransGetNum(gnc_import_TransInfo_get_trans (trans_info)))!=0)
+      if(strlen(xaccTransGetNum(new_trans))!=0)
 	{     
-	  if((strcmp(xaccTransGetNum
-		     (gnc_import_TransInfo_get_trans (trans_info)),
+	  if((strcmp(xaccTransGetNum (new_trans),
 		     xaccTransGetNum(xaccSplitGetParent(split)))
 	      ==0))
 	    {	
@@ -666,7 +670,7 @@
 	      prob = prob+4;
 	      /*DEBUG("heuristics:  probability + 5 (Check number)");*/
 	    }
-	  else if(strlen(xaccTransGetNum(gnc_import_TransInfo_get_trans (trans_info))) > 0 &&
+	  else if(strlen(xaccTransGetNum(new_trans)) > 0 &&
 		  strlen(xaccTransGetNum(xaccSplitGetParent(split))) > 0)
 	    {
 	      /* If both number are not empty yet do not match, add a little extre penality */
@@ -700,10 +704,9 @@
 	}
 
       /* Description heuristics */  
-      if(strlen(xaccTransGetDescription(gnc_import_TransInfo_get_trans (trans_info)))!=0)
+      if(strlen(xaccTransGetDescription(new_trans))!=0)
 	{
-	  if((strcmp(xaccTransGetDescription
-		     (gnc_import_TransInfo_get_trans (trans_info)),
+	  if((strcmp(xaccTransGetDescription (new_trans),
 		     xaccTransGetDescription(xaccSplitGetParent(split)))
 	      ==0))
 	    {	
@@ -711,11 +714,9 @@
 	      prob = prob+2;
 	      /*DEBUG("heuristics:  probability + 2 (description)");*/
 	    }
-	  else if((strncmp(xaccTransGetDescription
-			   (gnc_import_TransInfo_get_trans (trans_info)),
-			   xaccTransGetDescription(xaccSplitGetParent(split)),
-			   strlen(xaccTransGetDescription
-				  (gnc_import_TransInfo_get_trans (trans_info)))/2)
+	  else if((strncmp(xaccTransGetDescription (new_trans),
+			   xaccTransGetDescription (xaccSplitGetParent(split)),
+			   strlen(xaccTransGetDescription (new_trans))/2)
 		   ==0))
 	    {
 	      /* Very primitive fuzzy match worth +1.  This matches the
@@ -898,7 +899,7 @@
 	  if(gnc_import_MatchInfo_get_split 
 	     (gnc_import_TransInfo_get_selected_match (trans_info)) ==NULL)
 	    {
-	      PERR("The split I am trying to reconcile is NULL, shouldn't happen!")
+                PERR("The split I am trying to reconcile is NULL, shouldn't happen!");
 	    }
 	  else
 	    {
@@ -936,10 +937,12 @@
 	      xaccTransDestroy(trans_info->trans);
 	      /*DEBUG("CommitEdit trans")*/
 	      xaccTransCommitEdit(trans_info->trans);
+	      /* Very important: Make sure the freed transaction is not freed again! */
+	      trans_info->trans = NULL;
 	    }
 	  break;
 	case GNCImport_EDIT:
-	    PERR("EDIT action is UNSUPPORTED!")
+	    PERR("EDIT action is UNSUPPORTED!");
 	  break;
 	default:
 	  DEBUG("Invalid GNCImportAction for this imported transaction.");
@@ -983,7 +986,7 @@
     }
   else
     {
-      //printf("test_trans_online_id(): Duplicate found\n");
+      /*printf("test_trans_online_id(): Duplicate found\n");*/
       return 1;
     }
 }
--- src/import-export/generic-import.scm
+++ /dev/null
@@ -1,79 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  generic-import.scm
-;;  
-;;
-;;  Copyright (c) 2002 Benoit Grégoire <bock at step.polymtl.ca>
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-;;
-; If you ever move the prefs from one page to another, DON'T forget to change MATCHER_PREF_PAGE in import-settings.c !!!!!!!
-;;
-
-;; Register Preferences
-;(gnc:register-configuration-option
-; (gnc:make-simple-boolean-option
-;  (N_ "Transaction Matcher") (N_ "Enable SKIP transaction action")
-;  "b" (N_ "Enable the SKIP action in the transaction matcher.  If enabled, a transaction whose best match's score is in the yellow zone (above the Auto-ADD threshold but below the Auto-CLEAR threshold) will be SKIPed by default.")
-;  #t))
-
-; Disable for 1.8 release until implemented
-
-;(gnc:register-configuration-option
-; (gnc:make-simple-boolean-option
-;  (N_ "Transaction Matcher") (N_ "Enable EDIT match action")
-;  "b" (N_ "Enable the EDIT action in the transaction matcher.  NOT YET SUPPORTED")
-;  #f))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  ;;(N_ "Transaction Matcher") 
-  (N_ "Online Banking & Importing")
-  (N_ "Match display threshold")
-  ;; Please leave this sorting argument at no less than "d" since
-  ;; other (optional) items might want to appear in front of it.
-  "d" (N_ "The minimum score a potential match must have to be displayed in the match list.")
-  1.0 ;; default
-  0.0 ;; lower bound
-  6.0 ;; upper bound
-  0.0 ;; number of decimals
-  1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  ;;(N_ "Transaction Matcher") 
-  (N_ "Online Banking & Importing")
-  (N_ "Auto-ADD threshold")
-  "e" (N_ "A transaction whose best match's score is in the red zone (above the display threshold but below or equal to the Auto-ADD threshold) will be ADDed by default.")
-  3.0 ;; default
-  1.0 ;; lower bound
-  6.0 ;; upper bound
-  0.0 ;; number of decimals
-  1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  ;;(N_ "Transaction Matcher") 
-  (N_ "Online Banking & Importing")
-  (N_ "Auto-CLEAR threshold")
-  "f" (N_ "A transaction whose best match's score is in the green zone (above or equal to the Auto-CLEAR threshold) will be CLEARed by default.")
-  6.0 ;; default
-  1.0 ;; lower bound
-  12.0 ;; upper bound
-  0.0 ;; number of decimals
-  1.0 ;; step size
-  ))
-
-(gnc:register-configuration-option
- (gnc:make-number-range-option
-  ;;(N_ "Transaction Matcher") 
-  (N_ "Online Banking & Importing")
-  (N_ "Commercial ATM fees threshold")
-  "g" (N_ "In some places commercial ATMs (not belonging to a financial institution) are installed in places like convienience store.  These ATM add its fee directly to the amount instead of showing up as a separate transaction or in your monthly banking fees.  For example, you withdraw 100$, and you are charged 101,50$ plus Interac fees.  If you manually entered that 100$, the amounts won't match.  You should set this to whatever is the maximum such fee in your area (in units of your local currency), so the transaction will be recognised as a match.")
-  2.00 ;; default
-  0.0 ;; lower bound
-  1000.0 ;; upper bound
-  2.0 ;; number of decimals
-  0.01 ;; step size
-  ))
Index: import-parse.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-parse.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/import-parse.h -Lsrc/import-export/import-parse.h -u -r1.2 -r1.3
--- src/import-export/import-parse.h
+++ src/import-export/import-parse.h
@@ -31,6 +31,8 @@
 #include "gnc-date.h"
 
 typedef enum {
+  GNCIF_NONE		= 0,
+
   /* number formats */
   GNCIF_NUM_PERIOD	= (1 << 1),
   GNCIF_NUM_COMMA	= (1 << 2),
Index: import-main-matcher.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-main-matcher.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/import-export/import-main-matcher.c -Lsrc/import-export/import-main-matcher.c -u -r1.16 -r1.17
--- src/import-export/import-main-matcher.c
+++ src/import-export/import-main-matcher.c
@@ -32,9 +32,8 @@
 
 #include "dialog-utils.h"
 #include "gnc-ui.h"
-#include "global-options.h"
 #include "gnc-ui-util.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-trace.h"
 #include "import-settings.h"
 #include "import-match-map.h"
@@ -67,7 +66,7 @@
 #define DOWNLOADED_CLIST_ACTION_CLEAR 6
 #define DOWNLOADED_CLIST_ACTION_EDIT 7
 #define DOWNLOADED_CLIST_ACTION_INFO 8
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /* Local prototypes */
 static void automatch_clist_transactions(GNCImportMainMatcher *info, GtkCList *clist, int starting_row);
@@ -388,23 +387,21 @@
   GladeXML *xml;
   GtkWidget *heading_label;
   
-  gnc_set_log_level(MOD_IMPORT, GNC_LOG_TRACE);
-
   info = g_new0 (GNCImportMainMatcher, 1);
 
   /* Initialize user Settings. */
   info->user_settings = gnc_import_Settings_new ();
   gnc_import_Settings_set_match_date_hardlimit (info->user_settings, match_date_hardlimit);
 
-  /* Initialize the GnomeDialog. */
+  /* Initialize the GtkDialog. */
   xml = gnc_glade_xml_new ("generic-import.glade", "transaction_matcher");
 
-  g_assert
-    (info->dialog = glade_xml_get_widget (xml, "transaction_matcher"));
-  g_assert 
-    (info->clist = glade_xml_get_widget (xml, "downloaded_clist"));
-  g_assert
-    (heading_label = glade_xml_get_widget (xml, "heading_label"));
+  info->dialog = glade_xml_get_widget (xml, "transaction_matcher");
+  g_assert (info->dialog != NULL);
+  info->clist = glade_xml_get_widget (xml, "downloaded_clist");
+  g_assert (info->clist != NULL);
+  heading_label = glade_xml_get_widget (xml, "heading_label");
+  g_assert (heading_label != NULL);
 
   /*if (parent)
     gnome_dialog_set_parent (GNOME_DIALOG (info->dialog), 
@@ -566,7 +563,7 @@
   /*Date*/
 
   text[DOWNLOADED_CLIST_DATE] = 
-    xaccPrintDateSecs ( xaccTransGetDate( gnc_import_TransInfo_get_trans(info) ) );
+    qof_print_date ( xaccTransGetDate( gnc_import_TransInfo_get_trans(info) ) );
   gtk_clist_set_text (GTK_CLIST (gui->clist), row_number, 
 		      DOWNLOADED_CLIST_DATE, 
 		      text[DOWNLOADED_CLIST_DATE]);
Index: import-match-picker.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-match-picker.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/import-match-picker.c -Lsrc/import-export/import-match-picker.c -u -r1.4 -r1.5
--- src/import-export/import-match-picker.c
+++ src/import-export/import-match-picker.c
@@ -103,7 +103,7 @@
   
   /*Date*/
   clist_text[DOWNLOADED_CLIST_DATE] = 
-    xaccPrintDateSecs 
+    qof_print_date 
     ( xaccTransGetDate
       ( gnc_import_TransInfo_get_trans(transaction_info) ) );
   
@@ -171,7 +171,7 @@
       
       /* Date */
       clist_text[MATCHER_CLIST_DATE]=
-	xaccPrintDateSecs 
+	qof_print_date 
 	( xaccTransGetDate
 	  ( xaccSplitGetParent
 	    ( gnc_import_MatchInfo_get_split(match_info) ) ));
@@ -276,8 +276,9 @@
   matcher->user_settings = gnc_import_Settings_new ();
 
   /* load the interface */
-  g_assert
-    (xml = gnc_glade_xml_new ("generic-import.glade", "match_picker"));
+  xml = gnc_glade_xml_new ("generic-import.glade", "match_picker");
+  g_return_if_fail (xml != NULL);
+
   /* connect the signals in the interface */
   glade_xml_signal_connect_data(xml,
 				"match_transaction_select_cb", 
@@ -334,7 +335,7 @@
 gnc_import_match_picker_run_and_close (GNCImportTransInfo *transaction_info)
 {
   GNCImportMatchPicker *matcher;
-  gint row_number, result;
+  gint row_number, response;
   GNCImportMatchInfo *old;
   g_assert (transaction_info);
   
@@ -360,11 +361,12 @@
   
   /* Let this dialog run and close. */
   /*DEBUG("Right before run and close");*/
-  result = 
-    gnome_dialog_run_and_close (GNOME_DIALOG (matcher->transaction_matcher));
+  gtk_window_set_modal(GTK_WINDOW(matcher->transaction_matcher), TRUE);
+  response = gtk_dialog_run (GTK_DIALOG (matcher->transaction_matcher));
+  gtk_widget_destroy (matcher->transaction_matcher);
   /*DEBUG("Right after run and close");*/
-  /* DEBUG("Result was %d.", result); */
-  if (result == 0 && matcher->selected_match_info != old)
+  /* DEBUG("Response was %d.", response); */
+  if (response == GTK_RESPONSE_OK && matcher->selected_match_info != old)
     {    /* OK was pressed */
       gnc_import_TransInfo_set_selected_match (transaction_info,
 					       matcher->selected_match_info,
Index: import-match-map.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-match-map.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/import-export/import-match-map.c -Lsrc/import-export/import-match-map.c -u -r1.8 -r1.9
--- src/import-export/import-match-map.c
+++ src/import-export/import-match-map.c
@@ -33,13 +33,13 @@
 #include "kvp_frame.h"
 #include "Group.h"
 #include "gnc-ui-util.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 /********************************************************************\
  *   Constants   *
 \********************************************************************/
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 
 struct _GncImportMatchMap {
@@ -304,8 +304,6 @@
 
   ENTER(" ");
 
-gnc_set_log_level(MOD_IMPORT, GNC_LOG_INFO);
-
   /* check to see if the imap is NULL */
   if(!imap)
   {
Index: import-account-matcher.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-account-matcher.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/import-export/import-account-matcher.c -Lsrc/import-export/import-account-matcher.c -u -r1.12 -r1.13
--- src/import-export/import-account-matcher.c
+++ src/import-export/import-account-matcher.c
@@ -27,35 +27,18 @@
 
 #include "config.h"
 
-
-#include <glib.h>
-#include <gmodule.h>
-
-#include <glade/glade.h>
-
-#include <stdlib.h>
 #include "import-account-matcher.h"
 #include "import-utilities.h"
 #include "dialog-account.h"
 #include "dialog-utils.h"
 
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
+#include "gnc-tree-view-account.h"
+#include "gnc-ui.h"
 
-#include "gnc-ui-util.h"
 
-
-static short module = MOD_IMPORT;
-
-/********************************************************************\
- *   Constants   *
-\********************************************************************/
-
-#define NUM_COLUMNS_CLIST 4
-static const int CLIST_NAME= 0;
-static const int CLIST_TYPE = 1;
-static const int CLIST_DESCRIPTION = 2;
-static const int CLIST_ONLINE_ID = 3;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /*-******************************************************************\
  *   Structs   *
@@ -63,9 +46,8 @@
 
 struct _accountpickerdialog {
   GtkWidget       * dialog;
-  GtkWidget       * treeview;
-  AccountGroup * acct_group;
-  Account * selected_acct;
+  GncTreeViewAccount *account_tree;
+  GtkWidget       * account_tree_box;
   const gchar * account_human_description;
   gchar * account_online_id_value;
   gnc_commodity * new_account_default_commodity;
@@ -77,91 +59,34 @@
  * 
 \********************************************************************/
 
-/**@return If the parent node should be expanded*/
-static gboolean acct_tree_add_accts(struct _accountpickerdialog * picker, AccountGroup * accts, GtkCTree * tree, GtkCTreeNode * parent)
+static void
+build_acct_tree(struct _accountpickerdialog * picker)
 {
-  GtkCTreeNode * node;
-  Account *current_acct;
-  gint i;
-  gboolean expand_parent = FALSE;
-  gboolean expand;
-  gchar * acctinfo[NUM_COLUMNS_CLIST];
+  GtkTreeView *account_tree;
 
-  for(i=0;i<xaccGroupGetNumAccounts(accts);i++)
-    {
-      current_acct = xaccGroupGetAccount(accts, i);
-      acctinfo[CLIST_NAME]=g_strdup(xaccAccountGetName(current_acct));
-      acctinfo[CLIST_TYPE]=g_strdup(xaccAccountGetTypeStr(xaccAccountGetType(current_acct)));
-      acctinfo[CLIST_DESCRIPTION]=g_strdup(xaccAccountGetDescription(current_acct));
-      if(picker->account_online_id_value!=NULL)/* This is just a speed optimisation, so we don't access the kvp's uselessly*/
-	{
-	  acctinfo[CLIST_ONLINE_ID]=g_strdup(gnc_import_get_acc_online_id(current_acct));
-	}
-      else
-	{
-	  acctinfo[CLIST_ONLINE_ID]=g_strdup("");
-	}
-    //printf("acct_tree_add_acct(): %s%s",xaccAccountGetName(current_acct),"\n");
-      node = gtk_ctree_insert_node (tree,
-				    parent,
-				    NULL,
-				    acctinfo,
-				    2,
-				    NULL,NULL,NULL,NULL,
-				    FALSE,//isleaf
-				    FALSE);
-      gtk_ctree_node_set_row_data     (tree,
-				       node,
-                                       current_acct);
-      if(current_acct==picker->selected_acct)
-	{
-	  gtk_ctree_select(tree,
-			   node);
-	  expand_parent=TRUE;
-	}
-      expand = acct_tree_add_accts(picker, xaccAccountGetChildren(current_acct), tree, node);
-	if(expand)
-	  {
-	    gtk_ctree_expand (tree,
-			      node);
-	    expand_parent=TRUE;
-	  }
-    }
-  return expand_parent;
-}
-
-static void
-build_acct_tree(struct _accountpickerdialog * picker) {
+  /* Build a new account tree */
   TRACE("Begin");
-  
-  if(picker->acct_group==NULL)
-    {
-      PERR("acct_group is NULL");
-    }
-  gtk_clist_freeze (GTK_CLIST(picker->treeview));
-
-  gtk_clist_clear(GTK_CLIST(picker->treeview));
-  /*gtk_clist_set_column_justification (GTK_CLIST(picker->treeview),
-                                      1, GTK_JUSTIFY_CENTER);*/
-
-  acct_tree_add_accts(picker, picker->acct_group,  GTK_CTREE(picker->treeview), NULL);
-  
-
-  gtk_clist_column_titles_passive (GTK_CLIST (picker->treeview));
-  gtk_clist_set_column_auto_resize (GTK_CLIST (picker->treeview),
-				    CLIST_NAME,
-				    TRUE);
-  gtk_clist_set_column_auto_resize (GTK_CLIST (picker->treeview),
-				    CLIST_TYPE,
-				    TRUE);
-  gtk_clist_columns_autosize (GTK_CLIST (picker->treeview));
-  gtk_clist_thaw (GTK_CLIST(picker->treeview));
+  account_tree = gnc_tree_view_account_new(FALSE);
+  picker->account_tree = GNC_TREE_VIEW_ACCOUNT(account_tree);
+  gtk_tree_view_set_headers_visible (account_tree, TRUE);
+
+  /* Add our custom column. */
+  gnc_tree_view_account_add_kvp_column (picker->account_tree,
+					_("Account ID"), "online_id");
+
+  gtk_container_add(GTK_CONTAINER(picker->account_tree_box),
+		    GTK_WIDGET(picker->account_tree));
+
+  /* Configure the columns */
+  gnc_tree_view_configure_columns (GNC_TREE_VIEW(picker->account_tree),
+				   "type", "description", "online_id", NULL);
 }
 
 /* When user clicks to create a new account */
 static void
-gnc_ui_generic_account_picker_new_cb(GtkButton * w, gpointer user_data) {
-  struct _accountpickerdialog * picker = user_data;  
+gnc_import_add_account(struct _accountpickerdialog * picker)
+{
+  Account *selected_account, *new_account;
   GList * valid_types = NULL;
   /*DEBUG("Begin");  */
   
@@ -170,33 +95,12 @@
       /*Yes, this is weird, but we really DO want to pass the value instead of the pointer...*/
      valid_types = g_list_prepend(valid_types, (gpointer)picker->new_account_default_type);
     }
-  picker->selected_acct = gnc_ui_new_accounts_from_name_with_defaults ( picker->account_human_description,
-									valid_types,
-									picker->new_account_default_commodity,
-									picker->selected_acct);
-  build_acct_tree(picker);
-}
-
-static void
-gnc_ui_generic_account_picker_select_cb(GtkCTree   * tree,
-					GtkCTreeNode  * node,
-					gint column,
-					gpointer  user_data) {
-  struct _accountpickerdialog * picker = user_data;
-  TRACE("Begin");
-  gtk_ctree_node_get_row_data(tree, node);
-  picker->selected_acct = gtk_ctree_node_get_row_data(tree, node);
-}
-
-/*Will be called when unselection an account, or when the user clicks cancel*/
-static void
-gnc_ui_generic_account_picker_unselect_cb(GtkCTree   * tree,
-					  GtkCTreeNode  * node,
-					  gint column,
-					  gpointer  user_data) {
-  struct _accountpickerdialog * picker = user_data;
-  TRACE("Begin");
-  picker->selected_acct = NULL;
+  selected_account = gnc_tree_view_account_get_selected_account(picker->account_tree);
+  new_account = gnc_ui_new_accounts_from_name_with_defaults ( picker->account_human_description,
+							      valid_types,
+							      picker->new_account_default_commodity,
+							      selected_account);
+  gnc_tree_view_account_set_selected_account(picker->account_tree, new_account);
 }
 
 static gpointer test_acct_online_id_match(Account *acct, gpointer param_online_id)
@@ -224,29 +128,26 @@
 {
   #define ACCOUNT_DESCRIPTION_MAX_SIZE 255
   struct _accountpickerdialog * picker;
-  gint ui_retval;
+  gint response;
   Account * retval = NULL;
   GladeXML *xml;
-  GtkWidget * online_id_label;
+  GtkWidget * online_id_label, *button;
   gchar account_description_text[ACCOUNT_DESCRIPTION_MAX_SIZE] = "";
-  gboolean ok_pressed_retval;
+  gboolean ok_pressed_retval = FALSE;
 
-  DEBUG("Default commodity received: %s",gnc_commodity_get_fullname( new_account_default_commodity));
+  ENTER("Default commodity received: %s",gnc_commodity_get_fullname( new_account_default_commodity));
   DEBUG("Default account type received: %s",xaccAccountGetTypeStr( new_account_default_type));
   picker = g_new0(struct _accountpickerdialog, 1);
-  picker->acct_group = gnc_get_current_group();
-  g_assert(picker->acct_group);
 
   picker->account_online_id_value = account_online_id_value;
   picker->account_human_description =  account_human_description;
   picker->new_account_default_commodity = new_account_default_commodity;
   picker->new_account_default_type = new_account_default_type;
-  picker->selected_acct=default_selection;
 
   /*DEBUG("Looking for account with online_id: %s", account_online_id_value);*/
   if(account_online_id_value!=NULL)
     {
-      retval = xaccGroupForEachAccount(picker->acct_group,
+      retval = xaccGroupForEachAccount(gnc_get_current_group (),
 				       test_acct_online_id_match,
 				       account_online_id_value,
 				       TRUE);
@@ -261,49 +162,56 @@
 	  PERR("Error opening the glade interface");
 	}
       
-      glade_xml_signal_connect_data(xml, "gnc_ui_generic_account_picker_new_cb", GTK_SIGNAL_FUNC (gnc_ui_generic_account_picker_new_cb), picker);
-      glade_xml_signal_connect_data(xml, "gnc_ui_generic_account_picker_select_cb", GTK_SIGNAL_FUNC(gnc_ui_generic_account_picker_select_cb), picker);
-      glade_xml_signal_connect_data(xml, "gnc_ui_generic_account_picker_unselect_cb", GTK_SIGNAL_FUNC(gnc_ui_generic_account_picker_unselect_cb), picker);      
       picker->dialog     = glade_xml_get_widget (xml, "Generic Import Account Picker");
-      picker->treeview   = glade_xml_get_widget (xml, "account_tree");
+      picker->account_tree_box   = glade_xml_get_widget (xml, "account_tree_box");
       online_id_label = glade_xml_get_widget (xml, "online_id_label");
-      
+      button = glade_xml_get_widget (xml, "newbutton");
+      gtk_button_set_use_stock (GTK_BUTTON(button), TRUE);
+
       //printf("gnc_import_select_account(): Fin get widget\n");
 
       if(account_human_description!=NULL)
 	{
-	  strncat(account_description_text, account_human_description, ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
-	  strncat(account_description_text, "\n", ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
+	  strncat(account_description_text, account_human_description,
+		  ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
+	  strncat(account_description_text, "\n",
+		  ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
 	}
       if(account_online_id_value!=NULL)
 	{
-	  strncat(account_description_text,_("(Full account ID: "), ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
-	  strncat(account_description_text, account_online_id_value, ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
-	  strncat(account_description_text, ")", ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
-	}
-      else
-	{
-	  gtk_clist_set_column_visibility (GTK_CLIST (picker->treeview),
-					   CLIST_ONLINE_ID,
-					   FALSE);
+	  strncat(account_description_text,_("(Full account ID: "),
+		  ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
+	  strncat(account_description_text, account_online_id_value,
+		  ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
+	  strncat(account_description_text, ")",
+		  ACCOUNT_DESCRIPTION_MAX_SIZE-strlen(account_description_text));
 	}
       gtk_label_set_text((GtkLabel*)online_id_label, account_description_text);
       build_acct_tree(picker);
+      gnc_tree_view_account_set_selected_account(picker->account_tree, default_selection);
 
-      ui_retval = gnome_dialog_run_and_close(GNOME_DIALOG(picker->dialog));  
-
-      if(ui_retval == 0) {
-	if( account_online_id_value != NULL)
-	  {
-	    gnc_import_set_acc_online_id(picker->selected_acct, account_online_id_value);
-	  }
-	ok_pressed_retval=TRUE;
-	retval=picker->selected_acct;
-      }
-      else {
-	ok_pressed_retval=FALSE;
-	retval=NULL;
-      }
+      gtk_window_set_modal(GTK_WINDOW(picker->dialog), TRUE);
+      do {
+	response = gtk_dialog_run(GTK_DIALOG(picker->dialog));
+	switch (response) {
+	 case GTK_RESPONSE_OK:
+	  retval = gnc_tree_view_account_get_selected_account(picker->account_tree);
+	  DEBUG("Selected account %p, %s", retval, xaccAccountGetName(retval));
+	  if( account_online_id_value != NULL)
+	    {
+	      gnc_import_set_acc_online_id(retval, account_online_id_value);
+	    }
+	  ok_pressed_retval=TRUE;
+	  break;
+	 case GNC_RESPONSE_NEW:
+	  gnc_import_add_account(picker);
+	  break;
+	 default:
+	  ok_pressed_retval=FALSE;
+	  break;
+	}
+      } while (response == GNC_RESPONSE_NEW);
+      gtk_widget_destroy(picker->dialog);
     }
   else
     {
@@ -316,6 +224,7 @@
     {
       *ok_pressed=ok_pressed_retval;
     }
+  LEAVE("Selected account %p, %s", retval, xaccAccountGetName(retval));
   return retval;
 }
 /**@}*/
Index: generic-import.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/generic-import.glade,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/import-export/generic-import.glade -Lsrc/import-export/generic-import.glade -u -r1.19 -r1.20
--- src/import-export/generic-import.glade
+++ src/import-export/generic-import.glade
@@ -1,1231 +1,1532 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>generic-import</name>
-  <program_name>Gnucash</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Generic Import Account Picker</name>
-  <signal>
-    <name>map</name>
-    <handler>gnc_ui_generic_account_picker_map_cb</handler>
-    <last_modification_time>Fri, 07 Jun 2002 17:35:27 GMT</last_modification_time>
-  </signal>
-  <title>Select Account</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>800</default_width>
-  <default_height>600</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-    <child>
-      <padding>1</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox1</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button2</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkLabel</class>
-      <name>label847715</name>
-      <label>Please select or create an appropriate Gnucash account for:</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+<widget class="GtkDialog" id="Generic Import Account Picker">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select Account</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">800</property>
+  <property name="default_height">600</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="map" handler="gnc_ui_generic_account_picker_map_cb"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="newbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">gnc-new-account</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkLabel</class>
-      <name>online_id_label</name>
-      <label>Online account ID here...</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkLabel" id="label847715">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Please select or create an appropriate Gnucash account for:</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame1</name>
-      <label></label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow24</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	<widget>
-	  <class>GtkCTree</class>
-	  <name>account_tree</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>tree_select_row</name>
-	    <handler>gnc_ui_generic_account_picker_select_cb</handler>
-	    <last_modification_time>Fri, 07 Jun 2002 17:33:51 GMT</last_modification_time>
-	  </signal>
-	  <signal>
-	    <name>tree_unselect_row</name>
-	    <handler>gnc_ui_generic_account_picker_unselect_cb</handler>
-	    <last_modification_time>Fri, 07 Jun 2002 17:34:00 GMT</last_modification_time>
-	  </signal>
-	  <columns>4</columns>
-	  <column_widths>215,48,82,80</column_widths>
-	  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CTree:title</child_name>
-	    <name>label847711</name>
-	    <label>Account</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CTree:title</child_name>
-	    <name>label847712</name>
-	    <label>Type</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CTree:title</child_name>
-	    <name>label847713</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CTree:title</child_name>
-	    <name>label847785</name>
-	    <label>Account ID</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
+	<widget class="GtkLabel" id="online_id_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Online account ID here...</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkButton</class>
-      <name>button78</name>
-      <can_focus>True</can_focus>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_ui_generic_account_picker_new_cb</handler>
-	<data>QIF_Import_Account_Picker</data>
-	<last_modification_time>Fri, 07 Jun 2002 17:30:20 GMT</last_modification_time>
-      </signal>
-      <label>New Account (child of selected) ...</label>
-      <relief>GTK_RELIEF_NORMAL</relief>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkFrame" id="frame1">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkHBox" id="account_tree_box">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<placeholder/>
+	      </child>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>transaction_matcher</name>
-  <signal>
-    <name>close</name>
-    <handler>on_matcher_cancel_clicked</handler>
-    <last_modification_time>Sat, 24 Aug 2002 01:53:49 GMT</last_modification_time>
-  </signal>
-  <title>Generic import transaction matcher</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <default_width>1000</default_width>
-  <default_height>600</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>matcher_ok</name>
-	<can_default>True</can_default>
-	<has_default>True</has_default>
-	<can_focus>True</can_focus>
-	<has_focus>True</has_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>on_matcher_ok_clicked</handler>
-	  <last_modification_time>Sat, 24 Aug 2002 01:08:51 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>matcher_cancel</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>on_matcher_cancel_clicked</handler>
-	  <last_modification_time>Sat, 24 Aug 2002 01:09:11 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="transaction_matcher">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Generic import transaction matcher</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">800</property>
+  <property name="default_height">600</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="close" handler="on_matcher_cancel_clicked"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="matcher_cancel">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="on_matcher_cancel_clicked"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="matcher_ok">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_matcher_ok_clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox3</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>heading_label</name>
-	<label>List of downloaded transactions (source split shown):</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow25</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>downloaded_clist</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>select_row</name>
-	    <handler>downloaded_transaction_select_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 01:37:44 GMT</last_modification_time>
-	  </signal>
-	  <signal>
-	    <name>unselect_row</name>
-	    <handler>downloaded_transaction_unselect_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 02:05:02 GMT</last_modification_time>
-	  </signal>
-	  <columns>9</columns>
-	  <column_widths>67,89,49,109,43,58,32,29,34</column_widths>
-	  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847716</name>
-	    <label>Date</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847717</name>
-	    <label>Account</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847718</name>
-	    <label>Amount</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847719</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847720</name>
-	    <label>Memo</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847786</name>
-	    <label>A</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847787</name>
-	    <label>R</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847788</name>
-	    <label>EDIT</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847789</name>
-	    <label>Select Import Action</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>quick_instructions</name>
-	<label>-Red transactions require your intervention or they will NOT be imported.
+	<widget class="GtkVBox" id="vbox3">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="heading_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">List of downloaded transactions (source split shown):</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow25">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkCList" id="downloaded_clist">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_columns">9</property>
+		  <property name="column_widths">67,89,49,109,43,58,32,29,34</property>
+		  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <signal name="select_row" handler="downloaded_transaction_select_cb"/>
+		  <signal name="unselect_row" handler="downloaded_transaction_unselect_cb"/>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847716">
+		      <property name="label" translatable="yes">Date</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847717">
+		      <property name="label" translatable="yes">Account</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847718">
+		      <property name="label" translatable="yes">Amount</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847719">
+		      <property name="label" translatable="yes">Description</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847720">
+		      <property name="label" translatable="yes">Memo</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847721">
+		      <property name="label" translatable="yes">A</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847722">
+		      <property name="label" translatable="yes">R</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847723">
+		      <property name="label" translatable="yes">EDIT</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847724">
+		      <property name="label" translatable="yes">Select Import Action</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="quick_instructions">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">-Red transactions require your intervention or they will NOT be imported.
 -Yellow transactions probably require your intervention or they will be imported unbalanced.
 -Green transactions will be imported balanced (you may still want to double check the match or destination account).
 
 -Select &quot;A&quot; to Add the transaction as new
 -Select &quot;R&quot; to Reconcile a matching transaction
 -Select neither to Skip (The transaction won't be imported at all)
--&quot;Select Import Action&quot; allows you to change the matching transaction to reconcile, or the destination account of the auto-balance split (if required).</label>
-	<justify>GTK_JUSTIFY_FILL</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<focus_target>matcher_ok</focus_target>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
+-&quot;Select Import Action&quot; allows you to change the matching transaction to reconcile, or the destination account of the auto-balance split (if required).</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_FILL</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="mnemonic_widget">matcher_ok</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>transaction_list_dialog</name>
-  <signal>
-    <name>close</name>
-    <handler>on_matcher_cancel_clicked</handler>
-    <last_modification_time>Sat, 24 Aug 2002 01:53:49 GMT</last_modification_time>
-  </signal>
-  <title>Generic import transaction matcher</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>False</modal>
-  <default_width>800</default_width>
-  <default_height>600</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>True</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area3</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>on_matcher_ok_clicked</handler>
-	  <last_modification_time>Sat, 24 Aug 2002 01:09:11 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<signal>
-	  <name>clicked</name>
-	  <handler>on_matcher_cancel_clicked</handler>
-	  <last_modification_time>Sat, 24 Aug 2002 01:09:11 GMT</last_modification_time>
-	</signal>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="transaction_list_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Generic import transaction matcher</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">800</property>
+  <property name="default_height">600</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+  <signal name="close" handler="on_matcher_cancel_clicked"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area3">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="on_matcher_cancel_clicked"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_matcher_ok_clicked"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox6</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>heading_label</name>
-	<label>List of downloaded transactions (source split shown):</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow28</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>downloaded_clist</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>select_row</name>
-	    <handler>downloaded_transaction_select_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 01:37:44 GMT</last_modification_time>
-	  </signal>
-	  <signal>
-	    <name>unselect_row</name>
-	    <handler>downloaded_transaction_unselect_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 02:05:02 GMT</last_modification_time>
-	  </signal>
-	  <columns>7</columns>
-	  <column_widths>60,160,60,30,120,210,60</column_widths>
-	  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847761</name>
-	    <label>Date</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847748</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847749</name>
-	    <label>Amount</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847750</name>
-	    <label>New?</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847751</name>
-	    <label>Duplicate Transaction</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847752</name>
-	    <label>Other Account</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847352</name>
-	    <label>Amount</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>explanation_label</name>
-	<label>For a new transaction, click on the &quot;Other Account&quot; entry to choose the other (destination) account of this transaction.
+	<widget class="GtkVBox" id="vbox6">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="heading_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">List of downloaded transactions (source split shown):</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow28">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkCList" id="downloaded_clist">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_columns">7</property>
+		  <property name="column_widths">60,160,60,30,120,210,60</property>
+		  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <signal name="select_row" handler="downloaded_transaction_select_cb"/>
+		  <signal name="unselect_row" handler="downloaded_transaction_unselect_cb"/>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847761">
+		      <property name="label" translatable="yes">Date</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847762">
+		      <property name="label" translatable="yes">Description</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847763">
+		      <property name="label" translatable="yes">Amount</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847764">
+		      <property name="label" translatable="yes">New?</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847765">
+		      <property name="label" translatable="yes">Duplicate Transaction</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847766">
+		      <property name="label" translatable="yes">Other Account</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847767">
+		      <property name="label" translatable="yes">Amount</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="explanation_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">For a new transaction, click on the &quot;Other Account&quot; entry to choose the other (destination) account of this transaction.
 For a transaction that is a duplicate of an existing one, click on the &quot;Other Account&quot; or &quot;Description&quot; entry to 
 check whether GnuCash chose the right existing transaction.
 To switch transactions between both states, click on the checkmark in the &quot;New&quot; column.
 When all new transactions have the correct destination account and all duplicates are matched with the right existing transaction, 
-click &quot;Ok&quot;.</label>
-	<justify>GTK_JUSTIFY_LEFT</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
+click &quot;Ok&quot;.</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>match_picker</name>
-  <title>Select matching existing transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>800</default_width>
-  <default_height>600</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox3</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area4</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
+<widget class="GtkDialog" id="match_picker">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select matching existing transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">800</property>
+  <property name="default_height">600</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
+	<widget class="GtkVBox" id="vbox7">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847772">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Imported transaction's first split:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow30">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkCList" id="downloaded_clist">
+		  <property name="visible">True</property>
+		  <property name="n_columns">6</property>
+		  <property name="column_widths">80,80,80,80,80,80</property>
+		  <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <signal name="select_row" handler="downloaded_transaction_select_cb"/>
+		  <signal name="unselect_row" handler="downloaded_transaction_unselect_cb"/>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847779">
+		      <property name="label" translatable="yes">Account</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847780">
+		      <property name="label" translatable="yes">Date</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847781">
+		      <property name="label" translatable="yes">Amount</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847782">
+		      <property name="label" translatable="yes">Description</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847783">
+		      <property name="label" translatable="yes">Memo</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847784">
+		      <property name="label" translatable="yes">Imbalance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847766">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Potential splits matching the selected transaction: </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow29">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+	      <child>
+		<widget class="GtkCList" id="matched_clist">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_columns">5</property>
+		  <property name="column_widths">80,80,80,80,80</property>
+		  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <signal name="select_row" handler="match_transaction_select_cb"/>
+		  <signal name="unselect_row" handler="match_transaction_unselect_cb"/>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847767">
+		      <property name="label" translatable="yes">Confidence</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847768">
+		      <property name="label" translatable="yes">Date</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847769">
+		      <property name="label" translatable="yes">Amount</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847770">
+		      <property name="label" translatable="yes">Description</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847771">
+		      <property name="label" translatable="yes">Memo</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="format_picker">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Choose a format</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">True</property>
+  <property name="resizable">False</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area5">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="okbutton1">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox7</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847772</name>
-	<label>Imported transaction's first split:</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow30</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>downloaded_clist</name>
-	  <signal>
-	    <name>select_row</name>
-	    <handler>downloaded_transaction_select_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 01:37:44 GMT</last_modification_time>
-	  </signal>
-	  <signal>
-	    <name>unselect_row</name>
-	    <handler>downloaded_transaction_unselect_cb</handler>
-	    <last_modification_time>Thu, 22 Aug 2002 02:05:02 GMT</last_modification_time>
-	  </signal>
-	  <columns>6</columns>
-	  <column_widths>80,80,80,80,80,80</column_widths>
-	  <selection_mode>GTK_SELECTION_BROWSE</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847779</name>
-	    <label>Account</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847780</name>
-	    <label>Date</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847781</name>
-	    <label>Amount</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847782</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847783</name>
-	    <label>Memo</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847784</name>
-	    <label>Imbalance</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>label847766</name>
-	<label>Potential splits matching the selected transaction: </label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow29</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>matched_clist</name>
-	  <can_focus>True</can_focus>
-	  <signal>
-	    <name>select_row</name>
-	    <handler>match_transaction_select_cb</handler>
-	    <last_modification_time>Fri, 23 Aug 2002 00:41:39 GMT</last_modification_time>
-	  </signal>
-	  <signal>
-	    <name>unselect_row</name>
-	    <handler>match_transaction_unselect_cb</handler>
-	    <last_modification_time>Fri, 23 Aug 2002 00:41:59 GMT</last_modification_time>
-	  </signal>
-	  <columns>5</columns>
-	  <column_widths>80,80,80,80,80</column_widths>
-	  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	  <show_titles>True</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847767</name>
-	    <label>Confidence</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847768</name>
-	    <label>Date</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847769</name>
-	    <label>Amount</label>
-	    <justify>GTK_JUSTIFY_RIGHT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847770</name>
-	    <label>Description</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label847771</name>
-	    <label>Memo</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
+	<widget class="GtkFrame" id="frame2">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkVBox" id="vbox8">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">15</property>
+
+	      <child>
+		<widget class="GtkLabel" id="msg_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">do not translate</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">True</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox1">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">3</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847775">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Format:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_RIGHT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="menu_box">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<placeholder/>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label847773">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Choose a format</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>format_picker</name>
-  <title>Choose a format</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_CENTER</position>
-  <modal>True</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox4</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area5</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
+<widget class="GtkWindow" id="Preferences">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Preferences</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkTable" id="matcher_prefs">
+      <property name="visible">True</property>
+      <property name="n_rows">9</property>
+      <property name="n_columns">4</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<widget class="GtkCheckButton" id="gconf/dialogs/import/generic_matcher/enable_skip">
+	  <property name="tooltip" translatable="yes">Enable the SKIP action in the transaction matcher.  If enabled, a transaction whose best match's score is in the yellow zone (above the Auto-ADD threshold but below the Auto-CLEAR threshold) will be SKIPed by default.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Enable skip transaction action</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button79</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-    </widget>
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/import/generic_matcher/enable_edit">
+	  <property name="tooltip" translatable="yes">Enable the EDIT action in the transaction matcher.  NOT YET SUPPORTED</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Enable edit match action</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">2</property>
+	  <property name="bottom_attach">3</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame2</name>
-      <label>Choose a format</label>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkVBox</class>
-	<name>vbox8</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>15</spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>msg_label</name>
-	  <label>do not translate</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>True</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox1</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>3</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label847791</name>
-	    <label>Format:</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>menu_box</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
+	<widget class="GtkLabel" id="label847785">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;Generic Importer&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
 
-	    <widget>
-	      <class>Placeholder</class>
-	    </widget>
-	  </widget>
+      <child>
+	<widget class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/atm_fee_threshold">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">In some places commercial ATMs (not belonging to a financial institution) are installed in places like convienience store.  These ATM add its fee directly to the amount instead of showing up as a separate transaction or in your monthly banking fees.  For example, you withdraw 100$, and you are charged 101,50$ plus Interac fees.  If you manually entered that 100$, the amounts won't match.  You should set this to whatever is the maximum such fee in your area (in units of your local currency), so the transaction will be recognised as a match.</property>
+	  <property name="can_focus">True</property>
+	  <property name="climb_rate">1</property>
+	  <property name="digits">2</property>
+	  <property name="numeric">False</property>
+	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	  <property name="snap_to_ticks">False</property>
+	  <property name="wrap">False</property>
+	  <property name="adjustment">2 0 1000 0.01 1 1</property>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_options"></property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_clear_threshold">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">A transaction whose best match's score is in the green zone (above or equal to the Auto-CLEAR threshold) will be CLEARed by default.</property>
+	  <property name="can_focus">True</property>
+	  <property name="climb_rate">1</property>
+	  <property name="digits">0</property>
+	  <property name="numeric">False</property>
+	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	  <property name="snap_to_ticks">False</property>
+	  <property name="wrap">False</property>
+	  <property name="adjustment">1 6 12 1 10 10</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/auto_add_threshold">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">A transaction whose best match's score is in the red zone (above the display threshold but below or equal to the Auto-ADD threshold) will be ADDed by default.</property>
+	  <property name="can_focus">True</property>
+	  <property name="climb_rate">1</property>
+	  <property name="digits">0</property>
+	  <property name="numeric">False</property>
+	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	  <property name="snap_to_ticks">False</property>
+	  <property name="wrap">False</property>
+	  <property name="adjustment">1 1 6 1 10 10</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkSpinButton" id="gconf/dialogs/import/generic_matcher/match_threshold">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">The minimum score a potential match must have to be displayed in the match list.</property>
+	  <property name="can_focus">True</property>
+	  <property name="climb_rate">1</property>
+	  <property name="digits">0</property>
+	  <property name="numeric">True</property>
+	  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	  <property name="snap_to_ticks">False</property>
+	  <property name="wrap">False</property>
+	  <property name="adjustment">1 0 6 1 10 10</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">1</property>
+	  <property name="right_attach">2</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label847789">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Commercial atm fees threshold</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">7</property>
+	  <property name="bottom_attach">8</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label847788">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Auto-clear threshold</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">6</property>
+	  <property name="bottom_attach">7</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label847787">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Auto-_add threshold</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/auto_add_threshold</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">5</property>
+	  <property name="bottom_attach">6</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="label847786">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Match _display threshold</property>
+	  <property name="use_underline">True</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="mnemonic_widget">gconf/dialogs/import/generic_matcher/match_threshold</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">4</property>
+	  <property name="bottom_attach">5</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/import/generic_matcher/use_bayes">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Use bayesian algorithms to match new transactions with existing accounts.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Use bayesian matching</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">3</property>
+	  <property name="bottom_attach">4</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: import-settings.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-settings.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/import-export/import-settings.c -Lsrc/import-export/import-settings.c -u -r1.7 -r1.8
--- src/import-export/import-settings.c
+++ src/import-export/import-settings.c
@@ -30,32 +30,16 @@
 
 #include <glib.h>
 #include "dialog-utils.h"
-#include "global-options.h"
 #include "import-settings.h"
+#include "gnc-gconf-utils.h"
 
 /********************************************************************\
  * Default values for user prefs (or values for unimplemented prefs.*
  * If you modify the value of any of these, you must do the same in *
  * generic-import.scm                                               *
 \********************************************************************/
-#define MATCHER_PREF_PAGE _("Online Banking & Importing")
+#define GCONF_SECTION "dialogs/import/generic_matcher"
 
-/** Transaction who's best match probability is equal or higher than
-   this will reconcile their best match by default */
-#define DEFAULT_CLEAR_THRESHOLD 6
-/** Transaction who's best match probability is below or equal to 
-   this will be added as new by default */
-#define DEFAULT_ADD_THRESHOLD 3
-/** Transaction's match probability must be at least this much to be
-   displayed in the match list.  Dont set this to 0 except for 
-   debugging purposes, otherwise all transactions of every accounts 
-   will be shown in the list */
-#define DEFAULT_DISPLAY_THRESHOLD 1
-
-#define DEFAULT_ATM_FEE_THRESHOLD 2.00
-
-static const int DEFAULT_ACTION_SKIP_ENABLED = TRUE;
-static const int DEFAULT_ACTION_EDIT_ENABLED = FALSE;
 static const int DEFAULT_ACTION_ADD_ENABLED = TRUE;
 static const int DEFAULT_ACTION_CLEAR_ENABLED = TRUE;
 
@@ -101,28 +85,20 @@
 
   
   settings->action_skip_enabled = 
-    gnc_lookup_boolean_option(MATCHER_PREF_PAGE,
-			      "Enable SKIP transaction action",
-			      DEFAULT_ACTION_SKIP_ENABLED);
+    gnc_gconf_get_bool(GCONF_SECTION, "enable_skip", NULL);
   settings->action_edit_enabled =
-    gnc_lookup_boolean_option(MATCHER_PREF_PAGE,
-			      "Enable EDIT match action",
-			      DEFAULT_ACTION_EDIT_ENABLED);
+    gnc_gconf_get_bool(GCONF_SECTION, "enable_edit", NULL);
   settings->action_add_enabled=DEFAULT_ACTION_ADD_ENABLED;
   settings->action_clear_enabled=DEFAULT_ACTION_CLEAR_ENABLED;
-  settings->clear_threshold=gnc_lookup_number_option(MATCHER_PREF_PAGE,
-						     "Auto-CLEAR threshold",
-						     DEFAULT_CLEAR_THRESHOLD);
-  settings->add_threshold=gnc_lookup_number_option(MATCHER_PREF_PAGE,
-						   "Auto-ADD threshold",
-						   DEFAULT_ADD_THRESHOLD);
+  settings->clear_threshold=
+    gnc_gconf_get_float(GCONF_SECTION, "auto_clear_threshold", NULL);
+  settings->add_threshold=
+    gnc_gconf_get_float(GCONF_SECTION, "auto_add_threshold", NULL);
   settings->display_threshold =
-    gnc_lookup_number_option(MATCHER_PREF_PAGE,"Match display threshold",
-			     DEFAULT_DISPLAY_THRESHOLD);
+    gnc_gconf_get_float(GCONF_SECTION, "match_threshold", NULL);
 
   settings->fuzzy_amount =
-    gnc_lookup_number_option(MATCHER_PREF_PAGE,"Commercial ATM fees threshold",
-			     DEFAULT_ATM_FEE_THRESHOLD);
+    gnc_gconf_get_float(GCONF_SECTION, "atm_fee_threshold", NULL);
 
   settings->match_date_hardlimit = 42; /* 6 weeks */
   return settings;
Index: import-settings.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-settings.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/import-settings.h -Lsrc/import-export/import-settings.h -u -r1.3 -r1.4
--- src/import-export/import-settings.h
+++ src/import-export/import-settings.h
@@ -38,16 +38,7 @@
 
 /** Allocates a new GNCImportSettings object, and initialize it with
  *    the appropriate user prefs.
- *
- * @param match_date_hardlimit The number of days that a matching
- * split may differ from the given transaction before it is discarded
- * immediately. In other words, any split that is more distant from
- * the given transaction than this match_date_hardlimit days will be
- * ignored altogether. For use cases without paper checks (e.g. HBCI),
- * values like 14 (days) might be appropriate, whereas for use cases
- * with paper checks (e.g. OFX, QIF), values like 42 (days) seem more
- * appropriate. 
-*/
+ */
 GNCImportSettings * 
 gnc_import_Settings_new (void);
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/import-export/.cvsignore -Lsrc/import-export/.cvsignore -u -r1.5 -r1.6
--- src/import-export/.cvsignore
+++ src/import-export/.cvsignore
@@ -1,3 +1,4 @@
+*.gladep
 *.la
 *.lo
 .deps
Index: import-parse.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-parse.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/import-parse.c -Lsrc/import-export/import-parse.c -u -r1.2 -r1.3
--- src/import-export/import-parse.c
+++ src/import-export/import-parse.c
@@ -35,12 +35,12 @@
 #include <sys/types.h>
 #include <regex.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 #include "import-parse.h"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /* numeric regular expressions */
 static regex_t decimal_radix_regex;
Index: gncmod-generic-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/gncmod-generic-import.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/import-export/gncmod-generic-import.c -Lsrc/import-export/gncmod-generic-import.c -u -r1.8 -r1.9
--- src/import-export/gncmod-generic-import.c
+++ src/import-export/gncmod-generic-import.c
@@ -8,6 +8,9 @@
 #include <glib.h>
 #include <libguile.h>
 
+#include "gnc-import-format-gnome.h"
+#include "dialog-preferences.h"
+
 #include "gnc-module.h"
 #include "gnc-module-api.h"
 /* version of the gnc module system interface we require */
@@ -52,7 +55,14 @@
   {
     return FALSE;
   }
-  scm_c_eval_string("(load-from-path \"generic-import/generic-import.scm\")");
+
+  if (!refcount) {
+    gnc_import_format_gnome_register();
+    gnc_preferences_add_to_page("generic-import.glade", "matcher_prefs",
+				"Online Banking");
+
+  }
+
   return TRUE;
 }
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/Makefile.am,v
retrieving revision 1.31
retrieving revision 1.32
diff -Lsrc/import-export/Makefile.am -Lsrc/import-export/Makefile.am -u -r1.31 -r1.32
--- src/import-export/Makefile.am
+++ src/import-export/Makefile.am
@@ -1,5 +1,5 @@
-SUBDIRS = .  binary-import qif qif-import ${OFX_DIR} ${HBCI_DIR} ${MT940_DIR} log-replay test
-DIST_SUBDIRS = binary-import qif qif-import qif-io-core ofx hbci mt940 log-replay test
+SUBDIRS = . schemas binary-import qif qif-import ${OFX_DIR} ${HBCI_DIR} ${MT940_DIR} log-replay test
+DIST_SUBDIRS = schemas binary-import qif qif-import qif-io-core ofx hbci mt940 log-replay test
 
 pkglib_LTLIBRARIES=libgncmod-generic-import.la
 
@@ -14,11 +14,16 @@
 	import-settings.c \
 	import-match-map.c \
 	import-main-matcher.c \
+	gnc-import-desc-format.c \
+	gnc-import-format-cb.c \
+	gnc-import-format-gnome.c \
 	gncmod-generic-import.c
 
 gncincludedir = ${GNC_INCLUDE_DIR}
 gncinclude_HEADERS = \
   import-match-map.h \
+  gnc-import-desc-format.h \
+  gnc-import-format-cb.h \
   import-parse.h
 
 noinst_HEADERS = \
@@ -29,46 +34,43 @@
   import-match-map.h \
   import-match-picker.h \
   import-settings.h \
-  import-utilities.h 
-
-libgncmod_generic_import_la_LDFLAGS = -module
+  import-utilities.h \
+  gnc-import-format-gnome.h
 
 libgncmod_generic_import_la_LIBADD = \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
-  ${top_builddir}/src/app-file/libgncmod-app-file.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/register/ledger-core/libgncmod-ledger-core.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${GLADE_LIBS} \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
-gncscmdir = ${GNC_SCM_INSTALL_DIR}/generic-import
-
-gncscm_DATA = \
-	generic-import.scm
-
 gladedir = ${GNC_GLADE_DIR}
-glade_DATA = generic-import.glade
+glade_DATA = \
+  generic-import.glade \
+  import-provider-format.glade
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
   ${G_WRAP_COMPILE_ARGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 EXTRA_DIST = \
   $(glade_DATA) \
-  ${gncscm_DATA} \
   .cvsignore \
   generic-import-design.txt
 
Index: import-commodity-matcher.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-commodity-matcher.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/import-export/import-commodity-matcher.c -Lsrc/import-export/import-commodity-matcher.c -u -r1.5 -r1.6
--- src/import-export/import-commodity-matcher.c
+++ src/import-export/import-commodity-matcher.c
@@ -41,7 +41,7 @@
 #include "dialog-commodity.h"
 #include "dialog-utils.h"
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "gnc-ui-util.h"
 
@@ -54,7 +54,7 @@
  *   Constants, should ideally be defined a user preference dialog    *
 \********************************************************************/
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 
 
Index: import-format-dialog.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-format-dialog.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/import-format-dialog.c -Lsrc/import-export/import-format-dialog.c -u -r1.2 -r1.3
--- src/import-export/import-format-dialog.c
+++ src/import-export/import-format-dialog.c
@@ -107,7 +107,9 @@
   gtk_box_pack_start(GTK_BOX(menu_box), menu, TRUE, TRUE, 0);
 
   gtk_widget_show_all(dialog);
-  gnome_dialog_run_and_close(GNOME_DIALOG(dialog));
+  gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
+  gtk_dialog_run(GTK_DIALOG(dialog));
+  gtk_widget_destroy(dialog);
 
   return formats[index];
 }
Index: import-main-matcher.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/import-main-matcher.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/import-main-matcher.h -Lsrc/import-export/import-main-matcher.h -u -r1.4 -r1.5
--- src/import-export/import-main-matcher.h
+++ src/import-export/import-main-matcher.h
@@ -60,14 +60,15 @@
 /** Deletes the given object. */
 void gnc_gen_trans_list_delete (GNCImportMainMatcher *info);
 
-/** Add a newly imported Transaction to the Transaction Importer.
+/** Add a newly imported Transaction to the Transaction Importer. The Importer takes over ownership of the passed transaction.
  *
  * @param gui The Transaction Importer to use.
  *
  * @param trans The Transaction to add.  The must contain at least one
  * split, and this split must have been associated with an account
  * Only the first split will be used for matching.  The transaction
- * must NOT be commited.
+ * must NOT be commited. The Importer takes over ownership of the
+ * passed transaction.
  */
 void gnc_gen_trans_list_add_trans(GNCImportMainMatcher *gui, Transaction *trans);
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/binary-import/.cvsignore -Lsrc/import-export/binary-import/.cvsignore -u -r1.3 -r1.4
--- src/import-export/binary-import/.cvsignore
+++ src/import-export/binary-import/.cvsignore
@@ -3,6 +3,7 @@
 .deps
 .libs
 *.diff
+*.gladep
 *.lo
 *.la
 .scm-links
Index: druid-commodity.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/druid-commodity.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/binary-import/druid-commodity.h -Lsrc/import-export/binary-import/druid-commodity.h -u -r1.2 -r1.3
--- src/import-export/binary-import/druid-commodity.h
+++ src/import-export/binary-import/druid-commodity.h
@@ -32,6 +32,7 @@
 
 #include "gnc-commodity.h"
 #include "gnc-engine.h"
+#include "qofsession.h"
 
 typedef struct _commoditydruid CommodityDruid;
 
@@ -42,5 +43,8 @@
 /* invoke import druid modally */
 void            gnc_import_legacy_commodities(const char * filename);
 
+/* book-opened callback hook */
+void gnc_import_commodities(QofSession *session, gpointer data);
+
 #endif
 
Index: druid-commodity.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/druid-commodity.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/import-export/binary-import/druid-commodity.c -Lsrc/import-export/binary-import/druid-commodity.c -u -r1.15 -r1.16
--- src/import-export/binary-import/druid-commodity.c
+++ src/import-export/binary-import/druid-commodity.c
@@ -35,9 +35,7 @@
 #include "dialog-utils.h"
 #include "druid-commodity.h"
 #include "druid-utils.h"
-#include "gnc-book.h"
 #include "gnc-commodity.h"
-#include "gnc-engine-util.h"
 #include "gnc-engine.h"
 #include "gnc-file.h"
 #include "gnc-gui-query.h"
@@ -46,7 +44,7 @@
 #include "gnc-ui.h"
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
+static QofLogModule log_module = GNC_MOD_GUI;
 
 struct _commoditydruid {
   GtkWidget  * window; 
@@ -140,6 +138,7 @@
   CommodityDruidPage * new_page;
   GnomeDruidPage * back_page;
   GladeXML       * xml;
+  QofBook        * book = gnc_get_current_book ();
 
   xml = gnc_glade_xml_new ("binary-import.glade",
                            "New Commodity Format Druid");
@@ -184,7 +183,7 @@
 
     /* otherwise, guess that it's a NASDAQ security. */
     if(!found) {
-      found = gnc_commodity_new(gnc_commodity_get_mnemonic(lost),
+      found = gnc_commodity_new(book, gnc_commodity_get_mnemonic(lost),
                                 GNC_COMMODITY_NS_NASDAQ,
                                 gnc_commodity_get_mnemonic(lost),
                                 NULL, 100000);
@@ -245,7 +244,7 @@
   GnomeDruidPageStandard * page;
 
   /* make the page widget */
-  retval->page = gnome_druid_page_standard_new_with_vals("", NULL);
+  retval->page = gnome_druid_page_standard_new_with_vals("", NULL, NULL);
   gtk_object_set_data(GTK_OBJECT(retval->page), "page_struct", retval);
 
   page = GNOME_DRUID_PAGE_STANDARD(retval->page);
@@ -401,8 +400,8 @@
     (CommodityDruidPage *)gtk_object_get_data(GTK_OBJECT(page),
                                               "page_struct");
   const char * new_type;
-  char * new_name;
-  char * new_mnemonic;
+  const char * new_name;
+  const char * new_mnemonic;
   gnc_commodity * new_comm;
 
   new_type     = gnc_ui_namespace_picker_ns (dpage->new_type_combo);
@@ -506,3 +505,12 @@
   /* destroy the dialog */
   gnc_ui_commodity_druid_destroy(cd);
 }
+
+
+void gnc_import_commodities(QofSession *session, gpointer unused)
+{
+  const gchar *book_url;
+
+  book_url = qof_session_get_url(session);
+  gnc_import_legacy_commodities(book_url);
+}
Index: binary-import.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/binary-import.glade,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/binary-import/binary-import.glade -Lsrc/import-export/binary-import/binary-import.glade -u -r1.1 -r1.2
--- src/import-export/binary-import/binary-import.glade
+++ src/import-export/binary-import/binary-import.glade
@@ -1,47 +1,35 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>New Commodity Format Druid</name>
-  <title>Import currency and stock information</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>commodity_druid</name>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start_page</name>
-      <signal>
-	<name>cancel</name>
-	<handler>gnc_ui_commodity_druid_cancel_cb</handler>
-	<data>New_Commodity_Format_Druid</data>
-	<last_modification_time>Fri, 11 Aug 2000 21:12:16 GMT</last_modification_time>
-      </signal>
-      <title>Import currency and stock information </title>
-      <text>The file you are loading is from an older version of GnuCash. 
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="New Commodity Format Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Import currency and stock information</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="commodity_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Import currency and stock information </property>
+	  <property name="text" translatable="yes">The file you are loading is from an older version of GnuCash. 
 Information about currencies, stocks, and mutual funds needs to
 be updated for the new version. 
 
@@ -50,43 +38,38 @@
 accounts.  After you have entered this information, you can
 update your accounts for the new version of GnuCash.
 
-Hit &quot;Cancel&quot; now to stop loading the file. </text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>finish_page</name>
-      <signal>
-	<name>finish</name>
-	<handler>gnc_ui_commodity_druid_finish_cb</handler>
-	<data>New_Commodity_Format_Druid</data>
-	<last_modification_time>Fri, 11 Aug 2000 21:17:16 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>cancel</name>
-	<handler>gnc_ui_commodity_druid_cancel_cb</handler>
-	<data>New_Commodity_Format_Druid</data>
-	<last_modification_time>Fri, 11 Aug 2000 21:17:46 GMT</last_modification_time>
-      </signal>
-      <title>Update your accounts with the new information</title>
-      <text>Click &quot;Finish&quot; to update your accounts to use the new 
+Hit &quot;Cancel&quot; now to stop loading the file. </property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#9999bfbf9999</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="cancel" handler="gnc_ui_commodity_druid_cancel_cb"/>
+	</widget>
+      </child>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="finish_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">Update your accounts with the new information</property>
+	  <property name="text" translatable="yes">Click &quot;Finish&quot; to update your accounts to use the new 
 information you have entered.
 
 Click &quot;Cancel&quot; to cancel the file-loading process.  
 
-Click &quot;Back&quot; to review your currency selections.</text>
-      <background_color>155,191,156</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
+Click &quot;Back&quot; to review your currency selections.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#9b9bbfbf9c9c</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="finish" handler="gnc_ui_commodity_druid_finish_cb"/>
+	  <signal name="cancel" handler="gnc_ui_commodity_druid_cancel_cb"/>
+	</widget>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/import-export/binary-import/Makefile.am -Lsrc/import-export/binary-import/Makefile.am -u -r1.17 -r1.18
--- src/import-export/binary-import/Makefile.am
+++ src/import-export/binary-import/Makefile.am
@@ -1,21 +1,20 @@
 SUBDIRS = . test
 PWD := $(shell pwd)
 
-pkglib_LTLIBRARIES = libgncmod-binary-import.la libgw-binary-import.la
+pkglib_LTLIBRARIES = libgncmod-binary-import.la
 
 AM_CFLAGS = \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnome \
   ${GUILE_INCS} \
   ${GLADE_CFLAGS} \
-  ${G_WRAP_COMPILE_ARGS} \
   ${GLIB_CFLAGS} \
-  ${GNOME_INCLUDEDIR}
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS}
 
 #FIXME remove the following deps
 #  -I${top_srcdir}/src \
@@ -27,71 +26,23 @@
 
 gncincludedir = ${GNC_INCLUDE_DIR}
 gncinclude_HEADERS = \
-  druid-commodity.h \
-  gw-binary-import.h
-
-libgncmod_binary_import_la_LDFLAGS = -module
+  druid-commodity.h
 
 libgncmod_binary_import_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/calculation/libgncmod-calculation.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
-  ${top_builddir}/src/app-file/libgncmod-app-file.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
   ${GUILE_LIBS} \
   ${GLADE_LIBS} \
-  ${GNOMEUI_LIBS} \
-  ${GNOME_LIBDIR} \
+  ${GNOME_LIBS} \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
-libgw_binary_import_la_SOURCES = gw-binary-import.c
-libgw_binary_import_la_LDFLAGS = -module
-libgw_binary_import_la_LIBADD  = libgncmod-binary-import.la
-
-gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash/import-export
-gncmod_DATA = binary-import.scm 
-
-gwmoddir = ${GNC_GWRAP_LIBDIR}
-gwmod_DATA = gw-binary-import-spec.scm gw-binary-import.scm
-
-noinst_DATA = .scm-links
-
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = binary-import.glade
 
 EXTRA_DIST = \
   .cvsignore \
-  ${gncmod_DATA} \
-  ${gwmod_DATA} \
   ${glade_DATA}
-
-if GNUCASH_SEPARATE_BUILDDIR
-#Only needed when srcdir and builddir are different
-SCM_FILE_LINKS = gw-binary-import-spec.scm
-endif
-
-.scm-links: 
-	rm -f import-export gnucash g-wrapped
-	ln -sf . import-export
-	ln -sf . gnucash 
-	ln -sf . g-wrapped 
-if GNUCASH_SEPARATE_BUILDDIR
-	for X in ${SCM_FILE_LINKS} ; do \
-	  ln -sf ${srcdir}/$$X . ; \
-	done
-endif
-	touch .scm-links
-
-gw-binary-import.scm gw-binary-import.c gw-binary-import.h: \
-  .scm-links gw-binary-import-spec.scm ${top_builddir}/config.status
-	FLAVOR=gnome guile -c \
-	 "(set! %load-path (cons \"${G_WRAP_MODULE_DIR}\" %load-path)) \
-	  (set! %load-path (cons \"${PWD}\" %load-path)) \
-	  (primitive-load \"./gw-binary-import-spec.scm\") \
-	  (gw:generate-wrapset \"gw-binary-import\")"
-
-BUILT_SOURCES = gw-binary-import.scm gw-binary-import.c gw-binary-import.h
-DISTCLEANFILES = gnucash g-wrapped import-export .scm-links ${SCM_FILE_LINKS} \
-                 gw-binary-import.html
-
--- src/import-export/binary-import/binary-import.scm
+++ /dev/null
@@ -1,12 +0,0 @@
-
-(define-module (gnucash import-export binary-import))
-(use-modules (g-wrapped gw-binary-import))
-(use-modules (gnucash app-utils))
-(use-modules (gnucash gnc-module))
-(gnc:module-load "gnucash/engine" 0)
-
-(define (import-commodities session)
-  (let ((book-url (gnc:session-get-url session)))
-    (gnc:import-legacy-commodities book-url)))
-
-(gnc:hook-add-dangler gnc:*book-opened-hook* import-commodities)
Index: gncmod-binary-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/binary-import/gncmod-binary-import.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/import-export/binary-import/gncmod-binary-import.c -Lsrc/import-export/binary-import/gncmod-binary-import.c -u -r1.6 -r1.7
--- src/import-export/binary-import/gncmod-binary-import.c
+++ src/import-export/binary-import/gncmod-binary-import.c
@@ -10,8 +10,10 @@
 #include <glib.h>
 #include <libguile.h>
 
+#include "gnc-hooks.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "druid-commodity.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_binary_import_LTX_gnc_module_system_interface = 0;
@@ -38,14 +40,6 @@
   return g_strdup("Utilities importing GnuCash binary files");
 }
 
-static void
-lmod(char * mn) 
-{
-  char * form = g_strdup_printf("(use-modules %s)\n", mn);
-  scm_c_eval_string(form);
-  g_free(form);
-}
-
 int
 libgncmod_binary_import_LTX_gnc_module_init(int refcount) {
   /* load the engine (we depend on it) */
@@ -59,20 +53,13 @@
   }
 
   /* load the calculation module (we depend on it) */
-  if(!gnc_module_load("gnucash/app-file", 0)) {
-    return FALSE;
-  }
-
-  /* load the calculation module (we depend on it) */
   if(!gnc_module_load("gnucash/gnome-utils", 0)) {
     return FALSE;
   }
 
-  /* publish g-wrapped bindings */
-  /* load the scheme code */
-  lmod("(g-wrapped gw-binary-import)");
-  lmod("(gnucash import-export binary-import)");
-
+  if (refcount == 0) {
+    gnc_hook_add_dangler(HOOK_BOOK_OPENED, (GFunc)gnc_import_commodities, NULL);
+  }
   return TRUE;
 }
 
--- src/import-export/binary-import/gw-binary-import-spec.scm
+++ /dev/null
@@ -1,29 +0,0 @@
-
-(define-module (g-wrapped gw-app-utils-spec))
-
-(debug-set! maxdepth 100000)
-(debug-set! stack    2000000)
-
-(use-modules (g-wrap))
-
-(use-modules (g-wrap gw-standard-spec))
-
-(let ((ws (gw:new-wrapset "gw-binary-import")))
-
-  (gw:wrapset-depends-on ws "gw-standard")
-
-  (gw:wrapset-set-guile-module! ws '(g-wrapped gw-binary-import))
-
-  (gw:wrapset-add-cs-declarations!
-   ws
-   (lambda (wrapset client-wrapset) 
-     "#include <druid-commodity.h>\n"))
-
-  (gw:wrap-function
-   ws
-   'gnc:import-legacy-commodities
-   '<gw:void>
-   "gnc_import_legacy_commodities"
-   '(((<gw:mchars> caller-owned const) filename))
-   "Launch the legacy-commodity import druid")
-)
Index: druid-hbci-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-utils.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/import-export/hbci/druid-hbci-utils.c -Lsrc/import-export/hbci/druid-hbci-utils.c -u -r1.16 -r1.17
--- src/import-export/hbci/druid-hbci-utils.c
+++ src/import-export/hbci/druid-hbci-utils.c
@@ -162,7 +162,7 @@
 {
   g_assert (parent);
   
-  if (g_file_test (filename, G_FILE_TEST_ISFILE | G_FILE_TEST_ISLINK)) {
+  if (g_file_test (filename, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_SYMLINK)) {
     return TRUE;
   }
 
@@ -177,7 +177,7 @@
 gnc_test_dir_exist_error (GtkWindow *parent, const char *filename) 
 {
   char *dirname = g_dirname (filename);
-  gboolean dirtest = g_file_test (dirname, G_FILE_TEST_ISDIR);
+  gboolean dirtest = g_file_test (dirname, G_FILE_TEST_IS_DIR);
   g_free (dirname);
   if (!dirtest) {
     gnc_error_dialog
Index: dialog-daterange.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-daterange.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/hbci/dialog-daterange.c -Lsrc/import-export/hbci/dialog-daterange.c -u -r1.3 -r1.4
--- src/import-export/hbci/dialog-daterange.c
+++ src/import-export/hbci/dialog-daterange.c
@@ -61,24 +61,17 @@
   
   xml = gnc_glade_xml_new ("hbci.glade", "HBCI_daterange_dialog");
 
-  g_assert
-    (dialog = glade_xml_get_widget (xml, "HBCI_daterange_dialog"));
+  dialog = glade_xml_get_widget (xml, "HBCI_daterange_dialog");
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
-  g_assert 
-    (heading_label  = glade_xml_get_widget (xml, "heading_label"));
-  g_assert 
-    (last_retrieval_button  = glade_xml_get_widget (xml, "last_retrieval_button"));
-  g_assert 
-    (first_button  = glade_xml_get_widget (xml, "first_button"));
-  g_assert 
-    (info.enter_from_button  = glade_xml_get_widget (xml, "enter_from_button"));
-  g_assert 
-    (info.enter_to_button  = glade_xml_get_widget (xml, "enter_to_button"));
-  g_assert 
-    (now_button  = glade_xml_get_widget (xml, "now_button"));
+  heading_label  = glade_xml_get_widget (xml, "heading_label");
+  last_retrieval_button  = glade_xml_get_widget (xml, "last_retrieval_button");
+  first_button  = glade_xml_get_widget (xml, "first_button");
+  info.enter_from_button  = glade_xml_get_widget (xml, "enter_from_button");
+  info.enter_to_button  = glade_xml_get_widget (xml, "enter_to_button");
+  now_button  = glade_xml_get_widget (xml, "now_button");
 
   info.from_dateedit = gnc_date_edit_new_ts (*from_date, FALSE, FALSE);
   gtk_container_add (GTK_CONTAINER (glade_xml_get_widget 
@@ -102,7 +95,7 @@
   gtk_signal_connect (GTK_OBJECT (info.enter_to_button), "toggled", 
 		      GTK_SIGNAL_FUNC (on_button_toggled), &info);
 
-  gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), 1);
 
   if (heading)
     gtk_label_set_text (GTK_LABEL (heading_label), heading);
@@ -111,12 +104,14 @@
 
   /* Hide on close instead of destroy since we still need the values
      from the boxes. */
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
+  /* gnome_dialog_close_hides (GTK_DIALOG (dialog), TRUE); */
   gtk_widget_show_all (GTK_WIDGET (dialog));
   
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
+  if (result >= 0)
+    gtk_widget_hide (GTK_WIDGET (dialog));
 
-  if (result == 0)
+  if (result == 1)
   {
     *from_date = gnc_date_edit_get_date_ts (GNC_DATE_EDIT (info.from_dateedit));
     *last_retv_date = gtk_toggle_button_get_active 
@@ -131,7 +126,8 @@
     return TRUE;
   }
   
-  gtk_widget_destroy (GTK_WIDGET (dialog));
+  if (result >= 0)
+    gtk_widget_destroy (GTK_WIDGET (dialog));
   return FALSE;
 }
 
Index: dialog-hbcitrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -Lsrc/import-export/hbci/dialog-hbcitrans.c -Lsrc/import-export/hbci/dialog-hbcitrans.c -u -r1.45 -r1.46
--- src/import-export/hbci/dialog-hbcitrans.c
+++ src/import-export/hbci/dialog-hbcitrans.c
@@ -31,6 +31,14 @@
 #include <aqbanking/account.h>
 #include <aqbanking/jobsingletransfer.h>
 #include <aqbanking/jobsingledebitnote.h>
+#if ((AQBANKING_VERSION_MAJOR > 1) || \
+     ((AQBANKING_VERSION_MAJOR == 1) && \
+      ((AQBANKING_VERSION_MINOR > 6) || \
+       ((AQBANKING_VERSION_MINOR == 6) && \
+        ((AQBANKING_VERSION_PATCHLEVEL > 0) || \
+	 (AQBANKING_VERSION_BUILD > 2))))))
+# include <aqbanking/jobinternaltransfer.h>
+#endif
 #include <iconv.h>
 
 #include "dialog-utils.h"
@@ -75,7 +83,7 @@
   GtkWidget *recp_bankname_label;
 
   /* The template choosing GtkList */
-  GtkWidget *template_gtk_list;
+  GtkWidget *template_gtktreeview;
 
   /* The selected template in the list */
   GtkWidget *selected_template;
@@ -112,8 +120,9 @@
     AB_Transaction_free (td->hbci_trans);
 
   td->selected_template = NULL;
-    
-  gtk_widget_destroy (GTK_WIDGET (td->dialog));
+
+  if (td->dialog)
+    gtk_widget_destroy (GTK_WIDGET (td->dialog));
 #if HAVE_KTOBLZCHECK_H
   AccountNumberCheck_delete(td->blzcheck);
 #endif    
@@ -194,7 +203,7 @@
 static void fill_template_list_func(gpointer data, gpointer user_data)
 {
   GNCTransTempl *templ = data;
-  GtkList *list = user_data;
+  GtkTreeView *list = user_data;
   GtkWidget *item;
 
   g_assert(templ);
@@ -235,7 +244,8 @@
   td->dialog = glade_xml_get_widget (xml, "HBCI_trans_dialog");
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (td->dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (td->dialog), 
+				  GTK_WINDOW (parent));
   
   {
     GtkWidget *heading_label;
@@ -303,7 +313,7 @@
     g_assert
       ((exec_later_button = glade_xml_get_widget (xml, "exec_later_button")) != NULL);
     g_assert
-      ((td->template_gtk_list = glade_xml_get_widget (xml, "template_list")) != NULL);
+      ((td->template_gtktreeview = glade_xml_get_widget (xml, "template_list")) != NULL);
     g_assert
       ((add_templ_button = glade_xml_get_widget (xml, "add_templ_button")) != NULL);
     g_assert
@@ -322,10 +332,21 @@
     gnc_amount_edit_set_fraction (GNC_AMOUNT_EDIT (td->amount_edit),
 				  xaccAccountGetCommoditySCU (gnc_acc));
 
+    /* FIXME: Greyed out the template widgets because they are not yet
+       implemented -- need to change the GTK_LIST code to
+       GTK_TREE_VIEW */
+    gtk_widget_set_sensitive (td->template_gtktreeview, FALSE);
+    gtk_widget_set_sensitive (add_templ_button, FALSE);
+    gtk_widget_set_sensitive (moveup_templ_button, FALSE);
+    gtk_widget_set_sensitive (movedown_templ_button, FALSE);
+    gtk_widget_set_sensitive (sort_templ_button, FALSE);
+    gtk_widget_set_sensitive (del_templ_button, FALSE);
+
     /* Check for what kind of transaction this should be, and change
        the labels accordingly. */
     switch (trans_type) {
     case SINGLE_TRANSFER:
+    case SINGLE_INTERNAL_TRANSFER:
       /* all labels are already set */
       break;
     case SINGLE_DEBITNOTE:
@@ -372,8 +393,9 @@
 			hbci_bankid);
 
     /* fill list for choosing a transaction template */
-    g_list_foreach(td->templ, fill_template_list_func, 
-		    GTK_LIST (td->template_gtk_list));
+    /* g_list_foreach(td->templ, fill_template_list_func, 
+       GTK_TREE_VIEW (td->template_gtktreeview)); */
+    /* FIXME: commented out until the GTK_TREE_VIEW is implemented! */
 
     td->selected_template = NULL;
     td->templ_changed = FALSE;
@@ -382,7 +404,9 @@
 /*    gnc_option_menu_init_w_signal (td->template_option, 
 				   GTK_SIGNAL_FUNC(template_selection_cb),
 				   td);   */
-    gtk_signal_connect (GTK_OBJECT (td->template_gtk_list), "select_child",
+    /* FIXME: commented out until the GTK_TREE_VIEW is implemented! */
+    /*
+    gtk_signal_connect (GTK_OBJECT (td->template_gtktreeview), "select_child",
                       GTK_SIGNAL_FUNC (on_template_list_select_child),
                       td);
                       
@@ -404,20 +428,14 @@
      gtk_signal_connect (GTK_OBJECT (del_templ_button), "clicked",
                       GTK_SIGNAL_FUNC (del_template_cb),
                       td);
-
+    */
 
     gtk_signal_connect(GTK_OBJECT (td->recp_bankcode_entry), "changed",
 		       GTK_SIGNAL_FUNC(blz_changed_cb), td);
 
     /* Default button */
-    gnome_dialog_set_default (GNOME_DIALOG (td->dialog), 0);
+    gtk_dialog_set_default_response (GTK_DIALOG (td->dialog), GTK_RESPONSE_OK);
     
-    gtk_widget_grab_focus (td->recp_name_entry);
-
-    /* Hide on close instead of destroy since we still need the values
-       from the boxes. */
-    gnome_dialog_close_hides (GNOME_DIALOG (td->dialog), TRUE);
-
   } /* GtkWidget declarations/definitions */
   
   return td;
@@ -431,7 +449,7 @@
 int gnc_hbci_dialog_run_until_ok(HBCITransDialog *td, 
 				 const AB_ACCOUNT *h_acc)
 {
-  int result;
+  gint result;
   int max_purpose_lines;
   gboolean values_ok;
 
@@ -470,15 +488,17 @@
     gtk_widget_show_all (td->dialog); 
 
     /* Now run the dialog until it gets closed by a button press. */
-    result = gnome_dialog_run (GNOME_DIALOG (td->dialog));
+    result = gtk_dialog_run (GTK_DIALOG (td->dialog));
     /* printf("hbci_trans: result button was %d.\n", result); */
 
     /* The dialog gets hidden anyway as soon as any button is pressed. */
     gtk_widget_hide_all (td->dialog);
 
-    /* Was cancel pressed or dialog closed? 0 == execute now, 1 ==
-       scheduled for later execution (currently unimplemented) */
-    if ((result != 0) && (result != 1)) {
+    /* Was cancel pressed or dialog closed? 1 == execute now, 3 ==
+       scheduled for later execution (currently unimplemented); 2 == cancel */
+    if (result != 1 ) { /* <- currently hard-coded response-id from glade */
+      gtk_widget_destroy (GTK_WIDGET (td->dialog));
+      td->dialog = NULL;
       return -1;
     }
 
@@ -492,7 +512,7 @@
     if (AB_Value_GetValue (AB_Transaction_GetValue (td->hbci_trans)) == 0.0) {
       gtk_widget_show_all (td->dialog); 
       values_ok = !gnc_verify_dialog
-	(GTK_WIDGET (td->dialog),
+	(td->dialog,
 	 TRUE,
 	 "%s",
 	 _("The amount is zero or the amount field could not be \n"
@@ -503,6 +523,7 @@
 	   "Do you want to enter the job again?"));
       if (values_ok) {
 	AB_Transaction_free (td->hbci_trans);
+	td->hbci_trans = NULL;
 	return -1;
       }
       continue;
@@ -522,6 +543,7 @@
 	     "Do you want to enter the job again?"));
 	if (values_ok) {
 	  AB_Transaction_free (td->hbci_trans);
+	  td->hbci_trans = NULL;
 	  return -1;
 	}
 	continue;
@@ -551,9 +573,10 @@
   AB_TRANSACTION *trans = AB_Transaction_new();
   gchar *tmpchar;
 
-  /* FIXME: The internal source encoding is hard-coded so far. This
-     needs to be fixed for the gnome2 version; the source encoding is
-     then probably utf-8 as well. iconv is also used in
+  /* The internal source encoding is returned by
+     gnc_hbci_book_encoding(), which is hard-coded so far. This needs
+     to be fixed for the gnome2 version; the source encoding is then
+     probably utf-8 as well. iconv is also used in
      gnc_AB_BANKING_interactors() in hbci-interaction.c. */
   iconv_t gnc_iconv_handler =
     iconv_open(gnc_hbci_AQBANKING_encoding(), gnc_hbci_book_encoding());
@@ -689,6 +712,16 @@
   case SINGLE_DEBITNOTE:
     job = AB_JobSingleDebitNote_new(h_acc);
     break;
+  case SINGLE_INTERNAL_TRANSFER:
+#if ((AQBANKING_VERSION_MAJOR > 1) || \
+     ((AQBANKING_VERSION_MAJOR == 1) && \
+      ((AQBANKING_VERSION_MINOR > 6) || \
+       ((AQBANKING_VERSION_MINOR == 6) && \
+        ((AQBANKING_VERSION_PATCHLEVEL > 0) || \
+	 (AQBANKING_VERSION_BUILD > 2))))))
+    job = AB_JobInternalTransfer_new(h_acc);
+    break;
+#endif
   default:
   case SINGLE_TRANSFER:
     job = AB_JobSingleTransfer_new(h_acc);
@@ -702,6 +735,16 @@
   case SINGLE_DEBITNOTE:
     AB_JobSingleDebitNote_SetTransaction(job, td->hbci_trans);
     break;
+  case SINGLE_INTERNAL_TRANSFER:
+#if ((AQBANKING_VERSION_MAJOR > 1) || \
+     ((AQBANKING_VERSION_MAJOR == 1) && \
+      ((AQBANKING_VERSION_MINOR > 6) || \
+       ((AQBANKING_VERSION_MINOR == 6) && \
+        ((AQBANKING_VERSION_PATCHLEVEL > 0) || \
+	 (AQBANKING_VERSION_BUILD > 2))))))
+    AB_JobInternalTransfer_SetTransaction(job, td->hbci_trans);
+    break;
+#endif
   default:
   case SINGLE_TRANSFER:
     AB_JobSingleTransfer_SetTransaction(job, td->hbci_trans);
@@ -823,8 +866,19 @@
   
   if (record) {
     const char *bankname = AccountNumberCheck_Record_bankName (record);
+    GError *error = NULL;
+    gchar *utf8_bankname = g_convert (bankname, strlen(bankname), 
+				      "UTF-8", "ISO-8859-15",
+				      NULL, NULL, &error);
+    if (error != NULL) {
+      printf ("Error convertion bankname \"%s\" to UTF-8\n", bankname);
+      g_error_free (error);
+      utf8_bankname = g_strdup (bankname);
+    }
     gtk_label_set_text (GTK_LABEL (td->recp_bankname_label),
-			(strlen(bankname)>0 ? bankname : _("(unknown)")));
+			(strlen(utf8_bankname)>0 ? 
+			 utf8_bankname : _("(unknown)")));
+    g_free (utf8_bankname);
     gtk_widget_show_all (td->recp_bankname_label);
 
     /*printf("blz_changed_cb: KtoBlzCheck said check is bank is '%s' at '%s'.\n",
@@ -884,7 +938,7 @@
   if (td->selected_template) {
     t = gtk_object_get_user_data(GTK_OBJECT(td->selected_template));
 
-    index = 1+gtk_list_child_position(GTK_LIST(td->template_gtk_list), td->selected_template);
+    index = 1+gtk_list_child_position(GTK_LIST(td->template_gtktreeview), td->selected_template);
     }
   else index = 0;
   
@@ -892,16 +946,16 @@
     
   td->templ_changed = TRUE;
 
-  gtk_list_clear_items(GTK_LIST(td->template_gtk_list), 0, -1);
+  gtk_list_clear_items(GTK_LIST(td->template_gtktreeview), 0, -1);
 
   /* fill list for choosing a transaction template */
   g_list_foreach(td->templ, fill_template_list_func,
-		    GTK_LIST (td->template_gtk_list));
+		 GTK_TREE_VIEW (td->template_gtktreeview));
 
-  gtk_list_select_item(GTK_LIST(td->template_gtk_list), index);
+  gtk_list_select_item(GTK_LIST(td->template_gtktreeview), index);
 
   /* the show_all is necessary since otherwise the new item doesn't show up */
-  gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtk_list)));
+  gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtktreeview)));
   }
 }
 
@@ -918,22 +972,22 @@
   if (td->selected_template) {
     t = gtk_object_get_user_data(GTK_OBJECT(td->selected_template));
 
-    index = gtk_list_child_position(GTK_LIST(td->template_gtk_list), td->selected_template);
+    index = gtk_list_child_position(GTK_LIST(td->template_gtktreeview), td->selected_template);
 
     if (index > 0) {
       td->templ =  g_list_remove( td->templ, t);
       td->templ =  g_list_insert( td->templ, t, index-1);
 
       td->templ_changed = TRUE;
-      gtk_list_clear_items(GTK_LIST(td->template_gtk_list), 0, -1);
+      gtk_list_clear_items(GTK_LIST(td->template_gtktreeview), 0, -1);
 
       /* fill list for choosing a transaction template */
       g_list_foreach(td->templ, fill_template_list_func,
-		    GTK_LIST (td->template_gtk_list));
+		     GTK_TREE_VIEW (td->template_gtktreeview));
 
-      gtk_list_select_item(GTK_LIST(td->template_gtk_list), index-1);
+      gtk_list_select_item(GTK_LIST(td->template_gtktreeview), index-1);
 
-      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtk_list)));
+      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtktreeview)));
       }
     }
 }
@@ -951,22 +1005,22 @@
   if (td->selected_template) {
     t = gtk_object_get_user_data(GTK_OBJECT(td->selected_template));
 
-    index = gtk_list_child_position(GTK_LIST(td->template_gtk_list), td->selected_template);
+    index = gtk_list_child_position(GTK_LIST(td->template_gtktreeview), td->selected_template);
 
     if (index < g_list_length(td->templ)-1) {
       td->templ =  g_list_remove( td->templ, t);
       td->templ =  g_list_insert( td->templ, t, index+1);
 
       td->templ_changed = TRUE;
-      gtk_list_clear_items(GTK_LIST(td->template_gtk_list), 0, -1);
+      gtk_list_clear_items(GTK_LIST(td->template_gtktreeview), 0, -1);
 
       /* fill list for choosing a transaction template */
       g_list_foreach(td->templ, fill_template_list_func,
-		    GTK_LIST (td->template_gtk_list));
+		     GTK_TREE_VIEW (td->template_gtktreeview));
 
-      gtk_list_select_item(GTK_LIST(td->template_gtk_list), index+1);
+      gtk_list_select_item(GTK_LIST(td->template_gtktreeview), index+1);
 
-      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtk_list)));
+      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtktreeview)));
       }
     }
 }
@@ -993,15 +1047,15 @@
   
     td->templ_changed = TRUE;
 
-    gtk_list_clear_items(GTK_LIST(td->template_gtk_list), 0, -1);
+    gtk_list_clear_items(GTK_LIST(td->template_gtktreeview), 0, -1);
 
     /* fill list for choosing a transaction template */
     g_list_foreach(td->templ, fill_template_list_func,
-		    GTK_LIST (td->template_gtk_list));
+		   GTK_TREE_VIEW (td->template_gtktreeview));
 
-    gtk_list_unselect_all ( GTK_LIST (td->template_gtk_list) );
+    gtk_list_unselect_all ( GTK_LIST (td->template_gtktreeview) );
    
-    gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtk_list)));
+    gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtktreeview)));
   }
 }
 
@@ -1020,21 +1074,21 @@
 
     t = gtk_object_get_user_data(GTK_OBJECT(td->selected_template));
 
-    index = gtk_list_child_position(GTK_LIST(td->template_gtk_list), td->selected_template);
+    index = gtk_list_child_position(GTK_LIST(td->template_gtktreeview), td->selected_template);
 
     if (gnc_verify_dialog (td->parent,
           FALSE, _("Do you really want to delete the template '%s'?"),
           gnc_trans_templ_get_name(g_list_nth_data(td->templ, index)))) {
-      gtk_list_clear_items(GTK_LIST(td->template_gtk_list), index, index+1);
+      gtk_list_clear_items(GTK_LIST(td->template_gtktreeview), index, index+1);
             
       td->templ =  g_list_remove( td->templ, t);
       td->templ_changed = TRUE;
 
       gnc_trans_templ_delete(t);
 
-      gtk_list_unselect_all ( GTK_LIST (td->template_gtk_list) );
+      gtk_list_unselect_all ( GTK_LIST (td->template_gtktreeview) );
 
-      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtk_list)));
+      gtk_widget_show_all (GTK_WIDGET ( GTK_LIST (td->template_gtktreeview)));
     
       }
     }
--- src/import-export/hbci/gnc-hbci-cb.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/********************************************************************\
- * gnc-hbci-cb.h -- hbci callback functions                         *
- * Copyright (C) 2002 Christian Stimming                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#ifndef GNC_HBCI_CB_H
-#define GNC_HBCI_CB_H
-
-#include <gnome.h>
-
-/* Callback from account tree window to invoke Get Balance. */
-void
-gnc_hbci_acct_tree_menu_getbalance_cb (GtkWidget * widget, 
-                                       GnomeMDIChild * child);
-
-/* Callback from account tree window to invoke Get Transactions (not
- * yet implemented). */
-void
-gnc_hbci_acct_tree_menu_gettrans_cb (GtkWidget * widget, 
-				     GnomeMDIChild * child);
-
-/* Callback from register window to invoke Get Balance. */
-void
-gnc_hbci_register_menu_getbalance_cb (GtkWidget * widget, 
-				      gpointer data);
-
-/* Callback from register window to invoke Get Transactions. */
-void
-gnc_hbci_register_menu_gettrans_cb (GtkWidget * widget, 
-				      gpointer data);
-
-/* Callback from register window to invoke Transaction invocation. */
-void
-gnc_hbci_register_menu_maketrans_cb (GtkWidget * widget, 
-				     gpointer data);
-
-/* Callback from register window to invoke Debit Note invocation. */
-void
-gnc_hbci_register_menu_makedebnote_cb (GtkWidget * widget, 
-				       gpointer data);
-
-#endif /* GNC_HBCI_CB_H */
Index: gncmod-hbci.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gncmod-hbci.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/import-export/hbci/gncmod-hbci.c -Lsrc/import-export/hbci/gncmod-hbci.c -u -r1.22 -r1.23
--- src/import-export/hbci/gncmod-hbci.c
+++ src/import-export/hbci/gncmod-hbci.c
@@ -12,12 +12,11 @@
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
-#include "gnc-menu-extensions.h"
-
-#include "gnc-hbci-cb.h"
+#include "gnc-plugin-hbci.h"
 #include "druid-hbci-initial.h"
 #include "gnc-hbci-utils.h"
 #include <gwenhywfar/gwenhywfar.h>
+#include "dialog-preferences.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_hbci_LTX_gnc_module_system_interface = 0;
@@ -33,8 +32,6 @@
 int libgncmod_hbci_LTX_gnc_module_init(int refcount);
 int libgncmod_hbci_LTX_gnc_module_end(int refcount);
 
-static void gnc_hbci_addmenus(void);
-
 char *
 libgncmod_hbci_LTX_gnc_module_path(void) {
   return g_strdup("gnucash/import-export/hbci");
@@ -66,14 +63,11 @@
     return FALSE;
   }
 
-  /* load the HBCI Scheme code */
-  scm_c_eval_string("(load-from-path \"hbci/hbci.scm\")");
-
-  scm_c_define_gsubr("gnc:hbci-initial-setup", 
-		     0, 0, 0, scm_hbci_initial_druid);
-
   /* Add menu items with C callbacks */
-  gnc_hbci_addmenus();
+  gnc_plugin_hbci_create_plugin();
+  
+  gnc_preferences_add_to_page("hbciprefs.glade", "hbci_prefs",
+			      "Online Banking");
 
   /* Initialize gwen library */
   GWEN_Init();
@@ -90,38 +84,3 @@
 
   return TRUE;
 }
-
-static void
-gnc_hbci_addmenus(void)
-{
-  static GnomeUIInfo reg_online_submenu[] =    
-    {
-      GNOMEUIINFO_ITEM ( N_("HBCI Get Balance"),
-			 N_("Get the account balance online through HBCI"),
-			 gnc_hbci_register_menu_getbalance_cb, 
-			 GNOME_APP_PIXMAP_NONE),
-      GNOMEUIINFO_ITEM ( N_("HBCI Get Transactions"),
-			 N_("Get the transactions online through HBCI"),
-			 gnc_hbci_register_menu_gettrans_cb, 
-			 GNOME_APP_PIXMAP_NONE),
-      GNOMEUIINFO_ITEM ( N_("HBCI Issue Transaction"),
-			 N_("Issue a new transaction online through HBCI"),
-			 gnc_hbci_register_menu_maketrans_cb, 
-			 GNOME_APP_PIXMAP_NONE),
-      GNOMEUIINFO_ITEM ( N_("HBCI Issue Direct Debit"),
-			 N_("Issue a new direct debit note online through HBCI"),
-			 gnc_hbci_register_menu_makedebnote_cb, 
-			 GNOME_APP_PIXMAP_NONE),
-      GNOMEUIINFO_END
-    };
-    
-  static GnomeUIInfo reg_online_menu[] =
-    {
-      GNOMEUIINFO_SUBTREE( N_("Online Actions"),
-			   reg_online_submenu ),
-      GNOMEUIINFO_END
-    };
-    
-    
-  gnc_add_c_extension (reg_online_menu, WINDOW_NAME_REGISTER "/_Actions/");
-}
Index: hbci-interaction.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/import-export/hbci/hbci-interaction.h -Lsrc/import-export/hbci/hbci-interaction.h -u -r1.13 -r1.14
--- src/import-export/hbci/hbci-interaction.h
+++ src/import-export/hbci/hbci-interaction.h
@@ -26,6 +26,11 @@
 #include <aqbanking/banking.h>
 #include <gnome.h>
 
+#define GCONF_SECTION "dialogs/import/hbci"
+#define KEY_CLOSE_ON_FINISH "close_on_finish"
+#define KEY_REMEMBER_PIN    "remember_pin"
+#define KEY_VERBOSE_DEBUG   "verbose_debug"
+
 typedef struct _inter_data GNCInteractor;
 
 /** Adds the interactor and progressmonitor classes to the api. */
--- src/import-export/hbci/hbci.scm
+++ /dev/null
@@ -1,53 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;  hbci.scm
-;;  load the HBCI support code
-;;
-;;  Copyright (c) 2002 Christian <Stimming at tuhh.de>
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(define (add-hbci-menu-items)
-;  (gnc:add-extension 
-;   (gnc:make-menu (N_ "HBCI") (list gnc:window-name-main "_Tools" "")))
-
-  (gnc:add-extension
-   (gnc:make-menu-item (N_ "HBCI Setup")
-		       (N_ "HBCI Setup")
-		       (list gnc:window-name-main "_Tools" "")
-		       (lambda ()
-			 (gnc:hbci-initial-setup))))
-
-
-;  (gnc:add-extension
-;   (gnc:make-menu "Online" (list gnc:window-name-register "Actions" "")))
-
-;  (gnc:add-extension
-;   (gnc:make-menu-item (N_ "Get Balance")
-;		       (N_ "Get Balance")
-;		       (list gnc:window-name-register "Actions" "Online" "")
-;		       (lambda ()
-;			 (gnc:hbci-initial-setup))))
-)
-
-(gnc:hook-add-dangler gnc:*ui-startup-hook* add-hbci-menu-items)
-
-;; Register Preferences
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "Online Banking & Importing") (N_ "HBCI Remember PIN in memory")
-  "b" (N_ "Remember the PIN for HBCI in memory during a session")
-  #f))
-
-(gnc:register-configuration-option
- (gnc:make-internal-option
-  "__gui" "hbci_close_on_finish" 1))
-
-;(gnc:register-configuration-option
-; (gnc:make-simple-boolean-option
-;  (N_ "Online Banking & Importing") (N_ "HBCI Use generic import matcher")
-;  "b" (N_ "Use the transaction matcher from the generic import infrastructure instead of the HBCI specific one")
-;  #f))
-
-(gnc:register-configuration-option
- (gnc:make-simple-boolean-option
-  (N_ "_+Advanced") (N_ "HBCI Verbose Debug Messages")
-  "m" (N_ "Activate verbose debug messages for HBCI Online Banking.") #f))
Index: gnc-hbci-gettrans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-gettrans.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -Lsrc/import-export/hbci/gnc-hbci-gettrans.c -u -r1.38 -r1.39
--- src/import-export/hbci/gnc-hbci-gettrans.c
+++ src/import-export/hbci/gnc-hbci-gettrans.c
@@ -29,9 +29,7 @@
 #include "Transaction.h"
 #include "gnc-engine-util.h" 
 
-/*#include "gnc-gen-transaction.h"*/
 #include "import-main-matcher.h"
-#include "global-options.h"
 
 #include "hbci-interaction.h"
 #include "gnc-hbci-utils.h"
--- src/import-export/hbci/gnc-hbci-cb.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/********************************************************************\
- * gnc-hbci-cb.c -- hbci callback functions                         *
- * Copyright (C) 2002 Christian Stimming                            *
- *                                                                  *
- * This program is free software; you can redistribute it and/or    *
- * modify it under the terms of the GNU General Public License as   *
- * published by the Free Software Foundation; either version 2 of   *
- * the License, or (at your option) any later version.              *
- *                                                                  *
- * This program is distributed in the hope that it will be useful,  *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
- * GNU General Public License for more details.                     *
- *                                                                  *
- * You should have received a copy of the GNU General Public License*
- * along with this program; if not, contact:                        *
- *                                                                  *
- * Free Software Foundation           Voice:  +1-617-542-5942       *
- * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
- * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
-\********************************************************************/
-
-#include "config.h"
-
-#include "gnc-hbci-cb.h"
-
-#include "Account.h"
-#include "gnc-ui.h"
-#include "window-acct-tree.h"
-#include "window-register.h"
-
-#include "gnc-hbci-getbalance.h"
-#include "gnc-hbci-gettrans.h"
-#include "gnc-hbci-transfer.h"
-
-void
-gnc_hbci_acct_tree_menu_getbalance_cb (GtkWidget * widget, 
-                                       GnomeMDIChild * child)
-{
-  GNCMDIChildInfo * mc = NULL;
-  GNCAcctTreeWin   * win = NULL;
-  Account        * account = NULL;
-
-  g_assert (child);
-  mc = gtk_object_get_user_data (GTK_OBJECT (child));
-  g_assert (mc);
-  win = mc->user_data;
-  g_assert (win);
-  account = gnc_acct_tree_window_get_current_account (win);
-  g_assert (account);
-    
-  gnc_hbci_getbalance (gnc_acct_tree_window_get_widget (win),
-		       account);
-}
-
-void
-gnc_hbci_acct_tree_menu_gettrans_cb (GtkWidget * widget, 
-				     GnomeMDIChild * child)
-{
-  GNCMDIChildInfo * mc = NULL;
-  GNCAcctTreeWin   * win = NULL;
-  Account        * account = NULL;
-
-  g_assert (child);
-  mc = gtk_object_get_user_data (GTK_OBJECT (child));
-  g_assert (mc);
-  win = mc->user_data;
-  g_assert (win);
-  account = gnc_acct_tree_window_get_current_account (win);
-  g_assert (account);
-    
-  gnc_hbci_gettrans (gnc_acct_tree_window_get_widget (win),
-		     account);
-}
-
-void
-gnc_hbci_register_menu_getbalance_cb (GtkWidget * widget, 
-				      gpointer data)
-{
-  RegWindow *regData = data;
-  GNCLedgerDisplay *ledger = NULL;
-  Account *account = NULL;
-
-  g_assert (regData);
-  ledger = gnc_RegWindow_ledger (regData);
-  g_assert (ledger);
-  account = gnc_ledger_display_leader (ledger);
-  if (!account)
-      return;
-      
-  gnc_hbci_getbalance (gnc_RegWindow_window (regData), account);
-}
-
-void
-gnc_hbci_register_menu_gettrans_cb (GtkWidget * widget, 
-				    gpointer data)
-{
-  RegWindow *regData = data;
-  GNCLedgerDisplay *ledger = NULL;
-  Account *account = NULL;
-
-  g_assert (regData);
-  ledger = gnc_RegWindow_ledger (regData);
-  g_assert (ledger);
-  account = gnc_ledger_display_leader (ledger);
-  if (!account)
-      return;
-      
-  gnc_hbci_gettrans (gnc_RegWindow_window (regData), account);
-}
-
-void
-gnc_hbci_register_menu_maketrans_cb (GtkWidget * widget, 
-				     gpointer data)
-{
-  RegWindow *regData = data;
-  GNCLedgerDisplay *ledger = NULL;
-  Account *account = NULL;
-
-  g_assert (regData);
-  ledger = gnc_RegWindow_ledger (regData);
-  g_assert (ledger);
-  account = gnc_ledger_display_leader (ledger);
-  if (!account)
-      return;
-    
-  gnc_hbci_maketrans (gnc_RegWindow_window (regData), account, 
-		      SINGLE_TRANSFER);
-}
-
-void
-gnc_hbci_register_menu_makedebnote_cb (GtkWidget * widget, 
-				       gpointer data)
-{
-  RegWindow *regData = data;
-  GNCLedgerDisplay *ledger = NULL;
-  Account *account = NULL;
-
-  g_assert (regData);
-  ledger = gnc_RegWindow_ledger (regData);
-  g_assert (ledger);
-  account = gnc_ledger_display_leader (ledger);
-  if (!account)
-      return;
-    
-  gnc_hbci_maketrans (gnc_RegWindow_window (regData), account, 
-		      SINGLE_DEBITNOTE);
-}
Index: druid-hbci-initial.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-initial.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/hbci/druid-hbci-initial.h -Lsrc/import-export/hbci/druid-hbci-initial.h -u -r1.3 -r1.4
--- src/import-export/hbci/druid-hbci-initial.h
+++ src/import-export/hbci/druid-hbci-initial.h
@@ -26,7 +26,6 @@
 #include <libguile.h>
 
 void gnc_hbci_initial_druid (void);
-SCM  scm_hbci_initial_druid (void);
 
 typedef struct _hbciinitialinfo HBCIInitialInfo;
 
Index: druid-hbci-initial.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/druid-hbci-initial.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -Lsrc/import-export/hbci/druid-hbci-initial.c -Lsrc/import-export/hbci/druid-hbci-initial.c -u -r1.61 -r1.62
--- src/import-export/hbci/druid-hbci-initial.c
+++ src/import-export/hbci/druid-hbci-initial.c
@@ -40,6 +40,7 @@
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "gnc-html.h"
+//#include "import-account-matcher.h"
 #include "gnc-component-manager.h"
 
 #include <aqbanking/banking.h>
@@ -248,14 +249,14 @@
 {
   g_assert(info);
   gnome_druid_set_buttons_sensitive (GNOME_DRUID (info->druid),
-				     TRUE, TRUE, TRUE);
+				     TRUE, TRUE, TRUE, TRUE);
 }
 static void 
 druid_disable_next_button(HBCIInitialInfo *info)
 {
   g_assert(info);
   gnome_druid_set_buttons_sensitive (GNOME_DRUID (info->druid),
-				     TRUE, FALSE, TRUE);
+				     TRUE, FALSE, TRUE, TRUE);
 }
 /*
  * end button enabling
@@ -267,7 +268,6 @@
  * GUI callbacks
  */
 
-
 static gboolean banking_has_accounts(AB_BANKING *banking)
 {
   AB_ACCOUNT_LIST2 *accl;
@@ -366,7 +366,7 @@
     info->gnc_hash = gnc_hbci_new_hash_from_kvp (info->api);
   
   gnome_druid_set_buttons_sensitive (GNOME_DRUID (info->druid),
-				     FALSE, TRUE, TRUE);
+				     FALSE, TRUE, TRUE, TRUE);
 
   update_accountlist(info);
 }
@@ -426,7 +426,7 @@
 		   gpointer user_data)
 {
   HBCIInitialInfo *info = user_data;
-  char *name;
+  const char *name;
   g_assert(info->druid);
   
   name = gtk_widget_get_name (GTK_WIDGET (button));
@@ -689,11 +689,4 @@
   /*                   GTK_SIGNAL_FUNC(gnc_hierarchy_destroy_cb), NULL);*/
 
   gtk_widget_show_all (info->window);
-  
-}
-
-SCM  scm_hbci_initial_druid (void)
-{
-  gnc_hbci_initial_druid();
-  return SCM_EOL;
 }
Index: gnc-hbci-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-utils.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -Lsrc/import-export/hbci/gnc-hbci-utils.c -Lsrc/import-export/hbci/gnc-hbci-utils.c -u -r1.53 -r1.54
--- src/import-export/hbci/gnc-hbci-utils.c
+++ src/import-export/hbci/gnc-hbci-utils.c
@@ -32,9 +32,9 @@
 
 #include "gnc-ui.h"
 #include "gnc-hbci-kvp.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui-util.h"
 #include "gnc-engine-util.h" 
-#include "global-options.h"
 
 #include "hbci-interaction.h"
 #include <aqbanking/version.h>
@@ -438,8 +438,7 @@
   if (inter)
     GNCInteractor_show (inter);
 
-  if (gnc_lookup_boolean_option("_+Advanced", 
-				"HBCI Verbose Debug Messages", FALSE)) {
+  if (gnc_gconf_get_bool(GCONF_SECTION, KEY_VERBOSE_DEBUG, NULL)) {
     GWEN_Logger_SetLevel(GWEN_LOGDOMAIN, GWEN_LoggerLevelNotice);
     GWEN_Logger_SetLevel(AQBANKING_LOGDOMAIN, GWEN_LoggerLevelInfo);
     GWEN_Logger_SetLevel("aqhbci", GWEN_LoggerLevelInfo);
@@ -904,7 +903,7 @@
 {
   char *inbuffer = (char*)input;
   char *outbuffer, *outbufferstart;
-  int inbytes, outbytes;
+  size_t inbytes, outbytes;
 
   inbytes = strlen(inbuffer);
   outbytes = inbytes + 2;
@@ -921,7 +920,7 @@
 #if HAVE_LANGINFO_CODESET
   char* encoding = nl_langinfo(CODESET);
 #else
-  char* encoding = "ISO8859-15";
+  char* encoding = "UTF-8";
 #endif
   return encoding;
 }
Index: dialog-hbcitrans.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-hbcitrans.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/import-export/hbci/dialog-hbcitrans.h -Lsrc/import-export/hbci/dialog-hbcitrans.h -u -r1.10 -r1.11
--- src/import-export/hbci/dialog-hbcitrans.h
+++ src/import-export/hbci/dialog-hbcitrans.h
@@ -39,7 +39,8 @@
 
 typedef enum GNC_HBCI_Transtype {
   SINGLE_TRANSFER = 0,
-  SINGLE_DEBITNOTE
+  SINGLE_DEBITNOTE,
+  SINGLE_INTERNAL_TRANSFER
 } GNC_HBCI_Transtype;
 
 
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/hbci/.cvsignore -Lsrc/import-export/hbci/.cvsignore -u -r1.1 -r1.2
--- src/import-export/hbci/.cvsignore
+++ src/import-export/hbci/.cvsignore
@@ -1,6 +1,7 @@
 .deps
 .libs
 .scm-links
+*.gladep
 *.la
 *.lo
 Makefile
Index: hbci-interaction.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/hbci-interaction.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lsrc/import-export/hbci/hbci-interaction.c -Lsrc/import-export/hbci/hbci-interaction.c -u -r1.57 -r1.58
--- src/import-export/hbci/hbci-interaction.c
+++ src/import-export/hbci/hbci-interaction.c
@@ -33,7 +33,7 @@
 #include "druid-utils.h"
 #include "gnc-ui-util.h"
 #include "gnc-ui.h"
-#include "global-options.h"
+#include "gnc-gconf-utils.h"
 
 #include "dialog-pass.h"
 #include "gnc-hbci-utils.h"
@@ -43,8 +43,6 @@
 
 #include <iconv.h>
 
-#define PREF_TAB_ONLINE_BANKING N_("Online Banking & Importing")
-
 gchar *gnc__extractText(const char *text);
 
 /** Adds the interactor and progressmonitor classes to the api. */
@@ -63,9 +61,7 @@
   g_assert(data->gnc_iconv_handler != (iconv_t)(-1));
   data->keepAlive = TRUE;
   data->cache_pin = 
-    gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
-			      "HBCI Remember PIN in memory",
-                              FALSE);
+    gnc_gconf_get_bool(GCONF_SECTION, KEY_REMEMBER_PIN, NULL);
   data->showbox_id = 1;
   data->showbox_hash = g_hash_table_new(NULL, NULL); 
 
@@ -79,9 +75,10 @@
   if (data == NULL)
     return;
   if (data->dialog != NULL) {
-    gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
-			    gtk_toggle_button_get_active 
-			    (GTK_TOGGLE_BUTTON (data->close_checkbutton)));
+    gnc_gconf_set_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH,
+		       gtk_toggle_button_get_active 
+		       (GTK_TOGGLE_BUTTON (data->close_checkbutton)),
+		       NULL);
     gtk_object_unref (GTK_OBJECT (data->dialog));
     gtk_widget_destroy (data->dialog);
   }
@@ -143,9 +140,7 @@
 void GNCInteractor_show_nodelete(GNCInteractor *i)
 {
   gboolean cache_pin = 
-    gnc_lookup_boolean_option(PREF_TAB_ONLINE_BANKING,
-			      "HBCI Remember PIN in memory",
-			      FALSE);
+    gnc_gconf_get_bool(GCONF_SECTION, KEY_REMEMBER_PIN, NULL);
   g_assert(i);
   /* Show widgets */
   gtk_widget_show_all (i->dialog);
@@ -163,7 +158,9 @@
   g_assert(i);
   GNCInteractor_show_nodelete(i);
   /* Clear log window. */
-  gtk_editable_delete_text (GTK_EDITABLE (i->log_text), 0, -1);
+  gtk_text_buffer_set_text
+    (gtk_text_view_get_buffer (GTK_TEXT_VIEW (i->log_text) ),
+     "", 0);
 }
 
 
@@ -173,9 +170,10 @@
   if (gtk_toggle_button_get_active 
       (GTK_TOGGLE_BUTTON (i->close_checkbutton)))
     gtk_widget_hide_all (i->dialog);
-  gnc_set_boolean_option ("__gui", "hbci_close_on_finish",
-			  gtk_toggle_button_get_active 
-			  (GTK_TOGGLE_BUTTON (i->close_checkbutton)));
+  gnc_gconf_set_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH,
+		     gtk_toggle_button_get_active 
+		     (GTK_TOGGLE_BUTTON (i->close_checkbutton)),
+		     NULL);
 }
 
 gboolean GNCInteractor_get_cache_valid(const GNCInteractor *i)
@@ -204,7 +202,7 @@
 	gtk_widget_reparent (GTK_WIDGET (i->dialog), new_parent);
 	else
 	gtk_widget_set_parent (GTK_WIDGET (i->dialog), new_parent);*/
-      gnome_dialog_set_parent (GNOME_DIALOG (i->dialog), 
+      gtk_window_set_transient_for (GTK_WINDOW (i->dialog), 
 			       GTK_WINDOW (new_parent));
     }
 }
@@ -337,6 +335,7 @@
     if (!retval)
       break;
     
+    g_assert(passwd);
     if (strlen(passwd) < (unsigned int)minsize) {
       gboolean retval;
       char *msg = 
@@ -507,7 +506,7 @@
     dialog = data->showbox_last;
   }
   if (dialog) {
-    gnome_dialog_close (GNOME_DIALOG (dialog));
+    gtk_widget_hide (dialog);
     gtk_widget_destroy (dialog);
     g_hash_table_remove(data->showbox_hash, (gpointer)id);
   }
@@ -570,34 +569,39 @@
   b2text = gnc_hbci_utf8ToLatin1(data, b2);
   b3text = gnc_hbci_utf8ToLatin1(data, b3);
 
-  dialog = gnome_dialog_new (title, 
-			     b1 ? b1text : NULL,
-			     b2 ? b2text : NULL,
-			     b3 ? b3text : NULL,
-			     NULL);
-  gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (data->parent));
-  gnome_dialog_set_close (GNOME_DIALOG (dialog), TRUE);
+  dialog = gtk_dialog_new_with_buttons (title, 
+					GTK_WINDOW (data->parent),
+					GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
+					b1 ? b1text : NULL,
+					1,
+					b2 ? b2text : NULL,
+					2,
+					b3 ? b3text : NULL,
+					3,
+					NULL);
+  /* Ensure that the dialog box is destroyed when the user responds. */
+  g_signal_connect_swapped (dialog,
+			    "response", 
+			    G_CALLBACK (gtk_widget_destroy),
+			    dialog);
+  /* Add the label, and show everything we've added to the dialog. */
   label = gtk_label_new (text);
   gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
-  gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), label, TRUE, TRUE, 0);
-  gtk_widget_show (label);
+  gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox),
+		     label);
+  gtk_widget_show_all (dialog);
 
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-  if (result<0 || result>2) {
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
+  if (result<1 || result>3) {
     printf("messageBoxCB: Bad result %d", result);
-    g_free(title);
-    g_free(text);
-    g_free(b1text);
-    g_free(b2text);
-    g_free(b3text);
-    return 0;
+    result = 0;
   }
   g_free(title);
   g_free(text);
   g_free(b1text);
   g_free(b2text);
   g_free(b3text);
-  return result+1;
+  return result;
 }
 
 
@@ -627,6 +631,7 @@
   /*   GNCInteractor_add_log_text (data, text); */
 
   /* Set progress bar */
+  gtk_widget_set_sensitive (data->action_progress, TRUE);
   gtk_progress_set_percentage (GTK_PROGRESS (data->action_progress), 
 			       0.0);
   data->action_max = total;
@@ -715,16 +720,17 @@
 int debug_pmonitor = FALSE;
 void GNCInteractor_add_log_text (GNCInteractor *data, const char *msg)
 {
-  int pos;
+  GtkTextBuffer *tb;
+  GtkTextView *tv;
   g_assert(data);
-  
-  pos = gtk_text_get_length (GTK_TEXT (data->log_text));
-  gtk_editable_insert_text (GTK_EDITABLE (data->log_text),
-			    msg, strlen (msg),
-			    &pos);
-  gtk_editable_insert_text (GTK_EDITABLE (data->log_text),
-			    "\n", 1,
-			    &pos);
+
+  tv = GTK_TEXT_VIEW (data->log_text);
+  tb = gtk_text_view_get_buffer (tv);
+  gtk_text_buffer_insert_at_cursor (tb, msg, -1);
+  gtk_text_buffer_insert_at_cursor (tb, "\n", -1);
+  /* and scroll to the end of the buffer */
+  gtk_text_view_scroll_to_mark (tv, gtk_text_buffer_get_insert (tb),
+				0.0, FALSE, 0.0, 0.0);
 }
 
 static void
@@ -732,7 +738,7 @@
 		   gpointer user_data)
 {
   GNCInteractor *data = user_data;
-  char *name;
+  const char *name;
   g_assert(data);
   
   name = gtk_widget_get_name (GTK_WIDGET (button));
@@ -766,24 +772,24 @@
   /* Create the progress dialog window */
   xml = gnc_glade_xml_new ("hbci.glade", "HBCI_connection_dialog");
 
-  g_assert (dialog = glade_xml_get_widget (xml, "HBCI_connection_dialog"));
+  g_assert ((dialog = glade_xml_get_widget (xml, "HBCI_connection_dialog")) != NULL);
   data->dialog = dialog;
-  g_assert (data->job_entry = glade_xml_get_widget (xml, "job_entry"));
-  g_assert (data->action_entry = glade_xml_get_widget (xml, "action_entry"));
-  g_assert (data->action_progress = 
-	    glade_xml_get_widget (xml, "action_progress"));
-  g_assert (data->log_text = glade_xml_get_widget (xml, "log_text"));
-  g_assert (data->abort_button = glade_xml_get_widget (xml, "abort_button"));
+  g_assert ((data->job_entry = glade_xml_get_widget (xml, "job_entry")) != NULL);
+  g_assert ((data->action_entry = glade_xml_get_widget (xml, "action_entry")) != NULL);
+  g_assert ((data->action_progress = 
+	     glade_xml_get_widget (xml, "action_progress")) != NULL);
+  g_assert ((data->log_text = glade_xml_get_widget (xml, "log_text")) != NULL);
+  g_assert ((data->abort_button = glade_xml_get_widget (xml, "abort_button")) != NULL);
   gtk_widget_set_sensitive (GTK_WIDGET (data->abort_button), FALSE);
-  g_assert (data->close_button = glade_xml_get_widget (xml, "close_button"));
-  g_assert (data->close_checkbutton = 
-	    glade_xml_get_widget (xml, "close_checkbutton"));
+  g_assert ((data->close_button = glade_xml_get_widget (xml, "close_button")) != NULL);
+  g_assert ((data->close_checkbutton = 
+	     glade_xml_get_widget (xml, "close_checkbutton")) != NULL);
 
   /* grey out the progress bar -- its unused at the moment */
   gtk_widget_set_sensitive (data->action_progress, FALSE);
   gtk_toggle_button_set_active 
     (GTK_TOGGLE_BUTTON (data->close_checkbutton), 
-     gnc_lookup_boolean_option("__gui", "hbci_close_on_finish", TRUE));
+     gnc_gconf_get_bool(GCONF_SECTION, KEY_CLOSE_ON_FINISH, NULL));
 
   gtk_signal_connect (GTK_OBJECT (data->abort_button), "clicked", 
 		      GTK_SIGNAL_FUNC (on_button_clicked), data);
@@ -791,7 +797,7 @@
 		      GTK_SIGNAL_FUNC (on_button_clicked), data);
 
   if (data->parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (data->parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (data->parent));
   /*gtk_widget_set_parent (GTK_WIDGET (dialog), data->parent);*/
 
   gtk_object_ref (GTK_OBJECT (dialog));
Index: gnc-hbci-transfer.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/gnc-hbci-transfer.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/import-export/hbci/gnc-hbci-transfer.c -Lsrc/import-export/hbci/gnc-hbci-transfer.c -u -r1.22 -r1.23
--- src/import-export/hbci/gnc-hbci-transfer.c
+++ src/import-export/hbci/gnc-hbci-transfer.c
@@ -144,7 +144,10 @@
 	  continue;
 	}
 
-	if (result == 0) {
+	/* Result of run_until_ok: 1 == execute now, 3 == scheduled
+	   for later execution (currently unimplemented); 2 ==
+	   cancel */
+	if (result == 1) {
 
 	  /* If the user pressed "execute now", then execute this job
 	     now. This function already delete()s the job. */
@@ -160,12 +163,12 @@
 	  }
 	  
 	  gnc_hbci_cleanup_job(api, job);
-	} /* result == 0 */
+	} /* result == 1 */
 	else {
 	  /* huh? Only result == 0 should be possible. Simply ignore
 	     this case. */
 	  break;
-	} /* result == 0 */
+	} /* result == 1 */
 	  
       } /* Create a do-transaction (transfer) job */
 	
@@ -229,6 +232,8 @@
   switch (trans_type) {
   case SINGLE_DEBITNOTE:
     gnc_xfer_dialog_set_title (transdialog, _("Online HBCI Direct Debit Note"));
+  case SINGLE_INTERNAL_TRANSFER:
+    gnc_xfer_dialog_set_title (transdialog, _("Online HBCI Bank-Internal Transfer"));
   case SINGLE_TRANSFER:
   default:
     gnc_xfer_dialog_set_title (transdialog, _("Online HBCI Transaction"));
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/Makefile.am,v
retrieving revision 1.27
retrieving revision 1.28
diff -Lsrc/import-export/hbci/Makefile.am -Lsrc/import-export/hbci/Makefile.am -u -r1.27 -r1.28
--- src/import-export/hbci/Makefile.am
+++ src/import-export/hbci/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = . glade test
+SUBDIRS = . glade schemas test
 
 pkglib_LTLIBRARIES = libgncmod-hbci.la
 
@@ -6,13 +6,13 @@
   dialog-daterange.c \
   dialog-hbcitrans.c \
   dialog-pass.c \
-  gnc-hbci-cb.c \
   gnc-hbci-getbalance.c \
   gnc-hbci-gettrans.c \
   gnc-hbci-kvp.c \
   gnc-hbci-trans-templ.c \
   gnc-hbci-transfer.c \
   gnc-hbci-utils.c \
+  gnc-plugin-hbci.c \
   hbci-interaction.c \
   druid-hbci-utils.c \
   druid-hbci-initial.c \
@@ -30,44 +30,33 @@
   dialog-pass.h \
   druid-hbci-initial.h \
   druid-hbci-utils.h \
-  gnc-hbci-cb.h \
   gnc-hbci-getbalance.h \
   gnc-hbci-gettrans.h \
   gnc-hbci-kvp.h \
   gnc-hbci-transfer.h \
   gnc-hbci-trans-templ.h \
   gnc-hbci-utils.h \
+  gnc-plugin-hbci.h \
   hbci-interaction.h \
   hbci-interactionP.h
 
-
-libgncmod_hbci_la_LDFLAGS = -module
-
 libgncmod_hbci_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/import-export/libgncmod-generic-import.la \
   ${top_builddir}/src/gnome/libgncgnome.la \
   ${GLADE_LIBS} \
   ${GLIB_LIBS} \
-  ${GNOMEUI_LIBS} \
-  ${HBCI_LIBS} \
-  ${GNOME_XML_LIB}
-
-gncscmdir = ${GNC_SCM_INSTALL_DIR}/hbci
-
-gncscm_DATA = \
-  hbci.scm
-
-#gladedir = ${GNC_GLADE_DIR}
-#glade_DATA = 
+  ${GNOME_LIBS} \
+  ${HBCI_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/import-export \
@@ -79,14 +68,17 @@
   ${GUILE_INCS} \
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
-  ${HBCI_CFLAGS} \
-  ${GNOME_XML_CFLAGS}
+  ${HBCI_CFLAGS}
 
 #gladedir = $(GNC_GLADE_DIR)
 #glade_DATA = 
 
+uidir = $(GNC_UI_DIR)
+ui_DATA = \
+	gnc-plugin-hbci-ui.xml
+
 EXTRA_DIST = ${gncscm_DATA} ${libgncmod_hbci_la_empty}
 
-CLEANFILES = hbci import-export gnucash g-wrapped .scm-links
+CLEANFILES = gnucash g-wrapped .scm-links
Index: dialog-pass.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/dialog-pass.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/import-export/hbci/dialog-pass.c -Lsrc/import-export/hbci/dialog-pass.c -u -r1.6 -r1.7
--- src/import-export/hbci/dialog-pass.c
+++ src/import-export/hbci/dialog-pass.c
@@ -50,16 +50,15 @@
   dialog = glade_xml_get_widget (xml, "Password Dialog");
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   heading_label  = glade_xml_get_widget (xml, "heading_label");
   password_entry = glade_xml_get_widget (xml, "password_entry");
   g_assert(heading_label && password_entry);
 
-  gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), 1);
 
-  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                GTK_EDITABLE (password_entry));
+  gtk_entry_set_activates_default (GTK_ENTRY (password_entry), TRUE);
 
   if (windowtitle)
     gtk_window_set_title (GTK_WINDOW (dialog), windowtitle);
@@ -71,25 +70,17 @@
     gtk_entry_set_text (GTK_ENTRY (password_entry), initial_password);
   gtk_entry_set_visibility (GTK_ENTRY (password_entry), !hide_input);
 
-  gtk_widget_grab_focus (password_entry);
+  result = gtk_dialog_run (GTK_DIALOG (dialog));
 
-  /* Hide on close instead of destroy since we still need the values
-     from the boxes. */
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
-
-  if (result == 0)
+  if (result == 1) /* the hand-assigned response value */
   {
-    *password = gtk_editable_get_chars (GTK_EDITABLE (password_entry), 0, -1);
-
-    gtk_widget_destroy (GTK_WIDGET (dialog));
+    *password = g_strdup (gtk_entry_get_text (GTK_ENTRY (password_entry)) );
+    gtk_widget_destroy(dialog);
     return TRUE;
   }
+  gtk_widget_destroy(dialog);
 
   *password = NULL;
-
-  gtk_widget_destroy (GTK_WIDGET (dialog));
   return FALSE;
 }
 
@@ -114,19 +105,17 @@
   dialog = glade_xml_get_widget (xml, "Initial Password Dialog");
 
   if (parent)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   heading_label  = glade_xml_get_widget (xml, "heading_label");
   password_entry = glade_xml_get_widget (xml, "password_entry");
   confirm_entry = glade_xml_get_widget (xml, "confirm_entry");
   g_assert(heading_label && password_entry && confirm_entry);
 
-  gnome_dialog_set_default (GNOME_DIALOG (dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG (dialog), 1);
 
-  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                GTK_EDITABLE (password_entry));
-  gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                GTK_EDITABLE (confirm_entry));
+  gtk_entry_set_activates_default (GTK_ENTRY (password_entry), FALSE);
+  gtk_entry_set_activates_default (GTK_ENTRY (confirm_entry), TRUE);
 
   if (windowtitle)
     gtk_window_set_title (GTK_WINDOW (dialog), windowtitle);
@@ -134,29 +123,18 @@
   if (heading)
     gtk_label_set_text (GTK_LABEL (heading_label), heading);
 
-  gtk_widget_grab_focus (password_entry);
-
-  /* Hide on close instead of destroy since we still need the values
-     from the boxes. */
-  gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
-
   while (TRUE) {
-    result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+    result = gtk_dialog_run (GTK_DIALOG (dialog));
     
-    if (result == 0)
+    if (result == 1) /* the hand-assigned response value */
       {
-	char *pw, *confirm;
-	pw = gtk_editable_get_chars (GTK_EDITABLE (password_entry), 0, -1);
-	confirm = gtk_editable_get_chars (GTK_EDITABLE (confirm_entry), 
-					  0, -1);
+	const char *pw = gtk_entry_get_text (GTK_ENTRY (password_entry));
+	const char *confirm = gtk_entry_get_text (GTK_ENTRY (confirm_entry));
 	if (strcmp (pw, confirm) == 0) {
-	  *password = pw;
-	  g_free (confirm);
+	  *password = g_strdup(pw);
 	  gtk_widget_destroy (GTK_WIDGET (dialog));
 	  return TRUE;
 	}
-	g_free (pw);
-	g_free (confirm);
       }
     else
       break;
@@ -165,7 +143,7 @@
     if (gnc_ok_cancel_dialog (parent, GTK_RESPONSE_OK,
 			      _("The two passwords didn't match. \n"
 				"Please try again."))
-	== GTK_RESPONSE_CANCEL)
+	!= GTK_RESPONSE_OK)
       break;
   }
   *password = NULL;
Index: hbci.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/hbci.glade,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/import-export/hbci/glade/hbci.glade -Lsrc/import-export/hbci/glade/hbci.glade -u -r1.34 -r1.35
--- src/import-export/hbci/glade/hbci.glade
+++ src/import-export/hbci/glade/hbci.glade
@@ -1,50 +1,38 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GtkWindow</class>
-  <name>HBCI Init Druid</name>
-  <width>540</width>
-  <height>380</height>
-  <title>Initial HBCI Setup</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_MOUSE</position>
-  <modal>False</modal>
-  <default_width>650</default_width>
-  <default_height>580</default_height>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>hbci_init_druid</name>
-    <signal>
-      <name>cancel</name>
-      <handler>on_cancel</handler>
-      <last_modification_time>Sat, 16 Jun 2001 23:54:54 GMT</last_modification_time>
-    </signal>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>druidpagestart1</name>
-      <title>Initial HBCI Setup</title>
-      <text>This druid helps you setting up your HBCI connection with your bank.
+<glade-interface>
+<requires lib="gnome"/>
+
+<widget class="GtkWindow" id="HBCI Init Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Initial HBCI Setup</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">650</property>
+  <property name="default_height">580</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="hbci_init_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+      <signal name="cancel" handler="on_cancel"/>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="druidpagestart1">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Initial HBCI Setup</property>
+	  <property name="text" translatable="yes">This druid helps you setting up your HBCI connection with your bank.
 
 You first need to apply for HBCI access at your bank. If your bank 
 decides to grant you HBCI access, the bank will send you a letter, 
@@ -63,1996 +51,2097 @@
 feedback when a transfer has been rejected.
 
 Press 'Cancel' if you do not wish to setup any 
-HBCI connection now.</text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
+HBCI connection now.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#9999bfbf9999</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	</widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>configfile_page</name>
-      <title>Start AqHBCI Wizard</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>vbox132</name>
-	<border_width>10</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>5</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame56</name>
-	  <label>Start AqHBCI Setup Wizard</label>
-	  <label_xalign>4.84288e-08</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox156</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label8877441</name>
-	      <label>The Setup of your HBCI connection is handled by the external program &quot;AqHBCI Setup Wizard&quot;. Please press the button below to start this program.	</label>
-	      <justify>GTK_JUSTIFY_LEFT</justify>
-	      <wrap>True</wrap>
-	      <xalign>0</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>10</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="configfile_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Start AqHBCI Wizard</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#9999bfbf9999</property>
+	  <property name="logo_background">#ffffffffffff</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="vbox132">
+	      <property name="border_width">10</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">5</property>
 
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>hbox118</name>
-	      <border_width>9</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>aqhbci_button</name>
-		<can_focus>True</can_focus>
-		<label>Start AqHBCI Wizard</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<widget class="GtkFrame" id="frame56">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">4.84288e-08</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox156">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label8877441">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">The Setup of your HBCI connection is handled by the external program &quot;AqHBCI Setup Wizard&quot;. Please press the button below to start this program.	</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">True</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">10</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox118">
+			  <property name="border_width">9</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <widget class="GtkButton" id="aqhbci_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Start AqHBCI Wizard</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label1">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start AqHBCI Setup Wizard</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>account_match_page</name>
-      <title>Match HBCI accounts with GnuCash accounts</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox3</name>
-	<border_width>10</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox112</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox157</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow25</name>
-	      <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>GtkCList</class>
-		<name>account_page_list</name>
-		<can_focus>True</can_focus>
-		<columns>3</columns>
-		<column_widths>281,242,53</column_widths>
-		<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		<show_titles>True</show_titles>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label834</name>
-		  <label>HBCI account name</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label835</name>
-		  <label>GnuCash account name</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label836</name>
-		  <label>New?</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-	      </widget>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <name>label828</name>
-	      <label>Click on the line of a HBCI account name if you want to match it to a GnuCash account.
-Click &quot;Next&quot; when all desired accounts are matching.</label>
-	      <justify>GTK_JUSTIFY_LEFT</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame72</name>
-	    <label>HBCI Setup</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkVBox</class>
-	      <name>vbox144</name>
-	      <border_width>5</border_width>
-	      <homogeneous>False</homogeneous>
-	      <spacing>5</spacing>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>updatelist_button</name>
-		<can_focus>True</can_focus>
-		<label>Update 
-account list</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
-
-	      <widget>
-		<class>GtkButton</class>
-		<name>aqhbci_again_button</name>
-		<can_focus>True</can_focus>
-		<label>AqHBCI 
-Setup</label>
-		<relief>GTK_RELIEF_NORMAL</relief>
-		<child>
-		  <padding>0</padding>
-		  <expand>False</expand>
-		  <fill>False</fill>
-		</child>
-	      </widget>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="account_match_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Match HBCI accounts with GnuCash accounts</property>
+	  <property name="title_foreground">#ffffffffffff</property>
+	  <property name="background">#9999bfbf9999</property>
+	  <property name="logo_background">#ffffffffffff</property>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox3">
+	      <property name="border_width">10</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox112">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox157">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow25">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkCList" id="account_page_list">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="n_columns">3</property>
+			      <property name="column_widths">281,242,53</property>
+			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			      <property name="show_titles">True</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			      <child>
+				<widget class="GtkLabel" id="label834">
+				  <property name="label" translatable="yes">HBCI account name</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label835">
+				  <property name="label" translatable="yes">GnuCash account name</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label836">
+				  <property name="label" translatable="yes">New?</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label828">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Click on the line of a HBCI account name if you want to match it to a GnuCash account.
+Click &quot;Next&quot; when all desired accounts are matching.</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame72">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkVBox" id="vbox144">
+			  <property name="border_width">5</property>
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">5</property>
+
+			  <child>
+			    <widget class="GtkButton" id="updatelist_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">Update 
+account list</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkButton" id="aqhbci_again_button">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="label" translatable="yes">AqHBCI 
+Setup</property>
+			      <property name="use_underline">True</property>
+			      <property name="relief">GTK_RELIEF_NORMAL</property>
+			      <property name="focus_on_click">True</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label8877442">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">HBCI Setup</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>initial_finish_page</name>
-      <signal>
-	<name>finish</name>
-	<handler>on_finish</handler>
-	<last_modification_time>Sat, 16 Jun 2001 23:41:40 GMT</last_modification_time>
-      </signal>
-      <title>HBCI Setup Finished</title>
-      <text>Now the setup for all HBCI accounts that are matching
+      <child>
+	<widget class="GnomeDruidPageEdge" id="initial_finish_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">HBCI Setup Finished</property>
+	  <property name="text" translatable="yes">Now the setup for all HBCI accounts that are matching
 to a Gnucash account is finished. You can now invoke HBCI actions
 on those accounts.
 
 If you want to add another HBCI bank, user, or account, you can 
 start this druid again anytime.
 
-Press 'Finish' now.</text>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>0,0,0</text_color>
-      <title_color>255,255,255</title_color>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>HBCI_trans_dialog</name>
-  <title>Online Transaction</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>True</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox2</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area2</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>0</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>0</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+Press 'Finish' now.</property>
+	  <property name="title_color">#ffffffffffff</property>
+	  <property name="text_color">#000000000000</property>
+	  <property name="background_color">#9999bfbf9999</property>
+	  <property name="logo_background_color">#ffffffffffff</property>
+	  <property name="textbox_color">#ffffffffffff</property>
+	  <signal name="finish" handler="on_finish"/>
+	</widget>
       </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>exec_now_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Execute Now</label>
-	<stock_pixmap>GNOME_STOCK_PIXMAP_EXEC</stock_pixmap>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>exec_later_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<label>Execute Later (unimpl.)</label>
-	<stock_pixmap>GNOME_STOCK_PIXMAP_TIMER</stock_pixmap>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
     </widget>
+  </child>
+</widget>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox151</name>
-      <homogeneous>False</homogeneous>
-      <spacing>1</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkLabel</class>
-	<name>heading_label</name>
-	<label>Enter an Online Transaction</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkHSeparator</class>
-	<name>hseparator7</name>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkTable</class>
-	<name>table6</name>
-	<rows>21</rows>
-	<columns>3</columns>
-	<homogeneous>False</homogeneous>
-	<row_spacing>0</row_spacing>
-	<column_spacing>0</column_spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>recp_account_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>12</text_max_length>
-	  <text></text>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>3</top_attach>
-	    <bottom_attach>4</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+<widget class="GtkDialog" id="HBCI_trans_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Online Transaction</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="exec_now_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Execute Now</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>recp_account_heading</name>
-	  <label>Recipient Account Number</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>2</top_attach>
-	    <bottom_attach>3</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="exec_later_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Execute Later (unimpl.)</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">3</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>recp_bankcode_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>8</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>3</top_attach>
-	    <bottom_attach>4</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>recp_bankcode_heading</name>
-	  <label>Recipient Bank Code</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>2</top_attach>
-	    <bottom_attach>3</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+      <child>
+	<widget class="GtkVBox" id="vbox151">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">1</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="heading_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Enter an Online Transaction</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>recp_name_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>27</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkHSeparator" id="hseparator7">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>recp_name_heading</name>
-	  <label>Recipient Name</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	    <widget class="GtkTable" id="table6">
+	      <property name="visible">True</property>
+	      <property name="n_rows">21</property>
+	      <property name="n_columns">3</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>recp_bankname_heading</name>
-	  <label>at Bank</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>4</top_attach>
-	    <bottom_attach>5</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkEntry" id="recp_account_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>recp_bankname_label</name>
-	  <label>(filled in automatically)</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>5</top_attach>
-	    <bottom_attach>6</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="recp_account_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Recipient Account Number</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label8877434</name>
-	  <label>Amount</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>7</top_attach>
-	    <bottom_attach>8</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkEntry" id="recp_bankcode_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator6</name>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>9</top_attach>
-	    <bottom_attach>10</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="recp_bankcode_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Recipient Bank Code</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label8877433</name>
-	  <label>Payment Purpose (only for recipient)</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>10</top_attach>
-	    <bottom_attach>11</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkEntry" id="recp_name_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label8877435</name>
-	  <label>Payment Purpose continued</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>12</top_attach>
-	    <bottom_attach>13</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="recp_name_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Recipient Name</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_name_heading</name>
-	  <label>Originator Name</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>15</top_attach>
-	    <bottom_attach>16</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="recp_bankname_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">at Bank</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_name_label</name>
-	  <label>something</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>16</top_attach>
-	    <bottom_attach>17</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="recp_bankname_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">(filled in automatically)</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_bankname_heading</name>
-	  <label>at Bank</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>17</top_attach>
-	    <bottom_attach>18</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="label8877434">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Amount</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">7</property>
+		  <property name="bottom_attach">8</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_bankname_label</name>
-	  <label>something</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>18</top_attach>
-	    <bottom_attach>19</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkHSeparator" id="hseparator6">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">9</property>
+		  <property name="bottom_attach">10</property>
+		  <property name="x_options">fill</property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_account_heading</name>
-	  <label>Originator Account Number</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>15</top_attach>
-	    <bottom_attach>16</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="label8877433">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Payment Purpose (only for recipient)</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">10</property>
+		  <property name="bottom_attach">11</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_account_label</name>
-	  <label>something</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>16</top_attach>
-	    <bottom_attach>17</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkLabel" id="label8877435">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Payment Purpose continued</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">12</property>
+		  <property name="bottom_attach">13</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_bankcode_heading</name>
-	  <label>Bank Code</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>17</top_attach>
-	    <bottom_attach>18</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	      <child>
+		<widget class="GtkLabel" id="orig_name_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Originator Name</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">15</property>
+		  <property name="bottom_attach">16</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_name_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">something</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">16</property>
+		  <property name="bottom_attach">17</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_bankname_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">at Bank</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">17</property>
+		  <property name="bottom_attach">18</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_bankname_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">something</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">18</property>
+		  <property name="bottom_attach">19</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_account_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Originator Account Number</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">15</property>
+		  <property name="bottom_attach">16</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_account_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">something</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">16</property>
+		  <property name="bottom_attach">17</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_bankcode_heading">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Bank Code</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">17</property>
+		  <property name="bottom_attach">18</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="orig_bankcode_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">something</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">18</property>
+		  <property name="bottom_attach">19</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHSeparator" id="hseparator4">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">14</property>
+		  <property name="bottom_attach">15</property>
+		  <property name="x_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="amount_hbox">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <placeholder/>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">8</property>
+		  <property name="bottom_attach">9</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox117">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">4</property>
+
+		  <child>
+		    <widget class="GtkVBox" id="vbox158">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="add_templ_button">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Add current</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="add_template_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="moveup_templ_button">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-go-up</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="moveup_templ_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="movedown_templ_button">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-go-down</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="movedown_templ_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="sort_templ_button">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Sort</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="sort_templ_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">10</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="del_templ_button">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Delete</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="del_template_cb"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="template_scrolledwindow">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_NONE</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkViewport" id="viewport1">
+			  <property name="visible">True</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+			  <child>
+			    <widget class="GtkTreeView" id="template_list">
+			      <property name="headers_visible">True</property>
+			      <property name="rules_hint">False</property>
+			      <property name="reorderable">False</property>
+			      <property name="enable_search">True</property>
+			      <signal name="select_child" handler="on_template_list_select_child"/>
+			      <signal name="selection_changed" handler="on_template_list_selection_changed"/>
+			      <signal name="unselect_child" handler="on_template_list_unselect_child"/>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8877442">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Use Transaction Template</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		      <property name="pack_type">GTK_PACK_END</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">20</property>
+		  <property name="bottom_attach">21</property>
+		  <property name="x_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHSeparator" id="hseparator8">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">19</property>
+		  <property name="bottom_attach">20</property>
+		  <property name="y_padding">1</property>
+		  <property name="x_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHSeparator" id="hseparator5">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="y_padding">1</property>
+		  <property name="x_options">fill</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="purpose_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">11</property>
+		  <property name="bottom_attach">12</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="purpose_cont2_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">13</property>
+		  <property name="bottom_attach">14</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="purpose_cont_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">11</property>
+		  <property name="bottom_attach">12</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="purpose_cont3_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">False</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">13</property>
+		  <property name="bottom_attach">14</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>orig_bankcode_label</name>
-	  <label>something</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>18</top_attach>
-	    <bottom_attach>19</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+<widget class="GtkDialog" id="HBCI_connection_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">HBCI Connection Window</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">350</property>
+  <property name="default_height">420</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area3">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="close_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-close</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator4</name>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>14</top_attach>
-	    <bottom_attach>15</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
+	    <widget class="GtkButton" id="abort_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>amount_hbox</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>8</top_attach>
-	    <bottom_attach>9</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
-	  </child>
-
-	  <widget>
-	    <class>Placeholder</class>
-	  </widget>
-	</widget>
+      <child>
+	<widget class="GtkVBox" id="vbox149">
+	  <property name="border_width">8</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">8</property>
 
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox117</name>
-	  <border_width>2</border_width>
-	  <homogeneous>False</homogeneous>
-	  <spacing>4</spacing>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>20</top_attach>
-	    <bottom_attach>21</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
-	  </child>
-
-	  <widget>
-	    <class>GtkVBox</class>
-	    <name>vbox158</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>add_templ_button</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>add_template_cb</handler>
-		<last_modification_time>Sun, 19 Oct 2003 19:52:26 GMT</last_modification_time>
-	      </signal>
-	      <label>Add current</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>moveup_templ_button</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>moveup_templ_cb</handler>
-		<last_modification_time>Sun, 08 Feb 2004 17:48:19 GMT</last_modification_time>
-	      </signal>
-	      <stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>movedown_templ_button</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>movedown_templ_cb</handler>
-		<last_modification_time>Sun, 08 Feb 2004 17:48:35 GMT</last_modification_time>
-	      </signal>
-	      <stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>sort_templ_button</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>sort_templ_cb</handler>
-		<last_modification_time>Sun, 08 Feb 2004 17:48:52 GMT</last_modification_time>
-	      </signal>
-	      <label>Sort</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>10</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkButton</class>
-	      <name>del_templ_button</name>
-	      <border_width>2</border_width>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>clicked</name>
-		<handler>del_template_cb</handler>
-		<last_modification_time>Sun, 19 Oct 2003 19:55:28 GMT</last_modification_time>
-	      </signal>
-	      <label>Delete</label>
-	      <relief>GTK_RELIEF_NORMAL</relief>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>template_scrolledwindow</name>
-	    <width>350</width>
-	    <height>142</height>
-	    <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-
-	    <widget>
-	      <class>GtkViewport</class>
-	      <name>viewport1</name>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkList</class>
-		<name>template_list</name>
-		<visible>False</visible>
-		<signal>
-		  <name>select_child</name>
-		  <handler>on_template_list_select_child</handler>
-		  <last_modification_time>Sun, 19 Oct 2003 20:56:25 GMT</last_modification_time>
-		</signal>
-		<signal>
-		  <name>selection_changed</name>
-		  <handler>on_template_list_selection_changed</handler>
-		  <last_modification_time>Sun, 19 Oct 2003 20:57:16 GMT</last_modification_time>
-		</signal>
-		<signal>
-		  <name>unselect_child</name>
-		  <handler>on_template_list_unselect_child</handler>
-		  <last_modification_time>Sun, 19 Oct 2003 20:57:22 GMT</last_modification_time>
-		</signal>
-		<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label8877442</name>
-	    <label>Use Transaction Template</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0.5</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	      <pack>GTK_PACK_END</pack>
-	    </child>
-	  </widget>
-	</widget>
+	    <widget class="GtkFrame" id="frame68">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator8</name>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>19</top_attach>
-	    <bottom_attach>20</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>1</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
-	  </child>
-	</widget>
+	      <child>
+		<widget class="GtkTable" id="table5">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8877424">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Current Job</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8877425">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Current Action</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8877426">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Progress</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkProgressBar" id="action_progress">
+		      <property name="visible">True</property>
+		      <property name="orientation">GTK_PROGRESS_LEFT_TO_RIGHT</property>
+		      <property name="fraction">0</property>
+		      <property name="pulse_step">0.1</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="job_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="action_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-	<widget>
-	  <class>GtkHSeparator</class>
-	  <name>hseparator5</name>
-	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>6</top_attach>
-	    <bottom_attach>7</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>1</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>True</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>True</yfill>
+	      <child>
+		<widget class="GtkLabel" id="label8877443">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Progress</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>purpose_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>27</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>11</top_attach>
-	    <bottom_attach>12</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkFrame" id="frame69">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow30">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTextView" id="log_text">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">False</property>
+		      <property name="overwrite">False</property>
+		      <property name="accepts_tab">True</property>
+		      <property name="justification">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap_mode">GTK_WRAP_WORD</property>
+		      <property name="cursor_visible">True</property>
+		      <property name="pixels_above_lines">0</property>
+		      <property name="pixels_below_lines">0</property>
+		      <property name="pixels_inside_wrap">0</property>
+		      <property name="left_margin">0</property>
+		      <property name="right_margin">0</property>
+		      <property name="indent">0</property>
+		      <property name="text" translatable="yes"></property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label8877444">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Log Messages</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>purpose_cont2_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>27</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>13</top_attach>
-	    <bottom_attach>14</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkCheckButton" id="close_checkbutton">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Close when finished</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">True</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>purpose_cont_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>27</text_max_length>
-	  <text></text>
-	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>11</top_attach>
-	    <bottom_attach>12</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+<widget class="GtkDialog" id="HBCI_daterange_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Get Transactions Online</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="ok_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>purpose_cont3_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>True</text_visible>
-	  <text_max_length>27</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>2</left_attach>
-	    <right_attach>3</right_attach>
-	    <top_attach>13</top_attach>
-	    <bottom_attach>14</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="cancel_button">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>HBCI_connection_dialog</name>
-  <title>HBCI Connection Window</title>
-  <type>GTK_WINDOW_DIALOG</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>350</default_width>
-  <default_height>420</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox3</name>
-    <homogeneous>False</homogeneous>
-    <spacing>0</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area3</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>close_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>abort_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox149</name>
-      <border_width>8</border_width>
-      <homogeneous>False</homogeneous>
-      <spacing>8</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame68</name>
-	<label>Progress</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkTable</class>
-	  <name>table5</name>
-	  <rows>3</rows>
-	  <columns>2</columns>
-	  <homogeneous>False</homogeneous>
-	  <row_spacing>0</row_spacing>
-	  <column_spacing>0</column_spacing>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label8877424</name>
-	    <label>Current Job</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label8877425</name>
-	    <label>Current Action</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label8877426</name>
-	    <label>Progress</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <left_attach>0</left_attach>
-	      <right_attach>1</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkProgressBar</class>
-	    <name>action_progress</name>
-	    <value>0</value>
-	    <lower>0</lower>
-	    <upper>100</upper>
-	    <bar_style>GTK_PROGRESS_CONTINUOUS</bar_style>
-	    <orientation>GTK_PROGRESS_LEFT_TO_RIGHT</orientation>
-	    <activity_mode>False</activity_mode>
-	    <show_text>True</show_text>
-	    <format>%P %%</format>
-	    <text_xalign>0.5</text_xalign>
-	    <text_yalign>0.5</text_yalign>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>2</top_attach>
-	      <bottom_attach>3</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>False</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>job_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>0</top_attach>
-	      <bottom_attach>1</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>action_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <left_attach>1</left_attach>
-	      <right_attach>2</right_attach>
-	      <top_attach>1</top_attach>
-	      <bottom_attach>2</bottom_attach>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	      <xexpand>True</xexpand>
-	      <yexpand>False</yexpand>
-	      <xshrink>False</xshrink>
-	      <yshrink>False</yshrink>
-	      <xfill>True</xfill>
-	      <yfill>False</yfill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame69</name>
-	<label>Log Messages</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow30</name>
-	  <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkText</class>
-	    <name>log_text</name>
-	    <can_focus>True</can_focus>
-	    <editable>False</editable>
-	    <text></text>
-	  </widget>
-	</widget>
-      </widget>
+	<widget class="GtkVBox" id="vbox152">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="heading_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Date range of transactions to retrieve:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 
-      <widget>
-	<class>GtkCheckButton</class>
-	<name>close_checkbutton</name>
-	<can_focus>True</can_focus>
-	<label>Close when finished</label>
-	<active>True</active>
-	<draw_indicator>True</draw_indicator>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-    </widget>
-  </widget>
-</widget>
+	  <child>
+	    <widget class="GtkFrame" id="frame70">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>HBCI_daterange_dialog</name>
-  <title>Get Transactions Online</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox4</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area4</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+	      <child>
+		<widget class="GtkVBox" id="vbox153">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="last_retrieval_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Last retrieval date</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox115">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="enter_from_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Enter date:</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">last_retrieval_button</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="enter_from_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="first_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Earliest possible date</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">last_retrieval_button</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>ok_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>cancel_button</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+	      <child>
+		<widget class="GtkLabel" id="label8877445">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">From</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox152</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	  <child>
+	    <widget class="GtkFrame" id="frame71">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<name>heading_label</name>
-	<label>Date range of transactions to retrieve:</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame70</name>
-	<label>From</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox153</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>last_retrieval_button</name>
-	    <can_focus>True</can_focus>
-	    <label>Last retrieval date</label>
-	    <active>True</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>fromdate</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox115</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>enter_from_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Enter date:</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>fromdate</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>enter_from_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
-	    </widget>
-	  </widget>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>first_button</name>
-	    <can_focus>True</can_focus>
-	    <label>Earliest possible date</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>fromdate</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-	</widget>
-      </widget>
+	      <child>
+		<widget class="GtkVBox" id="vbox154">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="now_button">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Now</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox116">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkRadioButton" id="enter_to_button">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label" translatable="yes">Enter date:</property>
+			  <property name="use_underline">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">False</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			  <property name="group">now_button</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkHBox" id="enter_to_box">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">0</property>
+
+			  <child>
+			    <placeholder/>
+			  </child>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">True</property>
+			  <property name="fill">True</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame71</name>
-	<label>To</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkVBox</class>
-	  <name>vbox154</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-
-	  <widget>
-	    <class>GtkRadioButton</class>
-	    <name>now_button</name>
-	    <can_focus>True</can_focus>
-	    <label>Now</label>
-	    <active>False</active>
-	    <draw_indicator>True</draw_indicator>
-	    <group>todate</group>
-	    <child>
-	      <padding>0</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkHBox</class>
-	    <name>hbox116</name>
-	    <homogeneous>False</homogeneous>
-	    <spacing>0</spacing>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkRadioButton</class>
-	      <name>enter_to_button</name>
-	      <can_focus>True</can_focus>
-	      <label>Enter date:</label>
-	      <active>False</active>
-	      <draw_indicator>True</draw_indicator>
-	      <group>todate</group>
-	      <child>
-		<padding>0</padding>
-		<expand>False</expand>
-		<fill>False</fill>
-	      </child>
-	    </widget>
-
-	    <widget>
-	      <class>GtkHBox</class>
-	      <name>enter_to_box</name>
-	      <homogeneous>False</homogeneous>
-	      <spacing>0</spacing>
-	      <child>
-		<padding>0</padding>
-		<expand>True</expand>
-		<fill>True</fill>
-	      </child>
-
-	      <widget>
-		<class>Placeholder</class>
-	      </widget>
+	      <child>
+		<widget class="GtkLabel" id="label8877446">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">To</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GnomeDialog</class>
-  <name>HBCI_version_dialog</name>
-  <title>HBCI Version</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>True</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox5</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area5</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<widget class="GtkDialog" id="HBCI_version_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">HBCI Version</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox5">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area5">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="button2">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button2</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button4</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+	  <child>
+	    <widget class="GtkButton" id="button4">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox155</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkVBox" id="vbox155">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label8877436">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Choose a HBCI Version to use with the selected bank:</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_CENTER</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkScrolledWindow" id="scrolledwindow31">
+	      <property name="visible">True</property>
+	      <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+	      <property name="shadow_type">GTK_SHADOW_IN</property>
+	      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
 
-      <widget>
-	<class>GtkLabel</class>
-	<name>label8877436</name>
-	<label>Choose a HBCI Version to use with the selected bank:</label>
-	<justify>GTK_JUSTIFY_CENTER</justify>
-	<wrap>False</wrap>
-	<xalign>0.5</xalign>
-	<yalign>0.5</yalign>
-	<xpad>0</xpad>
-	<ypad>0</ypad>
-	<child>
-	  <padding>0</padding>
-	  <expand>False</expand>
-	  <fill>False</fill>
-	</child>
-      </widget>
-
-      <widget>
-	<class>GtkScrolledWindow</class>
-	<name>scrolledwindow31</name>
-	<hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	<vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkCList</class>
-	  <name>version_clist</name>
-	  <can_focus>True</can_focus>
-	  <columns>1</columns>
-	  <column_widths>80</column_widths>
-	  <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	  <show_titles>False</show_titles>
-	  <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <child_name>CList:title</child_name>
-	    <name>label8877437</name>
-	    <label>Version</label>
-	    <justify>GTK_JUSTIFY_LEFT</justify>
-	    <wrap>False</wrap>
-	    <xalign>0</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	  </widget>
+	      <child>
+		<widget class="GtkCList" id="version_clist">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="n_columns">1</property>
+		  <property name="column_widths">80</property>
+		  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		  <property name="show_titles">True</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label8877437">
+		      <property name="label" translatable="yes">Version</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/hbci/glade/.cvsignore -Lsrc/import-export/hbci/glade/.cvsignore -u -r1.1 -r1.2
--- src/import-export/hbci/glade/.cvsignore
+++ src/import-export/hbci/glade/.cvsignore
@@ -1,2 +1,3 @@
+*.gladep
 Makefile
 Makefile.in
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/hbci/glade/Makefile.am -Lsrc/import-export/hbci/glade/Makefile.am -u -r1.2 -r1.3
--- src/import-export/hbci/glade/Makefile.am
+++ src/import-export/hbci/glade/Makefile.am
@@ -1,6 +1,7 @@
 gladedir = $(GNC_GLADE_DIR)
 glade_DATA = \
   hbci.glade \
-  hbcipass.glade
+  hbcipass.glade \
+  hbciprefs.glade
 
 EXTRA_DIST = $(glade_DATA)
Index: hbcipass.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/hbci/glade/hbcipass.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/hbci/glade/hbcipass.glade -Lsrc/import-export/hbci/glade/hbcipass.glade -u -r1.3 -r1.4
--- src/import-export/hbci/glade/hbcipass.glade
+++ src/import-export/hbci/glade/hbcipass.glade
@@ -1,350 +1,358 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Password Dialog</name>
-  <title>Enter Password</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>dialog-vbox16</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>dialog-action_area16</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
+<glade-interface>
+<requires lib="gnome"/>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button79</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button81</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<widget class="GtkDialog" id="Password Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Enter Password</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox16">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area16">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-    <widget>
-      <class>GtkLabel</class>
-      <name>heading_label</name>
-      <label>Enter your password</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-      </child>
-    </widget>
-
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame47</name>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
-
-      <widget>
-	<class>GtkHBox</class>
-	<name>hbox95</name>
-	<border_width>10</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>2</spacing>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847714</name>
-	  <label>Password:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>password_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>False</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
 	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-  </widget>
-</widget>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>Initial Password Dialog</name>
-  <title>Enter new Password</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>False</allow_grow>
-  <auto_shrink>False</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>True</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox106</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>4</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox1</name>
-      <layout_style>GTK_BUTTONBOX_END</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>True</fill>
-	<pack>GTK_PACK_END</pack>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
       </child>
 
-      <widget>
-	<class>GtkButton</class>
-	<name>button82</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button83</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GtkLabel</class>
-      <name>heading_label</name>
-      <label>Enter and confirm your new password</label>
-      <justify>GTK_JUSTIFY_CENTER</justify>
-      <wrap>False</wrap>
-      <xalign>0.5</xalign>
-      <yalign>0.5</yalign>
-      <xpad>0</xpad>
-      <ypad>0</ypad>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkLabel" id="heading_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Enter your password</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">True</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
       </child>
-    </widget>
 
-    <widget>
-      <class>GtkFrame</class>
-      <name>frame48</name>
-      <label_xalign>0</label_xalign>
-      <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
       <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+	<widget class="GtkFrame" id="frame47">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-      <widget>
-	<class>GtkTable</class>
-	<name>table1</name>
-	<border_width>10</border_width>
-	<rows>2</rows>
-	<columns>2</columns>
-	<homogeneous>False</homogeneous>
-	<row_spacing>0</row_spacing>
-	<column_spacing>0</column_spacing>
-
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>password_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>False</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkHBox" id="hbox95">
+	      <property name="border_width">10</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">2</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847714">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Password:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="password_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">False</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="Initial Password Dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Enter new Password</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox106">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847716</name>
-	  <label>Password:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>0</top_attach>
-	    <bottom_attach>1</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">2</property>
+	    </widget>
 	  </child>
-	</widget>
 
-	<widget>
-	  <class>GtkEntry</class>
-	  <name>confirm_entry</name>
-	  <can_focus>True</can_focus>
-	  <editable>True</editable>
-	  <text_visible>False</text_visible>
-	  <text_max_length>0</text_max_length>
-	  <text></text>
 	  <child>
-	    <left_attach>1</left_attach>
-	    <right_attach>2</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>True</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	    </widget>
 	  </child>
 	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="heading_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Enter and confirm your new password</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_CENTER</property>
+	  <property name="wrap">True</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame48">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847717</name>
-	  <label>Confirm Password:</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
 	  <child>
-	    <left_attach>0</left_attach>
-	    <right_attach>1</right_attach>
-	    <top_attach>1</top_attach>
-	    <bottom_attach>2</bottom_attach>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <xexpand>False</xexpand>
-	    <yexpand>False</yexpand>
-	    <xshrink>False</xshrink>
-	    <yshrink>False</yshrink>
-	    <xfill>True</xfill>
-	    <yfill>False</yfill>
+	    <widget class="GtkTable" id="table1">
+	      <property name="border_width">10</property>
+	      <property name="visible">True</property>
+	      <property name="n_rows">2</property>
+	      <property name="n_columns">2</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">0</property>
+	      <property name="column_spacing">0</property>
+
+	      <child>
+		<widget class="GtkEntry" id="password_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="has_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">False</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847716">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Password:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="confirm_entry">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">True</property>
+		  <property name="visibility">False</property>
+		  <property name="max_length">0</property>
+		  <property name="text" translatable="yes"></property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char" translatable="yes">*</property>
+		  <property name="activates_default">True</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847717">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Confirm Password:</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: gncmod-log-replay.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/gncmod-log-replay.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/log-replay/gncmod-log-replay.c -Lsrc/import-export/log-replay/gncmod-log-replay.c -u -r1.1 -r1.2
--- src/import-export/log-replay/gncmod-log-replay.c
+++ src/import-export/log-replay/gncmod-log-replay.c
@@ -26,11 +26,11 @@
 #include "config.h"
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-log-replay.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "gnc-plugin-log-replay.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_log_replay_LTX_gnc_module_system_interface = 0;
@@ -79,8 +79,10 @@
   {
     return FALSE;
   }
-    scm_c_eval_string("(load-from-path \"log-replay/log-replay.scm\")");
-    scm_c_define_gsubr("gnc:log-replay", 0, 0, 0, scm_gnc_file_log_replay);
+
+  /* Add menu items with C callbacks */
+  gnc_plugin_log_replay_create_plugin();
+
   return TRUE;
 }
 
Index: gnc-log-replay.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/gnc-log-replay.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/log-replay/gnc-log-replay.h -Lsrc/import-export/log-replay/gnc-log-replay.h -u -r1.1 -r1.2
--- src/import-export/log-replay/gnc-log-replay.h
+++ src/import-export/log-replay/gnc-log-replay.h
@@ -30,5 +30,4 @@
  *     is selected the the .log file is opened and read.  It's contents
  *     are then silently merged in the current log file. */
 void              gnc_file_log_replay (void);
-SCM  scm_gnc_file_log_replay (void);
 #endif
--- src/import-export/log-replay/log-replay.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(define (add-log-replay-menu-item)
-  (gnc:add-extension
-   (gnc:make-menu-item(N_ "Replay GnuCash .log file")
-		      (N_ "Replay a gnucash log file after a crash.  This cannot be undone.")
-		      (list gnc:window-name-main "File" "_Import" "")
-		      (lambda ()
-			(gnc:log-replay)))))
-
-(gnc:hook-add-dangler gnc:*ui-startup-hook* add-log-replay-menu-item)
-
Index: gnc-log-replay.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/gnc-log-replay.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/import-export/log-replay/gnc-log-replay.c -Lsrc/import-export/log-replay/gnc-log-replay.c -u -r1.7 -r1.8
--- src/import-export/log-replay/gnc-log-replay.c
+++ src/import-export/log-replay/gnc-log-replay.c
@@ -38,18 +38,23 @@
 #include "Account.h"
 #include "Transaction.h"
 #include "TransactionP.h"
-#include "global-options.h"
 #include "gnc-log-replay.h"
-#include "gnc-file-dialog.h"
+#include "gnc-file.h"
 #include "gnc-engine-util.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 
 #include "dialog-utils.h"
 
 
-/*static short module = MOD_IMPORT;*/
-static short module = MOD_TEST;
+#define GCONF_SECTION "dialogs/log_replay"
+
+/* NW: If you want a new log_module, just define
+a unique string either in gnc-engine.h or
+locally.*/
+/*static QofLogModule log_module = GNC_MOD_IMPORT;*/
+static QofLogModule log_module = GNC_MOD_TEST;
 
 /* fprintf (trans_log, "mod	guid	time_now	" \
    "date_entered	date_posted	" \
@@ -102,12 +107,6 @@
  * Entry point
 \********************************************************************/
 
-SCM  scm_gnc_file_log_replay ()
-{
-  gnc_file_log_replay();
-  return SCM_EOL;
-}
-
 static char *olds;
 /* This version of strtok will only match SINGLE occurence of delim,
    returning a 0 length valid string between two consecutive ocurence of delim.
@@ -497,7 +496,7 @@
 
 void gnc_file_log_replay (void)
 {
-  const char *selected_filename;
+  char *selected_filename;
   char *default_dir;
   char read_buf[256];
   char *read_retval;
@@ -505,21 +504,23 @@
   char * expected_header = "mod	trans_guid	split_guid	time_now	date_entered	date_posted	acc_guid	acc_name	num	description	notes	memo	action	reconciled	amount	value	date_reconciled";
   char * record_start_str = "===== START";
 
-  gnc_set_log_level(MOD_IMPORT, GNC_LOG_DEBUG);
+  gnc_set_log_level(GNC_MOD_IMPORT, GNC_LOG_DEBUG);
   ENTER(" ");
 
-  default_dir = gnc_lookup_string_option("__paths", "Log Files", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select a .log file to replay"),
 				      NULL,
-				      default_dir);
+				      default_dir,
+				      GNC_FILE_DIALOG_OPEN);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Log Files", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
@@ -559,6 +560,7 @@
 	    }
 	  fclose(log_file);
 	}
+      g_free(selected_filename);
     }
   
 }
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/log-replay/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/log-replay/Makefile.am -Lsrc/import-export/log-replay/Makefile.am -u -r1.1 -r1.2
--- src/import-export/log-replay/Makefile.am
+++ src/import-export/log-replay/Makefile.am
@@ -4,41 +4,41 @@
 
 libgncmod_log_replay_la_SOURCES = \
   gnc-log-replay.c \
+  gnc-plugin-log-replay.c \
   gncmod-log-replay.c
 
 noinst_HEADERS = \
-  gnc-log-replay.h
-
-libgncmod_log_replay_la_LDFLAGS = -module
+  gnc-log-replay.h \
+  gnc-plugin-log-replay.h
 
 libgncmod_log_replay_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/import-export/libgncmod-generic-import.la \
-  ${GLIB_LIBS}
-
-gncscmdir = ${GNC_SCM_INSTALL_DIR}/log-replay
-
-gncscm_DATA = \
-	log-replay.scm
+  ${GLIB_LIBS} ${QOF_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/import-export \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
 
+uidir = $(GNC_UI_DIR)
+dist_ui_DATA = \
+	gnc-plugin-log-replay-ui.xml
+
 EXTRA_DIST = \
-  .cvsignore \
-  ${gncscm_DATA}
+  .cvsignore
 
-CLEANFILES = g-wrapped .scm-links
+CLEANFILES = g-wrapped
Index: gnc-mt940-import.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/mt940/gnc-mt940-import.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/mt940/gnc-mt940-import.h -Lsrc/import-export/mt940/gnc-mt940-import.h -u -r1.1 -r1.2
--- src/import-export/mt940/gnc-mt940-import.h
+++ src/import-export/mt940/gnc-mt940-import.h
@@ -31,5 +31,4 @@
  *     are merged into the existing session (if any). The current
  *     session continues to remain open for editing. */
 void              gnc_file_mt940_import (void);
-SCM  scm_gnc_file_mt940_import (void);
 #endif
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/mt940/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/mt940/Makefile.am -Lsrc/import-export/mt940/Makefile.am -u -r1.2 -r1.3
--- src/import-export/mt940/Makefile.am
+++ src/import-export/mt940/Makefile.am
@@ -5,12 +5,12 @@
 
 libgncmod_mt940_la_SOURCES = \
   gnc-mt940-import.c \
-  gncmod-mt940-import.c
+  gncmod-mt940-import.c \
+  gnc-plugin-mt940.c
 
 noinst_HEADERS = \
-  gnc-mt940-import.h
-
-libgncmod_mt940_la_LDFLAGS = -module
+  gnc-mt940-import.h \
+  gnc-plugin-mt940.h
 
 libgncmod_mt940_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
@@ -19,17 +19,11 @@
   ${GLIB_LIBS} \
   $(HBCI_LIBS)
 
-gncscmdir = ${GNC_SCM_INSTALL_DIR}/mt940
-
-gncscm_DATA = \
-	mt940-import.scm
-
 AM_CFLAGS = \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/import-export \
@@ -41,8 +35,9 @@
   ${GTKHTML_CFLAGS} \
   $(HBCI_CFLAGS)
 
-EXTRA_DIST = \
-  .cvsignore \
-  ${gncscm_DATA}
+uidir = $(GNC_UI_DIR)
+ui_DATA = \
+	gnc-plugin-mt940-ui.xml
 
-CLEANFILES = mt940 import-export gnucash g-wrapped .scm-links
+EXTRA_DIST = \
+  .cvsignore
Index: gnc-mt940-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/mt940/gnc-mt940-import.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/mt940/gnc-mt940-import.c -Lsrc/import-export/mt940/gnc-mt940-import.c -u -r1.2 -r1.3
--- src/import-export/mt940/gnc-mt940-import.c
+++ src/import-export/mt940/gnc-mt940-import.c
@@ -42,17 +42,18 @@
 
 #include "Account.h"
 #include "Transaction.h"
-#include "global-options.h"
 
-#include "gnc-engine-util.h"
-#include "gnc-file-dialog.h"
+#include "gnc-engine.h"
+#include "gnc-file.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-hbci-utils.h"
 
 #include "gnc-mt940-import.h"
 
+#define GCONF_SECTION "dialogs/import/mt940"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 static void *trans_importer_cb (const HBCI_Transaction *h_trans, 
 			    void *user_data);
@@ -62,15 +63,9 @@
  * Entry point
 \********************************************************************/
 
-SCM  scm_gnc_file_mt940_import ()
-{
-  gnc_file_mt940_import();
-  return SCM_EOL;
-}
-
 void gnc_file_mt940_import (void)
 {
-  const char *selected_filename;
+  char *selected_filename;
   char *default_dir;
   FILE *mt940_file;
   GNCImportMainMatcher *gnc_mt940_importer_gui = NULL;
@@ -78,18 +73,20 @@
   /* gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE); */
   DEBUG("gnc_file_mt940_import(): Begin...\n");
 
-  default_dir = gnc_lookup_string_option("__paths", "Import MT940", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select an MT940 file to process"),
 				      NULL,
-				      default_dir);
+				      default_dir,
+				      GNC_FILE_DIALOG_IMPORT);
+  g_free(default_dir);
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Import MT940", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
 
       /*strncpy(file,selected_filename, 255);*/
@@ -140,6 +137,7 @@
         HBCI_transactionReport_delete(tr);
       }
       g_free(mt940_records);
+      g_free(selected_filename);
     }
 }
 
Index: gncmod-mt940-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/mt940/gncmod-mt940-import.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/mt940/gncmod-mt940-import.c -Lsrc/import-export/mt940/gncmod-mt940-import.c -u -r1.1 -r1.2
--- src/import-export/mt940/gncmod-mt940-import.c
+++ src/import-export/mt940/gncmod-mt940-import.c
@@ -25,12 +25,11 @@
  */
 #include "config.h"
 #include <glib.h>
-#include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-mt940-import.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "gnc-plugin-mt940.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_mt940_LTX_gnc_module_system_interface = 0;
@@ -79,8 +78,8 @@
   {
     return FALSE;
   }
-    scm_c_eval_string("(load-from-path \"mt940/mt940-import.scm\")");
-    scm_c_define_gsubr("gnc:mt940-import", 0, 0, 0, scm_gnc_file_mt940_import);
+
+  gnc_plugin_mt940_create_plugin();
   return TRUE;
 }
 
--- src/import-export/mt940/mt940-import.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(define (add-mt940-menu-item)
-  (gnc:add-extension
-   (gnc:make-menu-item(N_ "Import MT940")
-		      (N_ "Process an MT940 response file")
-		      (list gnc:window-name-main "File" "_Import" "")
-		      (lambda ()
-			(gnc:mt940-import)))))
-
-(gnc:hook-add-dangler gnc:*ui-startup-hook* add-mt940-menu-item)
-
Index: gnc-ofx-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/gnc-ofx-import.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -Lsrc/import-export/ofx/gnc-ofx-import.c -Lsrc/import-export/ofx/gnc-ofx-import.c -u -r1.34 -r1.35
--- src/import-export/ofx/gnc-ofx-import.c
+++ src/import-export/ofx/gnc-ofx-import.c
@@ -43,31 +43,25 @@
 
 #include "Account.h"
 #include "Transaction.h"
-#include "global-options.h"
 #include "gnc-associate-account.h"
 #include "gnc-ofx-import.h"
-#include "gnc-file-dialog.h"
-#include "gnc-engine-util.h"
+#include "gnc-file.h"
+#include "gnc-engine.h"
 #include "gnc-book.h"
 #include "gnc-ui-util.h"
-
+#include "gnc-gconf-utils.h"
 
 #include "dialog-utils.h"
 
+#define GCONF_SECTION "dialogs/import/ofx"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /********************************************************************\
  * gnc_file_ofx_import
  * Entry point
 \********************************************************************/
 
-SCM  scm_gnc_file_ofx_import ()
-{
-  gnc_file_ofx_import();
-  return SCM_EOL;
-}
-
 /* CS: Store the reference to the created importer gui so that the
    ofx_proc_transaction_cb can use it. */
 GNCImportMainMatcher *gnc_ofx_importer_gui = NULL;
@@ -364,6 +358,7 @@
 								   NULL,
 								   NULL);
 		    g_free (investment_account_text);
+		    investment_account_text = NULL;
 		    if(investment_account!=NULL&&
 		       data.unitprice_valid==true&&
 		       data.units_valid==true&&
@@ -621,22 +616,26 @@
   ofx_INFO_msg = true;
   ofx_STATUS_msg = false;
 
-  gnc_should_log(MOD_IMPORT, GNC_LOG_TRACE);
+  gnc_should_log(GNC_MOD_IMPORT, GNC_LOG_TRACE);
   DEBUG("gnc_file_ofx_import(): Begin...\n");
 
-  default_dir = gnc_lookup_string_option("__paths", "Import OFX", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
   selected_filename = gnc_file_dialog(_("Select an OFX/QFX file to process"),
 				      NULL,
-				      default_dir);
+				      default_dir,
+				      GNC_FILE_DIALOG_IMPORT);
+  g_free(default_dir);
+  default_dir = NULL;
 
   if(selected_filename!=NULL)
     {
       /* Remember the directory as the default. */
       gnc_extract_directory(&default_dir, selected_filename);
-      gnc_set_string_option("__paths", "Import OFX", default_dir);
+      gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
       g_free(default_dir);
+      default_dir = NULL;
 
       /*strncpy(file,selected_filename, 255);*/
       DEBUG("Filename found: %s",selected_filename);
Index: gncmod-ofx-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/gncmod-ofx-import.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/import-export/ofx/gncmod-ofx-import.c -Lsrc/import-export/ofx/gncmod-ofx-import.c -u -r1.8 -r1.9
--- src/import-export/ofx/gncmod-ofx-import.c
+++ src/import-export/ofx/gncmod-ofx-import.c
@@ -25,12 +25,11 @@
  */
 #include "config.h"
 #include <glib.h>
-#include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-ofx-import.h"
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "gnc-plugin-ofx.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_ofx_LTX_gnc_module_system_interface = 0;
@@ -79,8 +78,10 @@
   {
     return FALSE;
   }
-    scm_c_eval_string("(load-from-path \"ofx/ofx-import.scm\")");
-    scm_c_define_gsubr("gnc:ofx-import", 0, 0, 0, scm_gnc_file_ofx_import);
+
+  /* Add menu items with C callbacks */
+  gnc_plugin_ofx_create_plugin();
+  
   return TRUE;
 }
 
--- src/import-export/ofx/ofx-import.scm
+++ /dev/null
@@ -1,10 +0,0 @@
-(define (add-ofx-menu-item)
-  (gnc:add-extension
-   (gnc:make-menu-item(N_ "Import OFX/QFX")
-		      (N_ "Process an OFX/QFX response file")
-		      (list gnc:window-name-main "File" "_Import" "")
-		      (lambda ()
-			(gnc:ofx-import)))))
-
-(gnc:hook-add-dangler gnc:*ui-startup-hook* add-ofx-menu-item)
-
Index: gnc-ofx-import.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/gnc-ofx-import.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/ofx/gnc-ofx-import.h -Lsrc/import-export/ofx/gnc-ofx-import.h -u -r1.4 -r1.5
--- src/import-export/ofx/gnc-ofx-import.h
+++ src/import-export/ofx/gnc-ofx-import.h
@@ -31,5 +31,4 @@
  *     are merged into the existing session (if any). The current
  *     session continues to remain open for editing. */
 void              gnc_file_ofx_import (void);
-SCM  scm_gnc_file_ofx_import (void);
 #endif
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/ofx/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/import-export/ofx/Makefile.am -Lsrc/import-export/ofx/Makefile.am -u -r1.11 -r1.12
--- src/import-export/ofx/Makefile.am
+++ src/import-export/ofx/Makefile.am
@@ -4,43 +4,41 @@
 
 libgncmod_ofx_la_SOURCES = \
   gnc-ofx-import.c \
-  gncmod-ofx-import.c
+  gncmod-ofx-import.c \
+  gnc-plugin-ofx.c
 
 noinst_HEADERS = \
-  gnc-ofx-import.h
-
-libgncmod_ofx_la_LDFLAGS = -module
+  gnc-ofx-import.h \
+  gnc-plugin-ofx.h
 
 libgncmod_ofx_la_LIBADD = \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/import-export/libgncmod-generic-import.la \
+  ${top_builddir}/src/gnome/libgncgnome.la \
   ${GLIB_LIBS} \
   ${LIBOFX_LIBS}
 
-gncscmdir = ${GNC_SCM_INSTALL_DIR}/ofx
-
-gncscm_DATA = \
-	ofx-import.scm
-
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/import-export \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GTKHTML_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GUILE_INCS} \
   ${GLIB_CFLAGS} \
   ${LIBOFX_CFLAGS} 
 
-EXTRA_DIST = \
-  .cvsignore \
-  ${gncscm_DATA}
+uidir = $(GNC_UI_DIR)
+ui_DATA = \
+	gnc-plugin-ofx-ui.xml
 
-CLEANFILES = ofx import-export gnucash g-wrapped .scm-links
+EXTRA_DIST = \
+  .cvsignore
Index: qif-objects.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/qif-objects.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/import-export/qif/qif-objects.c -Lsrc/import-export/qif/qif-objects.c -u -r1.5 -r1.6
--- src/import-export/qif/qif-objects.c
+++ src/import-export/qif/qif-objects.c
@@ -30,13 +30,13 @@
 #include <string.h>
 #include "Account.h"
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "qif-import-p.h"
 #include "qif-objects-p.h"
 #include "qif-defaults.h"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /* create a new object of type t, with type-string type and
  * destroy function dest.  Requires 'obj' to be set.
Index: qif-parse.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/qif-parse.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/import-export/qif/qif-parse.c -Lsrc/import-export/qif/qif-parse.c -u -r1.6 -r1.7
--- src/import-export/qif/qif-parse.c
+++ src/import-export/qif/qif-parse.c
@@ -36,7 +36,7 @@
 #include <stdarg.h>
 
 #include "messages.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 #include "qif-import-p.h"
@@ -44,7 +44,7 @@
 
 #include "import-parse.h"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 /* An array of handlers for the various bang-types */
 static QifHandler qif_handlers[QIF_TYPE_MAX+1] = { NULL };
Index: qif-file.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/qif-file.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/import-export/qif/qif-file.c -Lsrc/import-export/qif/qif-file.c -u -r1.5 -r1.6
--- src/import-export/qif/qif-file.c
+++ src/import-export/qif/qif-file.c
@@ -31,12 +31,12 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "qif-import-p.h"
 #include "qif-objects-p.h"
 
-static short module = MOD_IMPORT;
+static QofLogModule log_module = GNC_MOD_IMPORT;
 
 
 static QifLine
@@ -309,4 +309,3 @@
   qif_clear_flag(ctx->parse_flags, QIF_F_TXN_NEEDS_ACCT);
   qif_clear_flag(ctx->parse_flags, QIF_F_ITXN_NEEDS_ACCT);
 }
-
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/import-export/qif/Makefile.am -Lsrc/import-export/qif/Makefile.am -u -r1.1 -r1.2
--- src/import-export/qif/Makefile.am
+++ src/import-export/qif/Makefile.am
@@ -18,9 +18,7 @@
   qif-objects-p.h \
   qif-parse.h
 
-libgncmod_qif_la_LDFLAGS = -module
-
-libgncmod_qif_la_LIBADD =
+libgncmod_qif_la_LIBADD = ${QOF_LIBS}
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
@@ -28,4 +26,8 @@
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/import-export \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
+  ${G_WRAP_COMPILE_ARGS}
+
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif/test/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/qif/test/Makefile.am -Lsrc/import-export/qif/test/Makefile.am -u -r1.2 -r1.3
--- src/import-export/qif/test/Makefile.am
+++ src/import-export/qif/test/Makefile.am
@@ -7,6 +7,7 @@
   -I${top_srcdir}/src/import-export \
   -I${top_srcdir}/src/import-export/qif \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 LDADD = \
@@ -14,6 +15,7 @@
   ${top_builddir}/src/test-core/libgncmod-test.la \
   ../../libgncmod-generic-import.la \
   ../libgncmod-qif.la \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
 TESTS = \
Index: druid-qif-import.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/druid-qif-import.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/qif-import/druid-qif-import.h -Lsrc/import-export/qif-import/druid-qif-import.h -u -r1.4 -r1.5
--- src/import-export/qif-import/druid-qif-import.h
+++ src/import-export/qif-import/druid-qif-import.h
@@ -38,6 +38,6 @@
  *     are merged into the existing session (if any). The current
  *     session continues to remain open for editing. */
 void              gnc_file_qif_import (void);
-void              gnc_ui_qif_import_create_menus(void);
+void              gnc_ui_qif_import_create_plugin(void);
 
 #endif
Index: qif.glade
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/qif.glade,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/import-export/qif-import/qif.glade -Lsrc/import-export/qif-import/qif.glade -u -r1.3 -r1.4
--- src/import-export/qif-import/qif.glade
+++ src/import-export/qif-import/qif.glade
@@ -1,206 +1,213 @@
-<?xml version="1.0"?>
-<GTK-Interface>
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
 
-<project>
-  <name>Glade</name>
-  <program_name>glade</program_name>
-  <directory></directory>
-  <source_directory></source_directory>
-  <pixmaps_directory></pixmaps_directory>
-  <language>C</language>
-  <gnome_support>True</gnome_support>
-  <gettext_support>True</gettext_support>
-  <output_main_file>False</output_main_file>
-  <output_support_files>False</output_support_files>
-  <output_build_files>False</output_build_files>
-  <backup_source_files>False</backup_source_files>
-</project>
-
-<widget>
-  <class>GnomeDialog</class>
-  <name>QIF Import Account Picker</name>
-  <title>Select Account</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <default_width>300</default_width>
-  <default_height>400</default_height>
-  <allow_shrink>True</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-  <auto_close>False</auto_close>
-  <hide_on_close>False</hide_on_close>
-
-  <widget>
-    <class>GtkVBox</class>
-    <child_name>GnomeDialog:vbox</child_name>
-    <name>vbox1</name>
-    <homogeneous>False</homogeneous>
-    <spacing>8</spacing>
-    <child>
-      <padding>1</padding>
-      <expand>True</expand>
-      <fill>True</fill>
-    </child>
-
-    <widget>
-      <class>GtkHButtonBox</class>
-      <child_name>GnomeDialog:action_area</child_name>
-      <name>hbuttonbox1</name>
-      <layout_style>GTK_BUTTONBOX_SPREAD</layout_style>
-      <spacing>8</spacing>
-      <child_min_width>85</child_min_width>
-      <child_min_height>27</child_min_height>
-      <child_ipad_x>7</child_ipad_x>
-      <child_ipad_y>0</child_ipad_y>
-      <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
-	<pack>GTK_PACK_END</pack>
-      </child>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button1</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
-      </widget>
-
-      <widget>
-	<class>GtkButton</class>
-	<name>button2</name>
-	<can_default>True</can_default>
-	<can_focus>True</can_focus>
-	<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
-      </widget>
-    </widget>
+<glade-interface>
+<requires lib="gnome"/>
 
-    <widget>
-      <class>GtkVBox</class>
-      <name>vbox2</name>
-      <homogeneous>False</homogeneous>
-      <spacing>0</spacing>
-      <child>
-	<padding>0</padding>
-	<expand>True</expand>
-	<fill>True</fill>
-      </child>
+<widget class="GtkDialog" id="QIF Import Account Picker">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select Account</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="default_width">300</property>
+  <property name="default_height">400</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="has_separator">True</property>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">8</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="hbuttonbox1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="newbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">gnc-new-account</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">1</property>
+	      <signal name="clicked" handler="gnc_ui_qif_account_picker_new_cb" last_modification_time="Sat, 25 Oct 2003 19:44:39 GMT"/>
+	    </widget>
+	  </child>
 
-      <widget>
-	<class>GtkFrame</class>
-	<name>frame1</name>
-	<label>Select or add a GnuCash account</label>
-	<label_xalign>0</label_xalign>
-	<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow24</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	  <widget>
-	    <class>GtkCTree</class>
-	    <name>account_tree</name>
-	    <can_focus>True</can_focus>
-	    <columns>2</columns>
-	    <column_widths>214,48</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847711</name>
-	      <label>Account</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkButton" id="cancelbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
 	    </widget>
+	  </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CTree:title</child_name>
-	      <name>label847712</name>
-	      <label>New?</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+	  <child>
+	    <widget class="GtkButton" id="okbutton">
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
 
-    <widget>
-      <class>GtkButton</class>
-      <name>button78</name>
-      <can_focus>True</can_focus>
-      <signal>
-	<name>clicked</name>
-	<handler>gnc_ui_qif_account_picker_new_cb</handler>
-	<data>QIF_Import_Account_Picker</data>
-	<last_modification_time>Sat, 10 Feb 2001 21:26:10 GMT</last_modification_time>
-      </signal>
-      <label>New Account (child of selected) ...</label>
-      <relief>GTK_RELIEF_NORMAL</relief>
       <child>
-	<padding>0</padding>
-	<expand>False</expand>
-	<fill>False</fill>
+	<widget class="GtkVBox" id="vbox2">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame1">
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow24">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCTree" id="account_tree">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">2</property>
+		      <property name="column_widths">214,48</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+
+		      <child>
+			<widget class="GtkLabel" id="label847711">
+			  <property name="label" translatable="yes">Account</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847712">
+			  <property name="label" translatable="yes">New?</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Select or add a GnuCash account</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
       </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-<widget>
-  <class>GtkWindow</class>
-  <name>QIF Import Druid</name>
-  <title>QIF Import</title>
-  <type>GTK_WINDOW_TOPLEVEL</type>
-  <position>GTK_WIN_POS_NONE</position>
-  <modal>False</modal>
-  <allow_shrink>False</allow_shrink>
-  <allow_grow>True</allow_grow>
-  <auto_shrink>True</auto_shrink>
-
-  <widget>
-    <class>GnomeDruid</class>
-    <name>qif_import_druid</name>
-    <signal>
-      <name>cancel</name>
-      <handler>gnc_ui_qif_import_cancel_cb</handler>
-      <data>QIF_Import_Druid</data>
-      <last_modification_time>Wed, 30 Aug 2000 15:11:02 GMT</last_modification_time>
-    </signal>
-
-    <widget>
-      <class>GnomeDruidPageStart</class>
-      <name>start_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:04:30 GMT</last_modification_time>
-      </signal>
-      <title>Import QIF files</title>
-      <text>GnuCash can import financial data from QIF (Quicken 
+<widget class="GtkWindow" id="QIF Import Druid">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">QIF Import</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GnomeDruid" id="qif_import_druid">
+      <property name="border_width">4</property>
+      <property name="visible">True</property>
+      <property name="show_help">False</property>
+      <signal name="cancel" handler="gnc_ui_qif_import_cancel_cb"/>
+
+      <child>
+	<widget class="GnomeDruidPageEdge" id="start_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_START</property>
+	  <property name="title" translatable="yes">Import QIF files</property>
+	  <property name="text" translatable="yes">GnuCash can import financial data from QIF (Quicken 
 Interchange Format) files written by Quicken/QuickBooks,
 MS Money, Moneydance, and many other programs. 
 
@@ -208,175 +215,149 @@
 accounts will not be changed until you click &quot;Finish&quot;
 at the end of the process. 
 
-Click &quot;Next&quot; to start loading your QIF data, or &quot;Cancel&quot;
-to abort the process. </text>
-      <title_color>255,255,255</title_color>
-      <text_color>0,0,0</text_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-    </widget>
+Click &quot;Forward&quot; to start loading your QIF data, or &quot;Cancel&quot;
+to abort the process. </property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	</widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>load_file_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_load_file_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 30 Aug 2000 14:30:37 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_load_file_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Sat, 04 Jan 2003 05:05:30 GMT</last_modification_time>
-      </signal>
-      <title>Select a QIF file to load</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox8</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label822</name>
-	  <label>Please select a file to load. When you click &quot;Next&quot;, the file will be loaded
+      <child>
+	<widget class="GnomeDruidPageStandard" id="load_file_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Select a QIF file to load</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_load_file_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_load_file_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox8">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label822">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Please select a file to load. When you click &quot;Forward&quot;, the file will be loaded
 and analyzed. You may need to answer some questions about the account(s)
 in the file.
 
 You will have the opportunity to load as many files as you wish, so don't 
 worry if your data is in multiple files. 
-</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>5</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox69</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">5</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox69">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label821">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">QIF Filename:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">4</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="qif_filename_entry">
+		      <property name="visible">True</property>
+		      <property name="can_default">True</property>
+		      <property name="has_default">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="button71">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Select...</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_ui_qif_import_select_file_cb"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">3</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label821</name>
-	    <label>QIF Filename:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>4</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>qif_filename_entry</name>
-	    <can_default>True</can_default>
-	    <has_default>True</has_default>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>button71</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>clicked</name>
-	      <handler>gnc_ui_qif_import_select_file_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Wed, 30 Aug 2000 17:33:50 GMT</last_modification_time>
-	    </signal>
-	    <label>Select...</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>3</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>date_format_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_date_format_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 04 Oct 2000 15:56:16 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_default_acct_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 04 Jul 2001 22:27:27 GMT</last_modification_time>
-      </signal>
-      <title>Set a date format for this QIF file</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox22</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label841</name>
-	  <label>The QIF file format does not specify which order the day, month, and 
+      <child>
+	<widget class="GnomeDruidPageStandard" id="date_format_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Set a date format for this QIF file</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_date_format_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_default_acct_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox22">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label841">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The QIF file format does not specify which order the day, month, and 
 year components of a date are printed.  In most cases, it is possible 
 to automatically determine which format is in use in a particular file.
 However, in the file you have just imported there exist more than one
@@ -385,388 +366,412 @@
 Please select a date format for the file.  QIF files created by European
 software are likely  to be in &quot;d-m-y&quot; or day-month-year format, where
 US QIF files are likely to be &quot;m-d-y&quot; or month-year-day.    
-</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>date_format_combo</name>
-	  <value_in_list>True</value_in_list>
-	  <ok_if_empty>False</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>date_format_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>False</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847713</name>
-	  <label>Click &quot;Back&quot; to cancel the loading of this file and choose another.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	    <pack>GTK_PACK_END</pack>
+</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCombo" id="date_format_combo">
+		  <property name="visible">True</property>
+		  <property name="value_in_list">True</property>
+		  <property name="allow_empty">False</property>
+		  <property name="case_sensitive">False</property>
+		  <property name="enable_arrow_keys">True</property>
+		  <property name="enable_arrows_always">False</property>
+
+		  <child internal-child="entry">
+		    <widget class="GtkEntry" id="date_format_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">False</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		  </child>
+
+		  <child internal-child="list">
+		    <widget class="GtkList" id="convertwidget3">
+		      <property name="visible">True</property>
+		      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		      <child>
+			<widget class="GtkListItem" id="convertwidget4">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="convertwidget5">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847713">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Back&quot; to cancel the loading of this file and choose another.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		  <property name="pack_type">GTK_PACK_END</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>account_name_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_default_acct_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 08 Sep 2000 14:03:17 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_default_acct_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Mon, 18 Sep 2000 16:36:41 GMT</last_modification_time>
-      </signal>
-      <title>Set the default QIF account name</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox9</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label823</name>
-	  <label>The QIF file that you just loaded appears to contain transactions for just 
+      <child>
+	<widget class="GnomeDruidPageStandard" id="account_name_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Set the default QIF account name</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_default_acct_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_default_acct_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox9">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label823">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The QIF file that you just loaded appears to contain transactions for just 
 one account, but the file does not specify a name for that account.  
 
 Please enter a name for the account. If the file was exported from another
 accounting program, you should use the same account name that was used 
 in that program.
-</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>4</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox70</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkLabel</class>
-	    <name>label824</name>
-	    <label>Account name:</label>
-	    <justify>GTK_JUSTIFY_CENTER</justify>
-	    <wrap>False</wrap>
-	    <xalign>1</xalign>
-	    <yalign>0.5</yalign>
-	    <xpad>0</xpad>
-	    <ypad>0</ypad>
-	    <child>
-	      <padding>4</padding>
-	      <expand>False</expand>
-	      <fill>False</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <name>qif_account_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847714</name>
-	  <label>Click &quot;Back&quot; to cancel the loading of this file and choose another.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	    <pack>GTK_PACK_END</pack>
-	  </child>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>loaded_files_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>gnc_ui_qif_import_loaded_files_prepare_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 30 Aug 2000 22:42:22 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 17:04:25 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:08:05 GMT</last_modification_time>
-      </signal>
-      <title>QIF files you have loaded</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox1</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>4</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkFrame</class>
-	  <name>frame33</name>
-	  <label>QIF Files</label>
-	  <label_xalign>0</label_xalign>
-	  <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkScrolledWindow</class>
-	    <name>scrolledwindow10</name>
-	    <hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
-	    <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	    <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	    <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	    <widget>
-	      <class>GtkCList</class>
-	      <name>selected_file_list</name>
-	      <can_focus>True</can_focus>
-	      <signal>
-		<name>select_row</name>
-		<handler>gnc_ui_qif_import_select_loaded_file_cb</handler>
-		<data>QIF_Import_Druid</data>
-		<last_modification_time>Wed, 30 Aug 2000 23:00:57 GMT</last_modification_time>
-	      </signal>
-	      <columns>1</columns>
-	      <column_widths>80</column_widths>
-	      <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	      <show_titles>False</show_titles>
-	      <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	      <widget>
-		<class>GtkLabel</class>
-		<child_name>CList:title</child_name>
-		<name>label827</name>
-		<label>label827</label>
-		<justify>GTK_JUSTIFY_CENTER</justify>
-		<wrap>False</wrap>
-		<xalign>0.5</xalign>
-		<yalign>0.5</yalign>
-		<xpad>0</xpad>
-		<ypad>0</ypad>
-	      </widget>
+</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">4</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox70">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label824">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Account name:</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_CENTER</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">1</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">4</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkEntry" id="qif_account_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label847714">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Back&quot; to cancel the loading of this file and choose another.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		  <property name="pack_type">GTK_PACK_END</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
+      </child>
 
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label816</name>
-	  <label>Click &quot;Load another file&quot; if you have more data to import at this time.
+      <child>
+	<widget class="GnomeDruidPageStandard" id="loaded_files_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">QIF files you have loaded</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="prepare" handler="gnc_ui_qif_import_loaded_files_prepare_cb"/>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox1">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">4</property>
+
+	      <child>
+		<widget class="GtkFrame" id="frame33">
+		  <property name="visible">True</property>
+		  <property name="label_xalign">0</property>
+		  <property name="label_yalign">0.5</property>
+		  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		  <child>
+		    <widget class="GtkScrolledWindow" id="scrolledwindow10">
+		      <property name="visible">True</property>
+		      <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		      <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		      <child>
+			<widget class="GtkCList" id="selected_file_list">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="n_columns">1</property>
+			  <property name="column_widths">80</property>
+			  <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			  <property name="show_titles">False</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <signal name="select_row" handler="gnc_ui_qif_import_select_loaded_file_cb"/>
+
+			  <child>
+			    <widget class="GtkLabel" id="label827">
+			      <property name="label" translatable="yes">labe82l7</property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_CENTER</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label847715">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">QIF Files</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		    <packing>
+		      <property name="type">label_item</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label816">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Load another file&quot; if you have more data to import at this time.
 Do this if you have saved your accounts to separate QIF files.
 
-Click &quot;Next&quot; to finish loading files and move to the next step 
-of the QIF import process. </label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox68</name>
-	  <homogeneous>False</homogeneous>
-	  <spacing>0</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+Click &quot;Forward&quot; to finish loading files and move to the next step 
+of the QIF import process. </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox68">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkButton" id="button69">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Load another file</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_ui_qif_import_load_another_cb"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="button70">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Unload selected file</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="gnc_ui_qif_import_unload_file_cb"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>button69</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>clicked</name>
-	      <handler>gnc_ui_qif_import_load_another_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Wed, 30 Aug 2000 15:32:12 GMT</last_modification_time>
-	    </signal>
-	    <label>Load another file</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
-
-	  <widget>
-	    <class>GtkButton</class>
-	    <name>button70</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>clicked</name>
-	      <handler>gnc_ui_qif_import_unload_file_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Wed, 30 Aug 2000 15:34:33 GMT</last_modification_time>
-	    </signal>
-	    <label>Unload selected file</label>
-	    <relief>GTK_RELIEF_NORMAL</relief>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-	  </widget>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>account_doc_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:08:41 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:08:52 GMT</last_modification_time>
-      </signal>
-      <title>Accounts and stock holdings</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox13</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label830</name>
-	  <label>On the next page, the accounts in your QIF files and any stocks or mutual funds
+      <child>
+	<widget class="GnomeDruidPageStandard" id="account_doc_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Accounts and stock holdings</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox13">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label830">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">On the next page, the accounts in your QIF files and any stocks or mutual funds
 you own will be matched with GnuCash accounts. If a GnuCash account already
 exists with the same name, or a similar name and compatible type, that account
 will be used as a match; otherwise, GnuCash will create a new account with the
@@ -779,187 +784,161 @@
 accounts (subaccounts of Retained Earnings, by default) which are the source
 of your opening balances, etc. All of these accounts will appear on the next 
 page so you can change them if you want to, but it is safe to leave them alone.
-</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>account_match_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>gnc_ui_qif_import_accounts_prepare_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Thu, 31 Aug 2000 14:19:54 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:09:25 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:09:37 GMT</last_modification_time>
-      </signal>
-      <title>Match QIF accounts with GnuCash accounts</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,153</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox3</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow11</name>
-	  <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>account_page_list</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>select_row</name>
-	      <handler>gnc_ui_qif_import_account_line_select_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Thu, 07 Sep 2000 22:35:06 GMT</last_modification_time>
-	    </signal>
-	    <columns>3</columns>
-	    <column_widths>281,242,53</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label834</name>
-	      <label>QIF account name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label835</name>
-	      <label>GnuCash account name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label836</name>
-	      <label>New?</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="account_match_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Match QIF accounts with GnuCash accounts</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="prepare" handler="gnc_ui_qif_import_accounts_prepare_cb"/>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox3">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow11">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCList" id="account_page_list">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">3</property>
+		      <property name="column_widths">281,242,53</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <signal name="select_row" handler="gnc_ui_qif_import_account_line_select_cb"/>
+
+		      <child>
+			<widget class="GtkLabel" id="label834">
+			  <property name="label" translatable="yes">QIF account name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label835">
+			  <property name="label" translatable="yes">GnuCash account name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label836">
+			  <property name="label" translatable="yes">New?</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label828">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Forward&quot; to check matchings for QIF categories. </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label828</name>
-	  <label>Click &quot;Next&quot; to check matchings for QIF categories. </label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>category_doc_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:10:09 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:10:35 GMT</last_modification_time>
-      </signal>
-      <title>Income and Expense categories</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox18</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label840</name>
-	  <label>GnuCash uses separate Income and Expense accounts rather than categories
+      <child>
+	<widget class="GnomeDruidPageStandard" id="category_doc_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Income and Expense categories</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox18">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label840">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">GnuCash uses separate Income and Expense accounts rather than categories
 to classify your transactions. Each of the categories in your QIF file will be 
 converted to a GnuCash account. 
 
@@ -968,187 +947,161 @@
 that you do not like by clicking on the line containing the category name.
 
 If you change your mind later, you can reorganize the account structure safely
-within GnuCash.</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+within GnuCash.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>category_match_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>gnc_ui_qif_import_categories_prepare_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Thu, 31 Aug 2000 14:21:48 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 17:04:56 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:12:18 GMT</last_modification_time>
-      </signal>
-      <title>Match QIF categories with GnuCash accounts</title>
-      <title_color>255,255,255</title_color>
-      <background_color>154,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox4</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow12</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>category_page_list</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>select_row</name>
-	      <handler>gnc_ui_qif_import_category_line_select_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Thu, 07 Sep 2000 22:35:38 GMT</last_modification_time>
-	    </signal>
-	    <columns>3</columns>
-	    <column_widths>243,250,72</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label837</name>
-	      <label>QIF category name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label838</name>
-	      <label>GnuCash account name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label839</name>
-	      <label>New?</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="category_match_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Match QIF categories with GnuCash accounts</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="prepare" handler="gnc_ui_qif_import_categories_prepare_cb"/>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox4">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow12">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCList" id="category_page_list">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">3</property>
+		      <property name="column_widths">243,250,72</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <signal name="select_row" handler="gnc_ui_qif_import_category_line_select_cb"/>
+
+		      <child>
+			<widget class="GtkLabel" id="label837">
+			  <property name="label" translatable="yes">QIF category name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label838">
+			  <property name="label" translatable="yes">GnuCash account name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label839">
+			  <property name="label" translatable="yes">New?</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label829">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Forward&quot; to enter information about the currency used in your QIF files.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">3</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label829</name>
-	  <label>Click &quot;Next&quot; to enter information about the currency used in your QIF files.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>3</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>memo_doc_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 16:17:27 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 16:17:45 GMT</last_modification_time>
-      </signal>
-      <title>Payees and memos</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox39</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847707</name>
-	  <label>QIF files downloaded from banks and other financial institutions may not have
+      <child>
+	<widget class="GnomeDruidPageStandard" id="memo_doc_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Payees and memos</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox39">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847707">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">QIF files downloaded from banks and other financial institutions may not have
 information about Accounts and Categories which would allow them to be
 correctly assigned to GnuCash accounts.  
 
@@ -1156,279 +1109,268 @@
 Memo fields of transactions with no QIF Account or Category. By default
 these transactions are assigned to the 'Unspecified' account in GnuCash.
 If you select a different account, it will be remembered for future QIF 
-files. </label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+files. </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>memo_match_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_memo_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 17:05:14 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 16:18:32 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>prepare</name>
-	<handler>gnc_ui_qif_import_memo_prepare_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Fri, 09 Feb 2001 16:39:58 GMT</last_modification_time>
-      </signal>
-      <title>Match payees/memos to GnuCash accounts</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox40</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkScrolledWindow</class>
-	  <name>scrolledwindow25</name>
-	  <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	  <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	  <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	  <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkCList</class>
-	    <name>memo_page_list</name>
-	    <can_focus>True</can_focus>
-	    <signal>
-	      <name>select_row</name>
-	      <handler>gnc_ui_qif_import_memo_line_select_cb</handler>
-	      <data>QIF_Import_Druid</data>
-	      <last_modification_time>Fri, 09 Feb 2001 16:28:31 GMT</last_modification_time>
-	    </signal>
-	    <columns>3</columns>
-	    <column_widths>285,228,72</column_widths>
-	    <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-	    <show_titles>True</show_titles>
-	    <shadow_type>GTK_SHADOW_IN</shadow_type>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847708</name>
-	      <label>QIF payee/memo</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
-
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847709</name>
-	      <label>GnuCash account name</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
-	    </widget>
+      </child>
 
-	    <widget>
-	      <class>GtkLabel</class>
-	      <child_name>CList:title</child_name>
-	      <name>label847710</name>
-	      <label>New?</label>
-	      <justify>GTK_JUSTIFY_CENTER</justify>
-	      <wrap>False</wrap>
-	      <xalign>0.5</xalign>
-	      <yalign>0.5</yalign>
-	      <xpad>0</xpad>
-	      <ypad>0</ypad>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="memo_match_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Match payees/memos to GnuCash accounts</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_memo_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+	  <signal name="prepare" handler="gnc_ui_qif_import_memo_prepare_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox40">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow25">
+		  <property name="visible">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkCList" id="memo_page_list">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="n_columns">3</property>
+		      <property name="column_widths">285,228,72</property>
+		      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+		      <property name="show_titles">True</property>
+		      <property name="shadow_type">GTK_SHADOW_IN</property>
+		      <signal name="select_row" handler="gnc_ui_qif_import_memo_line_select_cb"/>
+
+		      <child>
+			<widget class="GtkLabel" id="label847708">
+			  <property name="label" translatable="yes">QIF payee/memo</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847709">
+			  <property name="label" translatable="yes">GnuCash account name</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847710">
+			  <property name="label" translatable="yes">New?</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_CENTER</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>currency_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_currency_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 06 Sep 2000 15:12:05 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:12:42 GMT</last_modification_time>
-      </signal>
-      <title>Enter the currency used for new accounts</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox16</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label831</name>
-	  <label>The QIF importer cannot currently handle multi-currency QIF files. All the 
+      <child>
+	<widget class="GnomeDruidPageStandard" id="currency_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Enter the currency used for new accounts</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_currency_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox16">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label831">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">The QIF importer cannot currently handle multi-currency QIF files. All the 
 accounts in the QIF file(s) you are importing must be denominated in the
 same currency. This limitation should be removed soon.
 
 Select the currency to use for transactions imported from your QIF files:
-</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-
-	<widget>
-	  <class>GtkCombo</class>
-	  <name>currency_combo</name>
-	  <value_in_list>True</value_in_list>
-	  <ok_if_empty>False</ok_if_empty>
-	  <case_sensitive>False</case_sensitive>
-	  <use_arrows>True</use_arrows>
-	  <use_arrows_always>False</use_arrows_always>
-	  <items></items>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkEntry</class>
-	    <child_name>GtkCombo:entry</child_name>
-	    <name>currency_entry</name>
-	    <can_focus>True</can_focus>
-	    <editable>True</editable>
-	    <text_visible>True</text_visible>
-	    <text_max_length>0</text_max_length>
-	    <text></text>
-	  </widget>
-	</widget>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label832</name>
-	  <label>Click &quot;Next&quot; to enter information about stocks and
-mutual funds in the imported data.</label>
-	  <justify>GTK_JUSTIFY_CENTER</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	    <pack>GTK_PACK_END</pack>
+</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCombo" id="currency_combo">
+		  <property name="visible">True</property>
+		  <property name="value_in_list">True</property>
+		  <property name="allow_empty">False</property>
+		  <property name="case_sensitive">False</property>
+		  <property name="enable_arrow_keys">True</property>
+		  <property name="enable_arrows_always">False</property>
+
+		  <child internal-child="entry">
+		    <widget class="GtkEntry" id="currency_entry">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="editable">True</property>
+		      <property name="visibility">True</property>
+		      <property name="max_length">0</property>
+		      <property name="text" translatable="yes"></property>
+		      <property name="has_frame">True</property>
+		      <property name="invisible_char" translatable="yes">*</property>
+		      <property name="activates_default">False</property>
+		    </widget>
+		  </child>
+
+		  <child internal-child="list">
+		    <widget class="GtkList" id="convertwidget14">
+		      <property name="visible">True</property>
+		      <property name="selection_mode">GTK_SELECTION_BROWSE</property>
+
+		      <child>
+			<widget class="GtkListItem" id="convertwidget15">
+			  <property name="visible">True</property>
+
+			  <child>
+			    <widget class="GtkLabel" id="convertwidget16">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">False</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label832">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Click &quot;Forward&quot; to enter information about stocks and
+mutual funds in the imported data.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_CENTER</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		  <property name="pack_type">GTK_PACK_END</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>commodity_doc_page</name>
-      <signal>
-	<name>prepare</name>
-	<handler>gnc_ui_qif_import_commodity_prepare_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 06 Sep 2000 17:24:11 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:13:29 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:13:38 GMT</last_modification_time>
-      </signal>
-      <title>Tradable commodities</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox17</name>
-	<border_width>25</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label833</name>
-	  <label>In the next pages, you will be asked to provide information about stocks, 
+      <child>
+	<widget class="GnomeDruidPageStandard" id="commodity_doc_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Tradable commodities</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="prepare" handler="gnc_ui_qif_import_commodity_prepare_cb"/>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox17">
+	      <property name="border_width">25</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label833">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">In the next pages, you will be asked to provide information about stocks, 
 mutual funds, and other tradable commodities that appear in the QIF file(s)
 you are importing. GnuCash requires more information about tradable 
 commodities than the QIF format can represent. 
@@ -1440,59 +1382,47 @@
 Check to see if there is an existing Type that is appropriate; if not, you can
 enter a new Type name by hand in the box. Make sure that the abbreviation
 you enter matches the ticker symbol used for the commodity on the exchange
-or listing for its type.</label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
+or listing for its type.</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
 	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>match_doc_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 20:54:18 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:14:04 GMT</last_modification_time>
-      </signal>
-      <title>Match duplicate transactions</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox34</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkLabel</class>
-	  <name>label847694</name>
-	  <label>If you are importing a QIF file downloaded from a bank or other financial
+      <child>
+	<widget class="GnomeDruidPageStandard" id="match_doc_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Match duplicate transactions</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox34">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label847694">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">If you are importing a QIF file downloaded from a bank or other financial
 institution, some of the information in the QIF file may duplicate information
 already in your GnuCash accounts.  GnuCash will try to detect duplicates 
 of existing transactions.  
@@ -1507,255 +1437,283 @@
 You can control the rules used by GnuCash to find duplicate transactions 
 in the &quot;QIF Import&quot; section of the GnuCash Preferences dialog.
 
-Click &quot;Next&quot; to find duplicate transactions. </label>
-	  <justify>GTK_JUSTIFY_LEFT</justify>
-	  <wrap>False</wrap>
-	  <xalign>0.5</xalign>
-	  <yalign>0.5</yalign>
-	  <xpad>0</xpad>
-	  <ypad>0</ypad>
-	  <child>
-	    <padding>0</padding>
-	    <expand>False</expand>
-	    <fill>False</fill>
-	  </child>
-	</widget>
-      </widget>
-    </widget>
-
-    <widget>
-      <class>GnomeDruidPageStandard</class>
-      <name>match_duplicates_page</name>
-      <signal>
-	<name>next</name>
-	<handler>gnc_ui_qif_import_generic_next_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:15:14 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:15:23 GMT</last_modification_time>
-      </signal>
-      <title>Select possible duplicates</title>
-      <title_color>255,255,255</title_color>
-      <background_color>153,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-
-      <widget>
-	<class>GtkVBox</class>
-	<child_name>GnomeDruidPageStandard:vbox</child_name>
-	<name>druid-vbox35</name>
-	<border_width>5</border_width>
-	<homogeneous>False</homogeneous>
-	<spacing>0</spacing>
-	<child>
-	  <padding>0</padding>
-	  <expand>True</expand>
-	  <fill>True</fill>
-	</child>
-
-	<widget>
-	  <class>GtkHBox</class>
-	  <name>hbox94</name>
-	  <homogeneous>True</homogeneous>
-	  <spacing>2</spacing>
-	  <child>
-	    <padding>0</padding>
-	    <expand>True</expand>
-	    <fill>True</fill>
-	  </child>
-
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame45</name>
-	    <label>Imported transactions with duplicates</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow22</name>
-	      <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>GtkCList</class>
-		<name>new_transaction_list</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>select_row</name>
-		  <handler>gnc_ui_qif_import_duplicate_new_select_cb</handler>
-		  <data>QIF_Import_Druid</data>
-		  <last_modification_time>Mon, 05 Feb 2001 18:28:49 GMT</last_modification_time>
-		</signal>
-		<columns>3</columns>
-		<column_widths>53,172,56</column_widths>
-		<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		<show_titles>True</show_titles>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847700</name>
-		  <label>Date</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847701</name>
-		  <label>Description</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847702</name>
-		  <label>Amount</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
+Click &quot;Forward&quot; to find duplicate transactions. </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
+	</widget>
+      </child>
 
-	  <widget>
-	    <class>GtkFrame</class>
-	    <name>frame46</name>
-	    <label>Possible duplicates for selected new transaction</label>
-	    <label_xalign>0</label_xalign>
-	    <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
-	    <child>
-	      <padding>0</padding>
-	      <expand>True</expand>
-	      <fill>True</fill>
-	    </child>
-
-	    <widget>
-	      <class>GtkScrolledWindow</class>
-	      <name>scrolledwindow23</name>
-	      <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
-	      <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
-	      <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
-	      <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
-
-	      <widget>
-		<class>GtkCList</class>
-		<name>old_transaction_list</name>
-		<can_focus>True</can_focus>
-		<signal>
-		  <name>select_row</name>
-		  <handler>gnc_ui_qif_import_duplicate_old_select_cb</handler>
-		  <data>QIF_Import_Druid</data>
-		  <last_modification_time>Mon, 05 Feb 2001 18:29:59 GMT</last_modification_time>
-		</signal>
-		<columns>4</columns>
-		<column_widths>50,133,55,32</column_widths>
-		<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
-		<show_titles>True</show_titles>
-		<shadow_type>GTK_SHADOW_IN</shadow_type>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847703</name>
-		  <label>Date</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847704</name>
-		  <label>Description</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847705</name>
-		  <label>Amount</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
-		</widget>
-
-		<widget>
-		  <class>GtkLabel</class>
-		  <child_name>CList:title</child_name>
-		  <name>label847706</name>
-		  <label>Dup?</label>
-		  <justify>GTK_JUSTIFY_CENTER</justify>
-		  <wrap>False</wrap>
-		  <xalign>0.5</xalign>
-		  <yalign>0.5</yalign>
-		  <xpad>0</xpad>
-		  <ypad>0</ypad>
+      <child>
+	<widget class="GnomeDruidPageStandard" id="match_duplicates_page">
+	  <property name="visible">True</property>
+	  <property name="title" translatable="yes">Select possible duplicates</property>
+	  <property name="title_foreground">#f5f5f5f5f5f5</property>
+	  <signal name="next" handler="gnc_ui_qif_import_generic_next_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+
+	  <child internal-child="vbox">
+	    <widget class="GtkVBox" id="druid-vbox35">
+	      <property name="border_width">5</property>
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox94">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">True</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame45">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow22">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkCList" id="new_transaction_list">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="n_columns">3</property>
+			      <property name="column_widths">53,172,56</property>
+			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			      <property name="show_titles">True</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <signal name="select_row" handler="gnc_ui_qif_import_duplicate_new_select_cb"/>
+
+			      <child>
+				<widget class="GtkLabel" id="label847700">
+				  <property name="label" translatable="yes">Date</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847700">
+				  <property name="label" translatable="yes">Description</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847702">
+				  <property name="label" translatable="yes">Amount</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847716">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Imported transactions with duplicates</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkFrame" id="frame46">
+		      <property name="visible">True</property>
+		      <property name="label_xalign">0</property>
+		      <property name="label_yalign">0.5</property>
+		      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+		      <child>
+			<widget class="GtkScrolledWindow" id="scrolledwindow23">
+			  <property name="visible">True</property>
+			  <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+			  <property name="shadow_type">GTK_SHADOW_IN</property>
+			  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+			  <child>
+			    <widget class="GtkCList" id="old_transaction_list">
+			      <property name="visible">True</property>
+			      <property name="can_focus">True</property>
+			      <property name="n_columns">4</property>
+			      <property name="column_widths">50,133,55,32</property>
+			      <property name="selection_mode">GTK_SELECTION_SINGLE</property>
+			      <property name="show_titles">True</property>
+			      <property name="shadow_type">GTK_SHADOW_IN</property>
+			      <signal name="select_row" handler="gnc_ui_qif_import_duplicate_old_select_cb"/>
+
+			      <child>
+				<widget class="GtkLabel" id="label847703">
+				  <property name="label" translatable="yes">Date</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847704">
+				  <property name="label" translatable="yes">Description</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847705">
+				  <property name="label" translatable="yes">Amount</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkLabel" id="label847706">
+				  <property name="label" translatable="yes">Dup?</property>
+				  <property name="use_underline">False</property>
+				  <property name="use_markup">False</property>
+				  <property name="justify">GTK_JUSTIFY_CENTER</property>
+				  <property name="wrap">False</property>
+				  <property name="selectable">False</property>
+				  <property name="xalign">0.5</property>
+				  <property name="yalign">0.5</property>
+				  <property name="xpad">0</property>
+				  <property name="ypad">0</property>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label847717">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Possible duplicates for selected new transaction</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="type">label_item</property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
 		</widget>
-	      </widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
 	    </widget>
-	  </widget>
+	  </child>
 	</widget>
-      </widget>
-    </widget>
+      </child>
 
-    <widget>
-      <class>GnomeDruidPageFinish</class>
-      <name>end_page</name>
-      <signal>
-	<name>finish</name>
-	<handler>gnc_ui_qif_import_finish_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Wed, 30 Aug 2000 15:07:20 GMT</last_modification_time>
-      </signal>
-      <signal>
-	<name>back</name>
-	<handler>gnc_ui_qif_import_generic_back_cb</handler>
-	<data>QIF_Import_Druid</data>
-	<last_modification_time>Tue, 06 Feb 2001 17:16:05 GMT</last_modification_time>
-      </signal>
-      <title>Update your GnuCash accounts</title>
-      <text>Click &quot;Finish&quot; to import data from the staging area and update
+      <child>
+	<widget class="GnomeDruidPageEdge" id="end_page">
+	  <property name="visible">True</property>
+	  <property name="position">GNOME_EDGE_FINISH</property>
+	  <property name="title" translatable="yes">Update your GnuCash accounts</property>
+	  <property name="text" translatable="yes">Click &quot;Finish&quot; to import data from the staging area and update
 your GnuCash accounts. The account and category matching
 information you have entered will be saved and used for
 defaults the next time you use the QIF import  facility. 
@@ -1764,14 +1722,87 @@
 to change currency and security settings for new accounts, 
 or to add more files to the staging area.
 
-Click &quot;Cancel&quot; to abort the QIF import process.</text>
-      <background_color>154,191,154</background_color>
-      <logo_background_color>255,255,255</logo_background_color>
-      <textbox_color>255,255,255</textbox_color>
-      <text_color>1,1,1</text_color>
-      <title_color>255,255,255</title_color>
+Click &quot;Cancel&quot; to abort the QIF import process.</property>
+	  <signal name="finish" handler="gnc_ui_qif_import_finish_cb"/>
+	  <signal name="back" handler="gnc_ui_qif_import_generic_back_cb"/>
+	</widget>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="Preferences">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Preferences</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+
+  <child>
+    <widget class="GtkTable" id="prefs_table">
+      <property name="visible">True</property>
+      <property name="n_rows">2</property>
+      <property name="n_columns">4</property>
+      <property name="homogeneous">False</property>
+      <property name="row_spacing">0</property>
+      <property name="column_spacing">0</property>
+
+      <child>
+	<widget class="GtkLabel" id="label847718">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">&lt;b&gt;QIF Import&lt;/b&gt;</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">True</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">1</property>
+	  <property name="top_attach">0</property>
+	  <property name="bottom_attach">1</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkCheckButton" id="gconf/dialogs/import/qif/show_doc">
+	  <property name="visible">True</property>
+	  <property name="tooltip" translatable="yes">Show some documentation-only pages in QIF Import druid.</property>
+	  <property name="can_focus">True</property>
+	  <property name="label" translatable="yes">Show documentation</property>
+	  <property name="use_underline">True</property>
+	  <property name="relief">GTK_RELIEF_NORMAL</property>
+	  <property name="focus_on_click">True</property>
+	  <property name="active">False</property>
+	  <property name="inconsistent">False</property>
+	  <property name="draw_indicator">True</property>
+	</widget>
+	<packing>
+	  <property name="left_attach">0</property>
+	  <property name="right_attach">4</property>
+	  <property name="top_attach">1</property>
+	  <property name="bottom_attach">2</property>
+	  <property name="x_padding">12</property>
+	  <property name="x_options">fill</property>
+	  <property name="y_options"></property>
+	</packing>
+      </child>
     </widget>
-  </widget>
+  </child>
 </widget>
 
-</GTK-Interface>
+</glade-interface>
Index: qif-dialog-utils.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/qif-dialog-utils.scm,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/import-export/qif-import/qif-dialog-utils.scm -Lsrc/import-export/qif-import/qif-dialog-utils.scm -u -r1.5 -r1.6
--- src/import-export/qif-import/qif-dialog-utils.scm
+++ src/import-export/qif-import/qif-dialog-utils.scm
@@ -610,6 +610,7 @@
                       (gnc:get-current-group)
                       (qif-map-entry:gnc-name map-entry)
                       separator))
+		    (book (gnc:group-get-book (gnc:get-current-group)))
                     (existing-type 
                      (gnc:account-get-type existing-gnc-acct)))
                (if (and existing-gnc-acct 
@@ -629,7 +630,8 @@
                      (set! names (cons stock-name names))
                      (hash-set! 
                       stock-hash stock-name 
-                      (gnc:commodity-create stock-name
+                      (gnc:commodity-create book
+					    stock-name
                                             GNC_COMMODITY_NS_NYSE
                                             ticker-symbol
                                             ""
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/qif-import/.cvsignore -Lsrc/import-export/qif-import/.cvsignore -u -r1.4 -r1.5
--- src/import-export/qif-import/.cvsignore
+++ src/import-export/qif-import/.cvsignore
@@ -1,6 +1,7 @@
 .deps
 .libs
 .scm-links
+*.gladep
 *.la
 *.lo
 Makefile
Index: druid-qif-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/druid-qif-import.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/import-export/qif-import/druid-qif-import.c -Lsrc/import-export/qif-import/druid-qif-import.c -u -r1.28 -r1.29
--- src/import-export/qif-import/druid-qif-import.c
+++ src/import-export/qif-import/druid-qif-import.c
@@ -39,21 +39,20 @@
 #include "dialog-utils.h"
 #include "druid-qif-import.h"
 #include "druid-utils.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
-#include "gnc-file-dialog.h"
+#include "gnc-file.h"
 #include "gnc-gui-query.h"
-#include "gnc-menu-extensions.h"
 #include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ui.h"
 #include "messages.h"
-#include "window-help.h"
 #include "guile-mappings.h"
 
 #include <g-wrap-wct.h>
 
 #define DRUID_QIF_IMPORT_CM_CLASS "druid-qif-import"
+#define GCONF_SECTION "dialogs/import/qif"
 
 struct _qifimportwindow {
   GtkWidget * window;
@@ -352,34 +351,34 @@
                                  gpointer user_data)
 {
   QIFImportWindow * wind = user_data;
-  const char * new_file_name;
+  char * new_file_name;
   char *file_name, *default_dir;
 
   /* Default to whatever's already present */
-  default_dir = gnc_lookup_string_option("__paths", "Import QIF", NULL);
+  default_dir = gnc_gconf_get_string(GCONF_SECTION, KEY_LAST_PATH, NULL);
   if (default_dir == NULL)
     gnc_init_default_directory(&default_dir);
-  new_file_name = gnc_file_dialog (_("Select QIF File"), "*.qif", default_dir);
+  new_file_name = gnc_file_dialog (_("Select QIF File"), "*.qif", 
+		  default_dir, GNC_FILE_DIALOG_IMPORT);
 
   /* Insure valid data, and something that can be freed. */
-  if (new_file_name == NULL)
+  if (new_file_name == NULL) {
     file_name = g_strdup(default_dir);
-  else if (*new_file_name != '/')
+  } else if (*new_file_name != '/') {
     file_name = g_strdup_printf("%s%s", default_dir, new_file_name);
-  else
-    file_name = g_strdup(new_file_name);
+    g_free(new_file_name);
+  } else {
+    file_name = new_file_name;
+  }
 
   /* set the filename entry for what was selected */
   gtk_entry_set_text(GTK_ENTRY(wind->filename_entry), file_name);
 
   /* Update the working directory */
   gnc_extract_directory(&default_dir, file_name);
-  gnc_set_string_option("__paths", "Import QIF", default_dir);
+  gnc_gconf_set_string(GCONF_SECTION, KEY_LAST_PATH, default_dir, NULL);
   g_free(default_dir);
   g_free(file_name);
-
-  /* Now raise the window to be sure it's visible */
-  gdk_window_raise(wind->window->window);
 }
 
 
@@ -421,8 +420,8 @@
 {
   QIFImportWindow * wind = user_data;
 
-  char * path_to_load;
-  char * default_acctname = NULL;
+  const char * path_to_load;
+  const gchar * default_acctname = NULL;
 
   GList * format_strings;
   GList * listit;
@@ -492,11 +491,10 @@
      * exception. */
     if(SCM_LISTP(load_return) &&
        (SCM_CAR(load_return) == SCM_BOOL_T)) {
-      char *warn_str = gh_scm2newstr(SCM_CADR(load_return), NULL);
+      const gchar *warn_str = SCM_STRING_CHARS(SCM_CADR(load_return));
       gnc_warning_dialog(GTK_WIDGET(wind->window),
 			 _("QIF file load warning:\n%s"),
 			 warn_str ? warn_str : "(null)");
-      free (warn_str);
     }
 
     /* check success of the file load */
@@ -508,11 +506,10 @@
     else if ((load_return != SCM_BOOL_T) &&
              (!SCM_LISTP(load_return) || 
               (SCM_CAR(load_return) != SCM_BOOL_T))) {
-      char *warn_str = gh_scm2newstr(SCM_CADR(load_return), NULL);
+      const gchar *warn_str = SCM_STRING_CHARS(SCM_CADR(load_return));
       gnc_error_dialog(wind->window,
 		       _("QIF file load failed:\n%s"),
 		       warn_str ? warn_str : "(null)");
-      free (warn_str);
 
       imported_files = 
         scm_call_2(unload_qif_file, scm_qiffile, imported_files);
@@ -541,12 +538,12 @@
 
 	if ((date_formats = scm_call_2(qif_file_parse_results,
 				       SCM_CDR(parse_return),
-				       gh_symbol2scm("date"))) != SCM_BOOL_F) {
+				       scm_str2symbol("date"))) != SCM_BOOL_F) {
 	  format_strings = NULL;
 	  while(SCM_LISTP(date_formats) && !SCM_NULLP(date_formats)) {
 	    format_strings = 
 	      g_list_append(format_strings, 
-			    gh_symbol2newstr(gh_car(date_formats), NULL));
+			    g_strdup(SCM_SYMBOL_CHARS(SCM_CAR(date_formats))));
 	    date_formats = SCM_CDR(date_formats);
 	  }
 	  gtk_combo_set_popdown_strings(GTK_COMBO(wind->date_format_combo),
@@ -577,11 +574,10 @@
       else if((parse_return != SCM_BOOL_T) &&
          (!SCM_LISTP(parse_return) ||
           (SCM_CAR(parse_return) != SCM_BOOL_T))) {
-        char *warn_str = gh_scm2newstr(SCM_CDADR(parse_return), NULL);
+        const gchar *warn_str = SCM_STRING_CHARS(SCM_CDADR(parse_return));
         gnc_error_dialog(wind->window,
 			 _("QIF file parse failed:\n%s"),
 			 warn_str ? warn_str : "(null)");
-        free(warn_str);
 
         imported_files = 
           scm_call_2(unload_qif_file, scm_qiffile, imported_files);
@@ -603,13 +599,10 @@
     }
     else if(scm_call_1(check_from_acct, SCM_CAR(imported_files)) != SCM_BOOL_T) {
       /* skip to the "ask account name" page */
-      default_acctname = gh_scm2newstr(scm_call_1(default_acct, 
-                                                SCM_CAR(imported_files)),
-                                       NULL);
+      default_acctname =
+	SCM_STRING_CHARS(scm_call_1(default_acct, SCM_CAR(imported_files)));
       gtk_entry_set_text(GTK_ENTRY(wind->acct_entry), default_acctname);
       
-      if(default_acctname) free(default_acctname);
-      
       gnome_druid_set_page(GNOME_DRUID(wind->druid),
                            get_named_page(wind, "account_name_page"));
       return TRUE;
@@ -641,15 +634,12 @@
   
   if(scm_call_1(check_from_acct, wind->selected_file) != SCM_BOOL_T) {
     SCM default_acct    = scm_c_eval_string("qif-file:path-to-accountname");
-    char * default_acctname;
+    const gchar * default_acctname;
 
-    default_acctname = gh_scm2newstr(scm_call_1(default_acct,
-						wind->selected_file),
-				     NULL);
+    default_acctname = SCM_STRING_CHARS(scm_call_1(default_acct,
+						wind->selected_file));
     gtk_entry_set_text(GTK_ENTRY(wind->acct_entry), default_acctname);
 
-    if(default_acctname) free(default_acctname);
-
     return FALSE;
   }
   else {
@@ -699,7 +689,7 @@
 
   update_file_page(wind);
   gnome_druid_set_buttons_sensitive(GNOME_DRUID(wind->druid),
-                                    FALSE, TRUE, TRUE); 
+                                    FALSE, TRUE, TRUE, TRUE); 
 }
 
 
@@ -718,7 +708,7 @@
   gnome_druid_set_page(GNOME_DRUID(wind->druid),
                        get_named_page(wind, "load_file_page"));
   gnome_druid_set_buttons_sensitive(GNOME_DRUID(wind->druid),
-                                    TRUE, TRUE, TRUE); 
+                                    TRUE, TRUE, TRUE, TRUE); 
 }
 
 
@@ -779,11 +769,10 @@
   
   while(!SCM_NULLP(loaded_file_list)) {  
     scm_qiffile = SCM_CAR(loaded_file_list);
-    row_text    = gh_scm2newstr(scm_call_1(qif_file_path, scm_qiffile), NULL);
+    row_text    = SCM_STRING_CHARS(scm_call_1(qif_file_path, scm_qiffile));
 
     row = gtk_clist_append(GTK_CLIST(wind->selected_file_list),
                            &row_text);
-    free (row_text);
 
     if(scm_qiffile == wind->selected_file) {
       sel_item = row;
@@ -814,7 +803,7 @@
                                        gpointer user_data)
 {
   QIFImportWindow * wind = user_data;
-  char   * acct_name = gtk_entry_get_text(GTK_ENTRY(wind->acct_entry));
+  const char   * acct_name = gtk_entry_get_text(GTK_ENTRY(wind->acct_entry));
   SCM    fix_default = scm_c_eval_string("qif-import:fix-from-acct");
   SCM    scm_name;
 
@@ -858,7 +847,7 @@
   gnome_druid_set_page(GNOME_DRUID(wind->druid),
                        get_named_page(wind, "load_file_page"));
   gnome_druid_set_buttons_sensitive(GNOME_DRUID(wind->druid),
-                                    TRUE, TRUE, TRUE); 
+                                    TRUE, TRUE, TRUE, TRUE); 
   return TRUE;
 }
 
@@ -913,10 +902,8 @@
   row_text[2] = "";
 
   while(!SCM_NULLP(accts_left)) {
-    row_text[0] = gh_scm2newstr(scm_call_1(get_qif_name, SCM_CAR(accts_left)),
-                                NULL);
-    row_text[1] = gh_scm2newstr(scm_call_1(get_gnc_name, SCM_CAR(accts_left)),
-                                NULL);
+    row_text[0] = SCM_STRING_CHARS(scm_call_1(get_qif_name, SCM_CAR(accts_left)));
+    row_text[1] = SCM_STRING_CHARS(scm_call_1(get_gnc_name, SCM_CAR(accts_left)));
     
     row = gtk_clist_append(GTK_CLIST(list), row_text);
 
@@ -924,9 +911,6 @@
                          scm_call_1(get_new, SCM_CAR(accts_left)) == SCM_BOOL_T);
 
     accts_left = SCM_CDR(accts_left);
-
-    free(row_text[0]);
-    free(row_text[1]);
   }
 
   gtk_clist_thaw(GTK_CLIST(list));
@@ -1131,14 +1115,14 @@
   Split        * gnc_split;
   gnc_commodity * old_commodity;
 
-  char * mnemonic = NULL; 
+  const char * mnemonic = NULL; 
   const char * namespace = NULL;
-  char * fullname = NULL;
+  const char * fullname = NULL;
   const gchar * row_text[4] = { NULL, NULL, NULL, NULL };
   int  rownum;
 
   /* get the default currency */
-  char * currname = gtk_entry_get_text(GTK_ENTRY(wind->currency_entry));
+  const char * currname = gtk_entry_get_text(GTK_ENTRY(wind->currency_entry));
 
   /* busy cursor */
   gnc_suspend_gui_refresh ();
@@ -1386,8 +1370,8 @@
     gtk_object_get_data(GTK_OBJECT(page), "page_struct");
   
   const char * namespace = gnc_ui_namespace_picker_ns(qpage->new_type_combo);
-  char * name      = gtk_entry_get_text(GTK_ENTRY(qpage->new_name_entry));
-  char * mnemonic  = gtk_entry_get_text(GTK_ENTRY(qpage->new_mnemonic_entry));
+  const char * name      = gtk_entry_get_text(GTK_ENTRY(qpage->new_name_entry));
+  const char * mnemonic  = gtk_entry_get_text(GTK_ENTRY(qpage->new_mnemonic_entry));
   int  show_matches;
 
   if(!namespace || (namespace[0] == 0)) {
@@ -1536,7 +1520,7 @@
   GnomeDruidPageStandard * page;
 
   /* make the page widget */
-  retval->page = gnome_druid_page_standard_new_with_vals("", NULL);
+  retval->page = gnome_druid_page_standard_new_with_vals("", NULL, NULL);
   retval->commodity = comm;
   gtk_object_set_data(GTK_OBJECT(retval->page),
                       "page_struct", (gpointer)retval);
@@ -1548,9 +1532,9 @@
   str = str ? str : "";
   title = g_strdup_printf(_("Enter information about \"%s\""), str);
 
-  gnome_druid_page_standard_set_bg_color(page, & std_bg_color);  
-  gnome_druid_page_standard_set_logo_bg_color(page, & std_logo_bg_color);
-  gnome_druid_page_standard_set_title_color(page, & std_title_color);
+  gnome_druid_page_standard_set_background(page, & std_bg_color);  
+  gnome_druid_page_standard_set_logo_background(page, & std_logo_bg_color);
+  gnome_druid_page_standard_set_title_foreground (page, & std_title_color);
   gnome_druid_page_standard_set_title(page, title);
   g_free(title);
   
@@ -1801,7 +1785,8 @@
  ********************************************************************/
 
 QIFImportWindow *
-gnc_ui_qif_import_druid_make(void)  {
+gnc_ui_qif_import_druid_make(void)
+{
   
   QIFImportWindow * retval;
   GladeXML        * xml;
@@ -1970,9 +1955,7 @@
   retval->commodity_pages = NULL;
 
   retval->show_doc_pages = 
-    gnc_lookup_boolean_option("Online Banking & Importing",
-                              "QIF Verbose documentation",
-                              TRUE);
+    gnc_gconf_get_bool("dialogs/import/qif", "show_doc", NULL);
 
   for(i=0; i < NUM_PRE_PAGES; i++) {
     retval->pre_comm_pages = 
@@ -2040,19 +2023,3 @@
 
   return retval;
 }
-
-void
-gnc_ui_qif_import_create_menus(void)
-{
-  static GnomeUIInfo menuitem =
-  {
-    GNOME_APP_UI_ITEM,
-    N_("Import _QIF..."),
-    N_("Import a Quicken QIF file"),
-    gnc_file_qif_import, NULL, NULL,
-    GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_CONVERT,
-    'i', GDK_CONTROL_MASK, NULL
-  };
-
-  gnc_add_c_extension(&menuitem, WINDOW_NAME_MAIN "/File/_Import/");
-}
Index: gncmod-qif-import.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/gncmod-qif-import.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/import-export/qif-import/gncmod-qif-import.c -Lsrc/import-export/qif-import/gncmod-qif-import.c -u -r1.9 -r1.10
--- src/import-export/qif-import/gncmod-qif-import.c
+++ src/import-export/qif-import/gncmod-qif-import.c
@@ -14,6 +14,8 @@
 #include "druid-qif-import.h"
 #include "dialog-new-user.h"
 
+#include "gnc-plugin-qif-import.h"
+
 /* version of the gnc module system interface we require */
 int libgncmod_qif_import_LTX_gnc_module_system_interface = 0;
 
@@ -69,7 +71,8 @@
   }
 
   scm_c_eval_string("(use-modules (gnucash import-export qif-import))");
-  gnc_ui_qif_import_create_menus();
+
+  gnc_plugin_qif_import_create_plugin();
 
   return TRUE;
 }
Index: dialog-account-picker.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/dialog-account-picker.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/import-export/qif-import/dialog-account-picker.c -Lsrc/import-export/qif-import/dialog-account-picker.c -u -r1.4 -r1.5
--- src/import-export/qif-import/dialog-account-picker.c
+++ src/import-export/qif-import/dialog-account-picker.c
@@ -26,7 +26,6 @@
 #include <gnome.h>
 #include <stdio.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "dialog-account-picker.h"
 #include "dialog-utils.h"
@@ -49,7 +48,8 @@
 
 static void
 acct_tree_add_accts(SCM accts, GtkCTree * tree, GtkCTreeNode * parent,
-                    char * base_name, int *row) {
+                    char * base_name, int *row)
+{
   char         * acctinfo[2];
   char         * acctname;
   char         sep[2] = " ";
@@ -69,7 +69,10 @@
       continue;
     }
 
-    acctinfo[0] = gh_scm2newstr(SCM_CAR(current), NULL);
+    if (SCM_STRINGP(SCM_CAR(current)))
+      acctinfo[0] = g_strdup(SCM_STRING_CHARS(SCM_CAR(current)));
+    else
+      acctinfo[0] = g_strdup("");
 
     if(!SCM_NULLP(SCM_CADDR(current))) {
       leafnode = FALSE;
@@ -105,18 +108,21 @@
 }
 
 static gint
-test_str_cmp(gconstpointer a, gconstpointer b) {
+test_str_cmp(gconstpointer a, gconstpointer b)
+{
   return strcmp(a, b);
 }
 
 static void
-build_acct_tree(QIFAccountPickerDialog * picker, QIFImportWindow * import) {
+build_acct_tree(QIFAccountPickerDialog * picker, QIFImportWindow * import)
+{
   SCM  get_accts = scm_c_eval_string("qif-import:get-all-accts");
   SCM  acct_tree = scm_call_1(get_accts, 
 			      gnc_ui_qif_import_druid_get_mappings(import));
   GtkCTreeNode * new_sel;
   int row = 0;
 
+  gtk_clist_freeze(GTK_CLIST(picker->treeview));
   gtk_clist_clear(GTK_CLIST(picker->treeview));
   gtk_clist_set_column_justification (GTK_CLIST(picker->treeview),
                                       1, GTK_JUSTIFY_CENTER);
@@ -138,38 +144,35 @@
 
   gtk_clist_columns_autosize (GTK_CLIST (picker->treeview));
   gtk_clist_column_titles_passive (GTK_CLIST (picker->treeview));
+  gtk_clist_thaw(GTK_CLIST(picker->treeview));
 }
 
 static void
-new_child_string_cb(char * string, gpointer data) {
-  if(string) {
-    strncpy(data, string, 250);
-  }
-  else {
-    *(char *)data = 0;
-  }
-}
-
-static void
-gnc_ui_qif_account_picker_new_cb(GtkButton * w, gpointer user_data) {
+gnc_ui_qif_account_picker_new_cb(GtkButton * w, gpointer user_data)
+{
   QIFAccountPickerDialog * wind = user_data;
   SCM name_setter = scm_c_eval_string("qif-map-entry:set-gnc-name!");
-  char name[251] = "";
+  const char *name;
   char sep[2] = " ";
-  int  retval    = -1;
-  char * fullname = NULL;
-
-  GtkWidget * dlg = gnome_request_dialog(FALSE, 
-                                         _("Enter a name for the account"), 
-                                         "", 250,
-                                         &new_child_string_cb, &name[0],
-                                         NULL);
-  retval = gnome_dialog_run_and_close(GNOME_DIALOG(dlg));
-  sep[0] = gnc_get_account_separator();
-
-  /* retval is 0 if the 'ok' button was clicked */
-  if(retval == 0) {
+  int  response;
+  char * fullname;
+  GtkWidget *dlg, *entry;
+
+  dlg = gtk_message_dialog_new (GTK_WINDOW(wind->dialog),
+				GTK_DIALOG_DESTROY_WITH_PARENT,
+				GTK_MESSAGE_QUESTION,
+				GTK_BUTTONS_OK_CANCEL,
+				_("Enter a name for the account"));
+
+  entry = gtk_entry_new_with_max_length (250);
+  gtk_widget_show(entry);
+  gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dlg)->vbox), entry);
+
+  response = gtk_dialog_run(GTK_DIALOG(dlg));
+  if (response == GTK_RESPONSE_OK) {
+    name = gtk_entry_get_text(GTK_ENTRY(entry));
     if(wind->selected_name && (strlen(wind->selected_name) > 0)) {
+      sep[0] = gnc_get_account_separator();
       fullname = g_strjoin(sep, wind->selected_name, name, NULL);
     }
     else {
@@ -179,6 +182,7 @@
     scm_call_2(name_setter, wind->map_entry, scm_makfrom0str(fullname));
     g_free(fullname);
   }
+  gtk_widget_destroy(dlg);
 
   build_acct_tree(wind, wind->qif_wind);
 
@@ -188,7 +192,8 @@
 gnc_ui_qif_account_picker_select_cb(GtkCTree   * tree,
                                     GtkCTreeNode  * node,
                                     gint column,
-                                    gpointer  user_data) {
+                                    gpointer  user_data)
+{
   QIFAccountPickerDialog * wind = user_data;
   SCM name_setter = scm_c_eval_string("qif-map-entry:set-gnc-name!");
 
@@ -204,7 +209,8 @@
 gnc_ui_qif_account_picker_unselect_cb(GtkCTree   * tree,
                                       GtkCTreeNode  * node,
                                       gint column,
-                                      gpointer  user_data) {
+                                      gpointer  user_data)
+{
   QIFAccountPickerDialog * wind = user_data;
 
   g_free(wind->selected_name);
@@ -213,7 +219,8 @@
 
 
 static int
-gnc_ui_qif_account_picker_map_cb(GtkWidget * w, gpointer user_data) {
+gnc_ui_qif_account_picker_map_cb(GtkWidget * w, gpointer user_data)
+{
   QIFAccountPickerDialog * wind = user_data;
 
   /* update the tree display with all the existing accounts plus all
@@ -232,14 +239,16 @@
  ****************************************************************/
 
 SCM
-qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry) {  
+qif_account_picker_dialog(QIFImportWindow * qif_wind, SCM map_entry)
+{  
   QIFAccountPickerDialog * wind;
   SCM save_entry   = scm_c_eval_string("qif-map-entry:clone");
   SCM init_pick    = scm_c_eval_string("qif-map-entry:gnc-name");
   SCM saved_entry  = scm_call_1(save_entry, map_entry);
-  int retval = -1;
-  char * scmname;
+  int response;
+  const gchar * scmname;
   GladeXML *xml;
+  GtkWidget *button;
 
   wind = g_new0(QIFAccountPickerDialog, 1);
 
@@ -255,9 +264,8 @@
 
   wind->map_entry  = map_entry;
   
-  scmname = gh_scm2newstr(scm_call_1(init_pick, map_entry), NULL);
+  scmname = SCM_STRING_CHARS(scm_call_1(init_pick, map_entry));
   wind->selected_name = g_strdup(scmname);
-  free(scmname);
 
   scm_gc_protect_object(wind->map_entry);
 
@@ -273,17 +281,23 @@
                            GTK_SIGNAL_FUNC(gnc_ui_qif_account_picker_map_cb),
                            wind);
   
+  button = glade_xml_get_widget (xml, "newbutton");
+  gtk_button_set_use_stock(GTK_BUTTON(button), TRUE);
+
   /* this is to get the checkmarks set up right.. it will get called 
    * again after the window is mapped. */
   build_acct_tree(wind, wind->qif_wind);
 
-  retval = gnome_dialog_run_and_close(GNOME_DIALOG(wind->dialog));  
-  
+  do {
+    response = gtk_dialog_run(GTK_DIALOG(wind->dialog));
+  } while (response == GNC_RESPONSE_NEW);
+  gtk_widget_destroy(wind->dialog);
+
   scm_gc_unprotect_object(wind->map_entry);
   g_free(wind->selected_name);
   g_free(wind);
 
-  if(retval == 0) {
+  if (response == GTK_RESPONSE_OK) {
     return map_entry;
   }
   else {
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/Makefile.am,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/import-export/qif-import/Makefile.am -Lsrc/import-export/qif-import/Makefile.am -u -r1.21 -r1.22
--- src/import-export/qif-import/Makefile.am
+++ src/import-export/qif-import/Makefile.am
@@ -5,22 +5,26 @@
 libgncmod_qif_import_la_SOURCES = \
   dialog-account-picker.c \
   druid-qif-import.c \
+  gnc-plugin-qif-import.c \
+  gnc-druid-test.c \
   gncmod-qif-import.c
 
 noinst_HEADERS = \
   dialog-account-picker.h \
-  druid-qif-import.h
-
-libgncmod_qif_import_la_LDFLAGS = -module 
+  druid-qif-import.h \
+  gnc-druid-test.h \
+  gnc-plugin-qif-import.h
 
 libgncmod_qif_import_la_LIBADD = \
+  ${top_builddir}/src/import-export/libgncmod-generic-import.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
-  ${top_builddir}/src/app-file/libgncmod-app-file.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${GUILE_LIBS} \
   ${GNOME_LIBS} \
   ${GLADE_LIBS} \
+  ${QOF_LIBS} \
   ${GLIB_LIBS}
 
 
@@ -45,26 +49,33 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
-  -I${top_srcdir}/src/app-file \
   -I${top_srcdir}/src/gnome \
   -I${top_srcdir}/src/gnome-utils \
+  -I${top_srcdir}/src/import-export \
   ${G_WRAP_COMPILE_ARGS} \
   ${GUILE_INCS} \
   ${GLIB_CFLAGS} \
   ${GLADE_CFLAGS} \
   ${GNOME_PRINT_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   ${GDK_PIXBUF_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GTKHTML_CFLAGS}
 
+uidir = $(GNC_UI_DIR)
+ui_DATA = \
+	gnc-plugin-qif-import-ui.xml
+
 EXTRA_DIST = \
   .cvsignore \
   ${gncscm_DATA} \
   ${glade_DATA} \
-  file-format.txt
+  file-format.txt \
+  $(ui_DATA)
 
 CLEANFILES =
 
Index: qif-parse.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/qif-parse.scm,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/import-export/qif-import/qif-parse.scm -Lsrc/import-export/qif-import/qif-parse.scm -u -r1.9 -r1.10
--- src/import-export/qif-import/qif-parse.scm
+++ src/import-export/qif-import/qif-parse.scm
@@ -1,4 +1,4 @@
-0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;  qif-parse.scm
 ;;;  routines to parse values and dates in QIF files. 
 ;;;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-import/test/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/qif-import/test/Makefile.am -Lsrc/import-export/qif-import/test/Makefile.am -u -r1.2 -r1.3
--- src/import-export/qif-import/test/Makefile.am
+++ src/import-export/qif-import/test/Makefile.am
@@ -2,6 +2,11 @@
 
 noinst_PROGRAMS=test-link
 
-test_link_SOURCES=test-link.c
+test_link_SOURCES = \
+  test-link.c
+
 test_link_LDADD=../libgncmod-qif-import.la \
-  ${top_builddir}/src/gnome/libgncgnome.la
+  ${top_builddir}/src/gnome/libgncgnome.la \
+  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ${LIBXML2_LIBS}
+
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-io-core/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/import-export/qif-io-core/Makefile.am -Lsrc/import-export/qif-io-core/Makefile.am -u -r1.7 -r1.8
--- src/import-export/qif-io-core/Makefile.am
+++ src/import-export/qif-io-core/Makefile.am
@@ -5,7 +5,6 @@
 AM_CFLAGS = -I${top_srcdir}/src/gnc-module ${GUILE_INCS} ${GLIB_CFLAGS}
 
 libgncmod_qifiocore_la_SOURCES = gncmod-qifiocore.c
-libgncmod_qifiocore_la_LDFLAGS = -module
 
 noinst_DATA = .scm-links
 
Index: test-import-phase-1.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-io-core/test/test-import-phase-1.scm,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/import-export/qif-io-core/test/test-import-phase-1.scm -Lsrc/import-export/qif-io-core/test/test-import-phase-1.scm -u -r1.6 -r1.7
--- src/import-export/qif-io-core/test/test-import-phase-1.scm
+++ src/import-export/qif-io-core/test/test-import-phase-1.scm
@@ -13,13 +13,14 @@
   (gnc:module-system-init)
   (gnc:module-load "gnucash/qif-io/core" 0)
   ;; XXX: Need app/file to initialize (gnc:get-current-session/book)
-  (gnc:module-load "gnucash/app-file" 0)
   
   (let ((qiffile (qif-io:make-empty-file))
         (acct-table (qif-io:make-empty-acct-table))
-        (com-table (gnc:commodity-table-new)))
+	(session (gnc:get-current-session))
+	(book (gnc:session-get-book session))
+	(com-table (gnc:commodity-table-new)))
 
-    (gnc:commodity-table-add-default-data com-table)
+    (gnc:commodity-table-add-default-data com-table book)
 
     ;; read the file and look at data formats. we need to do this
     ;; immediately when loading a file.
@@ -59,9 +60,7 @@
       (let ((group (qif-io:acct-table-make-gnc-group 
                     acct-table qiffile commodity)))
         ;; write the file
-        (let* ((session (gnc:get-current-session))
-               (book (gnc:session-get-book session))
-               (name (simple-format #f "file:~A.gnc" filename)))
+        (let* ((name (simple-format #f "file:~A.gnc" filename)))
           (simple-format #t "using book name='~A'\n" name)
           (gnc:group-concat-group (gnc:book-get-group book) group)
 	  (gnc:account-group-destroy group)
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/qif-io-core/test/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/import-export/qif-io-core/test/Makefile.am -Lsrc/import-export/qif-io-core/test/Makefile.am -u -r1.8 -r1.9
--- src/import-export/qif-io-core/test/Makefile.am
+++ src/import-export/qif-io-core/test/Makefile.am
@@ -9,7 +9,6 @@
   --gnc-module-dir ${top_builddir}/src/gnc-module \
   --gnc-module-dir ${top_builddir}/src/engine \
   --gnc-module-dir ${top_builddir}/src/app-utils \
-  --gnc-module-dir ${top_builddir}/src/app-file \
   --gnc-module-dir ${top_builddir}/src/calculation \
   --gnc-module-dir ${top_builddir}/src/backend/file \
   --gnc-module-dir ${top_builddir}/src/import-export/qif-io-core \
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/import-export/test/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/import-export/test/Makefile.am -Lsrc/import-export/test/Makefile.am -u -r1.2 -r1.3
--- src/import-export/test/Makefile.am
+++ src/import-export/test/Makefile.am
@@ -6,13 +6,14 @@
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/import-export \
   ${GUILE_INCS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS} 
 
 LDADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/test-core/libgncmod-test.la \
   ../libgncmod-generic-import.la \
-  ${GLIB_LIBS}
+  ${GLIB_LIBS} ${QOF_LIBS}
 
 TESTS = \
   test-link \
Index: gnc-http.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/network-utils/gnc-http.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/network-utils/gnc-http.c -Lsrc/network-utils/gnc-http.c -u -r1.2 -r1.3
--- src/network-utils/gnc-http.c
+++ src/network-utils/gnc-http.c
@@ -20,8 +20,17 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  ********************************************************************/
 
+/********************************************************************
+ * 3/11/03 TomF Gnome2 changes for Gnome2                           * 
+ * gnc_http.c Disable all functions to bypass missing ghttp	    *
+ *   include "gnc-engine-util.h" to allow PERR warnings		    *
+ *   Use long if 0 to make it easy to go back to the original to    *
+ *   start developing a ghttp replacement.                          *
+*********************************************************************/
+
 #include "config.h"
 
+#if 0
 #ifdef HAVE_OPENSSL
 #include <openssl/ssl.h>
 #include <openssl/err.h>
@@ -42,9 +51,13 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#endif
 
 #include "gnc-http.h"
+#include "gnc-engine.h"  /* To allow PERR messages             */ 
 
+/* ***Warning*** Find a gnome2 replacement for ghttp  ***************/
+#if 0
 
 struct _gnc_http {
   GList  * requests; 
@@ -58,7 +71,14 @@
   GncHTTPRequestCB callback;
   gpointer         callback_data;
 };
+#endif
+
+gnc_http *
+gnc_http_new(void) {
+  return NULL;
+}
 
+#if 0 
 gnc_http *
 gnc_http_new(void) {
   gnc_http * ret = g_new0(struct _gnc_http, 1);
@@ -266,3 +286,49 @@
   }  
 }
 
+#else
+static QofLogModule log_module = GNC_MOD_IO;
+
+/* ***Warning*** Find a gnome2 replacement for ghttp  ***************/
+
+void
+gnc_http_destroy(gnc_http * http) {
+  PERR ("***Warning*** Find a gnome2 replacement for ghttp  *******");
+  return;
+}
+
+void
+gnc_http_cancel_requests(gnc_http * http) {
+  PERR ("***Warning*** Find a gnome2 replacement for ghttp  *******");
+  return;
+}
+
+
+#ifdef HAVE_OPENSSL
+static int
+gnc_http_certificate_check_cb(ghttp_request * req, X509 * cert, 
+                              void * user_data) {
+  PERR ("***Warning*** Find a gnome2 replacement for ghttp  *******");
+  return;
+}
+#endif
+
+void 
+gnc_http_start_request(gnc_http * http, const gchar * uri, 
+                       GncHTTPRequestCB cb, gpointer user_data) {
+  PERR ("***Warning*** Find a gnome2 replacement for ghttp  *******");
+  return;
+}
+
+void
+gnc_http_start_post(gnc_http * http, const char * uri, 
+                    const char * content_type, 
+                    const char * data, int datalen,
+                    GncHTTPRequestCB cb, gpointer user_data) {
+  PERR ("***Warning*** Find a gnome2 replacement for ghttp  *******");
+  return; 
+}
+
+
+  /* ***Warning*** Find a gnome2 replacement for ghttp  *************/
+#endif
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/network-utils/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/network-utils/Makefile.am -Lsrc/network-utils/Makefile.am -u -r1.8 -r1.9
--- src/network-utils/Makefile.am
+++ src/network-utils/Makefile.am
@@ -1,3 +1,6 @@
+# 2003-03-11 TomF changes for Gnome-2 branch, 5th batch
+# Add src/engine to allow including gnc-engine-util.h
+
 SUBDIRS = . test
 
 pkglib_LTLIBRARIES = libgncmod-network-utils.la
@@ -5,9 +8,10 @@
 AM_CFLAGS = \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
+  -I${top_srcdir}/src/engine \
   ${GLIB_CFLAGS} \
-  ${GHTTP_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS} \
   ${GUILE_INCS}
 
 libgncmod_network_utils_la_SOURCES = \
@@ -20,14 +24,9 @@
   gnc-gpg.h \
   gnc-http.h
 
-libgncmod_network_utils_la_LDFLAGS = -module
-
 libgncmod_network_utils_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
-  ${GHTTP_LIBS} \
-  ${GNOME_LIBDIR} \
-  ${GNOME_LIBS} \
-  ${GNOMEUI_LIBS}
+  ${GNOME_LIBS} ${QOF_LIBS}
 
 EXTRA_DIST = \
   .cvsignore
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/network-utils/test/Makefile.am,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/network-utils/test/Makefile.am -Lsrc/network-utils/test/Makefile.am -u -r1.9 -r1.10
--- src/network-utils/test/Makefile.am
+++ src/network-utils/test/Makefile.am
@@ -1,3 +1,7 @@
+# 2003-03-11 TomF changes for Gnome-2 branch, 6th batch
+# src/network-utils/test/Makefile.am:
+# Add libgncmod-engine.la to fix undefined ref to `gnc_should_log'
+
 TESTS =  \
   test-link-module \
   test-load-module
@@ -15,7 +19,9 @@
   test-link-module
 
 test_link_module_SOURCES=test-link-module.c
-test_link_module_LDADD=../libgncmod-network-utils.la
+test_link_module_LDADD= \
+  ${top_builddir}/src/engine/libgncmod-engine.la \
+  ../libgncmod-network-utils.la
 
 EXTRA_DIST = test-load-module
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/optional/swig/Makefile.am,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/optional/swig/Makefile.am -Lsrc/optional/swig/Makefile.am -u -r1.30 -r1.31
--- src/optional/swig/Makefile.am
+++ src/optional/swig/Makefile.am
@@ -36,7 +36,7 @@
 
 AM_CFLAGS = \
   -I at PERLINCL@/CORE \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
   -I${top_srcdir}/src/engine
 
 #
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/pixmaps/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/pixmaps/Makefile.am -Lsrc/pixmaps/Makefile.am -u -r1.8 -r1.9
--- src/pixmaps/Makefile.am
+++ src/pixmaps/Makefile.am
@@ -1,8 +1,19 @@
 gncpixmapdir = ${GNC_PIXMAP_DIR}
 
 gncpixmap_DATA = \
+  account-16.png \
+  account.png \
+  appicon.png \
+  delete-account-16.png \
+  delete-account.png \
+  edit-account-16.png \
+  edit-account.png \
   gnucash-icon.png \
   gnucash_splash.png \
+  new-account-16.png \
+  new-account.png \
+  open-account-16.png \
+  open-account.png \
   stock_split_title.png \
   stock_split_watermark.png
 
Index: split-register-layout.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-layout.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/ledger-core/split-register-layout.h -Lsrc/register/ledger-core/split-register-layout.h -u -r1.2 -r1.3
--- src/register/ledger-core/split-register-layout.h
+++ src/register/ledger-core/split-register-layout.h
@@ -25,16 +25,12 @@
 
 #include "table-layout.h"
 #include "split-register.h"
+/** @addtogroup GUI
+    @{ */
+/** @addtogroup Register Register visual layout.
 
-/** @addtogroup Register
- *  @{
- *  @file split-register-layout.h
- *  @author Copyright (C) 1998, 2004 Linas Vepstas <linas at linas.org>
- */
-
-/** Create the actual register visual layout: pick specific cell types
- *  to sit in specific columns, and add connections so that user can tab
- *  from one field to the next.  
+ *  pick specific cell types to sit in specific columns, and add 
+ *  connections so that user can tab from one field to the next.  
  *
  *  The actual layout depends on the register type, but, typically,
  *  all of the registers have the date cell on the left, description
@@ -44,8 +40,16 @@
  *  original intent was that the layout would be fetched from a 
  *  config file that could be tweaked for a specific, non-GnuCash 
  *  application.
+    @{
  */
+/** @file split-register-layout.h
+    @brief Create the actual register visual layout
+    @author Copyright (C) 1998, 2004 Linas Vepstas <linas at linas.org>
+*/
+
+/** Generate the split register layout. */
 TableLayout * gnc_split_register_layout_new (SplitRegister *reg);
 
 /** @} */
+/** @} */
 #endif
Index: split-register-model.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-model.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -Lsrc/register/ledger-core/split-register-model.c -Lsrc/register/ledger-core/split-register-model.c -u -r1.55 -r1.56
--- src/register/ledger-core/split-register-model.c
+++ src/register/ledger-core/split-register-model.c
@@ -23,15 +23,13 @@
 #include "config.h"
 
 #include <glib.h>
-#include <time.h>
 
 #include "Group.h"
 #include "datecell.h"
-#include "global-options.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-err-popup.h"
 #include "gnc-ui.h"
-#include "gnc-ui-util.h"
 #include "messages.h"
 #include "pricecell.h"
 #include "recncell.h"
@@ -43,20 +41,17 @@
 
 static SplitRegisterColors reg_colors =
 {
-  0xffffff, /* white */
-  0xffffff,
-  0xffffff,
-
-  0xffffff,
-  0xffffff,
-  0xffffff,
-  0xffffff,
-
-  FALSE /* double mode alternate by physical row */
+  0x96B183,
+  0xBFDEB9,
+  0xF6FFDA,
+  0xFFEF98,
+  0xFFEF98,
+  0xEDE7D3,
+  0xFFEF98,
 };
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 /* Flag for determining colorization of negative amounts. */
 static gboolean use_red_for_negative = TRUE;
@@ -498,6 +493,7 @@
   VirtualCell *vcell;
   guint32 bg_color;
   gboolean is_current;
+  gboolean double_alternate_virt;
 
   if (hatching)
     *hatching = FALSE;
@@ -538,9 +534,12 @@
   if (safe_strcmp (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
       safe_strcmp (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
   {
+    double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+					       "alternate_color_by_transaction",
+					       NULL);
     if (is_current)
     {
-      if (reg_colors.double_alternate_virt)
+      if (double_alternate_virt)
         return vcell->start_primary_color ?
           reg_colors.primary_active_bg_color :
           reg_colors.secondary_active_bg_color;
@@ -550,7 +549,7 @@
         reg_colors.secondary_active_bg_color;
     }
 
-    if (reg_colors.double_alternate_virt)
+    if (double_alternate_virt)
       return vcell->start_primary_color ?
         reg_colors.primary_bg_color :
         reg_colors.secondary_bg_color;
@@ -573,6 +572,89 @@
   return bg_color;
 }
 
+static RegisterColor
+gnc_split_register_get_gtkrc_bg_color (VirtualLocation virt_loc,
+				       gboolean *hatching,
+				       gpointer user_data)
+{
+  SplitRegister *reg = user_data;
+  const char *cursor_name;
+  VirtualCell *vcell;
+  gboolean is_current;
+  gboolean double_alternate_virt;
+
+  if (!reg)
+    return COLOR_UNKNOWN;
+
+  if (gnc_table_virtual_location_in_header (reg->table, virt_loc))
+    return COLOR_HEADER;
+
+  vcell = gnc_table_get_virtual_cell (reg->table, virt_loc.vcell_loc);
+  if (!vcell || !vcell->cellblock)
+    return COLOR_UNKNOWN;
+
+  if ((virt_loc.phys_col_offset < vcell->cellblock->start_col) ||
+      (virt_loc.phys_col_offset > vcell->cellblock->stop_col))
+    return COLOR_UNKNOWN;
+
+  is_current = virt_cell_loc_equal (reg->table->current_cursor_loc.vcell_loc,
+                                    virt_loc.vcell_loc);
+
+  cursor_name = vcell->cellblock->cursor_name;
+
+  if (safe_strcmp (cursor_name, CURSOR_SINGLE_JOURNAL) == 0 ||
+      safe_strcmp (cursor_name, CURSOR_SINGLE_LEDGER) == 0)
+  {
+    if (is_current)
+      return vcell->start_primary_color ?
+	COLOR_PRIMARY_ACTIVE :
+        COLOR_SECONDARY_ACTIVE;
+
+    return vcell->start_primary_color ?
+      COLOR_PRIMARY : COLOR_SECONDARY;
+  }
+
+  if (safe_strcmp (cursor_name, CURSOR_DOUBLE_JOURNAL) == 0 ||
+      safe_strcmp (cursor_name, CURSOR_DOUBLE_LEDGER) == 0)
+  {
+    double_alternate_virt = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+					       "alternate_color_by_transaction",
+					       NULL);
+    if (is_current)
+    {
+      if (double_alternate_virt)
+        return vcell->start_primary_color ?
+          COLOR_PRIMARY_ACTIVE :
+          COLOR_SECONDARY_ACTIVE;
+
+      return (virt_loc.phys_row_offset % 2 == 0) ?
+        COLOR_PRIMARY_ACTIVE :
+        COLOR_SECONDARY_ACTIVE;
+    }
+
+    if (double_alternate_virt)
+      return vcell->start_primary_color ?
+        COLOR_PRIMARY :
+        COLOR_SECONDARY;
+
+    return (virt_loc.phys_row_offset % 2 == 0) ?
+      COLOR_PRIMARY :
+      COLOR_SECONDARY;
+  }
+
+  if (safe_strcmp (cursor_name, CURSOR_SPLIT) == 0)
+  {
+    if (is_current)
+      return COLOR_SPLIT_ACTIVE;
+
+    return COLOR_SPLIT;
+  }
+
+  PWARN ("Unexpected cursor: %s\n", cursor_name);
+
+  return COLOR_UNKNOWN;
+}
+
 static guint32
 gnc_split_register_get_debcred_bg_color (VirtualLocation virt_loc,
                                          gboolean *hatching,
@@ -1745,22 +1827,23 @@
 
   if (recn == YREC)
   {
-    gboolean confirm;
-    const gchar *message = _("You are about to change a reconciled split.\n"
-			     "Are you sure you want to do that?");
-
-    confirm = gnc_lookup_boolean_option ("Register",
-                                         "Confirm before changing reconciled",
-                                         TRUE);
-    if (!confirm)
-      return TRUE;
+    gint response;
+    const gchar *message =
+      _("<b>Change reconciled split?</b>\n\n"
+	"You are about to change a reconciled split.  Doing so might make "
+	"future reconciliation difficult!  Continue with this change?\n");
+  
+    /* Does the user want to be warned? */
+    response = gnc_warning_remember_dialog(gnc_split_register_get_parent(reg),
+					   "change_reconciled_split",
+					   "Change _Split", GTK_STOCK_CANCEL,
+					   message);
 
-    confirm = gnc_verify_dialog (gnc_split_register_get_parent (reg),
-				 FALSE, message);
+    if (response != GTK_RESPONSE_YES)
+      return FALSE;
 
-    info->change_confirmed = confirm;
-
-    return confirm;
+    info->change_confirmed = TRUE;
+    return TRUE;
   }
 
   return TRUE;
@@ -1771,9 +1854,9 @@
 {
   GUID *guid;
 
-  guid = xaccGUIDMalloc ();
+  guid = guid_malloc ();
 
-  *guid = *xaccGUIDNULL ();
+  *guid = *guid_null ();
 
   return guid;
 }
@@ -1961,7 +2044,7 @@
 static void
 gnc_split_register_guid_free (gpointer guid)
 {
-  xaccGUIDFree (guid);
+  guid_free (guid);
 }
 
 static void
@@ -1973,15 +2056,39 @@
   g_return_if_fail (to != NULL);
 
   if (from == NULL)
-    *to = *xaccGUIDNULL ();
+    *to = *guid_null ();
   else
     *to = *from;
 }
 
+
+static void
+gnc_split_register_colorize_negative (GConfEntry *entry, gpointer unused)
+{
+  GConfValue *value;
+
+  value = gconf_entry_get_value(entry);
+  use_red_for_negative = gconf_value_get_bool(value);
+}
+
+
+static gpointer
+gnc_split_register_model_add_hooks (gpointer unused)
+{
+  gnc_gconf_general_register_cb(KEY_NEGATIVE_IN_RED,
+				gnc_split_register_colorize_negative,
+				NULL);
+  return NULL;
+}
+
+
 TableModel *
 gnc_split_register_model_new (void)
 {
   TableModel *model;
+  static GOnce once = G_ONCE_INIT;
+
+  g_once(&once, gnc_split_register_model_add_hooks, NULL);
 
   model = gnc_table_model_new ();
 
@@ -2339,6 +2446,11 @@
 
   gnc_table_model_set_bg_color_handler
                                    (model,
+                                    gnc_split_register_get_gtkrc_bg_color,
+                                    "gtkrc");
+
+  gnc_table_model_set_bg_color_handler
+                                   (model,
                                     gnc_split_register_get_debcred_bg_color,
                                     DEBT_CELL);
 
@@ -2442,15 +2554,3 @@
 
   return model;
 }
-
-void
-gnc_split_register_colorize_negative (gboolean use_red)
-{
-  use_red_for_negative = use_red;
-}
-
-void
-gnc_split_register_set_colors (SplitRegisterColors reg_colors_new)
-{
-  reg_colors = reg_colors_new;
-}
Index: split-register-load.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-load.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/register/ledger-core/split-register-load.c -Lsrc/register/ledger-core/split-register-load.c -u -r1.30 -r1.31
--- src/register/ledger-core/split-register-load.c
+++ src/register/ledger-core/split-register-load.c
@@ -27,7 +27,6 @@
 #include "Group.h"
 #include "account-quickfill.h"
 #include "combocell.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-engine-util.h"
 #include "gnc-ui-util.h"
@@ -513,7 +512,7 @@
     if (xaccTransIsOpen (pending_trans))
       xaccTransCommitEdit (pending_trans);
 
-    info->pending_trans_guid = *xaccGUIDNULL ();
+    info->pending_trans_guid = *guid_null ();
     pending_trans = NULL;
   }
 
@@ -554,7 +553,7 @@
 
   name = xaccAccountGetFullName (account, gnc_get_account_separator ());
   if (NULL == name) return NULL;
-  gnc_combo_cell_add_menu_item (cell, name);
+  gnc_combo_cell_add_account_menu_item (cell, name);
   g_free(name);
 
   return NULL;
Index: split-register-util.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-util.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/register/ledger-core/split-register-util.c -Lsrc/register/ledger-core/split-register-util.c -u -r1.12 -r1.13
--- src/register/ledger-core/split-register-util.c
+++ src/register/ledger-core/split-register-util.c
@@ -23,15 +23,12 @@
 #include "config.h"
 
 #include <glib.h>
-#include <string.h>
 
-#include "global-options.h"
-#include "gnc-engine-util.h"
 #include "pricecell.h"
 #include "split-register-p.h"
 
 
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 
 /* The routines below create, access, and destroy the SRInfo structure
@@ -49,10 +46,10 @@
 
   info = g_new0 (SRInfo, 1);
 
-  info->blank_split_guid = *xaccGUIDNULL ();
-  info->pending_trans_guid = *xaccGUIDNULL ();
-  info->default_account = *xaccGUIDNULL ();
-  info->template_account = *xaccGUIDNULL ();
+  info->blank_split_guid = *guid_null ();
+  info->pending_trans_guid = *guid_null ();
+  info->default_account = *guid_null ();
+  info->template_account = *guid_null ();
 
   info->last_date_entered = gnc_timet_get_today_start ();
 
Index: split-register-model.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-model.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/ledger-core/split-register-model.h -Lsrc/register/ledger-core/split-register-model.h -u -r1.1 -r1.2
--- src/register/ledger-core/split-register-model.h
+++ src/register/ledger-core/split-register-model.h
@@ -28,4 +28,15 @@
 TableModel * gnc_split_register_model_new (void);
 TableModel * gnc_template_register_model_new (void);
 
+typedef enum {
+  COLOR_UNKNOWN,
+  COLOR_HEADER,
+  COLOR_PRIMARY,
+  COLOR_PRIMARY_ACTIVE,
+  COLOR_SECONDARY,
+  COLOR_SECONDARY_ACTIVE,
+  COLOR_SPLIT,
+  COLOR_SPLIT_ACTIVE,
+} RegisterColor;
+
 #endif
Index: split-register-control.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-control.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -Lsrc/register/ledger-core/split-register-control.c -Lsrc/register/ledger-core/split-register-control.c -u -r1.51 -r1.52
--- src/register/ledger-core/split-register-control.c
+++ src/register/ledger-core/split-register-control.c
@@ -22,15 +22,11 @@
 
 #include "config.h"
 
-#include "dialog-account.h"
 #include "Group.h"
 #include "Scrub.h"
 #include "combocell.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
 #include "gnc-ui.h"
-#include "gnc-ui-util.h"
 #include "messages.h"
 #include "pricecell.h"
 #include "datecell.h"
@@ -42,7 +38,7 @@
 
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 
 static gboolean
@@ -336,7 +332,7 @@
       if (xaccTransIsOpen (old_trans))
         xaccTransCommitEdit (old_trans);
 
-      info->pending_trans_guid = *xaccGUIDNULL ();
+      info->pending_trans_guid = *guid_null ();
       pending_trans = NULL;
       saved = TRUE;
     }
@@ -1251,7 +1247,7 @@
   Transaction *pending_trans;
   VirtualLocation virt_loc;
   Transaction *trans, *new_trans;
-  GNCVerifyResult result;
+  gint result;
   gboolean changed;
   SRInfo *info;
   Split *split;
@@ -1537,23 +1533,21 @@
 gnc_split_register_recn_cell_confirm (char old_flag, gpointer data)
 {
   SplitRegister *reg = data;
+  gint response;
+  const gchar *message =
+    _("<b>Mark split as unreconciled?</b>\n\n"
+      "You are about to mark a reconciled split as unreconciled.  Doing "
+      "so might make future reconciliation difficult!  Continue "
+      "with this change?\n");
 
-  if (old_flag == YREC)
-  {
-    const char *message = _("Do you really want to mark this transaction "
-                            "not reconciled?\nDoing so might make future "
-                            "reconciliation difficult!");
-    gboolean confirm;
-
-    confirm = gnc_lookup_boolean_option ("Register",
-                                         "Confirm before changing reconciled",
-                                         TRUE);
-    if (!confirm)
-      return TRUE;
+  if (old_flag != YREC)
+    return TRUE;
 
-    return gnc_verify_dialog (gnc_split_register_get_parent (reg),
-                              TRUE, message);
-  }
+  /* Does the user want to be warned? */
+  response = gnc_warning_remember_dialog(gnc_split_register_get_parent(reg),
+					 "mark_split_unreconciled",
+					 "_Unreconcile", GTK_STOCK_CANCEL,
+					 message);
 
-  return TRUE;
+  return (response == GTK_RESPONSE_YES);
 }
Index: split-register-model-save.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-model-save.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -Lsrc/register/ledger-core/split-register-model-save.c -Lsrc/register/ledger-core/split-register-model-save.c -u -r1.30 -r1.31
--- src/register/ledger-core/split-register-model-save.c
+++ src/register/ledger-core/split-register-model-save.c
@@ -27,7 +27,7 @@
 #include "Scrub.h"
 #include "SchedXaction.h"
 #include "datecell.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "numcell.h"
 #include "pricecell.h"
 #include "recncell.h"
@@ -46,7 +46,7 @@
 };
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 
 static void
Index: split-register-layout.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register-layout.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/register/ledger-core/split-register-layout.c -Lsrc/register/ledger-core/split-register-layout.c -u -r1.17 -r1.18
--- src/register/ledger-core/split-register-layout.c
+++ src/register/ledger-core/split-register-layout.c
@@ -25,13 +25,13 @@
 
 #include <glib.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "messages.h"
 #include "split-register-layout.h"
 
 
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_REGISTER;
+static QofLogModule log_module = GNC_MOD_REGISTER;
 
 
 static void
Index: split-register.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -Lsrc/register/ledger-core/split-register.c -Lsrc/register/ledger-core/split-register.c -u -r1.49 -r1.50
--- src/register/ledger-core/split-register.c
+++ src/register/ledger-core/split-register.c
@@ -17,100 +17,24 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-
-/** 
- * @addtogroup Ledger 
- * @file split-register.c
- * @brief Provide view for SplitRegister object.
- *
- *
- * DESIGN NOTES:
- * Some notes about the "blank split":
- * Q: What is the "blank split"?
- * A: A new, empty split appended to the bottom of the ledger
- *    window.  The blank split provides an area where the user
- *    can type in new split/transaction info.  
- *    The "blank split" is treated in a special way for a number
- *    of reasons:
- *    (1) it must always appear as the bottom-most split
- *        in the Ledger window,
- *    (2) it must be committed if the user edits it, and 
- *        a new blank split must be created.
- *    (3) it must be deleted when the ledger window is closed.
- * To implement the above, the register "user_data" is used
- * to store an SRInfo structure containing the blank split.
- *
- * =====================================================================
- * Some notes on Commit/Rollback:
- * 
- * There's an engine component and a gui component to the commit/rollback
- * scheme.  On the engine side, one must always call BeginEdit()
- * before starting to edit a transaction.  When you think you're done,
- * you can call CommitEdit() to commit the changes, or RollbackEdit() to
- * go back to how things were before you started the edit. Think of it as
- * a one-shot mega-undo for that transaction.
- * 
- * Note that the query engine uses the original values, not the currently
- * edited values, when performing a sort.  This allows your to e.g. edit
- * the date without having the transaction hop around in the gui while you
- * do it.
- * 
- * On the gui side, commits are now performed on a per-transaction basis,
- * rather than a per-split (per-journal-entry) basis.  This means that
- * if you have a transaction with a lot of splits in it, you can edit them
- * all you want without having to commit one before moving to the next.
- * 
- * Similarly, the "cancel" button will now undo the changes to all of the
- * lines in the transaction display, not just to one line (one split) at a
- * time.
- * 
- * =====================================================================
- * Some notes on Reloads & Redraws:
- * 
- * Reloads and redraws tend to be heavyweight. We try to use change flags
- * as much as possible in this code, but imagine the following scenario:
- *
- * Create two bank accounts.  Transfer money from one to the other.
- * Open two registers, showing each account. Change the amount in one window.
- * Note that the other window also redraws, to show the new correct amount.
- * 
- * Since you changed an amount value, potentially *all* displayed
- * balances change in *both* register windows (as well as the ledger
- * balance in the main window).  Three or more windows may be involved
- * if you have e.g. windows open for bank, employer, taxes and your
- * entering a paycheck (or correcting a typo in an old paycheck).
- * Changing a date might even cause all entries in all three windows
- * to be re-ordered.
- *
- * The only thing I can think of is a bit stored with every table
- * entry, stating 'this entry has changed since lst time, redraw it'.
- * But that still doesn't avoid the overhead of reloading the table
- * from the engine.
- * 
- *
- * @author Copyright (c) 1998-2000 Linas Vepstas <linas at linas.org>
- * @author Copyright (c) 2000-2001 Dave Peticolas <dave at krondo.com>
+ /*
+ * split-register.c
+ * author Copyright (c) 1998-2000 Linas Vepstas <linas at linas.org>
+ * author Copyright (c) 2000-2001 Dave Peticolas <dave at krondo.com>
  */
-
 #define _GNU_SOURCE
 
 #include "config.h"
 
 #include <glib.h>
 #include <libguile.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
 
-#include "Account.h"
 #include "combocell.h"
 #include "datecell.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
-#include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
 #include "split-register-p.h"
 #include "gnc-ledger-display.h"
-#include "gnc-ui-util.h"
 #include "gnc-ui.h"
 #include "guile-util.h"
 #include "messages.h"
@@ -130,7 +54,7 @@
 /** static variables ******************************************************/
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 /* The copied split or transaction, if any */
 static CursorClass copied_class = CURSOR_CLASS_NONE;
@@ -492,13 +416,13 @@
   {
     const char *message = _("The current transaction has been changed.\n"
                             "Would you like to record it?");
-    GNCVerifyResult result;
+    gint result;
 
     result = gnc_ok_cancel_dialog
       (gnc_split_register_get_parent (reg),
        GTK_RESPONSE_OK, message);
 
-    if (result == GTK_RESPONSE_CANCEL)
+    if (result != GTK_RESPONSE_OK)
     {
       gnc_resume_gui_refresh ();
       return NULL;
@@ -661,7 +585,7 @@
         gnc_split_register_save_to_scm (reg, SCM_UNDEFINED, new_item,
                                         use_cut_semantics);
 
-      copied_leader_guid = *xaccGUIDNULL();
+      copied_leader_guid = *guid_null();
     }
   }
   else
@@ -847,7 +771,7 @@
     /* in pasting, the old split is deleted. */
     if (split == blank_split)
     {
-      info->blank_split_guid = *xaccGUIDNULL();
+      info->blank_split_guid = *guid_null();
       blank_split = NULL;
     }
 
@@ -932,7 +856,7 @@
   /* Check pending transaction */
   if (trans == pending_trans)
   {
-    info->pending_trans_guid = *xaccGUIDNULL ();
+    info->pending_trans_guid = *guid_null ();
     pending_trans = NULL;
   }
 
@@ -972,7 +896,7 @@
     /* Make sure we don't commit this later on */
     if (trans == pending_trans)
     {
-      info->pending_trans_guid = *xaccGUIDNULL();
+      info->pending_trans_guid = *guid_null();
       pending_trans = NULL;
     }
 
@@ -982,7 +906,7 @@
     xaccTransDestroy (trans);
     xaccTransCommitEdit (trans);
 
-    info->blank_split_guid = *xaccGUIDNULL();
+    info->blank_split_guid = *guid_null();
     blank_split = NULL;
 
     gnc_resume_gui_refresh ();
@@ -1006,7 +930,7 @@
   /* Check pending transaction */
   if (trans == pending_trans)
   {
-    info->pending_trans_guid = *xaccGUIDNULL();
+    info->pending_trans_guid = *guid_null();
     pending_trans = NULL;
   }
 
@@ -1055,7 +979,7 @@
   /* Check pending transaction */
   if (trans == pending_trans)
   {
-    info->pending_trans_guid = *xaccGUIDNULL();
+    info->pending_trans_guid = *guid_null();
     pending_trans = NULL;
   }
 
@@ -1104,7 +1028,7 @@
   /* Check pending transaction */
   if (trans == pending_trans)
   {
-    info->pending_trans_guid = *xaccGUIDNULL();
+    info->pending_trans_guid = *guid_null();
     pending_trans = NULL;
   }
 
@@ -1197,7 +1121,7 @@
 
   xaccTransRollbackEdit (pending_trans);
 
-  info->pending_trans_guid = *xaccGUIDNULL ();
+  info->pending_trans_guid = *guid_null ();
 
   gnc_resume_gui_refresh ();
 }
@@ -1437,7 +1361,7 @@
        if (xaccTransIsOpen(trans) || (info->blank_split_edited))
        {
          info->last_date_entered = xaccTransGetDate (trans);
-         info->blank_split_guid = *xaccGUIDNULL ();
+         info->blank_split_guid = *guid_null ();
          info->blank_split_edited = FALSE;
          blank_split = NULL;
        }
@@ -1453,7 +1377,7 @@
      if (pending_trans == trans)
      {
        pending_trans = NULL;
-       info->pending_trans_guid = *xaccGUIDNULL ();
+       info->pending_trans_guid = *guid_null ();
      }
 
      return TRUE;
@@ -1547,7 +1471,7 @@
    {
      if (do_commit)
      {
-       info->blank_split_guid = *xaccGUIDNULL ();
+       info->blank_split_guid = *guid_null ();
        blank_split = NULL;
        info->last_date_entered = xaccTransGetDate (trans);
      }
@@ -1563,7 +1487,7 @@
      if (pending_trans == trans)
      {
        pending_trans = NULL;
-       info->pending_trans_guid = *xaccGUIDNULL ();
+       info->pending_trans_guid = *guid_null ();
      }
    }
 
@@ -2232,6 +2156,31 @@
   gnc_split_register_config_action (reg);
 }
 
+static void
+split_register_gconf_changed (GConfEntry *entry, gpointer user_data)
+{
+  SplitRegister * reg = user_data;
+  SRInfo *info;
+
+  if (reg == NULL)
+    return;
+
+  info = reg->sr_info;
+  if (!info)
+    return;
+
+  /* Release current strings. Will be reloaded at next reference. */
+  g_free (info->debit_str);
+  g_free (info->tdebit_str);
+  g_free (info->credit_str);
+  g_free (info->tcredit_str);
+
+  info->debit_str = NULL;
+  info->tdebit_str = NULL;
+  info->credit_str = NULL;
+  info->tcredit_str = NULL;
+}
+
 static void 
 gnc_split_register_init (SplitRegister *reg,
                          SplitRegisterType type,
@@ -2245,6 +2194,9 @@
 
   /* Register 'destroy' callback */
   gnc_ui_register_account_destroy_callback (gnc_ledger_display_destroy_by_account);
+  gnc_gconf_general_register_cb(KEY_ACCOUNTING_LABELS,
+				split_register_gconf_changed,
+				reg);
 
   reg->sr_info = NULL;
 
@@ -2428,7 +2380,7 @@
       /* Make sure we don't commit this below */
       if (trans == pending_trans)
       {
-        info->pending_trans_guid = *xaccGUIDNULL ();
+        info->pending_trans_guid = *guid_null ();
         pending_trans = NULL;
       }
 
@@ -2436,7 +2388,7 @@
       xaccTransDestroy (trans);
       xaccTransCommitEdit (trans);
 
-      info->blank_split_guid = *xaccGUIDNULL ();
+      info->blank_split_guid = *guid_null ();
       blank_split = NULL;
    }
 
@@ -2446,7 +2398,7 @@
       if (xaccTransIsOpen (pending_trans))
         xaccTransCommitEdit (pending_trans);
 
-      info->pending_trans_guid = *xaccGUIDNULL ();
+      info->pending_trans_guid = *guid_null ();
       pending_trans = NULL;
    }
 
@@ -2461,6 +2413,9 @@
   if (!reg)
     return;
 
+  gnc_gconf_general_remove_cb(KEY_ACCOUNTING_LABELS,
+			      split_register_gconf_changed,
+			      reg);
   gnc_split_register_cleanup (reg);
 
   gnc_table_destroy (reg->table);
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/Makefile.am,v
retrieving revision 1.25
retrieving revision 1.26
diff -Lsrc/register/ledger-core/Makefile.am -Lsrc/register/ledger-core/Makefile.am -u -r1.25 -r1.26
--- src/register/ledger-core/Makefile.am
+++ src/register/ledger-core/Makefile.am
@@ -23,8 +23,9 @@
   split-register-model-save.h \
   split-register-p.h
 
-libgncmod_ledger_core_la_LDFLAGS = -module
 libgncmod_ledger_core_la_LIBADD = \
+  ${QOF_LIBS} \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   ${top_builddir}/src/register/register-core/libgncmod-register-core.la \
@@ -34,11 +35,13 @@
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/app-utils \
   -I${top_srcdir}/src/gnome-utils \
   -I${top_srcdir}/src/register/register-core \
   -I${top_srcdir}/src/register/register-gnome \
   ${GUILE_INCS} \
   ${GLADE_CFLAGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
Index: split-register.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/split-register.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/register/ledger-core/split-register.h -Lsrc/register/ledger-core/split-register.h -u -r1.21 -r1.22
--- src/register/ledger-core/split-register.h
+++ src/register/ledger-core/split-register.h
@@ -19,12 +19,19 @@
  * Boston, MA  02111-1307,  USA       gnu at gnu.org                   *
  *                                                                  *
 \********************************************************************/
-/** @addtogroup Ledger
+/** @addtogroup GUI
+@{ */
+/** @addtogroup Ledger Checkbook Register Display Area
+
+    @file split-register.h
+    @brief Checkbook Register Display Area
+    @author Copyright (C) 1998-2000 Linas Vepstas <linas at linas.org>
+
     The register is the spread-sheet-like area that looks like a 
     checkbook register.  It displays transactions, and allows the 
     user to edit transactions in-place.  The register does *not*
     contain any of the other window decorations that one might want 
-    to have for a fre-standing window (e.g. menubars, toolbars, etc.)
+    to have for a free standing window (e.g. menubars, toolbars, etc.)
 
     All user input to the register is handled by the 'cursor', which
     is mapped onto one of the displayed rows in the register.
@@ -37,6 +44,74 @@
     the fact that this register can display multiple rows of 
     transaction splits underneath a transaction title/summary row.
 
+\par Design Notes.
+@{
+Some notes about the "blank split":\n
+Q: What is the "blank split"?\n
+A: A new, empty split appended to the bottom of the ledger
+ window.  The blank split provides an area where the user
+ can type in new split/transaction info.  
+ The "blank split" is treated in a special way for a number
+ of reasons:
+-  it must always appear as the bottom-most split
+  in the Ledger window,
+-  it must be committed if the user edits it, and 
+  a new blank split must be created.
+-   it must be deleted when the ledger window is closed.
+To implement the above, the register "user_data" is used
+to store an SRInfo structure containing the blank split.
+
+ @}
+
+\par Some notes on Commit/Rollback:
+ @{
+ * 
+ * There's an engine component and a gui component to the commit/rollback
+ * scheme.  On the engine side, one must always call BeginEdit()
+ * before starting to edit a transaction.  When you think you're done,
+ * you can call CommitEdit() to commit the changes, or RollbackEdit() to
+ * go back to how things were before you started the edit. Think of it as
+ * a one-shot mega-undo for that transaction.
+ * 
+ * Note that the query engine uses the original values, not the currently
+ * edited values, when performing a sort.  This allows your to e.g. edit
+ * the date without having the transaction hop around in the gui while you
+ * do it.
+ * 
+ * On the gui side, commits are now performed on a per-transaction basis,
+ * rather than a per-split (per-journal-entry) basis.  This means that
+ * if you have a transaction with a lot of splits in it, you can edit them
+ * all you want without having to commit one before moving to the next.
+ * 
+ * Similarly, the "cancel" button will now undo the changes to all of the
+ * lines in the transaction display, not just to one line (one split) at a
+ * time.
+ * 
+
+ @}
+ \par Some notes on Reloads & Redraws:
+ @{
+ * Reloads and redraws tend to be heavyweight. We try to use change flags
+ * as much as possible in this code, but imagine the following scenario:
+ *
+ * Create two bank accounts.  Transfer money from one to the other.
+ * Open two registers, showing each account. Change the amount in one window.
+ * Note that the other window also redraws, to show the new correct amount.
+ * 
+ * Since you changed an amount value, potentially *all* displayed
+ * balances change in *both* register windows (as well as the ledger
+ * balance in the main window).  Three or more windows may be involved
+ * if you have e.g. windows open for bank, employer, taxes and your
+ * entering a paycheck (or correcting a typo in an old paycheck).
+ * Changing a date might even cause all entries in all three windows
+ * to be re-ordered.
+ *
+ * The only thing I can think of is a bit stored with every table
+ * entry, stating 'this entry has changed since lst time, redraw it'.
+ * But that still doesn't avoid the overhead of reloading the table
+ * from the engine.
+ @}
+
     The Register itself is independent of GnuCash, and is designed 
     so that it can be used with other applications.
     The Ledger is an adaptation of the Register for use by GnuCash.
@@ -50,11 +125,9 @@
     The actual GUI-toolkit specific code is supposed to be in a 
     GUI portability layer.  Over the years, some gnome-isms may 
     have snuck in; these should also be cleaned up.
-    @{ 
+*/
+/** @{
 
-    @file split-register.h
-    @brief Checkbook Register Display Area
-    @author Copyright (C) 1998-2000 Linas Vepstas <linas at linas.org>
 */
 
 #ifndef SPLIT_REGISTER_H
@@ -66,7 +139,8 @@
 #include "Transaction.h"
 #include "table-allgui.h"
 
-/** Register types.
+/** \brief Register types.
+ *
  * "registers" are single-account display windows.
  * "ledgers" are multiple-account display windows */
 typedef enum
@@ -109,7 +183,7 @@
 #define DEBT_CELL  "debit"
 #define DESC_CELL  "description"
 #define FCRED_CELL "credit-formula"
-#define FDEBT_CELL "debit formula"
+#define FDEBT_CELL "debit-formula"
 #define MEMO_CELL  "memo"
 #define MXFRM_CELL "transfer"
 #define NOTES_CELL "notes"
@@ -155,18 +229,16 @@
 
   guint32 split_bg_color;
   guint32 split_active_bg_color;
-
-  gboolean double_alternate_virt;
 } SplitRegisterColors;
 
 
 typedef struct split_register SplitRegister;
 typedef struct sr_info SRInfo;
 
+/** \brief The type, style and table for the register. */
 struct split_register
 {
-  /** The table itself that implements the underlying GUI. */
-  Table * table;
+  Table * table;   /**< The table itself that implements the underlying GUI. */
 
   SplitRegisterType type;
   SplitRegisterStyle style;
@@ -174,8 +246,7 @@
   gboolean use_double_line;
   gboolean is_template;
 
-  /** private data; outsiders should not access this */
-  SRInfo * sr_info;
+  SRInfo * sr_info;   /**< \internal private data; outsiders should not access this */
 };
 
 /** Callback function type */
@@ -330,12 +401,6 @@
 void gnc_split_register_show_present_divider (SplitRegister *reg,
                                               gboolean show_present);
 
-/** Set the colors used by SplitRegisters */
-void gnc_split_register_set_colors (SplitRegisterColors reg_colors);
-
-/** If use_red is TRUE, negative amounts will be printed in red. */
-void gnc_split_register_colorize_negative (gboolean use_red);
-
 /** Expand the current transaction if it is collapsed. */
 void gnc_split_register_expand_current_trans (SplitRegister *reg,
                                               gboolean expand);
@@ -358,6 +423,8 @@
 gboolean
 gnc_split_register_handle_exchange (SplitRegister *reg, gboolean force_dialog);
 
+/** @} */
+/** @} */
 /* -------------------------------------------------------------- */
 
 /** Private function -- outsiders must not use this */
@@ -373,5 +440,3 @@
                                 gboolean do_commit);
 
 #endif
-
-/** @} */
Index: gnc-ledger-display.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/gnc-ledger-display.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -Lsrc/register/ledger-core/gnc-ledger-display.c -Lsrc/register/ledger-core/gnc-ledger-display.c -u -r1.32 -r1.33
--- src/register/ledger-core/gnc-ledger-display.c
+++ src/register/ledger-core/gnc-ledger-display.c
@@ -32,11 +32,11 @@
 #include "QueryNew.h"
 #include "SX-book.h"
 #include "Transaction.h"
-#include "global-options.h"
 #include "gnc-component-manager.h"
 #include "gnc-book.h"
 #include "gnc-date.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
+#include "gnc-gconf-utils.h"
 #include "gnc-ledger-display.h"
 #include "gnc-ui-util.h"
 #include "split-register-control.h"
@@ -72,7 +72,7 @@
 
 
 /** GLOBALS *********************************************************/
-static short module = MOD_LEDGER;
+static QofLogModule log_module = GNC_MOD_LEDGER;
 
 
 /** Declarations ****************************************************/
@@ -225,16 +225,14 @@
 #endif
 
   default:
-    style_string = gnc_lookup_multichoice_option("Register", 
-                                                 "Default Register Style",
-                                                 "ledger");
-
-    if (safe_strcmp(style_string, "ledger") == 0)
-      new_style = REG_STYLE_LEDGER;
+    style_string = gnc_gconf_get_string(GCONF_GENERAL_REGISTER,
+					"default_style", NULL);
+    if (safe_strcmp(style_string, "journal") == 0)
+      new_style = REG_STYLE_JOURNAL;
     else if (safe_strcmp(style_string, "auto_ledger") == 0)
       new_style = REG_STYLE_AUTO_LEDGER;
-    else if (safe_strcmp(style_string, "journal") == 0)
-      new_style = REG_STYLE_JOURNAL;
+    else
+      new_style = REG_STYLE_LEDGER;
     
     if (style_string != NULL)
       free(style_string);
@@ -377,7 +375,7 @@
 gnc_ledger_display_default_double_line (GNCLedgerDisplay *gld)
 {
   return (gld->use_double_line_default ||
-          gnc_lookup_boolean_option ("Register", "Double Line Mode", FALSE));
+          gnc_gconf_get_bool(GCONF_GENERAL_REGISTER, "double_line_mode", NULL));
 }
 
 /* Opens up a register window to display a single account */
@@ -613,7 +611,7 @@
 
 static void
 gnc_ledger_display_make_query (GNCLedgerDisplay *ld,
-                               gboolean show_all,
+                               gint limit,
                                SplitRegisterType type)
 {
   Account *leader;
@@ -643,8 +641,8 @@
    * configurable, or maybe we should go back a time range instead
    * of picking a number, or maybe we should be able to exclude
    * based on reconciled status. Anyway, this works for now. */
-  if (!show_all && (type != SEARCH_LEDGER))
-    xaccQuerySetMaxSplits (ld->query, 30);
+  if ((limit != 0) && (type != SEARCH_LEDGER))
+    xaccQuerySetMaxSplits (ld->query, limit);
 
   xaccQuerySetBook (ld->query, gnc_get_current_book());
 
@@ -681,7 +679,7 @@
                              gboolean is_template )
 {
   GNCLedgerDisplay *ld;
-  gboolean show_all;
+  gint limit;
   const char *class;
   GList *splits;
 
@@ -761,15 +759,13 @@
   ld->get_parent = NULL;
   ld->user_data = NULL;
 
-  show_all = gnc_lookup_boolean_option ("_+Advanced",
-                                        "Show All Transactions",
-                                        TRUE);
+  limit = gnc_gconf_get_float(GCONF_GENERAL_REGISTER, "max_transactions", NULL);
 
   /* set up the query filter */
   if (q)
     ld->query = xaccQueryCopy (q);
   else
-    gnc_ledger_display_make_query (ld, show_all, reg_type);
+    gnc_ledger_display_make_query (ld, limit, reg_type);
 
   ld->component_id = gnc_register_gui_component (class,
                                                  refresh_handler,
@@ -825,12 +821,11 @@
   if (!ld || ld->loading)
     return;
 
-  if (!gnc_split_register_full_refresh_ok (ld->reg))
-  {
     gnc_split_register_load_xfer_cells (ld->reg,
                                         gnc_ledger_display_leader (ld));
+
+  if (!gnc_split_register_full_refresh_ok (ld->reg))
     return;
-  }
 
   ld->loading = TRUE;
 
Index: dialog-dup-trans.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/ledger-core/dialog-dup-trans.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/ledger-core/dialog-dup-trans.c -Lsrc/register/ledger-core/dialog-dup-trans.c -u -r1.2 -r1.3
--- src/register/ledger-core/dialog-dup-trans.c
+++ src/register/ledger-core/dialog-dup-trans.c
@@ -72,54 +72,18 @@
   return TRUE;
 }
 
-/*
- * This code works around an annoying bug in the SpinButton -- as soon
- * as you focus into the spin button it wants to force a digit to
- * appear and there is nothing the user can do.  Once you focus in,
- * the user cannot make the spin button entry be empty.
- *
- * To make matters worse, the spin button draws this number AFTER a
- * focus-out event, so we can't just use that event to clear it out.
- *
- * To work around this problem we hook into two signals, focus-out and
- * draw.  The focus-out event lets us know when we leave the
- * spinbutton entry, and we set a flag to remember this fact, and also
- * queue a redraw (just to be sure).  The draw event happens more
- * frequently, but also happens after the spin button digitizes
- * itself.  So when we hit a draw event we can check the flag and if
- * it's set we can potentially empty out the entry.
- *
- * This also means you cannot have a check numbered "0", but that is
- * probably a reasonable limitation.
- */
-static void
-gnc_dup_trans_focus_out_cb (GtkSpinButton *button, GdkEventFocus *event,
-			    gpointer user_data)
-{
-  DupTransDialog *dt_dialog = user_data;
-
-  g_return_if_fail(GTK_IS_SPIN_BUTTON(button));
-  if (!dt_dialog) return;
-
-  dt_dialog->focus_out = TRUE;
-  gtk_widget_queue_draw(GTK_WIDGET(button));
-}
-
-static void
-gnc_dup_trans_draw_cb (GtkSpinButton *button, GdkRectangle *unused, gpointer data)
+static gboolean
+gnc_dup_trans_output_cb(GtkSpinButton *spinbutton,
+                        gpointer user_data)
 {
-  DupTransDialog *dt_dialog = data;
-
-  g_return_if_fail(GTK_IS_SPIN_BUTTON(button));
-  if (!dt_dialog) return;
-
-  if (!dt_dialog->focus_out)
-    return;
-
-  dt_dialog->focus_out = FALSE;
-
-  if (!gtk_spin_button_get_value_as_int(button))
-    gtk_entry_set_text(GTK_ENTRY(button), "");
+  gboolean is_number;
+  long int num;
+  gchar *txt = gtk_editable_get_chars(GTK_EDITABLE(spinbutton), 0, -1);
+  is_number = parse_num(txt, &num);
+  g_free(txt);
+  if (!is_number)
+    gtk_entry_set_text(GTK_ENTRY(spinbutton), "");
+  return !is_number;
 }
 
 static void
@@ -136,10 +100,10 @@
 
   /* parent */
   if (parent != NULL)
-    gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent));
+    gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
 
   /* default to ok */
-  gnome_dialog_set_default (GNOME_DIALOG(dialog), 0);
+  gtk_dialog_set_default_response (GTK_DIALOG(dialog), GTK_RESPONSE_OK);
 
   /* date widget */
   {
@@ -161,13 +125,8 @@
     num_spin = glade_xml_get_widget (xml, "num_spin");
     dt_dialog->num_edit = num_spin;
 
-    gnome_dialog_editable_enters (GNOME_DIALOG (dialog),
-                                  GTK_EDITABLE (num_spin));
-
-    gtk_signal_connect (GTK_OBJECT(num_spin), "focus-out-event",
-			GTK_SIGNAL_FUNC(gnc_dup_trans_focus_out_cb), dt_dialog);
-    gtk_signal_connect (GTK_OBJECT(num_spin), "draw",
-			GTK_SIGNAL_FUNC(gnc_dup_trans_draw_cb), dt_dialog);
+    gtk_signal_connect(GTK_OBJECT(num_spin), "output",
+                       GTK_SIGNAL_FUNC(gnc_dup_trans_output_cb), dt_dialog);
 
     if (num_str && parse_num (num_str, &num))
       gtk_spin_button_set_value (GTK_SPIN_BUTTON (num_spin), num + 1);
@@ -209,9 +168,9 @@
 
   gtk_widget_grab_focus (entry);
 
-  result = gnome_dialog_run_and_close (GNOME_DIALOG (dt_dialog->dialog));
+  result = gtk_dialog_run (GTK_DIALOG (dt_dialog->dialog));
 
-  if (result == 0)
+  if (result == GTK_RESPONSE_OK)
   {
     *date_p = gnc_date_edit_get_date (GNC_DATE_EDIT (dt_dialog->date_edit));
     *out_num = g_strdup (gtk_entry_get_text (GTK_ENTRY (dt_dialog->num_edit)));
@@ -220,6 +179,7 @@
   else
     ok = FALSE;
 
+  gtk_widget_destroy(GTK_WIDGET(dt_dialog->dialog));
   g_free (dt_dialog);
 
   return ok;
Index: quickfillcell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/quickfillcell.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/register/register-core/quickfillcell.c -Lsrc/register/register-core/quickfillcell.c -u -r1.7 -r1.8
--- src/register/register-core/quickfillcell.c
+++ src/register/register-core/quickfillcell.c
@@ -35,16 +35,11 @@
 
 #include "config.h"
 
-#include <ctype.h>
 #include <glib.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef HAVE_WCTYPE_H
-#include <wctype.h>
-#endif
-
 #include "basiccell.h"
 #include "dialog-utils.h"
 #include "gnc-ui-util.h"
@@ -52,12 +47,12 @@
 
 
 static void gnc_quickfill_cell_set_original (QuickFillCell *cell,
-                                             const GdkWChar *original);
+                                             const char *original);
 
 
-static void 
+static void
 gnc_quickfill_cell_set_value_internal (BasicCell *_cell,
-                                       const char *val) 
+                                       const char *val)
 {
    QuickFillCell *cell = (QuickFillCell *) _cell;
    gnc_quickfill_cell_set_value (cell, val);
@@ -81,71 +76,74 @@
    return TRUE;
 }
 
-/* by definition, all text is valid text.  So accept
- * all modifications */
 static gboolean
-wcstrcaseequal (const GdkWChar *s1, const GdkWChar *s2)
+utf8_caseequal (const char *s1, const char *s2)
 {
-  int i;
-
-  if (s1 == s2)
-    return TRUE;
-
-  if (!s1 || !s2)
-    return FALSE;
-
-  for (i = 0; TRUE; i++)
-  {
-    GdkWChar a;
-    GdkWChar b;
-
-    if (s1[i] == 0 || s2[i] == 0)
-      return s1[i] == s2[i];
+   char *s1new;
+   char *s2new;
+   gboolean equal = FALSE;
+    
+   if (s1 == s2)
+      return TRUE;
+   
+   if (!s1 || !s2)
+      return FALSE;
 
-    a = iswlower (s1[i]) ? towupper (s1[i]) : s1[i];
-    b = iswlower (s2[i]) ? towupper (s2[i]) : s2[i];
+   s1new = g_utf8_casefold(s1, -1);
+   s2new = g_utf8_casefold(s2, -1);
 
-    if (a != b)
-      return FALSE;
-  }
+   if (g_utf8_collate(s1new, s2new) == 0)
+      equal = TRUE;
 
-  return TRUE;
+   g_free (s1new);
+   g_free (s2new);
+   
+   return equal;
 }
 
 static gboolean
-wcstrncaseequal (const GdkWChar *s1, const GdkWChar *s2, int len)
-{
-  int i;
-
-  if (s1 == s2)
-    return TRUE;
-
-  if (!s1 || !s2)
-    return FALSE;
-
-  for (i = 0; i < len; i++)
-  {
-    GdkWChar a;
-    GdkWChar b;
-
-    if (s1[i] == 0 || s2[i] == 0)
-      return FALSE;
-
-    a = iswlower (s1[i]) ? towupper (s1[i]) : s1[i];
-    b = iswlower (s2[i]) ? towupper (s2[i]) : s2[i];
-
-    if (a != b)
+utf8_caseequal_len (const char *s1, const char *s2, guint len)
+{   
+   char *s1new;
+   char *s2new;
+   glong s1chars;
+   glong s2chars;
+   gboolean equal = FALSE;
+    
+   if (len == 0)
+      return TRUE;       
+   
+   if (s1 == s2)
+      return TRUE;
+   
+   if (!s1 || !s2)
       return FALSE;
-  }
 
-  return TRUE;
+   s1chars = g_utf8_strlen (s1, -1);
+   s2chars = g_utf8_strlen (s2, -1);
+   
+   if ( (s1chars < len) || (s2chars < len) )
+       return FALSE;
+   
+   s1new = g_new0 (gchar, strlen (s1));
+   s2new = g_new0 (gchar, strlen (s2));
+
+   g_utf8_strncpy (s1new, s1, len);
+   g_utf8_strncpy (s2new, s2, len);
+
+   equal = utf8_caseequal (s1new, s2new);
+   
+   g_free (s1new);
+   g_free (s2new);
+    
+   return equal;
 }
 
 static void
 gnc_quickfill_cell_modify_verify (BasicCell *_cell,
-                                  const GdkWChar *change,
+                                  const char *change,
                                   int change_len,
-                                  const GdkWChar *newval,
+                                  const char *newval,
                                   int newval_len,
                                   int *cursor_position,
                                   int *start_selection,
@@ -155,52 +153,54 @@
    const char *match_str;
    QuickFill *match;
 
+   glong newval_chars;
+   glong change_chars;
+
+   newval_chars = g_utf8_strlen(newval, newval_len);
+   change_chars = g_utf8_strlen(change, change_len);
+   
    /* If deleting, just accept */
    if (change == NULL)
    {
      /* if the new value is a prefix of the original modulo case,
       * just truncate the end of the original. Otherwise, set it
       * to NULL */
-     if ((*cursor_position >= newval_len) &&
+     if ((*cursor_position >= newval_chars) &&
          (cell->original != NULL) &&
-         (gnc_wcslen (cell->original) >= newval_len) &&
-         wcstrncaseequal (cell->original, newval, newval_len))
-       cell->original[newval_len] = 0;
+         (g_utf8_strlen (cell->original, -1) >= newval_chars) &&
+         utf8_caseequal_len (cell->original, newval, newval_chars))
+     {
+         gchar *temp = g_strndup (cell->original, newval_len);
+         gnc_quickfill_cell_set_original (cell, temp);
+         g_free (temp);
+     }
      else
        gnc_quickfill_cell_set_original (cell, NULL);
 
-     gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
+     gnc_basic_cell_set_value_internal (&cell->cell, newval);
      return;
    }
 
    /* If we are inserting in the middle, just accept */
-   if (*cursor_position < _cell->value_len)
+   if (*cursor_position < _cell->value_chars)
    {
-     gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
+     gnc_basic_cell_set_value_internal (&cell->cell, newval);
      gnc_quickfill_cell_set_original (cell, NULL);
      return;
    }
 
    if (cell->original == NULL)
-     cell->original = gnc_wcsdup (newval);
-   else if (wcstrcaseequal (cell->original, _cell->value_w))
+     cell->original = g_strdup (newval);
+   else if (utf8_caseequal (cell->original, _cell->value))
    {
-     int orig_len = gnc_wcslen (cell->original);
-     GdkWChar *original;
-     int i;
-
-     original = g_new0 (GdkWChar, orig_len + change_len + 1);
-
-     for (i = 0; i < orig_len; i++)
-       original[i] = cell->original[i];
-
-     for (i = orig_len; i < orig_len + change_len; i++)
-       original[i] = change[i - orig_len];
+     GString *original;
 
-     original[orig_len + change_len] = 0;
+     original = g_string_new (cell->original);
+     g_string_append (original, change);
 
      g_free (cell->original);
-     cell->original = original;
+     cell->original = g_strdup (original->str);
+     g_string_free (original, TRUE);
    }
    else
    {
@@ -219,13 +219,13 @@
 
      *cursor_position = -1;
 
-     gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
+     gnc_basic_cell_set_value_internal (&cell->cell, newval);
      return;
    }
 
-   *start_selection = newval_len;
+   *start_selection = newval_chars;
    *end_selection = -1;
-   *cursor_position += change_len;
+   *cursor_position += change_chars;
 
    gnc_basic_cell_set_value_internal (&cell->cell, match_str);
 }
@@ -237,7 +237,7 @@
 {
    QuickFillCell *cell = (QuickFillCell *) _cell;
 
-   gnc_quickfill_insert_wc (cell->qf, _cell->value_w, cell->sort);
+   gnc_quickfill_insert (cell->qf, _cell->value, cell->sort);
 }
 
 static void
@@ -293,7 +293,7 @@
     return;
 
   gnc_basic_cell_set_value_internal (&cell->cell, value);
-  gnc_quickfill_insert_wc (cell->qf, cell->cell.value_w, cell->sort);
+  gnc_quickfill_insert (cell->qf, value, cell->sort);
 }
 
 void
@@ -306,7 +306,7 @@
 }
 
 static void
-gnc_quickfill_cell_set_original (QuickFillCell *cell, const GdkWChar *original)
+gnc_quickfill_cell_set_original (QuickFillCell *cell, const char *original)
 {
   if (cell == NULL)
     return;
@@ -314,7 +314,7 @@
   g_free (cell->original);
 
   if ((original != NULL) && (*original != 0))
-    cell->original = gnc_wcsdup (original);
+    cell->original = strdup (original);
   else
     cell->original = NULL;
 }
Index: gncmod-register-core.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/gncmod-register-core.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/register/register-core/gncmod-register-core.c -Lsrc/register/register-core/gncmod-register-core.c -u -r1.8 -r1.9
--- src/register/register-core/gncmod-register-core.c
+++ src/register/register-core/gncmod-register-core.c
@@ -8,7 +8,6 @@
 #include "config.h"
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
Index: formulacell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/formulacell.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/register/register-core/formulacell.c -Lsrc/register/register-core/formulacell.c -u -r1.4 -r1.5
--- src/register/register-core/formulacell.c
+++ src/register/register-core/formulacell.c
@@ -21,16 +21,13 @@
 
 #include "config.h"
 
-#include <ctype.h>
-#include <string.h>
-
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 #include "basiccell.h"
 #include "formulacell.h"
 
-static short module = MOD_SX;
+static QofLogModule log_module = GNC_MOD_SX;
 
 static void gnc_formula_cell_init( FormulaCell *fc );
 
@@ -44,9 +41,9 @@
 #endif
 
 static void gnc_formula_cell_modify_verify( BasicCell *_cell, 
-                                            const GdkWChar *change,
+                                            const char *change,
                                             int change_len,
-                                            const GdkWChar *newval,
+                                            const char *newval,
                                             int newval_len,
                                             int *cursor_position,
                                             int *start_selection,
@@ -115,10 +112,10 @@
 
 static
 void
-gnc_formula_cell_modify_verify( BasicCell *_cell, 
-                                const GdkWChar *change,
+gnc_formula_cell_modify_verify( BasicCell *_cell,
+                                const char *change,
                                 int change_len,
-                                const GdkWChar *newval,
+                                const char *newval,
                                 int newval_len,
                                 int *cursor_position,
                                 int *start_selection,
@@ -129,7 +126,8 @@
   const char *toks = "+-*/=()_:";
   unsigned char decimal_point;
   unsigned char thousands_sep;
-  int i;
+  const char *c;
+  gunichar uc;
 
   DEBUG( "%s, %d, %s, %d, %d, %d, %d",
          (gchar *)change, change_len, (gchar *)newval, newval_len,
@@ -138,7 +136,7 @@
   /* accept the newval string if user action was delete */
   if (change == NULL)
   {
-    gnc_basic_cell_set_wcvalue_internal( &cell->cell, newval );
+    gnc_basic_cell_set_value_internal( &cell->cell, newval );
     return;
   }
 
@@ -152,16 +150,21 @@
   else
     thousands_sep = lc->thousands_sep[0];
 
-  for (i = 0; i < change_len; i++)
-    if (!isdigit(change[i]) &&
-        !isspace(change[i]) &&
-        !isalpha(change[i]) &&
-        (decimal_point != change[i]) &&
-        (thousands_sep != change[i]) &&
-        (strchr (toks, change[i]) == NULL))
-      return;
+   c = change;
+   while (*c)
+   {
+      uc = g_utf8_get_char (c);
+      if (!g_unichar_isdigit (uc) &&
+          !g_unichar_isspace (uc) &&
+          !g_unichar_isalpha (uc) &&
+          (decimal_point != uc) &&
+          (thousands_sep != uc) &&
+          (g_utf8_strchr (toks, -1, uc) == NULL))
+        return;
+      c = g_utf8_next_char (c);
+   }
 
-  gnc_basic_cell_set_wcvalue_internal( &cell->cell, newval );
+  gnc_basic_cell_set_value_internal( &cell->cell, newval );
 }
 
 static
Index: cell-factory.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/cell-factory.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/register-core/cell-factory.c -Lsrc/register/register-core/cell-factory.c -u -r1.2 -r1.3
--- src/register/register-core/cell-factory.c
+++ src/register/register-core/cell-factory.c
@@ -26,7 +26,7 @@
 #include <glib.h>
 
 #include "cell-factory.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 
 typedef struct cell_record
Index: table-allgui.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/table-allgui.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -Lsrc/register/register-core/table-allgui.c -Lsrc/register/register-core/table-allgui.c -u -r1.35 -r1.36
--- src/register/register-core/table-allgui.c
+++ src/register/register-core/table-allgui.c
@@ -43,7 +43,7 @@
 #include "table-allgui.h"
 #include "cellblock.h"
 #include "dialog-utils.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 
 /** Static Globals *****************************************************/
@@ -51,7 +51,7 @@
 static TableGUIHandlers default_gui_handlers;
 
 /* This static indicates the debugging module that this .o belongs to. */
-static short module = MOD_REGISTER;
+static QofLogModule log_module = GNC_MOD_REGISTER;
 
 
 /** Prototypes *********************************************************/
@@ -390,6 +390,30 @@
                            table->model->handler_user_data);
 }
 
+guint32
+gnc_table_get_gtkrc_bg_color (Table *table, VirtualLocation virt_loc,
+			      gboolean *hatching)
+{
+  TableGetBGColorHandler bg_color_handler;
+  const char *cell_name;
+
+  if (hatching)
+    *hatching = FALSE;
+
+  if (!table || !table->model)
+    return 0xffffff; /* white */
+
+  cell_name = gnc_table_get_cell_name (table, virt_loc);
+
+  bg_color_handler = gnc_table_model_get_bg_color_handler (table->model,
+                                                           "gtkrc");
+  if (!bg_color_handler)
+    return 0xffffff;
+
+  return bg_color_handler (virt_loc, hatching,
+                           table->model->handler_user_data);
+}
+
 void
 gnc_table_get_borders (Table *table, VirtualLocation virt_loc,
                        PhysicalCellBorders *borders)
@@ -1184,9 +1208,9 @@
 const char *
 gnc_table_modify_update (Table *table,
                          VirtualLocation virt_loc,
-                         const GdkWChar *change,
+                         const char *change,
                          int change_len,
-                         const GdkWChar *newval,
+                         const char *newval,
                          int newval_len,
                          int *cursor_position,
                          int *start_selection,
@@ -1242,9 +1266,7 @@
         cursor_position, start_selection, end_selection);
   else
   {
-    char *newval_mb = gnc_wcstombs (newval);
-    gnc_basic_cell_set_value (cell, newval_mb);
-    g_free (newval_mb);
+    gnc_basic_cell_set_value (cell, newval);
   }
 
   if (safe_strcmp (old_value, cell->value) != 0)
Index: recncell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/recncell.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/register/register-core/recncell.c -Lsrc/register/register-core/recncell.c -u -r1.7 -r1.8
--- src/register/register-core/recncell.c
+++ src/register/register-core/recncell.c
@@ -41,7 +41,7 @@
 #include <time.h>
 
 #include "basiccell.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "recncell.h"
 
 
@@ -204,4 +204,3 @@
 
   cell->flag_order = (char *)flags;
 }
-
Index: numcell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/numcell.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/register/register-core/numcell.c -Lsrc/register/register-core/numcell.c -u -r1.6 -r1.7
--- src/register/register-core/numcell.c
+++ src/register/register-core/numcell.c
@@ -38,7 +38,7 @@
 #include <string.h>
 
 #include "numcell.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 
 /* This static indicates the debugging module that this .o belongs to. */
@@ -73,9 +73,9 @@
 
 static void
 gnc_num_cell_modify_verify (BasicCell *_cell, 
-                            const GdkWChar *change,
+                            const char *change,
                             int change_len,
-                            const GdkWChar *newval,
+                            const char *newval,
                             int new_val_len,
                             int *cursor_position,
                             int *start_selection,
@@ -85,12 +85,16 @@
   gboolean accel = FALSE;
   gboolean is_num;
   long int number = 0;
+  gunichar uc;
+  glong change_chars;
+    
+  change_chars = g_utf8_strlen (change, -1);
 
-  if ((change == NULL) || (change_len == 0) || /* if we are deleting       */
-      (change_len > 1))                        /* or entering > 1 char     */
+  if ((change == NULL) || (change_chars == 0) || /* if we are deleting       */
+      (change_chars > 1))                        /* or entering > 1 char     */
     /* then just accept the proposed change */
   {
-    gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
+    gnc_basic_cell_set_value_internal (&cell->cell, newval);
     return;
   }
 
@@ -101,7 +105,8 @@
   if (is_num && (number < 0))
     is_num = FALSE;
 
-  switch (change[0])
+  uc = g_utf8_get_char (change);
+  switch (uc)
   {
     case '+':
     case '=':
@@ -155,7 +160,7 @@
     return;
   }
 
-  gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
+  gnc_basic_cell_set_value_internal (&cell->cell, newval);
 }
 
 BasicCell *
Index: basiccell.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/basiccell.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -Lsrc/register/register-core/basiccell.h -Lsrc/register/register-core/basiccell.h -u -r1.9 -r1.10
--- src/register/register-core/basiccell.h
+++ src/register/register-core/basiccell.h
@@ -158,9 +158,9 @@
                                    int *end_selection);
 
 typedef void (*CellModifyVerifyFunc) (BasicCell *cell,
-                                      const GdkWChar *add_str,
+                                      const char *add_str,
                                       int add_str_len,
-                                      const GdkWChar *new_value,
+                                      const char *new_value,
                                       int new_value_len,
                                       int *cursor_position,
                                       int *start_selection,
@@ -192,10 +192,7 @@
   char * cell_name;
 
   char * value;                  /* current value */
-
-  GdkWChar * value_w;            /* value as wide chars */
-
-  gint value_len;                /* length of wide chars value */
+  guint value_chars;           /* number of characters in value */
 
   gboolean changed;               /* true if value modified */
   gboolean conditionally_changed; /* true if value modified conditionally */
@@ -260,7 +257,4 @@
 void         gnc_basic_cell_set_value_internal (BasicCell *bcell,
                                                 const char *value);
 
-void         gnc_basic_cell_set_wcvalue_internal (BasicCell *bcell,
-                                                  const GdkWChar *value);
-
 #endif /* BASIC_CELL_H */
Index: table-allgui.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/table-allgui.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/register/register-core/table-allgui.h -Lsrc/register/register-core/table-allgui.h -u -r1.15 -r1.16
--- src/register/register-core/table-allgui.h
+++ src/register/register-core/table-allgui.h
@@ -99,7 +99,6 @@
 #include "table-layout.h"
 #include "table-model.h"
 
-
 /* The VirtualCell structure holds information about each virtual cell. */
 typedef struct
 {
@@ -205,6 +204,8 @@
 
 guint32        gnc_table_get_bg_color (Table *table, VirtualLocation virt_loc,
                                        gboolean *hatching);
+guint32        gnc_table_get_gtkrc_bg_color (Table *table, VirtualLocation virt_loc,
+					     gboolean *hatching);
 
 void           gnc_table_get_borders (Table *table, VirtualLocation virt_loc,
                                       PhysicalCellBorders *borders);
@@ -344,9 +345,9 @@
 
 const char * gnc_table_modify_update(Table *table,
                                      VirtualLocation virt_loc,
-                                     const GdkWChar *change,
+                                     const char *change,
                                      int change_len,
-                                     const GdkWChar *newval,
+                                     const char *newval,
                                      int newval_len,
                                      int *cursor_position,
                                      int *start_selection,
Index: quickfillcell.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/quickfillcell.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/register/register-core/quickfillcell.h -Lsrc/register/register-core/quickfillcell.h -u -r1.3 -r1.4
--- src/register/register-core/quickfillcell.h
+++ src/register/register-core/quickfillcell.h
@@ -58,7 +58,7 @@
   QuickFillSort sort;  /* determines order of strings matched.
                         * default is QUICKFILL_LIFO. */
 
-  GdkWChar *original;  /* original string entered in original case */
+  char *original;  /* original string entered in original case */
 } QuickFillCell;
 
 BasicCell *      gnc_quickfill_cell_new (void);
Index: pricecell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/pricecell.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/register/register-core/pricecell.c -Lsrc/register/register-core/pricecell.c -u -r1.10 -r1.11
--- src/register/register-core/pricecell.c
+++ src/register/register-core/pricecell.c
@@ -34,15 +34,12 @@
 
 #include "config.h"
 
-#include <ctype.h>
 #include <glib.h>
 #include <locale.h>
 #include <string.h>
-#include <string.h>
 
 #include "gnc-exp-parser.h"
-#include "gnc-engine-util.h"
-#include "gnc-numeric.h"
+#include "gnc-engine.h"
 #include "gnc-ui-util.h"
 
 #include "basiccell.h"
@@ -69,10 +66,10 @@
 }
 
 static void
-gnc_price_cell_modify_verify (BasicCell *_cell, 
-                              const GdkWChar *change,
+gnc_price_cell_modify_verify (BasicCell *_cell,
+                              const char *change,
                               int change_len,
-                              const GdkWChar *newval,
+                              const char *newval,
                               int newval_len,
                               int *cursor_position,
                               int *start_selection,
@@ -83,12 +80,13 @@
   const char *toks = "+-*/=()_";
   unsigned char decimal_point;
   unsigned char thousands_sep;
-  int i;
+  const char *c;
+  gunichar uc;
 
   /* accept the newval string if user action was delete */
   if (change == NULL)
   {
-    gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+    gnc_basic_cell_set_value_internal (_cell, newval);
     cell->need_to_parse = TRUE;
     return;
   }
@@ -103,16 +101,21 @@
   else
     thousands_sep = lc->thousands_sep[0];
 
-  for (i = 0; i < change_len; i++)
-    if (!isdigit(change[i]) &&
-        !isspace(change[i]) &&
-        !isalpha(change[i]) &&
-        (decimal_point != change[i]) &&
-        (thousands_sep != change[i]) &&
-        (strchr (toks, change[i]) == NULL))
+  c = change;
+  while (*c)
+  {
+    uc = g_utf8_get_char (c);
+    if (!g_unichar_isdigit (uc) &&
+        !g_unichar_isspace (uc) &&
+        !g_unichar_isalpha (uc) &&
+        (decimal_point != uc) &&
+        (thousands_sep != uc) &&
+        (g_utf8_strchr (toks, -1, uc) == NULL))
       return;
+    c = g_utf8_next_char (c);
+  }
 
-  gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+  gnc_basic_cell_set_value_internal (_cell, newval);
   cell->need_to_parse = TRUE;
 }
 
Index: checkboxcell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/checkboxcell.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-core/checkboxcell.c -Lsrc/register/register-core/checkboxcell.c -u -r1.1 -r1.2
--- src/register/register-core/checkboxcell.c
+++ src/register/register-core/checkboxcell.c
@@ -40,7 +40,7 @@
 #include <time.h>
 
 #include "basiccell.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "checkboxcell.h"
 
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -Lsrc/register/register-core/Makefile.am -Lsrc/register/register-core/Makefile.am -u -r1.28 -r1.29
--- src/register/register-core/Makefile.am
+++ src/register/register-core/Makefile.am
@@ -3,13 +3,12 @@
 
 pkglib_LTLIBRARIES = libgncmod-register-core.la libgw-register-core.la
 
-libgncmod_register_core_la_LDFLAGS = -module
 libgncmod_register_core_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
-  ${GLIB_LIBS}
+  ${QOF_LIBS} ${GLIB_LIBS}
 
 libgncmod_register_core_la_SOURCES = \
   gncmod-register-core.c \
@@ -51,7 +50,6 @@
   table-model.h
 
 libgw_register_core_la_SOURCES = gw-register-core.c
-libgw_register_core_la_LDFLAGS = -module
 
 gwmoddir = ${GNC_GWRAP_LIBDIR}
 gwmod_DATA = gw-register-core.scm gw-register-core-spec.scm
@@ -72,7 +70,8 @@
   ${GUILE_INCS} \
   ${GLADE_CFLAGS} \
   ${G_WRAP_COMPILE_ARGS} \
-  ${GNOME_INCLUDEDIR} \
+  ${GNOME_CFLAGS} \
+  ${QOF_CFLAGS} \
   ${GLIB_CFLAGS}
 
 
Index: basiccell.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/basiccell.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/register/register-core/basiccell.c -Lsrc/register/register-core/basiccell.c -u -r1.11 -r1.12
--- src/register/register-core/basiccell.c
+++ src/register/register-core/basiccell.c
@@ -40,10 +40,10 @@
 
 #include "basiccell.h"
 #include "dialog-utils.h"
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 /* Debugging module */
-static short module = MOD_REGISTER;
+static QofLogModule log_module = GNC_MOD_REGISTER;
 
 gboolean
 gnc_cell_name_equal (const char * cell_name_1,
@@ -74,8 +74,7 @@
   cell->conditionally_changed = FALSE;
 
   cell->value = NULL;
-  cell->value_w = NULL;
-  cell->value_len = 0;
+  cell->value_chars = 0;
 
   cell->set_value = NULL;
   cell->enter_cell = NULL;
@@ -100,8 +99,6 @@
   gnc_basic_cell_clear (cell);
 
   cell->value = g_strdup ("");
-
-  cell->value_len = gnc_mbstowcs (&cell->value_w, cell->value);
 }
 
 void
@@ -119,9 +116,6 @@
   g_free (cell->value);
   cell->value = NULL;
 
-  g_free (cell->value_w);
-  cell->value_w = NULL;
-
   /* help prevent access to freed memory */
   gnc_basic_cell_clear (cell);
 
@@ -257,23 +251,5 @@
 
   g_free (cell->value);
   cell->value = g_strdup (value);
-
-  g_free (cell->value_w);
-  cell->value_len = gnc_mbstowcs (&cell->value_w, cell->value);
-}
-
-void
-gnc_basic_cell_set_wcvalue_internal (BasicCell *cell, const GdkWChar *value)
-{
-  if (!value)
-  {
-    gnc_basic_cell_set_value_internal (cell, "");
-    return;
-  }
-
-  g_free (cell->value);
-  cell->value = gnc_wcstombs (value);
-
-  g_free (cell->value_w);
-  cell->value_len = gnc_mbstowcs (&cell->value_w, cell->value);
+  cell->value_chars = g_utf8_strlen(value, -1);
 }
Index: combocell.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/combocell.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/register/register-core/combocell.h -Lsrc/register/register-core/combocell.h -u -r1.5 -r1.6
--- src/register/register-core/combocell.h
+++ src/register/register-core/combocell.h
@@ -22,7 +22,7 @@
 
 /**
  * @file combocell.h
- * @breif The ComboCell object implements a cell handler with a 
+ * @brief The ComboCell object implements a cell handler with a 
  *        "combination-box" pull-down menu in it.  
  * 
  * On output, the currently selected menu item is displayed.
@@ -59,6 +59,11 @@
 /** Add a menu item to the list. */
 void         gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr);
 
+/** Add a 'account name' menu item to the list. When testing for
+ *  equality with the currently selected item, this function will
+ *  ignore the characters normally used to separate account names. */
+void         gnc_combo_cell_add_account_menu_item (ComboCell *cell, char * menustr);
+
 /** Determines whether the cell will accept strings not in the
  * menu. Defaults to strict, i.e., only menu items are accepted. */
 void         gnc_combo_cell_set_strict (ComboCell *cell, gboolean strict);
@@ -76,10 +81,6 @@
  * all available space. FALSE by default. */
 void         gnc_combo_cell_set_autosize (ComboCell *cell, gboolean autosize);
 
-/** Determines whether combocells are automatically raised upon typing.
- * Defaults to false. This is a 'class' method. */
-void         gnc_combo_cell_set_autopop (gboolean auto_pop_combos);
-
 /** Tell the combocell to use a shared QuickFill object.  Using this routine
  *  can dramatically improve performance when creating combocells with a 
  *  large number of entries.  For example, users with thousands of accounts
Index: formulacell.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/formulacell.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/register/register-core/formulacell.h -Lsrc/register/register-core/formulacell.h -u -r1.4 -r1.5
--- src/register/register-core/formulacell.h
+++ src/register/register-core/formulacell.h
@@ -50,7 +50,7 @@
   GNCPrintAmountInfo print_info;
 
   /** The user-entered formula. **/
-  GdkWChar *formula;
+  char *formula;
 } FormulaCell;
 
 /* installs a callback to handle date recording */
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-core/test/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/register/register-core/test/Makefile.am -Lsrc/register/register-core/test/Makefile.am -u -r1.7 -r1.8
--- src/register/register-core/test/Makefile.am
+++ src/register/register-core/test/Makefile.am
@@ -12,7 +12,10 @@
   test-link-module
 
 test_link_module_SOURCES=test-link-module.c
-test_link_module_LDADD=../libgncmod-register-core.la
+test_link_module_LDADD= \
+  ${top_builddir}/src/engine/libgncmod-engine.la \
+  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ../libgncmod-register-core.la
 
 #EXTRA_DIST = test-load-module
 
Index: gnucash-cursor.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-cursor.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-cursor.h -Lsrc/register/register-gnome/gnucash-cursor.h -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-cursor.h
+++ src/register/register-gnome/gnucash-cursor.h
@@ -28,18 +28,18 @@
 
 
 #define GNUCASH_TYPE_CURSOR     (gnucash_cursor_get_type ())
-#define GNUCASH_CURSOR(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_CURSOR, GnucashCursor))
-#define GNUCASH_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_CURSOR))
-#define GNUCASH_IS_CURSOR(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_CURSOR))
+#define GNUCASH_CURSOR(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNUCASH_TYPE_CURSOR, GnucashCursor))
+#define GNUCASH_CURSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_CURSOR, GnucashCursorClass))
+#define GNUCASH_IS_CURSOR(obj)  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNUCASH_TYPE_CURSOR))
 
 #define GNUCASH_TYPE_ITEM_CURSOR     (gnucash_item_cursor_get_type ())
-#define GNUCASH_ITEM_CURSOR(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_ITEM_CURSOR, GnucashItemCursor))
-#define GNUCASH_ITEM_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_ITEM_CURSOR))
-#define GNUCASH_IS_ITEM_CURSOR(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_ITEM_CURSOR))
+#define GNUCASH_ITEM_CURSOR(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNUCASH_TYPE_ITEM_CURSOR, GnucashItemCursor))
+#define GNUCASH_ITEM_CURSOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_ITEM_CURSOR, GnucashItemCursorClass))
+#define GNUCASH_IS_ITEM_CURSOR(o)    (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNUCASH_TYPE_ITEM_CURSOR))
 
 
-GtkType    gnucash_item_cursor_get_type (void);
-GtkType    gnucash_cursor_get_type (void);
+GType    gnucash_item_cursor_get_type (void);
+GType    gnucash_cursor_get_type (void);
 
 
 enum
Index: combocell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/combocell-gnome.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/register/register-gnome/combocell-gnome.c -Lsrc/register/register-gnome/combocell-gnome.c -u -r1.14 -r1.15
--- src/register/register-gnome/combocell-gnome.c
+++ src/register/register-gnome/combocell-gnome.c
@@ -38,26 +38,26 @@
 
 #include "QuickFill.h"
 #include "combocell.h"
-#include "gnc-ui-util.h"
+#include "gnc-gconf-utils.h"
 #include "gnucash-item-edit.h"
 #include "gnucash-item-list.h"
 #include "gnucash-sheet.h"
 #include "messages.h"
 #include "table-allgui.h"
 
+#define KEY_AUTO_RAISE_LISTS	"auto_raise_lists"
 
 typedef struct _PopBox
 {
 	GList *menustrings;
 
 	GnucashSheet *sheet;
-	ItemEdit     *item_edit;
-	GNCItemList  *item_list;
+	GncItemEdit  *item_edit;
+	GncItemList  *item_list;
 
 	gboolean signals_connected; /* list signals connected? */
 
 	gboolean list_in_sync; /* list in sync with menustrings? */
-        gboolean list_sorted;  /* list has been sorted? */
         gboolean list_popped;  /* list is popped up? */
 
         gboolean autosize;
@@ -85,14 +85,39 @@
 static void gnc_combo_cell_leave (BasicCell *bcell);
 static void gnc_combo_cell_destroy (BasicCell *bcell);
 
+static GOnce auto_pop_init_once = G_ONCE_INIT;
 static gboolean auto_pop_combos = FALSE;
 
 
+static void
+gnc_combo_cell_set_autopop (GConfEntry *entry, gpointer user_data)
+{
+	GConfValue *value;
+
+	value = gconf_entry_get_value(entry);
+	auto_pop_combos = gconf_value_get_bool(value);
+}
+
+static gpointer
+gnc_combo_cell_autopop_init (gpointer unused)
+{
+        auto_pop_combos = gnc_gconf_get_bool (GCONF_GENERAL_REGISTER, 
+                                              KEY_AUTO_RAISE_LISTS, 
+                                              NULL);
+
+        gnc_gconf_general_register_cb(KEY_AUTO_RAISE_LISTS,
+                                      gnc_combo_cell_set_autopop,
+                                      NULL);
+	return NULL;
+}
+
 BasicCell *
 gnc_combo_cell_new (void)
 {
 	ComboCell * cell;
 
+	g_once(&auto_pop_init_once, gnc_combo_cell_autopop_init, NULL);
+
         cell = g_new0 (ComboCell, 1);
 
 	gnc_combo_cell_init (cell);
@@ -122,7 +147,6 @@
 	box->menustrings = NULL;
 	box->signals_connected = FALSE;
 	box->list_in_sync = TRUE;
-        box->list_sorted = TRUE;
         box->list_popped = FALSE;
         box->autosize = FALSE;
 
@@ -141,7 +165,7 @@
 }
 
 static void
-select_item_cb (GNCItemList *item_list, char *item_string, gpointer data)
+select_item_cb (GncItemList *item_list, char *item_string, gpointer data)
 {
 	ComboCell *cell = data;
 	PopBox *box = cell->cell.gui_private;
@@ -150,12 +174,12 @@
 	gnucash_sheet_modify_current_cell (box->sheet, item_string);
         box->in_list_select = FALSE;
 
-        item_edit_hide_popup (box->item_edit);
+        gnc_item_edit_hide_popup (box->item_edit);
         box->list_popped = FALSE;
 }
 
 static void
-change_item_cb (GNCItemList *item_list, char *item_string, gpointer data)
+change_item_cb (GncItemList *item_list, char *item_string, gpointer data)
 {
 	ComboCell *cell = data;
 	PopBox *box = cell->cell.gui_private;
@@ -166,17 +190,17 @@
 }
 
 static void
-activate_item_cb (GNCItemList *item_list, char *item_string, gpointer data)
+activate_item_cb (GncItemList *item_list, char *item_string, gpointer data)
 {
 	ComboCell *cell = data;
 	PopBox *box = cell->cell.gui_private;
 
-        item_edit_hide_popup (box->item_edit);
+        gnc_item_edit_hide_popup (box->item_edit);
         box->list_popped = FALSE;
 }
 
 static void
-key_press_item_cb (GNCItemList *item_list, GdkEventKey *event, gpointer data)
+key_press_item_cb (GncItemList *item_list, GdkEventKey *event, gpointer data)
 {
 	ComboCell *cell = data;
 	PopBox *box = cell->cell.gui_private;
@@ -184,7 +208,7 @@
         switch (event->keyval)
         {
                 case GDK_Escape:
-                        item_edit_hide_popup (box->item_edit);
+                        gnc_item_edit_hide_popup (box->item_edit);
                         box->list_popped = FALSE;
                         break;
 
@@ -203,10 +227,8 @@
 	if (!box->signals_connected)
 		return;
 
-        if (GTK_OBJECT_DESTROYED (GTK_OBJECT(box->item_list)))
-                return;
-
-	gtk_signal_disconnect_by_data (GTK_OBJECT(box->item_list), cell);
+	g_signal_handlers_disconnect_matched (G_OBJECT (box->item_list), G_SIGNAL_MATCH_DATA,
+					      0, 0, NULL, NULL, cell);
 
 	box->signals_connected = FALSE;
 }
@@ -219,20 +241,17 @@
 	if (box->signals_connected)
 		return;
 
-        if (GTK_OBJECT_DESTROYED(GTK_OBJECT(box->item_list)))
-                return;
-
-        gtk_signal_connect (GTK_OBJECT(box->item_list), "select_item",
-                            GTK_SIGNAL_FUNC(select_item_cb), cell);
+        g_signal_connect (G_OBJECT (box->item_list), "select_item",
+                          G_CALLBACK (select_item_cb), cell);
 
-        gtk_signal_connect (GTK_OBJECT(box->item_list), "change_item",
-                            GTK_SIGNAL_FUNC(change_item_cb), cell);
+        g_signal_connect (G_OBJECT (box->item_list), "change_item",
+                          G_CALLBACK (change_item_cb), cell);
 
-        gtk_signal_connect (GTK_OBJECT(box->item_list), "activate_item",
-                            GTK_SIGNAL_FUNC(activate_item_cb), cell);
+        g_signal_connect (G_OBJECT (box->item_list), "activate_item",
+                          G_CALLBACK (activate_item_cb), cell);
 
-        gtk_signal_connect (GTK_OBJECT(box->item_list), "key_press_event",
-                            GTK_SIGNAL_FUNC(key_press_item_cb), cell);
+        g_signal_connect (G_OBJECT (box->item_list), "key_press_event",
+                          G_CALLBACK (key_press_item_cb), cell);
 
 	box->signals_connected = TRUE;
 }
@@ -245,7 +264,8 @@
 	if (!box->signals_connected)
 		return;
 
-        gtk_signal_handler_block_by_data (GTK_OBJECT(box->item_list), cell);
+        g_signal_handlers_block_matched (G_OBJECT (box->item_list), G_SIGNAL_MATCH_DATA,
+					 0, 0, NULL, NULL, cell);
 }
 
 static void
@@ -256,7 +276,8 @@
 	if (!box->signals_connected)
 		return;
 
-        gtk_signal_handler_unblock_by_data (GTK_OBJECT(box->item_list), cell);
+        g_signal_handlers_unblock_matched (G_OBJECT (box->item_list), G_SIGNAL_MATCH_DATA,
+					   0, 0, NULL, NULL, cell);
 }
 
 static void
@@ -270,7 +291,7 @@
 		if (box != NULL && box->item_list != NULL)
                 {
 			combo_disconnect_signals(cell);
-			gtk_object_unref(GTK_OBJECT(box->item_list));
+			g_object_unref (box->item_list);
 			box->item_list = NULL;
 		}
 
@@ -301,8 +322,8 @@
         {
                 GList *node;
 
-		g_list_foreach(box->menustrings, menustring_free, NULL);
-		g_list_free(box->menustrings);
+		g_list_foreach (box->menustrings, menustring_free, NULL);
+		g_list_free (box->menustrings);
                 box->menustrings = NULL;
 
                 /* Don't destroy the qf if its not ours to destroy */
@@ -321,7 +342,7 @@
                 g_list_free (box->ignore_strings);
                 box->ignore_strings = NULL;
 
-		g_free(box);
+		g_free (box);
 		cell->cell.gui_private = NULL;
 	}
 
@@ -364,7 +385,6 @@
         }
 
         box->list_in_sync = TRUE;
-        box->list_sorted = TRUE;
 }
 
 void
@@ -389,7 +409,7 @@
 gnc_append_string_to_list (gpointer _string, gpointer _item_list)
 {
 	char *string = _string;
-	GNCItemList *item_list = GNC_ITEM_LIST (_item_list);
+	GncItemList *item_list = GNC_ITEM_LIST (_item_list);
 
 	gnc_item_list_append (item_list, string);
 }
@@ -405,15 +425,6 @@
                         box->item_list);
 }
 
-static void
-gnc_combo_sort_edit_list(PopBox *box)
-{
-	if (box->list_sorted || box->item_list == NULL)
-		return;
-
-        gnc_item_list_sort(box->item_list);
-}
-
 void 
 gnc_combo_cell_add_menu_item (ComboCell *cell, char * menustr)
 { 
@@ -450,8 +461,52 @@
         {
                 gnc_quickfill_insert (box->qf, menustr, QUICKFILL_ALPHA);
         }
+}
+
+void 
+gnc_combo_cell_add_account_menu_item (ComboCell *cell, char * menustr)
+{ 
+	PopBox *box;
+	gchar *menu_copy, *value_copy;
+
+	if (cell == NULL)
+		return;
+	if (menustr == NULL)
+		return;
+
+	box = cell->cell.gui_private;
+	box->menustrings = g_list_append (box->menustrings,
+                                          g_strdup (menustr));
+
+	gnc_combo_sync_edit_list(box);
+
+	if (box->item_list != NULL)
+        {
+                block_list_signals (cell);
+
+                gnc_item_list_append (box->item_list, menustr);
+                if (cell->cell.value) {
+		    menu_copy = g_strdelimit(g_strdup(menustr), "-:/\\.", ' ');
+		    value_copy =
+			g_strdelimit(g_strdup(cell->cell.value), "-:/\\.", ' ');
+		    if (strcmp (menu_copy, value_copy) == 0) {
+			gnc_combo_cell_set_value (cell, menustr);
+                        gnc_item_list_select (box->item_list, menustr);
+		    }
+		    g_free(value_copy);
+		    g_free(menu_copy);
+		}
+                unblock_list_signals (cell);
+        }
+	else
+		box->list_in_sync = FALSE;
 
-        box->list_sorted = FALSE;
+        /* If we're going to be using a pre-fab quickfill, 
+         * then don't fill it in here */
+        if (FALSE == box->use_quickfill_cache)
+        {
+                gnc_quickfill_insert (box->qf, menustr, QUICKFILL_ALPHA);
+        }
 }
 
 void
@@ -462,9 +517,9 @@
 
 static void
 gnc_combo_cell_modify_verify (BasicCell *_cell,
-                              const GdkWChar *change,
+                              const char *change,
                               int change_len,
-                              const GdkWChar *newval,
+                              const char *newval,
                               int newval_len,
                               int *cursor_position,
                               int *start_selection,
@@ -475,10 +530,15 @@
         const char *match_str;
         QuickFill *match;
         gboolean pop_list;
+        glong newval_chars;
+        glong change_chars;
+    
+        newval_chars = g_utf8_strlen (newval, newval_len);
+        change_chars = g_utf8_strlen (change, change_len);
 
         if (box->in_list_select)
         {
-                gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+                gnc_basic_cell_set_value_internal (_cell, newval);
 
                 *cursor_position = -1;
                 *start_selection = 0;
@@ -490,14 +550,14 @@
         /* If deleting, just accept */
         if (change == NULL)
         {
-                gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+                gnc_basic_cell_set_value_internal (_cell, newval);
                 return;
         }
 
         /* If we are inserting in the middle, just accept */
-        if (*cursor_position < _cell->value_len)
+        if (*cursor_position < _cell->value_chars)
         {
-                gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+                gnc_basic_cell_set_value_internal (_cell, newval);
                 return;
         }
 
@@ -507,7 +567,7 @@
 
         if ((match == NULL) || (match_str == NULL))
         {
-                gnc_basic_cell_set_wcvalue_internal (_cell, newval);
+                gnc_basic_cell_set_value_internal (_cell, newval);
 
                 block_list_signals (cell);
                 gnc_item_list_select (box->item_list, NULL);
@@ -516,9 +576,9 @@
                 return;
         }
 
-        *start_selection = newval_len;
+        *start_selection = newval_chars;
         *end_selection = -1;
-        *cursor_position += change_len;
+        *cursor_position += change_chars;
 
         if (!box->list_popped)
                 pop_list = auto_pop_combos;
@@ -527,7 +587,7 @@
 
         if (pop_list)
         {
-                item_edit_show_popup (box->item_edit);
+                gnc_item_edit_show_popup (box->item_edit);
                 box->list_popped = TRUE;
         }
 
@@ -577,7 +637,7 @@
                                 return FALSE;
 
                         match = gnc_quickfill_get_string_len_match
-                                (box->qf, bcell->value_w, *cursor_position);
+                                (box->qf, bcell->value, *cursor_position);
                         if (match == NULL)
                                 return TRUE;
 
@@ -618,28 +678,34 @@
         if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
                 return FALSE;
 
-        if ((*cursor_position < bcell->value_len) &&
-            ((*end_selection < bcell->value_len) ||
+        if ((*cursor_position < bcell->value_chars) &&
+            ((*end_selection < bcell->value_chars) ||
              (*cursor_position < *start_selection)))
                 return FALSE;
 
-        if ((*cursor_position == bcell->value_len) &&
+        if ((*cursor_position == bcell->value_chars) &&
             (*start_selection != *end_selection) &&
-            (*end_selection < bcell->value_len))
+            (*end_selection < bcell->value_chars))
                 return FALSE;
 
         find_pos = -1;
-        if (*cursor_position < bcell->value_len)
+        if (*cursor_position < bcell->value_chars)
         {
                 int i = *cursor_position;
-
-                while (bcell->value_w[i])
+                const char *c;
+                gunichar uc;
+              
+                c = g_utf8_offset_to_pointer (bcell->value, i);
+                while (*c)
                 {
-                        if (bcell->value_w[i++] == box->complete_char)
-                        {
-                                find_pos = i;
-                                break;
-                        }
+                    uc = g_utf8_get_char (c);
+                    if (uc == box->complete_char)
+                    {
+                        find_pos = (i + 1);
+                        break;
+                    }
+                    c = g_utf8_next_char (c);
+                    i++;
                 }
         }
 
@@ -652,12 +718,12 @@
         }
         else
         {
-                new_pos = bcell->value_len;
+                new_pos = bcell->value_chars;
                 extra_colon = TRUE;
         }
 
         match = gnc_quickfill_get_string_len_match (box->qf,
-                                                    bcell->value_w, new_pos);
+                                                    bcell->value, new_pos);
         if (match == NULL)
                 return FALSE;
 
@@ -696,15 +762,15 @@
 {
 	GnucashSheet *sheet = data;
 	GnomeCanvasItem *item = sheet->item_editor;
-	ItemEdit *item_edit = ITEM_EDIT (item);
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (item);
 	ComboCell *cell = (ComboCell *) bcell;
 	PopBox *box = cell->cell.gui_private;
 
 	/* initialize gui-specific, private data */
 	box->sheet = sheet;
 	box->item_edit = item_edit;
-	box->item_list = item_edit_new_list(box->item_edit);
-	gtk_object_ref (GTK_OBJECT(box->item_list));
+	box->item_list = gnc_item_edit_new_list(box->item_edit);
+	g_object_ref (box->item_list);
 	gtk_object_sink (GTK_OBJECT(box->item_list));
 
 	/* to mark cell as realized, remove the realize method */
@@ -724,7 +790,7 @@
 
 	combo_disconnect_signals ((ComboCell *) bcell);
 
-	item_edit_set_popup (box->item_edit, NULL, NULL,
+	gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
                              NULL, NULL, NULL, NULL, NULL);
 
         box->list_popped = FALSE;
@@ -756,7 +822,7 @@
 popup_set_focus (GnomeCanvasItem *item,
                  gpointer user_data)
 {
-        gtk_widget_grab_focus (GTK_WIDGET (GNC_ITEM_LIST (item)->clist));
+        gtk_widget_grab_focus (GTK_WIDGET (GNC_ITEM_LIST (item)->tree_view));
 }
 
 static void
@@ -778,7 +844,7 @@
 popup_get_width (GnomeCanvasItem *item,
                  gpointer user_data)
 {
-        return GTK_WIDGET (GNC_ITEM_LIST (item)->clist)->allocation.width;
+        return GTK_WIDGET (GNC_ITEM_LIST (item)->tree_view)->allocation.width;
 }
 
 static gboolean
@@ -799,9 +865,8 @@
                 return FALSE;
 
 	gnc_combo_sync_edit_list (box);
-        gnc_combo_sort_edit_list (box);
 
-	item_edit_set_popup (box->item_edit,
+	gnc_item_edit_set_popup (box->item_edit,
                              GNOME_CANVAS_ITEM (box->item_list),
                              get_popup_height, popup_autosize,
                              popup_set_focus, popup_post_show,
@@ -827,7 +892,7 @@
 
 	combo_disconnect_signals ((ComboCell *) bcell);
 
-	item_edit_set_popup (box->item_edit, NULL, NULL,
+	gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
                              NULL, NULL, NULL, NULL, NULL);
 
         box->list_popped = FALSE;
@@ -913,12 +978,6 @@
         box->autosize = autosize;
 }
 
-void
-gnc_combo_cell_set_autopop (gboolean auto_pop_combos_arg)
-{
-        auto_pop_combos = auto_pop_combos_arg;
-}
-
 /*
   Local Variables:
   c-basic-offset: 8
Index: gnucash-item-edit.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-edit.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-item-edit.h -Lsrc/register/register-gnome/gnucash-item-edit.h -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-item-edit.h
+++ src/register/register-gnome/gnucash-item-edit.h
@@ -26,10 +26,13 @@
 #include "gnucash-item-list.h"
 #include "gnucash-sheet.h"
 
+/* GNOME 2 port (XIM need to be replaced by a GNOME 2 port) */
+#undef USE_XIM
 
-#define ITEM_EDIT(obj)          (GTK_CHECK_CAST((obj), item_edit_get_type (), ItemEdit))
-#define ITEM_EDIT_CLASS(k)      (GTK_CHECK_CLASS_CAST ((k), item_edit_get_type (), ItemEditClass))
-#define IS_ITEM_EDIT(o)         (GTK_CHECK_TYPE((o), item_edit_get_type ()))
+#define GNC_TYPE_ITEM_EDIT        (gnc_item_edit_get_type ())
+#define GNC_ITEM_EDIT(o)          (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_EDIT, GncItemEdit))
+#define GNC_ITEM_EDIT_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_EDIT, GncItemEditClass))
+#define GNC_IS_ITEM_EDIT(o)       (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_EDIT))
 
 
 typedef int (*GetPopupHeight) (GnomeCanvasItem *item,
@@ -64,8 +67,7 @@
 };
 
 
-typedef struct
-{
+typedef struct {
         GnomeCanvasItem canvas_item;
 
 	GnomeCanvasGroup *parent;
@@ -102,80 +104,79 @@
         gboolean reset_pos;
         gint x_offset;
 
+        enum { UNKNOWN, FORWARD, REVERSE } selection_dir;
+
         /* Where are we */
         VirtualLocation virt_loc;
 
         SheetBlockStyle *style;
-} ItemEdit;
+} GncItemEdit;
 
+typedef struct {
+	GnomeCanvasItemClass parent_class;
+} GncItemEditClass;
 
-GtkType item_edit_get_type (void);
 
-void item_edit_configure (ItemEdit *item_edit);
+GType gnc_item_edit_get_type (void);
 
-void item_edit_get_pixel_coords (ItemEdit *item_edit,
-                                 int *x, int *y,
-				 int *w, int *h);
+void gnc_item_edit_configure (GncItemEdit *item_edit);
 
-GnomeCanvasItem *item_edit_new (GnomeCanvasGroup *parent,
-				GnucashSheet *sheet, GtkWidget *entry);
+void gnc_item_edit_get_pixel_coords (GncItemEdit *item_edit,
+				     int *x, int *y,
+				     int *w, int *h);
 
-GNCItemList * item_edit_new_list (ItemEdit *item_edit);
-GNCDatePicker * item_edit_new_date_picker (ItemEdit *item_edit);
+GnomeCanvasItem *gnc_item_edit_new (GnomeCanvasGroup *parent,
+				    GnucashSheet *sheet, GtkWidget *entry);
 
-void item_edit_set_popup (ItemEdit        *item_edit,
-                          GnomeCanvasItem *popup_item,
-                          GetPopupHeight   get_popup_height,
-                          PopupAutosize    popup_autosize,
-                          PopupSetFocus    popup_set_focus,
-                          PopupPostShow    popup_post_show,
-                          PopupGetWidth    popup_get_width,
-                          gpointer         popup_user_data);
+GncItemList * gnc_item_edit_new_list (GncItemEdit *item_edit);
+GNCDatePicker * gnc_item_edit_new_date_picker (GncItemEdit *item_edit);
 
-void item_edit_show_popup (ItemEdit *item_edit);
-void item_edit_hide_popup (ItemEdit *item_edit);
+void gnc_item_edit_set_popup (GncItemEdit     *item_edit,
+			      GnomeCanvasItem *popup_item,
+			      GetPopupHeight   get_popup_height,
+			      PopupAutosize    popup_autosize,
+			      PopupSetFocus    popup_set_focus,
+			      PopupPostShow    popup_post_show,
+			      PopupGetWidth    popup_get_width,
+			      gpointer         popup_user_data);
 
-int item_edit_get_toggle_offset (int row_height);
+void gnc_item_edit_show_popup (GncItemEdit *item_edit);
+void gnc_item_edit_hide_popup (GncItemEdit *item_edit);
 
-gboolean item_edit_set_cursor_pos (ItemEdit *item_edit,
+int gnc_item_edit_get_toggle_offset (int row_height);
+
+gboolean gnc_item_edit_set_cursor_pos (GncItemEdit *item_edit,
                                    VirtualLocation virt_loc, int x,
                                    gboolean changed_cells,
                                    gboolean extend_selection);
 
-void item_edit_redraw (ItemEdit *item_edit);
-
-void item_edit_claim_selection (ItemEdit *item_edit, guint32 time);
+void gnc_item_edit_redraw (GncItemEdit *item_edit);
 
-void item_edit_cut_clipboard (ItemEdit *item_edit, guint32 time);
-void item_edit_copy_clipboard (ItemEdit *item_edit, guint32 time);
-void item_edit_paste_clipboard (ItemEdit *item_edit, guint32 time);
-void item_edit_paste_primary (ItemEdit *item_edit, guint32 time);
+void gnc_item_edit_claim_selection (GncItemEdit *item_edit, guint32 time);
 
-void item_edit_set_has_selection (ItemEdit *item_edit, gboolean has_selection);
+void gnc_item_edit_cut_clipboard (GncItemEdit *item_edit, guint32 time);
+void gnc_item_edit_copy_clipboard (GncItemEdit *item_edit, guint32 time);
+void gnc_item_edit_paste_clipboard (GncItemEdit *item_edit, guint32 time);
+void gnc_item_edit_paste_primary (GncItemEdit *item_edit, guint32 time);
 
-gboolean item_edit_selection_clear (ItemEdit          *item_edit,
-                                    GdkEventSelection *event);
+void gnc_item_edit_set_has_selection (GncItemEdit *item_edit, gboolean has_selection);
 
-void item_edit_selection_get (ItemEdit         *item_edit,
-                              GtkSelectionData *selection_data,
-                              guint             info,
-                              guint             time);
+gboolean gnc_item_edit_selection_clear (GncItemEdit       *item_edit,
+					GdkEventSelection *event);
 
-void item_edit_selection_received (ItemEdit          *item_edit,
-                                   GtkSelectionData  *selection_data,
-                                   guint              time);
+void gnc_item_edit_selection_get (GncItemEdit         *item_edit,
+				  GtkSelectionData *selection_data,
+				  guint             info,
+				  guint             time);
 
-void item_edit_focus_in (ItemEdit *item_edit);
-void item_edit_focus_out (ItemEdit *item_edit);
+void gnc_item_edit_selection_received (GncItemEdit       *item_edit,
+				       GtkSelectionData  *selection_data,
+				       guint              time);
 
-void item_edit_reset_offset (ItemEdit *item_edit);
-
-
-typedef struct
-{
-        GnomeCanvasItemClass parent_class;
-} ItemEditClass;
+void gnc_item_edit_focus_in (GncItemEdit *item_edit);
+void gnc_item_edit_focus_out (GncItemEdit *item_edit);
 
+void gnc_item_edit_reset_offset (GncItemEdit *item_edit);
 
 #endif /* GNUCASH_ITEM_EDIT_H */
 
Index: gnucash-cursor.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-cursor.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/register/register-gnome/gnucash-cursor.c -Lsrc/register/register-gnome/gnucash-cursor.c -u -r1.6 -r1.7
--- src/register/register-gnome/gnucash-cursor.c
+++ src/register/register-gnome/gnucash-cursor.c
@@ -40,9 +40,9 @@
 static GnomeCanvasItem *gnucash_item_cursor_parent_class;
 
 enum {
-        ARG_0,
-        ARG_SHEET,
-        ARG_GRID,
+        PROP_0,
+        PROP_SHEET,
+        PROP_GRID,
 };
 
 
@@ -239,7 +239,7 @@
 			/* draw the rectangle around the entire active
 			   virtual row */
 			gdk_gc_set_line_attributes (cursor->gc, 1,
-						    GDK_LINE_SOLID, -1, -1);
+						    GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
 
 			gdk_gc_set_foreground (cursor->gc, &gn_black);
 
@@ -257,7 +257,7 @@
 			dh = item_cursor->h;
 
 			gdk_gc_set_line_attributes (cursor->gc, 1,
-						    GDK_LINE_SOLID, -1, -1);
+						    GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
 
 			gdk_gc_set_foreground (cursor->gc, &gn_black);
 
@@ -336,7 +336,7 @@
         gnucash_cursor_configure (cursor);
 
         gnome_canvas_item_set (GNOME_CANVAS_ITEM(sheet->header_item),
-                               "GnucashHeader::cursor_name",
+                               "cursor_name",
                                cursor->style->cursor->cursor_name,
                                NULL);
 
@@ -345,17 +345,6 @@
 
 
 static void
-gnucash_item_cursor_destroy (GtkObject *object)
-{
-	GNUCASH_ITEM_CURSOR(object);
-
-        if (GTK_OBJECT_CLASS (gnucash_item_cursor_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS (gnucash_item_cursor_parent_class)->destroy)
-			(object);
-}
-
-
-static void
 gnucash_item_cursor_init (GnucashItemCursor *cursor)
 {
         GnomeCanvasItem *item = GNOME_CANVAS_ITEM (cursor);
@@ -403,44 +392,43 @@
 
 
 static void
-gnucash_item_cursor_class_init (GnucashItemCursorClass *item_cursor_class)
+gnucash_item_cursor_class_init (GnucashItemCursorClass *class)
 {
-        GtkObjectClass  *object_class;
+        GObjectClass  *object_class;
         GnomeCanvasItemClass *item_class;
 
-        gnucash_item_cursor_parent_class =
-		gtk_type_class (gnome_canvas_item_get_type());
+        object_class = G_OBJECT_CLASS (class);
+        item_class = GNOME_CANVAS_ITEM_CLASS (class);
 
-        object_class = (GtkObjectClass *) item_cursor_class;
-        item_class = (GnomeCanvasItemClass *) item_cursor_class;
-
-        object_class->destroy = gnucash_item_cursor_destroy;
+        gnucash_item_cursor_parent_class = g_type_class_peek_parent (class);
 
         /* GnomeCanvasItem method overrides */
-        item_class->draw        = gnucash_item_cursor_draw;
+        item_class->draw = gnucash_item_cursor_draw;
 }
 
 
-GtkType
+GType
 gnucash_item_cursor_get_type (void)
 {
-        static GtkType gnucash_item_cursor_type = 0;
+        static GType gnucash_item_cursor_type = 0;
 
         if (!gnucash_item_cursor_type) {
-                GtkTypeInfo gnucash_item_cursor_info = {
-                        "GnucashItemCursor",
-                        sizeof (GnucashItemCursor),
+                static const GTypeInfo gnucash_item_cursor_info = {
                         sizeof (GnucashItemCursorClass),
-                        (GtkClassInitFunc) gnucash_item_cursor_class_init,
-                        (GtkObjectInitFunc) gnucash_item_cursor_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+                        (GClassInitFunc) gnucash_item_cursor_class_init,
+			NULL,		/* class_finalize */
+			NULL,		/* class_data */
+                        sizeof (GnucashItemCursor),
+			0,		/* n_preallocs */
+                        (GInstanceInitFunc) gnucash_item_cursor_init
                 };
 
                 gnucash_item_cursor_type =
-			gtk_type_unique (gnome_canvas_item_get_type (),
-					 &gnucash_item_cursor_info);
+			g_type_register_static (gnome_canvas_item_get_type (),
+						"GnucashItemCursor",
+						&gnucash_item_cursor_info, 0);
         }
 
         return gnucash_item_cursor_type;
@@ -448,34 +436,53 @@
 
 
 static void
-gnucash_cursor_destroy (GtkObject *object)
+gnucash_cursor_set_property (GObject         *object,
+                             guint            prop_id,
+                             const GValue    *value,
+                             GParamSpec      *pspec)
 {
-	GNUCASH_CURSOR(object);
+        GnomeCanvasItem *item;
+        GnucashCursor *cursor;
+
+        item = GNOME_CANVAS_ITEM (object);
+        cursor = GNUCASH_CURSOR (object);
 
-        if (GTK_OBJECT_CLASS (gnucash_cursor_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS
-		 (gnucash_cursor_parent_class)->destroy)(object);
+        switch (prop_id){
+                case PROP_SHEET:
+                        cursor->sheet = 
+                                GNUCASH_SHEET (g_value_get_object (value));
+                        break;
+                case PROP_GRID:
+                        cursor->grid = 
+                                GNUCASH_GRID (g_value_get_object (value));
+                        break;
+                default:
+                        break;
+        }
 }
 
 
 static void
-gnucash_cursor_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gnucash_cursor_get_property (GObject         *object,
+                             guint            prop_id,
+                             GValue          *value,
+                             GParamSpec      *pspec)
 {
         GnomeCanvasItem *item;
         GnucashCursor *cursor;
 
-        item = GNOME_CANVAS_ITEM (o);
-        cursor = GNUCASH_CURSOR (o);
+        item = GNOME_CANVAS_ITEM (object);
+        cursor = GNUCASH_CURSOR (object);
 
-        switch (arg_id){
-        case ARG_SHEET:
-                cursor->sheet = GTK_VALUE_POINTER (*arg);
-                break;
-        case ARG_GRID:
-                cursor->grid = GTK_VALUE_POINTER (*arg);
-                break;
-        default:
-                break;
+        switch (prop_id){
+                case PROP_SHEET:
+                        g_value_set_object (value, cursor->sheet);
+                        break;
+                case PROP_GRID:
+                        g_value_set_object (value, cursor->grid);
+                        break;
+                default:
+                        break;
         }
 }
 
@@ -493,51 +500,66 @@
 
 
 static void
-gnucash_cursor_class_init (GnucashCursorClass *cursor_class)
+gnucash_cursor_class_init (GnucashCursorClass *class)
 {
-        GtkObjectClass  *object_class;
+        GObjectClass  *object_class;
         GnomeCanvasItemClass *item_class;
 
-        gnucash_cursor_parent_class =
-		gtk_type_class (gnome_canvas_group_get_type());
-
-        object_class = (GtkObjectClass *) cursor_class;
-        item_class = (GnomeCanvasItemClass *) cursor_class;
+        object_class = G_OBJECT_CLASS (class);
+        item_class = GNOME_CANVAS_ITEM_CLASS (class);
 
-        gtk_object_add_arg_type ("GnucashCursor::sheet", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_SHEET);
-        gtk_object_add_arg_type ("GnucashCursor::grid", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_GRID);
+        gnucash_cursor_parent_class = g_type_class_peek_parent (class);
 
-        object_class->set_arg = gnucash_cursor_set_arg;
-        object_class->destroy = gnucash_cursor_destroy;
+        /* GObject method overrides */
+        object_class->set_property = gnucash_cursor_set_property;
+        object_class->get_property = gnucash_cursor_get_property;
 
         /* GnomeCanvasItem method overrides */
         item_class->realize     = gnucash_cursor_realize;
         item_class->unrealize   = gnucash_cursor_unrealize;
+        
+        /* properties */
+        g_object_class_install_property 
+                        (object_class,
+                         PROP_SHEET,
+                         g_param_spec_object ("sheet",
+                                              "Sheet Value",
+                                              "Sheet Value",
+                                              GNUCASH_TYPE_SHEET,
+                                              G_PARAM_READWRITE));
+        g_object_class_install_property 
+                        (object_class,
+                         PROP_GRID,
+                         g_param_spec_object ("grid",
+                                              "Grid Value",
+                                              "Grid Value",
+                                              GNUCASH_TYPE_GRID,
+                                              G_PARAM_READWRITE));
 }
 
 
-GtkType
+GType
 gnucash_cursor_get_type (void)
 {
-        static GtkType gnucash_cursor_type = 0;
+        static GType gnucash_cursor_type = 0;
 
         if (!gnucash_cursor_type) {
-                GtkTypeInfo gnucash_cursor_info = {
-                        "GnucashCursor",
-                        sizeof (GnucashCursor),
+                static const GTypeInfo gnucash_cursor_info = {
                         sizeof (GnucashCursorClass),
-                        (GtkClassInitFunc) gnucash_cursor_class_init,
-                        (GtkObjectInitFunc) gnucash_cursor_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+                        (GClassInitFunc) gnucash_cursor_class_init,
+			NULL,		/* class_finalize */
+			NULL,		/* class_data */
+                        sizeof (GnucashCursor),
+			0,		/* n_preallocs */
+                        (GInstanceInitFunc) gnucash_cursor_init
                 };
 
                 gnucash_cursor_type =
-			gtk_type_unique (gnome_canvas_group_get_type (),
-					 &gnucash_cursor_info);
+			g_type_register_static (gnome_canvas_group_get_type (),
+						"GnucashCursor",
+						&gnucash_cursor_info, 0);
         }
 
         return gnucash_cursor_type;
Index: gnucash-scrolled-window.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-scrolled-window.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-scrolled-window.c -Lsrc/register/register-gnome/gnucash-scrolled-window.c -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-scrolled-window.c
+++ src/register/register-gnome/gnucash-scrolled-window.c
@@ -31,33 +31,33 @@
 
 
 /** Declarations ******************************************************/
-static void gnc_scrolled_window_class_init (GNCScrolledWindowClass *class);
-static void gnc_scrolled_window_init (GNCScrolledWindow *scrollwin);
+static void gnc_scrolled_window_class_init (GncScrolledWindowClass *class);
+static void gnc_scrolled_window_init (GncScrolledWindow *scrollwin);
 
 
 /** Implementations ***************************************************/
 
-GtkType
+GType
 gnc_scrolled_window_get_type (void)
 {
-  static GtkType gnc_scrolled_window_type = 0;
+  static GType gnc_scrolled_window_type = 0;
 
-  if (!gnc_scrolled_window_type)
-  {
-    static const GtkTypeInfo gnc_scrolled_window_info =
-    {
-      "GNCScrolledWindow",
-      sizeof (GNCScrolledWindow),
-      sizeof (GNCScrolledWindowClass),
-      (GtkClassInitFunc) gnc_scrolled_window_class_init,
-      (GtkObjectInitFunc) gnc_scrolled_window_init,
-      /* reserved_1 */ NULL,
-      /* reserved_2 */ NULL,
-      (GtkClassInitFunc) NULL
+  if (!gnc_scrolled_window_type) {
+    static const GTypeInfo gnc_scrolled_window_info = {
+      sizeof (GncScrolledWindowClass),
+      NULL,
+      NULL,
+      (GClassInitFunc) gnc_scrolled_window_class_init,
+      NULL,
+      NULL,
+      sizeof (GncScrolledWindow),
+      0,
+      (GInstanceInitFunc) gnc_scrolled_window_init
     };
-
-    gnc_scrolled_window_type = gtk_type_unique (GTK_TYPE_SCROLLED_WINDOW,
-                                                &gnc_scrolled_window_info);
+		
+    gnc_scrolled_window_type = g_type_register_static (GTK_TYPE_SCROLLED_WINDOW,
+						       "GncScrolledWindow",
+						       &gnc_scrolled_window_info, 0);
   }
 
   return gnc_scrolled_window_type;
@@ -75,16 +75,16 @@
 
 
 static void
-gnc_scrolled_window_class_init (GNCScrolledWindowClass *class)
+gnc_scrolled_window_class_init (GncScrolledWindowClass *class)
 {
-  GtkScrolledWindowClass *scroll_class = (GtkScrolledWindowClass *) class;
+  GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS (class);
 
-  parent_class = gtk_type_class (GTK_TYPE_SCROLLED_WINDOW);
+  parent_class = g_type_class_peek_parent (class);
 
   scroll_class->scrollbar_spacing = 0;
 }
 
 static void
-gnc_scrolled_window_init (GNCScrolledWindow *scrollwin)
+gnc_scrolled_window_init (GncScrolledWindow *scrollwin)
 {
 }
Index: quickfillcell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/quickfillcell-gnome.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/register/register-gnome/quickfillcell-gnome.c -Lsrc/register/register-gnome/quickfillcell-gnome.c -u -r1.4 -r1.5
--- src/register/register-gnome/quickfillcell-gnome.c
+++ src/register/register-gnome/quickfillcell-gnome.c
@@ -72,7 +72,7 @@
                  (*start_selection >= *cursor_position))
                 *cursor_position = *end_selection;
 
-        match = gnc_quickfill_get_string_len_match (cell->qf, bcell->value_w,
+        match = gnc_quickfill_get_string_len_match (cell->qf, bcell->value,
                                                     *cursor_position);
 
         if (match == NULL)
Index: gnucash-scrolled-window.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-scrolled-window.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-scrolled-window.h -Lsrc/register/register-gnome/gnucash-scrolled-window.h -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-scrolled-window.h
+++ src/register/register-gnome/gnucash-scrolled-window.h
@@ -26,39 +26,27 @@
 
 #include <gtk/gtkscrolledwindow.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
 
+#define GNC_TYPE_SCROLLED_WINDOW        (gnc_scrolled_window_get_type ())
+#define GNC_SCROLLED_WINDOW(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_SCROLLED_WINDOW, GNCScrolledWindow))
+#define GNC_SCROLLED_WINDOW_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_SCROLLED_WINDOW, GNCScrolledWindowClass))
+#define GNC_IS_SCROLLED_WINDOW(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_SCROLLED_WINDOW))
+#define GNC_IS_SCROLLED_WINDOW_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_SCROLLED_WINDOW))
 
-#define GNC_TYPE_SCROLLED_WINDOW            (gnc_scrolled_window_get_type ())
-#define GNC_SCROLLED_WINDOW(obj)            (GTK_CHECK_CAST ((obj), GNC_TYPE_SCROLLED_WINDOW, GNCScrolledWindow))
-#define GNC_SCROLLED_WINDOW_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLED_WINDOW, GNCScrolledWindowClass))
-#define GNC_IS_SCROLLED_WINDOW(obj)         (GTK_CHECK_TYPE ((obj), GNC_TYPE_SCROLLED_WINDOW))
-#define GNC_IS_SCROLLED_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GNC_TYPE_SCROLLED_WINDOW))
 
-
-typedef struct _GNCScrolledWindow       GNCScrolledWindow;
-typedef struct _GNCScrolledWindowClass  GNCScrolledWindowClass;
-
-struct _GNCScrolledWindow
-{
+typedef struct {
   GtkScrolledWindow scrollwin;
-};
+} GncScrolledWindow;
 
-struct _GNCScrolledWindowClass
-{
+typedef struct {
   GtkScrolledWindowClass parent_class;
-};
-
-
-GtkType     gnc_scrolled_window_get_type (void);
-GtkWidget * gnc_scrolled_window_new (void);
+} GncScrolledWindowClass;
 
 
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+GType      gnc_scrolled_window_get_type (void);
+GtkWidget *gnc_scrolled_window_new (void);
 
+G_END_DECLS
 
 #endif /* GNC_SCROLLED_WINDOW_H */
Index: gnucash-item-list.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-list.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-item-list.h -Lsrc/register/register-gnome/gnucash-item-list.h -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-item-list.h
+++ src/register/register-gnome/gnucash-item-list.h
@@ -24,54 +24,53 @@
 #define GNUCASH_ITEM_LIST_H
 
 
-#define GNC_ITEM_LIST(obj) (GTK_CHECK_CAST((obj), gnc_item_list_get_type (), GNCItemList))
-#define GNC_ITEM_LIST_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), gnc_item_list_get_type (), GNCItemListClass))
-#define IS_GNC_ITEM_LIST(o) (GTK_CHECK_TYPE((o), gnc_item_list_get_type ()))
-
+#define GNC_TYPE_ITEM_LIST     (gnc_item_list_get_type ())
+#define GNC_ITEM_LIST(o)       (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_ITEM_LIST, GncItemList))
+#define GNC_ITEM_LIST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_ITEM_LIST, GncItemListClass))
+#define IS_GNC_ITEM_LIST(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_ITEM_LIST))
 
 typedef struct 
 {
         GnomeCanvasWidget canvas_widget;
 
-        GtkCList *clist;  /* Contains the list items */
-        GtkWidget *frame; /* frame around everything */
-} GNCItemList;
-
+        GtkTreeView *tree_view;
+	GtkListStore *list_store; /* Contains the list items */
+        GtkWidget *frame;         /* frame around everything */
+} GncItemList;
 
-GtkType gnc_item_list_get_type (void);
+typedef struct
+{
+        GnomeCanvasWidgetClass parent_class;
 
-GnomeCanvasItem *gnc_item_list_new (GnomeCanvasGroup *parent);
+	void (*select_item) (GncItemList *item_list,
+			     char        *item_string);
 
-void gnc_item_list_clear (GNCItemList *item_list);
+        void (*change_item) (GncItemList *item_list,
+                             char        *item_string);
 
-void gnc_item_list_append (GNCItemList *item_list, char *string);
+        void (*activate_item) (GncItemList *item_list,
+                               char        *item_string);
 
-void gnc_item_list_select (GNCItemList *item_list, const char *string);
+	void (*key_press_event) (GncItemList *item_list,
+				 GdkEventKey *event);
 
-void gnc_item_list_show_selected (GNCItemList *item_list);
+} GncItemListClass;
 
-void gnc_item_list_sort (GNCItemList *item_list);
 
-int gnc_item_list_autosize (GNCItemList *item_list);
+GType gnc_item_list_get_type (void);
 
+GnomeCanvasItem *gnc_item_list_new (GnomeCanvasGroup *parent);
 
-typedef struct
-{
-        GnomeCanvasWidgetClass parent_class;
+void gnc_item_list_clear (GncItemList *item_list);
 
-	void (*select_item) (GNCItemList *item_list,
-			     char        *item_string);
+void gnc_item_list_append (GncItemList *item_list, char *string);
 
-        void (*change_item) (GNCItemList *item_list,
-                             char        *item_string);
+void gnc_item_list_select (GncItemList *item_list, const char *string);
 
-        void (*activate_item) (GNCItemList *item_list,
-                               char        *item_string);
+void gnc_item_list_show_selected (GncItemList *item_list);
 
-	void (*key_press_event) (GNCItemList *item_list,
-				 GdkEventKey *event);
+int gnc_item_list_autosize (GncItemList *item_list);
 
-} GNCItemListClass;
 
 
 #endif /* GNUCASH_ITEM_LIST_H */
Index: gnucash-header.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-header.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/register/register-gnome/gnucash-header.c -Lsrc/register/register-gnome/gnucash-header.c -u -r1.7 -r1.8
--- src/register/register-gnome/gnucash-header.c
+++ src/register/register-gnome/gnucash-header.c
@@ -37,21 +37,21 @@
 
 #include "gnucash-header.h"
 
-static GnomeCanvasItem *gnucash_header_parent_class;
+static GnomeCanvasItem *parent_class;
 
 enum {
-        ARG_0,
-        ARG_SHEET,       /*  the sheet this header is associated with */
-        ARG_CURSOR_NAME, /* the name of the current cursor */
+        PROP_0,
+        PROP_SHEET,       /*  the sheet this header is associated with */
+        PROP_CURSOR_NAME, /* the name of the current cursor */
 };
 
 
 static void
-gnucash_header_update (GnomeCanvasItem *item, double *affine,
+gnc_header_update (GnomeCanvasItem *item, double *affine,
 		       ArtSVP *clip_path, int flags)
 {
-        if (GNOME_CANVAS_ITEM_CLASS(gnucash_header_parent_class)->update)
-                (*GNOME_CANVAS_ITEM_CLASS(gnucash_header_parent_class)->update)
+        if (GNOME_CANVAS_ITEM_CLASS (parent_class)->update)
+                (*GNOME_CANVAS_ITEM_CLASS (parent_class)->update)
 			(item, affine, clip_path, flags);
 
         item->x1 = 0;
@@ -62,10 +62,10 @@
 
 
 static void
-gnucash_header_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
+gnc_header_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
                      int x, int y, int width, int height)
 {
-        GnucashHeader *header = GNUCASH_HEADER(item);
+        GncHeader *header = GNC_HEADER(item);
         SheetBlockStyle *style = header->style;
         Table *table = header->sheet->table;
         VirtualLocation virt_loc;
@@ -75,19 +75,24 @@
         int xpaint, ypaint;
         const char *text;
         CellBlock *cb;
-        GdkFont *font;
-        guint32 argb;
+        guint32 argb, color_type;
         int i, j;
         int w, h;
+	PangoLayout *layout;
 
         virt_loc.vcell_loc.virt_row = 0;
         virt_loc.vcell_loc.virt_col = 0;
         virt_loc.phys_row_offset = 0;
         virt_loc.phys_col_offset = 0;
 
-        argb = gnc_table_get_bg_color (table, virt_loc, NULL);
-
-        bg_color = gnucash_color_argb_to_gdk (argb);
+	if (header->sheet->use_theme_colors) {
+		color_type = gnc_table_get_gtkrc_bg_color (table, virt_loc,
+							   NULL);
+		bg_color = get_gtkrc_color(header->sheet, color_type);
+	} else {
+		argb = gnc_table_get_bg_color (table, virt_loc, NULL);
+		bg_color = gnucash_color_argb_to_gdk (argb);
+	}
 
         h = style->dimensions->height;
         h *= header->num_phys_rows;
@@ -98,7 +103,7 @@
         gdk_draw_rectangle (drawable, header->gc, TRUE, 0, 0,
                             style->dimensions->width, h);
 
-        gdk_gc_set_line_attributes (header->gc, 1, GDK_LINE_SOLID, -1, -1);
+        gdk_gc_set_line_attributes (header->gc, 1, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
         gdk_gc_set_foreground (header->gc, &gn_black);
 
         gdk_draw_rectangle (drawable, header->gc, FALSE, -x, -y,
@@ -107,10 +112,10 @@
         gdk_draw_line (drawable, header->gc, 0, h + 1,
                        style->dimensions->width, h + 1);
 
-        gdk_gc_set_line_attributes (header->gc, 1, GDK_LINE_SOLID, -1, -1);
+        gdk_gc_set_line_attributes (header->gc, 1, GDK_LINE_SOLID, GDK_CAP_NOT_LAST, GDK_JOIN_MITER);
         gdk_gc_set_background (header->gc, &gn_white);
         gdk_gc_set_foreground (header->gc, &gn_black);
-        font = gnucash_register_font;
+        /*font = gnucash_register_font;*/
 
         vcell = gnc_table_get_virtual_cell
                 (table, table->current_cursor_loc.vcell_loc);
@@ -131,7 +136,7 @@
 
                 for (j = 0; j < style->ncols; j++)
                 {
-                        gint x_offset, y_offset;
+/*                        gint x_offset, y_offset;*/
                         GdkRectangle rect;
                         BasicCell *cell;
 
@@ -162,29 +167,26 @@
                         if (!text)
                                 text = "";
 
-                        y_offset = ((h / 2) +
+                      	layout = gtk_widget_create_pango_layout (GTK_WIDGET (header->sheet), text);
+			
+			/*y_offset = ((h / 2) +
                                     (((font->ascent + font->descent) / 2) -
                                      font->descent));
-                        y_offset++;
+                        y_offset++;*/
 
                         switch (gnc_table_get_align (table, virt_loc)) {
                         default:
-                        case CELL_ALIGN_LEFT:
-                                x_offset = CELL_HPADDING;
-                                break;
-                        case CELL_ALIGN_RIGHT:
-                                x_offset = w - CELL_HPADDING;
-                                x_offset -= gdk_string_measure(font, text);
-                                break;
-                        case CELL_ALIGN_CENTER:
-                                if (w < gdk_string_measure (font, text))
-                                        x_offset = CELL_HPADDING;
-                                else
-                                {
-                                        x_offset = w / 2;
-                                        x_offset -= gdk_string_measure (font, text) / 2;
-                                }
-                                break;
+			case CELL_ALIGN_LEFT:
+				pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT);
+				break;
+
+			case CELL_ALIGN_RIGHT:
+				pango_layout_set_alignment (layout, PANGO_ALIGN_RIGHT);
+				break;
+
+	                case CELL_ALIGN_CENTER:
+				pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
+				break;
                         }
 
                         rect.x = xpaint + CELL_HPADDING;
@@ -194,9 +196,13 @@
 
                         gdk_gc_set_clip_rectangle (header->gc, &rect);
 
-                        gdk_draw_string (drawable, font, header->gc,
-                                         xpaint + x_offset,
-                                         ypaint + y_offset, text);
+                        gdk_draw_layout (drawable,
+					 header->gc,
+                                         xpaint + CELL_HPADDING,
+                                         ypaint + 1,
+					 layout);
+
+			g_object_unref (layout);
 
                         gdk_gc_set_clip_rectangle (header->gc, NULL);
 
@@ -209,7 +215,7 @@
 
 
 static void
-gnucash_header_request_redraw (GnucashHeader *header)
+gnc_header_request_redraw (GncHeader *header)
 {
         GnomeCanvas *canvas = GNOME_CANVAS_ITEM(header)->canvas;
 
@@ -223,14 +229,13 @@
 
 
 static void
-gnucash_header_realize (GnomeCanvasItem *item)
+gnc_header_realize (GnomeCanvasItem *item)
 {
-        GnucashHeader *header = GNUCASH_HEADER (item);
+        GncHeader *header = GNC_HEADER (item);
         GdkWindow *window;
 
-        if (GNOME_CANVAS_ITEM_CLASS (gnucash_header_parent_class)->realize)
-                (*GNOME_CANVAS_ITEM_CLASS
-		 (gnucash_header_parent_class)->realize)(item);
+        if (GNOME_CANVAS_ITEM_CLASS (parent_class)->realize)
+                GNOME_CANVAS_ITEM_CLASS (parent_class)->realize (item);
 
         window = GTK_WIDGET (item->canvas)->window;
 
@@ -239,9 +244,9 @@
 
 
 static void
-gnucash_header_unrealize (GnomeCanvasItem *item)
+gnc_header_unrealize (GnomeCanvasItem *item)
 {
-        GnucashHeader *header = GNUCASH_HEADER (item);
+        GncHeader *header = GNC_HEADER (item);
 
         if (header->gc != NULL) {
                 gdk_gc_unref (header->gc);
@@ -256,30 +261,27 @@
                 gdk_cursor_destroy (header->normal_cursor);
         header->normal_cursor = NULL;
 
-        if (GNOME_CANVAS_ITEM_CLASS (gnucash_header_parent_class)->unrealize)
-                (*GNOME_CANVAS_ITEM_CLASS
-		 (gnucash_header_parent_class)->unrealize)(item);
+        if (GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize)
+                GNOME_CANVAS_ITEM_CLASS (parent_class)->unrealize (item);
 }
 
 
 static void
-gnucash_header_destroy (GtkObject *object)
+gnc_header_finalize (GObject *object)
 {
-        GnucashHeader *header;
+        GncHeader *header;
 
-        header = GNUCASH_HEADER (object);
+        header = GNC_HEADER (object);
 
         g_free (header->cursor_name);
         header->cursor_name = NULL;
 
-        if (GTK_OBJECT_CLASS (gnucash_header_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS
-		 (gnucash_header_parent_class)->destroy)(object);
+        G_OBJECT_CLASS (parent_class)->finalize (object);
 }
 
 
 void
-gnucash_header_reconfigure (GnucashHeader *header)
+gnc_header_reconfigure (GncHeader *header)
 {
         GnomeCanvas *canvas;
         GtkWidget *widget;
@@ -288,7 +290,7 @@
         int w, h;
 
         g_return_if_fail (header != NULL);
-        g_return_if_fail (GNUCASH_IS_HEADER (header));
+        g_return_if_fail (GNC_IS_HEADER (header));
 
         canvas = GNOME_CANVAS_ITEM(header)->canvas;
         widget = GTK_WIDGET (header->sheet);
@@ -324,22 +326,22 @@
                 if (old_height != h)
                         gtk_widget_set_usize (GTK_WIDGET(canvas), -1, h);
 
-                gnucash_header_request_redraw (header);
+                gnc_header_request_redraw (header);
         }
 }
 
 void
-gnucash_header_set_header_rows (GnucashHeader *header,
+gnc_header_set_header_rows (GncHeader *header,
                                 int num_phys_rows)
 {
         g_return_if_fail (header != NULL);
-        g_return_if_fail (GNUCASH_IS_HEADER (header));
+        g_return_if_fail (GNC_IS_HEADER (header));
 
         header->num_phys_rows = num_phys_rows;
 }
 
 static double
-gnucash_header_point (GnomeCanvasItem *item,
+gnc_header_point (GnomeCanvasItem *item,
                       double x, double y, int cx, int cy,
                       GnomeCanvasItem **actual_item)
 {
@@ -353,7 +355,7 @@
  *  argument.
  */
 static gboolean
-pointer_on_resize_line (GnucashHeader *header, int x, int y, int *col)
+pointer_on_resize_line (GncHeader *header, int x, int y, int *col)
 {
         SheetBlockStyle *style = header->style;
         gboolean on_the_line = FALSE;
@@ -377,7 +379,7 @@
 }
 
 static int
-find_resize_col (GnucashHeader *header, int col)
+find_resize_col (GncHeader *header, int col)
 {
         SheetBlockStyle *style = header->style;
         CellDimensions *cd;
@@ -405,37 +407,37 @@
 }
 
 static void
-gnucash_header_resize_column (GnucashHeader *header, gint col, gint width)
+gnc_header_resize_column (GncHeader *header, gint col, gint width)
 {
         GnucashSheet *sheet = header->sheet;
 
         gnucash_sheet_set_col_width (sheet, col, width);
 
         gnucash_cursor_configure (GNUCASH_CURSOR(sheet->cursor));
-        item_edit_configure (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_configure (GNC_ITEM_EDIT(sheet->item_editor));
 
-        gnucash_header_reconfigure (header);
+        gnc_header_reconfigure (header);
         gnucash_sheet_set_scroll_region (sheet);
         gnucash_sheet_update_adjustments (sheet);
 
-        gnucash_header_request_redraw (header);
+        gnc_header_request_redraw (header);
         gnucash_sheet_redraw_all (sheet);
 }
 
 static void
-gnucash_header_auto_resize_column (GnucashHeader *header, gint col)
+gnc_header_auto_resize_column (GncHeader *header, gint col)
 {
         int width;
 
         width = gnucash_sheet_col_max_width (header->sheet, 0, col);
 
-        gnucash_header_resize_column (header, col, width);
+        gnc_header_resize_column (header, col, width);
 }
 
 static gint
-gnucash_header_event (GnomeCanvasItem *item, GdkEvent *event)
+gnc_header_event (GnomeCanvasItem *item, GdkEvent *event)
 {
-        GnucashHeader *header = GNUCASH_HEADER(item);
+        GncHeader *header = GNC_HEADER(item);
         GnomeCanvas *canvas = item->canvas;
         int x, y;
         int col;
@@ -464,7 +466,7 @@
                         if (new_width >= 0) {
                                 header->resize_x = x;
                                 header->resize_col_width = new_width;
-                                gnucash_header_request_redraw (header);
+                                gnc_header_request_redraw (header);
                         }
 
                         break;
@@ -522,7 +524,7 @@
                                                           event->button.time);
                                 header->needs_ungrab = FALSE;
 
-                                gnucash_header_resize_column
+                                gnc_header_resize_column
                                         (header,
                                          header->resize_col,
                                          header->resize_col_width);
@@ -559,7 +561,7 @@
                                 header->needs_ungrab = FALSE;
                         }
 
-                        gnucash_header_auto_resize_column (header, resize_col);
+                        gnc_header_auto_resize_column (header, resize_col);
                 }
 
         }
@@ -574,42 +576,63 @@
 
 
 static void
-gnucash_header_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
-{
-        GnucashHeader *header;
-        GtkLayout *layout;
-        gint needs_update = FALSE;
-
-        header = GNUCASH_HEADER (o);
-        layout = GTK_LAYOUT(GNOME_CANVAS_ITEM(header)->canvas);
-
-        switch (arg_id){
-        case ARG_SHEET:
-                header->sheet = GTK_VALUE_POINTER (*arg);
-                gtk_layout_set_hadjustment (layout, header->sheet->hadj);
-                needs_update = TRUE;
-                break;
-        case ARG_CURSOR_NAME:
-        {
-                char * old_name = header->cursor_name;
+gnc_header_get_property (GObject *object,
+			 guint param_id,
+			 GValue *value,
+			 GParamSpec *pspec)
+{
+	GncHeader *header = GNC_HEADER (object);
+
+	switch (param_id) {
+		case PROP_SHEET:
+			g_value_set_object (value, header->sheet);
+			break;
+		case PROP_CURSOR_NAME:
+			g_value_set_string (value, header->cursor_name);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+			break;
+	}
+}
 
-                header->cursor_name = g_strdup (GTK_VALUE_STRING (*arg));
-                needs_update = !old_name || !header->cursor_name ||
-                        strcmp (old_name, header->cursor_name) != 0;
-                g_free (old_name);
-                break;
-        }
-        default:
-                break;
-        }
+static void
+gnc_header_set_property (GObject *object,
+			 guint param_id,
+			 const GValue *value,
+			 GParamSpec *pspec)
+{
+	GncHeader *header = GNC_HEADER (object);
+        GtkLayout *layout = GTK_LAYOUT (GNOME_CANVAS_ITEM (header)->canvas);
+	gboolean needs_update = FALSE;
+	gchar *old_name;
+
+	switch (param_id) {
+		case PROP_SHEET:
+			header->sheet = GNUCASH_SHEET (g_value_get_object (value));
+			gtk_layout_set_hadjustment (layout, header->sheet->hadj);
+			needs_update = TRUE;
+			break;
+		case PROP_CURSOR_NAME:
+			old_name = header->cursor_name;
+
+			header->cursor_name = g_value_dup_string (value);
+			needs_update = !old_name || !header->cursor_name ||
+					strcmp (old_name, header->cursor_name) != 0;
+			g_free (old_name);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+			break;
+	}
 
-        if ((header->sheet != NULL) && needs_update)
-                gnucash_header_reconfigure (header);
+	if ((header->sheet != NULL) && needs_update)
+		gnc_header_reconfigure (header);
 }
 
 
 static void
-gnucash_header_init (GnucashHeader *header)
+gnc_header_init (GncHeader *header)
 {
         header->sheet = NULL;
         header->cursor_name = NULL;
@@ -622,62 +645,71 @@
 
 
 static void
-gnucash_header_class_init (GnucashHeaderClass *header_class)
+gnc_header_class_init (GncHeaderClass *header_class)
 {
-        GtkObjectClass  *object_class;
-        GnomeCanvasItemClass *item_class;
-
-        gnucash_header_parent_class =
-		gtk_type_class(gnome_canvas_item_get_type());
+        GObjectClass  *object_class = G_OBJECT_CLASS (header_class);
+        GnomeCanvasItemClass *item_class = GNOME_CANVAS_ITEM_CLASS (header_class);
 
-        object_class = (GtkObjectClass *) header_class;
-        item_class = (GnomeCanvasItemClass *) header_class;
+        parent_class = g_type_class_peek_parent (header_class);
 
-        gtk_object_add_arg_type ("GnucashHeader::sheet", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_SHEET);
-        gtk_object_add_arg_type ("GnucashHeader::cursor_name", GTK_TYPE_STRING,
-                                 GTK_ARG_WRITABLE, ARG_CURSOR_NAME);
-
-        object_class->set_arg = gnucash_header_set_arg;
-        object_class->destroy = gnucash_header_destroy;
-
-        item_class->realize   = gnucash_header_realize;
-        item_class->unrealize = gnucash_header_unrealize;
-        item_class->update    = gnucash_header_update;
-        item_class->draw      = gnucash_header_draw;
-        item_class->event     = gnucash_header_event;
-        item_class->point     = gnucash_header_point;
+        object_class->finalize = gnc_header_finalize;
+        object_class->get_property = gnc_header_get_property;
+        object_class->set_property = gnc_header_set_property;
+
+	g_object_class_install_property (object_class,
+					 PROP_SHEET,
+					 g_param_spec_object ("sheet",
+						 	      "Sheet Value",
+							      "Sheet Value",
+							      GNUCASH_TYPE_SHEET,
+							      G_PARAM_READWRITE));
+	g_object_class_install_property (object_class,
+					 PROP_CURSOR_NAME,
+					 g_param_spec_string ("cursor_name",
+						 	      "Cursor Name",
+							      "Cursor Name",
+							      CURSOR_HEADER,
+							      G_PARAM_READWRITE));
+
+	
+        item_class->realize   = gnc_header_realize;
+        item_class->unrealize = gnc_header_unrealize;
+        item_class->update    = gnc_header_update;
+        item_class->draw      = gnc_header_draw;
+        item_class->event     = gnc_header_event;
+        item_class->point     = gnc_header_point;
 }
 
 
-GtkType
-gnucash_header_get_type (void)
-{
-        static GtkType gnucash_header_type = 0;
-
-        if (!gnucash_header_type) {
-                GtkTypeInfo gnucash_header_info = {
-                        "GnucashHeader",
-                        sizeof (GnucashHeader),
-                        sizeof (GnucashHeaderClass),
-                        (GtkClassInitFunc) gnucash_header_class_init,
-                        (GtkObjectInitFunc) gnucash_header_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+GType
+gnc_header_get_type (void)
+{
+        static GType gnc_header_type = 0;
+
+        if (!gnc_header_type) {
+                static const GTypeInfo gnc_header_info = {
+                        sizeof (GncHeaderClass),
+			NULL,
+			NULL,
+                        (GClassInitFunc) gnc_header_class_init,
+			NULL,
+			NULL,
+			sizeof (GncHeader),
+			0,
+                        (GInstanceInitFunc) gnc_header_init
                 };
 
-                gnucash_header_type =
-			gtk_type_unique(gnome_canvas_item_get_type (),
-					&gnucash_header_info);
+                gnc_header_type = g_type_register_static (gnome_canvas_item_get_type (),
+							  "GncHeader",
+							  &gnc_header_info, 0);
         }
 
-        return gnucash_header_type;
+        return gnc_header_type;
 }
 
 
 static void
-gnucash_header_realized (GtkWidget *widget, gpointer data)
+gnc_header_realized (GtkWidget *widget, gpointer data)
 {
        	gdk_window_set_back_pixmap (GTK_LAYOUT (widget)->bin_window,
                                     NULL, FALSE);
@@ -685,7 +717,7 @@
 
 
 GtkWidget *
-gnucash_header_new (GnucashSheet *sheet)
+gnc_header_new (GnucashSheet *sheet)
 {
         GnomeCanvasGroup *group;
         GnomeCanvasItem *item;
@@ -693,17 +725,16 @@
 
         canvas = gnome_canvas_new ();
 
-        gtk_signal_connect (GTK_OBJECT (canvas), "realize",
-                            (GtkSignalFunc) gnucash_header_realized,
-                            NULL);
+        g_signal_connect (G_OBJECT (canvas), "realize",
+                          G_CALLBACK (gnc_header_realized),
+                          NULL);
 
         group = GNOME_CANVAS_GROUP (GNOME_CANVAS (canvas)->root);
 
         item = gnome_canvas_item_new (group,
-                                      gnucash_header_get_type (),
-                                      "GnucashHeader::sheet", sheet,
-                                      "GnucashHeader::cursor_name",
-                                      CURSOR_HEADER,
+                                      gnc_header_get_type (),
+                                      "sheet", sheet,
+                                      "cursor_name", CURSOR_HEADER,
                                       NULL);
 
         sheet->header_item = item;
Index: gnucash-item-edit.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-edit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-item-edit.c -Lsrc/register/register-gnome/gnucash-item-edit.c -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-item-edit.c
+++ src/register/register-gnome/gnucash-item-edit.c
@@ -40,11 +40,15 @@
 #include "gnucash-style.h"
 
 
+/* FIXME GNOME2 Port
+ *	- ButtonEvents are not delegated to GtkEntry. 
+ */
+
 /* The arguments we take */
 enum {
-        ARG_0,
-        ARG_SHEET,     /* The Sheet argument      */
-        ARG_GTK_ENTRY, /* The GtkEntry argument   */
+        PROP_0,
+        PROP_SHEET,     /* The sheet property      */
+        PROP_EDITOR,     /* The entry property   */
 };
 
 /* values for selection info */
@@ -54,7 +58,7 @@
         TARGET_COMPOUND_TEXT
 };
 
-static GnomeCanvasItemClass *item_edit_parent_class;
+static GnomeCanvasItemClass *gnc_item_edit_parent_class;
 static GdkAtom clipboard_atom = GDK_NONE;
 static GdkAtom ctext_atom = GDK_NONE;
 
@@ -62,19 +66,7 @@
 typedef struct _TextDrawInfo TextDrawInfo;
 struct _TextDrawInfo
 {
-        GdkWChar *all_text;
-
-        GdkWChar *text_1;
-        GdkWChar *text_2;
-        GdkWChar *text_3;
-
-        int total_len;
-
-        int len_1;
-        int len_2;
-        int len_3;
-
-        GdkFont *font;
+	PangoLayout *layout;
 
         GdkRectangle bg_rect;
         GdkRectangle text_rect;
@@ -88,18 +80,11 @@
 
         gboolean hatching;
 
-        int text_x1;
-        int text_x2;
-        int text_x3;
-        int text_y;
-
-        int cursor_x;
-        int cursor_y1;
-        int cursor_y2;
+        PangoRectangle cursor;
 };
 
 
-static void item_edit_show_popup_toggle (ItemEdit *item_edit,
+static void gnc_item_edit_show_popup_toggle (GncItemEdit *item_edit,
 					 gint x, gint y,
 					 gint width, gint height,
 					 GtkAnchorType anchor);
@@ -108,7 +93,7 @@
  * Returns the coordinates for the editor bounding box
  */
 void
-item_edit_get_pixel_coords (ItemEdit *item_edit,
+gnc_item_edit_get_pixel_coords (GncItemEdit *item_edit,
                             int *x, int *y,
                             int *w, int *h)
 {
@@ -135,37 +120,41 @@
 
 
 static void
-item_edit_draw_info (ItemEdit *item_edit, int x, int y, TextDrawInfo *info)
+gnc_item_edit_draw_info (GncItemEdit *item_edit, int x, int y, TextDrawInfo *info)
 {
         SheetBlock *block;
         SheetBlockStyle *style;
         GtkEditable *editable;
-        CellAlignment align;
         Table *table;
 
         gboolean hatching;
-        guint32 argb;
+        guint32 argb, color_type;
 
-        int text_len, total_width;
-        int pre_cursor_width;
-        int width_1, width_2;
         int xd, yd, wd, hd, dx, dy;
         int start_pos, end_pos;
         int toggle_space, cursor_pos;
-        int xoffset;
-        char *text;
+        const gchar *text;
+	PangoRectangle strong_pos;
+	PangoAttribute *attr;
+	PangoAttrList *attr_list;
 
         style = item_edit->style;
         table = item_edit->sheet->table;
 
-        info->font = GNUCASH_GRID(item_edit->sheet->grid)->normal_font;
-
         block = gnucash_sheet_get_block (item_edit->sheet,
                                          item_edit->virt_loc.vcell_loc);
 
-        argb = gnc_table_get_bg_color (table, item_edit->virt_loc, &hatching);
+	if (item_edit->sheet->use_theme_colors) {
+		color_type = gnc_table_get_gtkrc_bg_color (table,
+							   item_edit->virt_loc,
+							   &hatching);
+		info->bg_color = get_gtkrc_color(item_edit->sheet, color_type);
+	} else {
+		argb = gnc_table_get_bg_color (table, item_edit->virt_loc,
+					       &hatching);
+		info->bg_color = gnucash_color_argb_to_gdk (argb);
+	}
 
-        info->bg_color = gnucash_color_argb_to_gdk (argb);
         info->hatching = hatching;
         info->fg_color = &gn_black;
 
@@ -173,36 +162,30 @@
         info->fg_color2 = &gn_white;
 
         editable = GTK_EDITABLE (item_edit->editor);
-        cursor_pos = editable->current_pos;
-        start_pos = MIN (editable->selection_start_pos,
-                         editable->selection_end_pos);
-        end_pos = MAX (editable->selection_start_pos,
-                       editable->selection_end_pos);
+        cursor_pos = gtk_editable_get_position (editable);
+	gtk_editable_get_selection_bounds (editable, &start_pos, &end_pos);
 
         text = gtk_entry_get_text (GTK_ENTRY (item_edit->editor));
-        text_len = strlen (text);
 
-        info->all_text = g_new0 (GdkWChar, text_len + 1);
-        text_len = gdk_mbstowcs (info->all_text, text, text_len);
-        info->total_len = text_len;
+	info->layout = gtk_widget_create_pango_layout (GTK_WIDGET (item_edit->sheet), text);
 
-        info->text_1 = info->all_text;
-        info->len_1  = start_pos;
+	/* Selection */
+	attr_list = pango_attr_list_new ();
 
-        info->text_2 = &info->text_1[start_pos];
-        info->len_2  = end_pos - start_pos;
+	attr = pango_attr_foreground_new (0xffff, 0xffff, 0xffff);
+	attr->start_index = start_pos;
+	attr->end_index = end_pos;
+	pango_attr_list_insert (attr_list, attr);
+	
+	attr = pango_attr_background_new (0x0, 0x0, 0x0);
+	attr->start_index = start_pos;
+	attr->end_index = end_pos;
+	pango_attr_list_insert (attr_list, attr);
 
-        info->text_3 = &info->text_1[end_pos];
-        info->len_3  = text_len - end_pos;
+	pango_layout_set_attributes (info->layout, attr_list);
+	pango_attr_list_unref (attr_list);
 
-        total_width = gdk_text_width_wc (info->font, info->text_1, text_len);
-        pre_cursor_width = gdk_text_width_wc (info->font, info->text_1,
-                                              cursor_pos);
-
-        width_1 = gdk_text_width_wc (info->font, info->text_1, info->len_1);
-        width_2 = gdk_text_width_wc (info->font, info->text_2, info->len_2);
-
-        item_edit_get_pixel_coords (item_edit, &xd, &yd, &wd, &hd);
+        gnc_item_edit_get_pixel_coords (item_edit, &xd, &yd, &wd, &hd);
 
         dx = xd - x;
         dy = yd - y;
@@ -220,75 +203,30 @@
         info->text_rect.width  = wd - toggle_space;
         info->text_rect.height = hd - 2;
 
-        align = gnc_table_get_align (table, item_edit->virt_loc);
+        // this width affects line-wrapping; setting it to -1 should turn wrapping off:
+        pango_layout_set_width( info->layout, -1 );
 
-        switch (align)
-        {
-                case CELL_ALIGN_RIGHT:
-                        xoffset = info->text_rect.width -
-                                  (CELL_HPADDING + total_width);
-                        if (xoffset > 0)
-                                break;
+        // pango_layout_set_ellipsize(...) as of pango 1.6 may be useful for
+        // strings longer than the field width.
 
+        switch (gnc_table_get_align (table, item_edit->virt_loc))
+        {
                 default:
-                        xoffset = MIN (CELL_HPADDING,
-                                       info->text_rect.width -
-                                       (2*CELL_HPADDING + pre_cursor_width));
+                case CELL_ALIGN_LEFT:
+			pango_layout_set_alignment (info->layout, PANGO_ALIGN_LEFT);
                         break;
-        }
 
-        if (!item_edit->reset_pos)
-        {
-                xoffset = item_edit->x_offset;
-
-                if (xoffset + pre_cursor_width >
-                    info->text_rect.width - CELL_HPADDING)
-                        xoffset = info->text_rect.width -
-                                (2*CELL_HPADDING + pre_cursor_width);
-
-                if (xoffset + pre_cursor_width < CELL_HPADDING)
-                        xoffset = CELL_HPADDING - pre_cursor_width;
-        }
-
-        switch (align)
-        {
                 case CELL_ALIGN_RIGHT:
-                        if (xoffset > CELL_HPADDING &&
-                            xoffset + total_width >
-                            info->text_rect.width - CELL_HPADDING)
-                                xoffset = MAX (CELL_HPADDING,
-                                               (info->text_rect.width -
-                                                CELL_HPADDING) - total_width);
-
-                        if (xoffset + total_width <
-                            info->text_rect.width - CELL_HPADDING)
-                                xoffset = (info->text_rect.width -
-                                           CELL_HPADDING) - total_width;
-
+			pango_layout_set_alignment (info->layout, PANGO_ALIGN_RIGHT);
                         break;
 
-                default:
-                        xoffset = MIN (xoffset, CELL_HPADDING);
+                case CELL_ALIGN_CENTER:
+			pango_layout_set_alignment (info->layout, PANGO_ALIGN_CENTER);
+                        break;
+	}
 
-                        if (xoffset < CELL_HPADDING &&
-                            xoffset + total_width <
-                            info->text_rect.width - CELL_HPADDING)
-                                xoffset = MIN (CELL_HPADDING,
-                                               (info->text_rect.width -
-                                                CELL_HPADDING) - total_width);
-        }
-
-        info->text_x1 = dx + xoffset;
-        info->text_x2 = info->text_x1 + width_1;
-        info->text_x3 = info->text_x2 + width_2;
-        info->text_y  = (dy + (hd / 2) +
-                         (((info->font->ascent + info->font->descent) / 2)
-                          - info->font->descent));
-        info->text_y++;
-
-        info->cursor_x  = info->text_x1 + pre_cursor_width;
-        info->cursor_y1 = info->text_y - info->font->ascent;
-        info->cursor_y2 = info->text_y + info->font->descent;
+	pango_layout_get_cursor_pos (info->layout, cursor_pos, NULL, &strong_pos);
+        info->cursor = strong_pos;
 
         if (info->hatching)
         {
@@ -297,25 +235,36 @@
                 info->hatch_rect.width = wd;
                 info->hatch_rect.height = hd;
         }
-
-        item_edit->x_offset = xoffset;
 }
 
 static void
-item_edit_free_draw_info_members(TextDrawInfo *info)
+gnc_item_edit_free_draw_info_members(TextDrawInfo *info)
 {
         if (info == NULL)
                 return;
 
-        g_free(info->all_text);
-        info->all_text = NULL;
+	g_object_unref (info->layout);
+}
+
+static void
+gnc_item_edit_update_scroll_offset(GncItemEdit *item_edit,
+				   TextDrawInfo *info) {
+	gint cursor_margin = CELL_HPADDING + 3;
+	if (PANGO_PIXELS (info->cursor.x) + item_edit->x_offset 
+	    > info->text_rect.width - cursor_margin) {
+		item_edit->x_offset = info->text_rect.width
+			- PANGO_PIXELS (info->cursor.x) - cursor_margin;
+	} else if (PANGO_PIXELS (info->cursor.x) + item_edit->x_offset 
+		   < 0) {
+		item_edit->x_offset = - PANGO_PIXELS (info->cursor.x);
+	}
 }
 
 static void
-item_edit_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
+gnc_item_edit_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
                 int x, int y, int width, int height)
 {
-        ItemEdit *item_edit = ITEM_EDIT (item);
+        GncItemEdit *item_edit = GNC_ITEM_EDIT (item);
         TextDrawInfo info;
 
         /* be sure we're valid */
@@ -324,7 +273,7 @@
                 return;
 
         /* Get the measurements for drawing */
-        item_edit_draw_info (item_edit, x, y, &info);
+        gnc_item_edit_draw_info (item_edit, x, y, &info);
 
         item_edit->reset_pos = FALSE;
 
@@ -344,42 +293,29 @@
         /* Draw the foreground text and cursor */
         gdk_gc_set_clip_rectangle (item_edit->gc, &info.text_rect);
 
-        /* Draw the highlited region */
-        if (info.len_2 > 0)
-        {
-                gdk_gc_set_foreground (item_edit->gc, info.bg_color2);
-                gdk_draw_rectangle (drawable, item_edit->gc, TRUE,
-                                    info.text_x2,
-                                    info.text_y - info.font->ascent,
-                                    info.text_x3 - info.text_x2,
-                                    info.font->ascent + info.font->descent);
-
-                gdk_gc_set_foreground (item_edit->gc, info.fg_color2);
-                gdk_draw_text_wc (drawable, info.font, item_edit->gc,
-                                  info.text_x2, info.text_y,
-                                  info.text_2, info.len_2);
-        }
-
         gdk_gc_set_foreground (item_edit->gc, info.fg_color);
 
-        if (info.len_1 > 0)
-                gdk_draw_text_wc (drawable, info.font, item_edit->gc,
-                                  info.text_x1, info.text_y,
-                                  info.text_1, info.len_1);
-
-        if (info.len_3 > 0)
-                gdk_draw_text_wc (drawable, info.font, item_edit->gc,
-                                  info.text_x3, info.text_y,
-                                  info.text_3, info.len_3);
-
-        if (info.len_2 == 0)
-                gdk_draw_line (drawable, item_edit->gc,
-                               info.cursor_x, info.cursor_y1,
-                               info.cursor_x, info.cursor_y2);
+	gnc_item_edit_update_scroll_offset(item_edit, &info);
+
+	gdk_draw_layout (drawable,
+			 item_edit->gc,
+			 info.text_rect.x + CELL_HPADDING + 
+			 item_edit->x_offset,
+			 info.text_rect.y + 1,
+			 info.layout);
+
+        gdk_draw_line (drawable,
+                       item_edit->gc,
+                       PANGO_PIXELS (info.cursor.x) + CELL_HPADDING 
+		       + item_edit->x_offset,
+                       PANGO_PIXELS (info.cursor.y),
+                       PANGO_PIXELS (info.cursor.x) + CELL_HPADDING
+		       + item_edit->x_offset,
+                       PANGO_PIXELS (info.cursor.y + info.cursor.height));
 
         gdk_gc_set_clip_rectangle (item_edit->gc, NULL);
 
-        item_edit_free_draw_info_members (&info);
+        gnc_item_edit_free_draw_info_members (&info);
 
 #ifdef USE_XIM
         if (gdk_im_ready() && item_edit->ic && 
@@ -405,12 +341,12 @@
 
 
 static double
-item_edit_point (GnomeCanvasItem *item, double c_x, double c_y, int cx, int cy,
+gnc_item_edit_point (GnomeCanvasItem *item, double c_x, double c_y, int cx, int cy,
                  GnomeCanvasItem **actual_item)
 {
         int x, y, w, h;
 
-        item_edit_get_pixel_coords (ITEM_EDIT (item), &x, &y, &w, &h);
+        gnc_item_edit_get_pixel_coords (GNC_ITEM_EDIT (item), &x, &y, &w, &h);
 
         *actual_item = NULL;
         if ((cx < x) || (cy < y) || (cx > x+w) || (cy > y+w))
@@ -422,33 +358,26 @@
 }
 
 
-static int
-item_edit_event (GnomeCanvasItem *item, GdkEvent *event)
-{
-        return 0;
-}
-
-
 int
-item_edit_get_toggle_offset (int row_height)
+gnc_item_edit_get_toggle_offset (int row_height)
 {
-        /* sync with item_edit_update */
+        /* sync with gnc_item_edit_update */
         return row_height - (2 * (CELL_VPADDING + 1)) + 3;
 }
 
 static void
-item_edit_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path,
+gnc_item_edit_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path,
 		  int flags)
 {
-        ItemEdit *item_edit = ITEM_EDIT (item);
+        GncItemEdit *item_edit = GNC_ITEM_EDIT (item);
         gint toggle_x, toggle_y, toggle_width, toggle_height;
         gint x, y, w, h;
 
-        if (GNOME_CANVAS_ITEM_CLASS (item_edit_parent_class)->update)
-                (*GNOME_CANVAS_ITEM_CLASS(item_edit_parent_class)->update)
+        if (GNOME_CANVAS_ITEM_CLASS (gnc_item_edit_parent_class)->update)
+                (*GNOME_CANVAS_ITEM_CLASS(gnc_item_edit_parent_class)->update)
 			(item, affine, clip_path, flags);
 
-        item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
+        gnc_item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
 
         item->x1 = x;
         item->y1 = y;
@@ -465,27 +394,27 @@
 
         item_edit->popup_toggle.toggle_offset = toggle_width + 3;
 
-        item_edit_show_popup_toggle (item_edit, toggle_x, toggle_y,
+        gnc_item_edit_show_popup_toggle (item_edit, toggle_x, toggle_y,
                                      toggle_width, toggle_height,
                                      GTK_ANCHOR_NW);
 
 	if (item_edit->show_popup)
-                item_edit_show_popup (item_edit);
+                gnc_item_edit_show_popup (item_edit);
 }
 
 
 static void
-item_edit_realize (GnomeCanvasItem *item)
+gnc_item_edit_realize (GnomeCanvasItem *item)
 {
         GnomeCanvas *canvas = item->canvas;
         GdkWindow *window;
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
-        if (GNOME_CANVAS_ITEM_CLASS (item_edit_parent_class)->realize)
+        if (GNOME_CANVAS_ITEM_CLASS (gnc_item_edit_parent_class)->realize)
                 (*GNOME_CANVAS_ITEM_CLASS
-		 (item_edit_parent_class)->realize) (item);
+		 (gnc_item_edit_parent_class)->realize) (item);
 
-        item_edit = ITEM_EDIT (item);
+        item_edit = GNC_ITEM_EDIT (item);
         window = GTK_WIDGET (canvas)->window;
 
         item_edit->gc = gdk_gc_new (window);
@@ -511,7 +440,8 @@
                 sheet_widget = GTK_WIDGET (item_edit->sheet);
 
                 if (sheet_widget->style &&
-                    sheet_widget->style->font->type != GDK_FONT_FONTSET)
+                    gdk_font_from_description (sheet_widget->style->font_desc)
+			->type != GDK_FONT_FONTSET)
                         supported_style &= ~GDK_IM_PREEDIT_POSITION;
 
                 attr->style = style = gdk_im_decide_style (supported_style);
@@ -536,8 +466,9 @@
                 {
                         case GDK_IM_PREEDIT_POSITION:
                                 if (sheet_widget->style &&
-                                    sheet_widget->style->font->type !=
-                                    GDK_FONT_FONTSET)
+                                    gdk_font_from_description (
+					sheet_widget->style->font_desc)
+					->type != GDK_FONT_FONTSET)
                                 {
                                         g_warning ("over-the-spot style "
                                                    "requires fontset");
@@ -556,7 +487,8 @@
                                 attr->preedit_area.width = width;
                                 attr->preedit_area.height = height;
                                 attr->preedit_fontset =
-                                        sheet_widget->style->font;
+                                        gdk_font_from_description (
+					sheet_widget->style->font_desc);
 
                                 break;
                 }
@@ -582,11 +514,11 @@
 
 
 static void
-item_edit_unrealize (GnomeCanvasItem *item)
+gnc_item_edit_unrealize (GnomeCanvasItem *item)
 {
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
-        item_edit = ITEM_EDIT (item);
+        item_edit = GNC_ITEM_EDIT (item);
 
 #ifdef USE_XIM
         if (item_edit->ic)
@@ -602,16 +534,16 @@
         }
 #endif
 
-        if (GNOME_CANVAS_ITEM_CLASS (item_edit_parent_class)->unrealize)
+        if (GNOME_CANVAS_ITEM_CLASS (gnc_item_edit_parent_class)->unrealize)
                 (*GNOME_CANVAS_ITEM_CLASS
-		 (item_edit_parent_class)->unrealize) (item);
+		 (gnc_item_edit_parent_class)->unrealize) (item);
 }
 
 void
-item_edit_focus_in (ItemEdit *item_edit)
+gnc_item_edit_focus_in (GncItemEdit *item_edit)
 {
         g_return_if_fail (item_edit != NULL);
-        g_return_if_fail (IS_ITEM_EDIT(item_edit));
+        g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
 #ifdef USE_XIM
         if (item_edit->ic)
@@ -621,10 +553,10 @@
 }
 
 void
-item_edit_focus_out (ItemEdit *item_edit)
+gnc_item_edit_focus_out (GncItemEdit *item_edit)
 {
         g_return_if_fail (item_edit != NULL);
-        g_return_if_fail (IS_ITEM_EDIT(item_edit));
+        g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
 #ifdef USE_XIM
         gdk_im_end ();
@@ -632,10 +564,10 @@
 }
 
 void
-item_edit_reset_offset (ItemEdit *item_edit)
+gnc_item_edit_reset_offset (GncItemEdit *item_edit)
 {
         g_return_if_fail (item_edit != NULL);
-        g_return_if_fail (IS_ITEM_EDIT(item_edit));
+        g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
         item_edit->reset_pos = TRUE;
 }
@@ -644,7 +576,7 @@
  * Instance initialization
  */
 static void
-item_edit_init (ItemEdit *item_edit)
+gnc_item_edit_init (GncItemEdit *item_edit)
 {
         GnomeCanvasItem *item = GNOME_CANVAS_ITEM (item_edit);
 
@@ -696,21 +628,21 @@
 
 
 static void
-queue_sync (ItemEdit *item_edit)
+queue_sync (GncItemEdit *item_edit)
 {
         GnomeCanvas *canvas = GNOME_CANVAS_ITEM (item_edit)->canvas;
         int x, y, w, h;
 
-        item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
+        gnc_item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
  
         gnome_canvas_request_redraw (canvas, x, y, x+w+1, y+h+1);
 }
 
 void
-item_edit_redraw (ItemEdit *item_edit)
+gnc_item_edit_redraw (GncItemEdit *item_edit)
 {
         g_return_if_fail (item_edit != NULL);
-        g_return_if_fail (IS_ITEM_EDIT(item_edit));
+        g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
         queue_sync (item_edit);
 }
@@ -718,48 +650,56 @@
 static void
 entry_changed (GtkEntry *entry, void *data)
 {
-        queue_sync(ITEM_EDIT (data));
+        queue_sync(GNC_ITEM_EDIT (data));
 }
 
 
 static void
-item_edit_destroy (GtkObject *object)
+gnc_item_edit_dispose (GObject *object)
 {
-        ItemEdit *item_edit = ITEM_EDIT (object);
-        GtkObject *edit_obj = GTK_OBJECT(item_edit->editor);
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (object);
 
-        if (item_edit->clipboard != NULL)
-                g_free(item_edit->clipboard);
-        item_edit->clipboard = NULL;
+	g_signal_handlers_disconnect_matched (G_OBJECT (item_edit->editor), G_SIGNAL_MATCH_DATA,
+					      0, 0, NULL, NULL, item_edit);
+
+        G_OBJECT_CLASS (gnc_item_edit_parent_class)->dispose (object);
+}
+
+static void
+gnc_item_edit_finalize (GObject *object)
+{
+        GncItemEdit *item_edit = GNC_ITEM_EDIT (object);
 
-        if (!GTK_OBJECT_DESTROYED(edit_obj))
-                gtk_signal_disconnect_by_data (edit_obj, item_edit);
+        if (item_edit->clipboard != NULL) {
+                g_free (item_edit->clipboard);
+        	item_edit->clipboard = NULL;
+	}
 
-        gdk_gc_destroy (item_edit->gc);
+	if (item_edit->gc) {
+		gdk_gc_destroy (item_edit->gc);
+		item_edit->gc = NULL;
+	}
 
-        if (GTK_OBJECT_CLASS (item_edit_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS (item_edit_parent_class)->destroy)(object);
+        G_OBJECT_CLASS (gnc_item_edit_parent_class)->finalize (object);
 }
 
 
 gboolean
-item_edit_set_cursor_pos (ItemEdit *item_edit,
-                          VirtualLocation virt_loc, int x,
-                          gboolean changed_cells,
-                          gboolean extend_selection)
+gnc_item_edit_set_cursor_pos (GncItemEdit *item_edit,
+                              VirtualLocation virt_loc,
+                              int x,
+                              gboolean changed_cells,
+                              gboolean extend_selection)
 {
         GtkEditable *editable;
-        TextDrawInfo info;
         Table *table;
-        gint pos;
-        gint pos_x;
+        gint pos = 0;
         gint o_x, o_y;
         CellDimensions *cd;
         gint cell_row, cell_col;
         SheetBlockStyle *style;
-        GdkWChar *text;
 
-        g_return_val_if_fail (IS_ITEM_EDIT(item_edit), FALSE);
+        g_return_val_if_fail (GNC_IS_ITEM_EDIT(item_edit), FALSE);
 
         table = item_edit->sheet->table;
 
@@ -770,9 +710,6 @@
 
         cd = gnucash_style_get_cell_dimensions (style, cell_row, cell_col);
 
-        o_x = cd->origin_x;
-        o_y = cd->origin_y;
-
         if (!virt_loc_equal (virt_loc, item_edit->virt_loc))
                 return FALSE;
 
@@ -784,80 +721,121 @@
 
                 align = gnc_table_get_align (table, item_edit->virt_loc);
 
-                if (align == CELL_ALIGN_RIGHT)
+                if (align == CELL_ALIGN_RIGHT) {
+			PangoRectangle ink_rect;
+			PangoLayout *layout;
+
                         gtk_editable_set_position(editable, -1);
-                else
-                        gtk_editable_set_position(editable, 0);
+
+			layout = gtk_entry_get_layout( GTK_ENTRY(item_edit->
+								 editor) );
+			pango_layout_get_pixel_extents(layout,
+						       &ink_rect,
+						       NULL);
+
+			item_edit->x_offset = 
+				cd->pixel_width - ink_rect.width -
+				2* CELL_HPADDING;
+		}
+                else {
+			gtk_editable_set_position(editable, 0);
+			item_edit->x_offset = 0;
+		}
 
                 if (item_edit->is_popup)
                         x -= item_edit->popup_toggle.toggle_offset;
         }
 
-        item_edit_draw_info (item_edit, o_x, o_y, &info);
+        o_x = cd->origin_x + item_edit->x_offset;
+        o_y = cd->origin_y;
 
-        if (info.text_1 == NULL)
-        {
-                item_edit_free_draw_info_members(&info);
-                return FALSE;
-        }
 
-        pos = info.total_len;
-        if (pos == 0)
+        // get the text index for the mouse position into pos
         {
-                item_edit_free_draw_info_members(&info);
-                return FALSE;
-        }
-
-        text = info.text_1 + (pos - 1);
-
-        while (text >= info.text_1) {
-                pos_x = o_x + info.text_x1 +
-                        gdk_text_width_wc (info.font, info.text_1, pos);
-
-                if (pos_x <= x + (gdk_char_width_wc(info.font, *text) / 2))
-                        break;
-
-                pos--;
-                text--;
+                PangoLayout *layout;
+                int textIndex, textTrailing;
+                gboolean insideText;
+
+                layout = gtk_entry_get_layout( GTK_ENTRY(item_edit->editor) );
+                insideText = pango_layout_xy_to_index( layout,
+                                                       (x - o_x) * PANGO_SCALE, 10 * PANGO_SCALE,
+                                                       &textIndex, &textTrailing );
+                pos = textIndex;
         }
 
         if (extend_selection)
         {
-                gint current_pos, start_sel, end_sel;
-
-                current_pos = editable->current_pos;
-                start_sel = MIN(editable->selection_start_pos,
-                                editable->selection_end_pos);
-                end_sel = MAX(editable->selection_start_pos,
-                              editable->selection_end_pos);
+                // Setting the selection-range on the GtkEditable implicitly
+                // sets the `position` to the end of the range; this is
+                // unfortunate if you're setting and using the `position` to
+                // be at the end or beginning of the selection range to
+                // discriminate the forward- or reverse- nature of the
+                // dragging.  Now we just keep even-more-explicit enumeration
+                // of the selection-direction. -- jsled, Mar 2005, Gnome2 port
+
+                gboolean selection_exists;
+                gint current_pos, start_sel, end_sel, orig_start, orig_end;
+
+                current_pos = gtk_editable_get_position (editable);
+		selection_exists = gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
+                orig_start = start_sel;
+                orig_end = end_sel;
 
-                if (start_sel == end_sel)
+                if ( item_edit->selection_dir == UNKNOWN && start_sel == end_sel )
                 {
                         start_sel = current_pos;
                         end_sel = pos;
                 }
-                else if (current_pos == start_sel)
+
+                // determine direction
+                if ( item_edit->selection_dir == UNKNOWN )
+                {
+                        if ( pos < start_sel )
+                        {
+                                item_edit->selection_dir = REVERSE;
+                        }
+                        else if ( pos > end_sel )
+                        {
+                                item_edit->selection_dir = FORWARD;
+                        }
+                }
+
+                // act accordingly
+                if ( item_edit->selection_dir == FORWARD )
+                {
+                        end_sel = pos;
+                }
+                else if ( item_edit->selection_dir == REVERSE )
+                {
                         start_sel = pos;
+                }
                 else
-                        end_sel = pos;
+                {
+                        // @@FIXME : don't printf... so ghetto.
+                        printf( "unknown, but with movement\n" );
+                }
+
+                gtk_editable_set_position (editable, pos);
 
                 gtk_editable_select_region(editable, start_sel, end_sel);
+
+                pos = gtk_editable_get_position (editable);
+                selection_exists = gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
         }
         else
+        {
                 gtk_editable_select_region(editable, 0, 0);
-
-        gtk_editable_set_position (editable, pos);
+                gtk_editable_set_position (editable, pos);
+                item_edit->selection_dir = UNKNOWN;
+        }
 
         queue_sync (item_edit);
 
-        item_edit_free_draw_info_members(&info);
-
         return TRUE;
 }
 
-
 static int
-entry_event (GtkEntry *entry, GdkEvent *event, ItemEdit *item_edit)
+entry_event (GtkEntry *entry, GdkEvent *event, GncItemEdit *item_edit)
 {
         switch (event->type)
         {
@@ -874,22 +852,21 @@
         return FALSE;
 }
 
-
 static void
-item_edit_set_editor (ItemEdit *item_edit, void *data)
+gnc_item_edit_set_editor (GncItemEdit *item_edit, void *data)
 {
         item_edit->editor = GTK_WIDGET (data);
 
-        gtk_signal_connect (GTK_OBJECT (item_edit->editor), "changed",
-                            GTK_SIGNAL_FUNC (entry_changed), item_edit);
+        g_signal_connect (G_OBJECT (item_edit->editor), "changed",
+                          G_CALLBACK (entry_changed), item_edit);
 
-        gtk_signal_connect_after (GTK_OBJECT (item_edit->editor), "event",
-                                  GTK_SIGNAL_FUNC (entry_event), item_edit);
+        g_signal_connect_after (G_OBJECT (item_edit->editor), "event",
+                                G_CALLBACK (entry_event), item_edit);
 }
 
 
 void
-item_edit_configure (ItemEdit *item_edit)
+gnc_item_edit_configure (GncItemEdit *item_edit)
 {
         GnucashSheet *sheet = item_edit->sheet;
         GnucashItemCursor *cursor;
@@ -929,10 +906,10 @@
         }
 
         if (!gnc_table_is_popup (item_edit->sheet->table, item_edit->virt_loc))
-                item_edit_set_popup (item_edit, NULL, NULL, NULL,
+                gnc_item_edit_set_popup (item_edit, NULL, NULL, NULL,
                                      NULL, NULL, NULL, NULL);
 
-        item_edit_update (GNOME_CANVAS_ITEM(item_edit), NULL, NULL, 0);
+        gnc_item_edit_update (GNOME_CANVAS_ITEM(item_edit), NULL, NULL, 0);
 
 #ifdef USE_XIM
         if (item_edit->ic &&
@@ -955,20 +932,17 @@
 
 
 void
-item_edit_claim_selection (ItemEdit *item_edit, guint32 time)
+gnc_item_edit_claim_selection (GncItemEdit *item_edit, guint32 time)
 {
         GtkEditable *editable;
         gint start_sel, end_sel;
 
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         editable = GTK_EDITABLE (item_edit->editor);
 
-        start_sel = MIN(editable->selection_start_pos,
-                        editable->selection_end_pos);
-        end_sel = MAX(editable->selection_start_pos,
-                      editable->selection_end_pos);
+	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
 
         if (start_sel != end_sel)
         {
@@ -990,24 +964,19 @@
 
 
 static void
-item_edit_cut_copy_clipboard (ItemEdit *item_edit, guint32 time, gboolean cut)
+gnc_item_edit_cut_copy_clipboard (GncItemEdit *item_edit, guint32 time, gboolean cut)
 {
         GtkEditable *editable;
         gint start_sel, end_sel;
         gchar *clip;
 
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         editable = GTK_EDITABLE (item_edit->editor);
 
-        start_sel = MIN(editable->selection_start_pos,
-                        editable->selection_end_pos);
-        end_sel = MAX(editable->selection_start_pos,
-                      editable->selection_end_pos);
-
-        if (start_sel == end_sel)
-                return;
+	if (!gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel))
+		return;
 
         g_free(item_edit->clipboard);
 
@@ -1029,24 +998,24 @@
 
 
 void
-item_edit_cut_clipboard (ItemEdit *item_edit, guint32 time)
+gnc_item_edit_cut_clipboard (GncItemEdit *item_edit, guint32 time)
 {
-        item_edit_cut_copy_clipboard(item_edit, time, TRUE);
+        gnc_item_edit_cut_copy_clipboard(item_edit, time, TRUE);
 }
 
 
 void
-item_edit_copy_clipboard (ItemEdit *item_edit, guint32 time)
+gnc_item_edit_copy_clipboard (GncItemEdit *item_edit, guint32 time)
 {
-        item_edit_cut_copy_clipboard(item_edit, time, FALSE);
+        gnc_item_edit_cut_copy_clipboard(item_edit, time, FALSE);
 }
 
 
 void
-item_edit_paste_clipboard (ItemEdit *item_edit, guint32 time)
+gnc_item_edit_paste_clipboard (GncItemEdit *item_edit, guint32 time)
 {
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         if (ctext_atom == GDK_NONE)
                 ctext_atom = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
@@ -1057,10 +1026,10 @@
 
 
 void
-item_edit_paste_primary (ItemEdit *item_edit, guint32 time)
+gnc_item_edit_paste_primary (GncItemEdit *item_edit, guint32 time)
 {
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         if (ctext_atom == GDK_NONE)
                 ctext_atom = gdk_atom_intern ("COMPOUND_TEXT", FALSE);
@@ -1071,12 +1040,12 @@
 
 
 static void
-item_edit_show_popup_toggle (ItemEdit *item_edit,
+gnc_item_edit_show_popup_toggle (GncItemEdit *item_edit,
                              gint x, gint y,
                              gint width, gint height,
                              GtkAnchorType anchor)
 {
-	g_return_if_fail (IS_ITEM_EDIT (item_edit));
+	g_return_if_fail (GNC_IS_ITEM_EDIT (item_edit));
 
 	gnome_canvas_item_raise_to_top
                 (item_edit->popup_toggle.toggle_button_item);
@@ -1092,9 +1061,9 @@
 
 
 static void
-item_edit_hide_popup_toggle (ItemEdit *item_edit)
+gnc_item_edit_hide_popup_toggle (GncItemEdit *item_edit)
 {
-	g_return_if_fail (IS_ITEM_EDIT(item_edit));
+	g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
 	/* safely out of the way */
 	gnome_canvas_item_set (item_edit->popup_toggle.toggle_button_item,
@@ -1105,7 +1074,7 @@
 static gboolean
 key_press_popup_cb (GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	ItemEdit *item_edit = ITEM_EDIT (data);
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (data);
 
 	gtk_signal_emit_stop_by_name (GTK_OBJECT(widget), "key_press_event");
 
@@ -1116,9 +1085,9 @@
 
 
 static void
-item_edit_popup_toggled (GtkToggleButton *button, gpointer data)
+gnc_item_edit_popup_toggled (GtkToggleButton *button, gpointer data)
 {
-	ItemEdit *item_edit = ITEM_EDIT (data);
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (data);
         gboolean show_popup;
 
 	show_popup = gtk_toggle_button_get_active (button);
@@ -1147,14 +1116,14 @@
         item_edit->show_popup = show_popup;
 
         if (!item_edit->show_popup)
-                item_edit_hide_popup (item_edit);
+                gnc_item_edit_hide_popup (item_edit);
 
-	item_edit_configure (item_edit);
+	gnc_item_edit_configure (item_edit);
 }
 
 
 static void
-block_toggle_signals(ItemEdit *item_edit)
+block_toggle_signals(GncItemEdit *item_edit)
 {
         GtkObject *obj;
 
@@ -1168,7 +1137,7 @@
 
 
 static void
-unblock_toggle_signals(ItemEdit *item_edit)
+unblock_toggle_signals(GncItemEdit *item_edit)
 {
         GtkObject *obj;
 
@@ -1182,11 +1151,11 @@
 
 
 static void
-connect_popup_toggle_signals (ItemEdit *item_edit)
+connect_popup_toggle_signals (GncItemEdit *item_edit)
 {
         GtkObject *object;
 
-	g_return_if_fail(IS_ITEM_EDIT(item_edit));
+	g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
 	if (item_edit->popup_toggle.signals_connected)
 		return;
@@ -1194,7 +1163,7 @@
         object = GTK_OBJECT(item_edit->popup_toggle.toggle_button);
 
         gtk_signal_connect (object, "toggled",
-                            GTK_SIGNAL_FUNC(item_edit_popup_toggled),
+                            GTK_SIGNAL_FUNC(gnc_item_edit_popup_toggled),
                             item_edit);
 
 	gtk_signal_connect (object, "key_press_event",
@@ -1206,9 +1175,9 @@
 
 
 static void
-disconnect_popup_toggle_signals (ItemEdit *item_edit)
+disconnect_popup_toggle_signals (GncItemEdit *item_edit)
 {
-	g_return_if_fail(IS_ITEM_EDIT(item_edit));
+	g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
 	if (!item_edit->popup_toggle.signals_connected)
 		return;
@@ -1219,86 +1188,118 @@
 	item_edit->popup_toggle.signals_connected = FALSE;
 }
 
-
 static void
-item_edit_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
-        GnomeCanvasItem *item;
-        ItemEdit *item_edit;
-
-        item = GNOME_CANVAS_ITEM (object);
-        item_edit = ITEM_EDIT (object);
-
-        switch (arg_id) {
-        case ARG_SHEET:
-                item_edit->sheet = GNUCASH_SHEET(GTK_VALUE_POINTER (*arg));
-                break;
-
-        case ARG_GTK_ENTRY:
-                item_edit_set_editor (item_edit, GTK_VALUE_POINTER (*arg));
-                break;
-
-        default:
-                break;
-        }
+gnc_item_edit_get_property (GObject *object,
+			guint param_id,
+			GValue *value,
+			GParamSpec *pspec)
+{
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (object);
+
+	switch (param_id) {
+		case PROP_SHEET:
+			g_value_set_object (value, item_edit->sheet);
+			break;
+		case PROP_EDITOR:
+			g_value_set_object (value, item_edit->editor);
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+			break;
+	}
 }
 
+static void
+gnc_item_edit_set_property (GObject *object,
+			guint param_id,
+			const GValue *value,
+			GParamSpec *pspec)
+{
+	GncItemEdit *item_edit = GNC_ITEM_EDIT (object);
+
+	switch (param_id) {
+		case PROP_SHEET:
+			item_edit->sheet = GNUCASH_SHEET (g_value_get_object (value));
+			break;
+		case PROP_EDITOR:
+			gnc_item_edit_set_editor (item_edit, GTK_ENTRY (g_value_get_object (value)));
+			break;
+		default:
+			G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+			break;
+	}
+}
 
 /*
- * ItemEdit class initialization
+ * GncItemEdit class initialization
  */
 static void
-item_edit_class_init (ItemEditClass *item_edit_class)
+gnc_item_edit_class_init (GncItemEditClass *gnc_item_edit_class)
 {
-        GtkObjectClass  *object_class;
+        GObjectClass  *object_class;
         GnomeCanvasItemClass *item_class;
 
-        item_edit_parent_class = gtk_type_class (gnome_canvas_item_get_type());
+        gnc_item_edit_parent_class = g_type_class_peek_parent (gnc_item_edit_class);
  
-        object_class = (GtkObjectClass *) item_edit_class;
-        item_class = (GnomeCanvasItemClass *) item_edit_class;
-
-        gtk_object_add_arg_type ("ItemEdit::sheet", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_SHEET);
-        gtk_object_add_arg_type ("ItemEdit::GtkEntry", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_GTK_ENTRY);
+        object_class = G_OBJECT_CLASS (gnc_item_edit_class);
+        item_class = GNOME_CANVAS_ITEM_CLASS (gnc_item_edit_class);
 
-        object_class->set_arg = item_edit_set_arg;
-        object_class->destroy = item_edit_destroy;
+        object_class->get_property = gnc_item_edit_get_property;
+        object_class->set_property = gnc_item_edit_set_property;
+        object_class->dispose = gnc_item_edit_dispose;
+        object_class->finalize = gnc_item_edit_finalize;
+
+	g_object_class_install_property (object_class,
+					 PROP_SHEET,
+					 g_param_spec_object ("sheet",
+						 	      "Sheet Value",
+							      "Sheet Value",
+							      GNUCASH_TYPE_SHEET,
+							      G_PARAM_READWRITE));
+	g_object_class_install_property (object_class,
+					 PROP_EDITOR,
+					 g_param_spec_object ("editor",
+						 	      "Editor Value",
+							      "Editor Value",
+							      GTK_TYPE_ENTRY,
+							      G_PARAM_READWRITE));
  
         /* GnomeCanvasItem method overrides */
-        item_class->update      = item_edit_update;
-        item_class->draw        = item_edit_draw;
-        item_class->point       = item_edit_point;
-        item_class->realize     = item_edit_realize;
-        item_class->unrealize   = item_edit_unrealize;
-        item_class->event       = item_edit_event;
+        item_class->update      = gnc_item_edit_update;
+        item_class->draw        = gnc_item_edit_draw;
+        item_class->point       = gnc_item_edit_point;
+        item_class->realize     = gnc_item_edit_realize;
+        item_class->unrealize   = gnc_item_edit_unrealize;
+        //item_class->event       = gnc_item_edit_event;
 }
 
 
-GtkType
-item_edit_get_type (void)
-{
-        static GtkType item_edit_type = 0;
-
-        if (!item_edit_type) {
-                GtkTypeInfo item_edit_info = {
-                        "ItemEdit",
-                        sizeof (ItemEdit),
-                        sizeof (ItemEditClass),
-                        (GtkClassInitFunc) item_edit_class_init,
-                        (GtkObjectInitFunc) item_edit_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+GType
+gnc_item_edit_get_type (void)
+{
+        static GType gnc_item_edit_type = 0;
+
+        if (!gnc_item_edit_type) {
+                static const GTypeInfo gnc_item_edit_info = {
+                        sizeof (GncItemEditClass),
+                        NULL,
+                        NULL,
+                        (GClassInitFunc) gnc_item_edit_class_init,
+                        NULL,
+                        NULL,
+                        sizeof (GncItemEdit),
+			0, /* n_preallocs */
+                        (GInstanceInitFunc) gnc_item_edit_init,
+                        NULL,
                 };
 
-                item_edit_type =
-			gtk_type_unique(gnome_canvas_item_get_type (),
-					&item_edit_info);
+                gnc_item_edit_type =
+			g_type_register_static(gnome_canvas_item_get_type (),
+					"GncItemEdit",
+					&gnc_item_edit_info, 0);
         }
 
-        return item_edit_type;
+        return gnc_item_edit_type;
 }
 
 
@@ -1315,16 +1316,18 @@
         pt->toggle_button = GTK_TOGGLE_BUTTON(button);
         gtk_container_add(GTK_CONTAINER(button), arrow);
 
+        gtk_widget_show_all( GTK_WIDGET(pt->toggle_button) );
+
         pt->toggle_button_item =
                 gnome_canvas_item_new(parent, gnome_canvas_widget_get_type(),
                                       "widget", button,
-                                      "size_pixels", TRUE,
+                                      "size-pixels", TRUE,
                                       NULL);
 }
 
 
 GnomeCanvasItem *
-item_edit_new (GnomeCanvasGroup *parent, GnucashSheet *sheet, GtkWidget *entry)
+gnc_item_edit_new (GnomeCanvasGroup *parent, GnucashSheet *sheet, GtkWidget *entry)
 {
         static const GtkTargetEntry targets[] = {
                 { "STRING", 0, TARGET_STRING },
@@ -1334,22 +1337,22 @@
         static const gint n_targets = sizeof(targets) / sizeof(targets[0]);
 
         GnomeCanvasItem *item;
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
         item = gnome_canvas_item_new (parent,
-				      item_edit_get_type (),
-				      "ItemEdit::sheet", sheet,
-				      "ItemEdit::GtkEntry", sheet->entry,
+				      GNC_TYPE_ITEM_EDIT,
+				      "sheet", sheet,
+				      "editor", sheet->entry,
 				      NULL);
 
-        item_edit = ITEM_EDIT(item);
+        item_edit = GNC_ITEM_EDIT(item);
 
 	item_edit->parent = parent;
 
 	create_popup_toggle (parent, &item_edit->popup_toggle);
 
         if (clipboard_atom == GDK_NONE)
-          clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
+		clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
 
         gtk_selection_add_targets (GTK_WIDGET(sheet),
                                    GDK_SELECTION_PRIMARY,
@@ -1363,12 +1366,12 @@
 }
 
 
-GNCItemList *
-item_edit_new_list (ItemEdit *item_edit)
+GncItemList *
+gnc_item_edit_new_list (GncItemEdit *item_edit)
 {
-        GNCItemList *item_list;
+        GncItemList *item_list;
 
-	g_return_val_if_fail (IS_ITEM_EDIT(item_edit), NULL);
+	g_return_val_if_fail (GNC_IS_ITEM_EDIT(item_edit), NULL);
 
         item_list = GNC_ITEM_LIST (gnc_item_list_new (item_edit->parent));
 
@@ -1376,11 +1379,11 @@
 }
 
 GNCDatePicker *
-item_edit_new_date_picker (ItemEdit *item_edit)
+gnc_item_edit_new_date_picker (GncItemEdit *item_edit)
 {
         GNCDatePicker *gdp;
 
-	g_return_val_if_fail (IS_ITEM_EDIT (item_edit), NULL);
+	g_return_val_if_fail (GNC_IS_ITEM_EDIT (item_edit), NULL);
 
         gdp = GNC_DATE_PICKER (gnc_date_picker_new (item_edit->parent));
 
@@ -1389,7 +1392,7 @@
 
 
 void
-item_edit_show_popup (ItemEdit *item_edit)
+gnc_item_edit_show_popup (GncItemEdit *item_edit)
 {
         GtkToggleButton *toggle;
         GtkAnchorType popup_anchor;
@@ -1406,7 +1409,7 @@
         gint down_height;
 
         g_return_if_fail (item_edit != NULL);
-	g_return_if_fail (IS_ITEM_EDIT(item_edit));
+	g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
         if (!item_edit->is_popup)
                 return;
@@ -1417,7 +1420,7 @@
         view_width  = GTK_WIDGET (sheet)->allocation.width;
 
         gnome_canvas_get_scroll_offsets (GNOME_CANVAS(sheet), NULL, &y_offset);
-        item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
+        gnc_item_edit_get_pixel_coords (item_edit, &x, &y, &w, &h);
 
 	popup_x = x;
 
@@ -1510,10 +1513,10 @@
 
 
 void
-item_edit_hide_popup (ItemEdit *item_edit)
+gnc_item_edit_hide_popup (GncItemEdit *item_edit)
 {
         g_return_if_fail(item_edit != NULL);
-	g_return_if_fail(IS_ITEM_EDIT(item_edit));
+	g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         if (!item_edit->is_popup)
                 return;
@@ -1530,7 +1533,7 @@
 }
 
 void
-item_edit_set_popup (ItemEdit        *item_edit,
+gnc_item_edit_set_popup (GncItemEdit        *item_edit,
                      GnomeCanvasItem *popup_item,
                      GetPopupHeight   get_popup_height,
                      PopupAutosize    popup_autosize,
@@ -1539,10 +1542,10 @@
                      PopupGetWidth    popup_get_width,
                      gpointer         popup_user_data)
 {
-	g_return_if_fail (IS_ITEM_EDIT(item_edit));
+	g_return_if_fail (GNC_IS_ITEM_EDIT(item_edit));
 
         if (item_edit->is_popup)
-                item_edit_hide_popup (item_edit);
+                gnc_item_edit_hide_popup (item_edit);
 
         item_edit->is_popup = popup_item != NULL;
 
@@ -1560,28 +1563,28 @@
         {
                 disconnect_popup_toggle_signals (item_edit);
 
-                item_edit_hide_popup (item_edit);
-                item_edit_hide_popup_toggle (item_edit);
+                gnc_item_edit_hide_popup (item_edit);
+                gnc_item_edit_hide_popup_toggle (item_edit);
         }
 
-        item_edit_update (GNOME_CANVAS_ITEM (item_edit), NULL, NULL, 0);
+        gnc_item_edit_update (GNOME_CANVAS_ITEM (item_edit), NULL, NULL, 0);
 }
 
 void
-item_edit_set_has_selection (ItemEdit *item_edit, gboolean has_selection)
+gnc_item_edit_set_has_selection (GncItemEdit *item_edit, gboolean has_selection)
 {
         g_return_if_fail (item_edit != NULL);
-        g_return_if_fail (IS_ITEM_EDIT (item_edit));
+        g_return_if_fail (GNC_IS_ITEM_EDIT (item_edit));
 
         item_edit->has_selection = has_selection;
 }
 
 gboolean
-item_edit_selection_clear (ItemEdit          *item_edit,
+gnc_item_edit_selection_clear (GncItemEdit          *item_edit,
                            GdkEventSelection *event)
 {
         g_return_val_if_fail(item_edit != NULL, FALSE);
-        g_return_val_if_fail(IS_ITEM_EDIT(item_edit), FALSE);
+        g_return_val_if_fail(GNC_IS_ITEM_EDIT(item_edit), FALSE);
         g_return_val_if_fail(event != NULL, FALSE);
 
         /* Let the selection handling code know that the selection
@@ -1608,10 +1611,10 @@
 
 
 void
-item_edit_selection_get (ItemEdit         *item_edit,
-                         GtkSelectionData *selection_data,
-                         guint             info,
-                         guint             time)
+gnc_item_edit_selection_get (GncItemEdit         *item_edit,
+			     GtkSelectionData *selection_data,
+			     guint             info,
+			     guint             time)
 {
         GtkEditable *editable;
 
@@ -1622,16 +1625,13 @@
         gint length;
 
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         editable = GTK_EDITABLE (item_edit->editor);
 
         if (selection_data->selection == GDK_SELECTION_PRIMARY)
         {
-                start_pos = MIN(editable->selection_start_pos,
-                                editable->selection_end_pos);
-                end_pos = MAX(editable->selection_start_pos,
-                              editable->selection_end_pos);
+		gtk_editable_get_selection_bounds (editable, &start_pos, &end_pos);
 
                 str = gtk_editable_get_chars(editable, start_pos, end_pos);
         }
@@ -1678,18 +1678,19 @@
 
 
 void
-item_edit_selection_received (ItemEdit          *item_edit,
-                              GtkSelectionData  *selection_data,
-                              guint              time)
+gnc_item_edit_selection_received (GncItemEdit       *item_edit,
+				  GtkSelectionData  *selection_data,
+				  guint              time)
 {
         GtkEditable *editable;
         gboolean reselect;
         gint old_pos;
         gint tmp_pos;
+	gint start_sel, end_sel;
         enum {INVALID, STRING, CTEXT} type;
 
         g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(IS_ITEM_EDIT(item_edit));
+        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
 
         editable = GTK_EDITABLE(item_edit->editor);
 
@@ -1714,20 +1715,16 @@
 
         reselect = FALSE;
 
-        if ((editable->selection_start_pos != editable->selection_end_pos) && 
+        if (gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel) && 
             (!item_edit->has_selection || 
              (selection_data->selection == clipboard_atom)))
         {
                 reselect = TRUE;
 
-                gtk_editable_delete_text(editable,
-                                         MIN(editable->selection_start_pos,
-                                             editable->selection_end_pos),
-                                         MAX(editable->selection_start_pos,
-                                             editable->selection_end_pos));
+                gtk_editable_delete_text(editable, start_sel, end_sel);
         }
 
-        tmp_pos = old_pos = editable->current_pos;
+        tmp_pos = old_pos = gtk_editable_get_position (editable);
 
         switch (type)
         {
@@ -1772,7 +1769,7 @@
         if (!reselect)
                 return;
 
-        gtk_editable_select_region(editable, old_pos, editable->current_pos);
+        gtk_editable_select_region(editable, old_pos, gtk_editable_get_position (editable));
 }
 
 
@@ -1781,3 +1778,5 @@
   c-basic-offset: 8
   End:
 */
+
+
Index: formulacell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/formulacell-gnome.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/register/register-gnome/formulacell-gnome.c -Lsrc/register/register-gnome/formulacell-gnome.c -u -r1.3 -r1.4
--- src/register/register-gnome/formulacell-gnome.c
+++ src/register/register-gnome/formulacell-gnome.c
@@ -21,9 +21,9 @@
 /* formulacell-gnome.c
  *
  * Implements Gnome-dependent formula-cell functions :
- * 
- * Often the decimal key in the keypad is not mapped to the correct locale 
- * decimal point, the function PriceDirect handle this case.  
+ *
+ * Often the decimal key in the keypad is not mapped to the correct locale
+ * decimal point, the function PriceDirect handle this case.
  */
 
 #include "config.h"
@@ -31,7 +31,7 @@
 #include <gnome.h>
 #include <locale.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 
 #include "gnc-exp-parser.h"
 #include "gnc-ui-util.h"
@@ -39,7 +39,7 @@
 #include "formulacell.h"
 #include "formulacell-gnome.h"
 
-static short module = MOD_REGISTER;
+static QofLogModule log_module = GNC_MOD_REGISTER;
 
 static
 gboolean
@@ -53,9 +53,11 @@
     GdkEventKey *event = gui_data;
     char decimal_point;
     struct lconv *lc;
-    GdkWChar *newval;
+    GString *newval_gs;
     gboolean is_return;
     int i;
+    const gchar *c;
+    gunichar uc;
 
     if (event->type != GDK_KEY_PRESS)
         return FALSE;
@@ -96,28 +98,38 @@
     else
         decimal_point = lc->decimal_point[0];
 
-    /* allocate space for newval_ptr : oldval + one letter ( the
-       decimal_point ) */
-    newval = g_new( GdkWChar, bcell->value_len + 2 );
-
-    /* copy oldval up to the cursor position */
-    for (i = 0; i < *cursor_position; i++)
-        newval[i] = bcell->value_w[i];
-
+    newval_gs = g_string_new ("");
+    c = bcell->value;
+    i = 0;
+    
+    /* copy original value up to cursor position */
+    while (*c && (i < *cursor_position))
+    {
+        uc = g_utf8_get_char (c);
+        g_string_append_unichar (newval_gs, uc);
+        c = g_utf8_next_char (c);
+        i++;
+    }
+    
     /* insert the decimal_point at cursor position */
-    newval[*cursor_position] = decimal_point;
-
-    for (i = *cursor_position + 1; i < bcell->value_len + 1; i++)
-        newval[i] = bcell->value_w[i - 1];
-
-    newval[bcell->value_len + 1] = 0;
+    g_string_append_c (newval_gs, decimal_point);
+	i++;
+    c = g_utf8_next_char (c);
+    
+    /* copy rest of original value */
+    while (*c)
+    {
+        uc = g_utf8_get_char (c);
+        g_string_append_unichar (newval_gs, uc);
+        c = g_utf8_next_char (c);
+    }
 
     /* update the cursor position */
     (*cursor_position)++;
 
-    gnc_basic_cell_set_wcvalue_internal( bcell, newval );
+    gnc_basic_cell_set_value_internal( bcell, newval_gs->str );
 
-    g_free (newval);
+    g_string_free (newval_gs, TRUE);
 
     return TRUE;
 }
Index: table-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/table-gnome.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/register/register-gnome/table-gnome.c -Lsrc/register/register-gnome/table-gnome.c -u -r1.13 -r1.14
--- src/register/register-gnome/table-gnome.c
+++ src/register/register-gnome/table-gnome.c
@@ -45,20 +45,22 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "global-options.h"
 #include "gnucash-sheet.h"
 #include "gnucash-style.h"
 #include "table-allgui.h"
 #include "table-gnome.h"
 #include "guile-mappings.h"
+#include "gnc-gconf-utils.h"
 
+#define GCONF_SECTION "window/pages/register"
 
 void
 gnc_table_save_state (Table *table)
 {
         GnucashSheet *sheet;
         GNCHeaderWidths widths;
-        SCM alist;
+	GList *node;
+	gchar *key;
 
         if (!table)
                 return;
@@ -66,41 +68,32 @@
         if (table->ui_data == NULL)
                 return;
 
+	if (!gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL))
+		return;
+
         sheet = GNUCASH_SHEET (table->ui_data);
 
         widths = gnc_header_widths_new ();
 
-        if (!GTK_OBJECT_DESTROYED(GTK_OBJECT(sheet)))
-                gnucash_sheet_get_header_widths (sheet, widths);
-
-        alist = SCM_EOL;
-        if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-        {
-                GList *node = gnc_table_layout_get_cells (table->layout);
-
-                for (; node; node = node->next)
-                {
-                        BasicCell *cell = node->data;
-                        int width;
-                        SCM assoc;
-
-                        width = gnc_header_widths_get_width (widths,
-                                                             cell->cell_name);
-                        if (width <= 0)
-                                continue;
-
-                        if (cell->expandable)
-                                continue;
-
-                        assoc = scm_cons (scm_makfrom0str(cell->cell_name),
-					  scm_int2num(width));
-
-                        alist = scm_cons (assoc, alist);
-                }
-        }
+        gnucash_sheet_get_header_widths (sheet, widths);
 
-        if (!SCM_NULLP (alist))
-                gnc_set_option ("__gui", "reg_column_widths", alist);
+	node = gnc_table_layout_get_cells (table->layout);
+	for (; node; node = node->next) {
+		BasicCell *cell = node->data;
+		int width;
+
+		width = gnc_header_widths_get_width (widths, cell->cell_name);
+		if (width <= 0)
+			continue;
+
+		if (cell->expandable)
+			continue;
+
+		/* Remember whether the column is visible */
+		key = g_strdup_printf("%s_width", cell->cell_name);
+		gnc_gconf_set_int(GCONF_SECTION, key, width, NULL);
+		g_free(key);
+	}
 
         gnc_header_widths_destroy (widths);
 }
@@ -134,7 +127,7 @@
 
         sheet = GNUCASH_SHEET (table->ui_data);
 
-        gtk_widget_unref (GTK_WIDGET(sheet));
+        g_object_unref (sheet);
 
         table->ui_data = NULL;
 }
@@ -146,7 +139,9 @@
         GnucashSheet *sheet;
         GnucashRegister *greg;
         Table *table;
-        SCM alist;
+	GList *node;
+	gchar *key;
+	guint value;
 
         g_return_if_fail (widget != NULL);
         g_return_if_fail (GNUCASH_IS_REGISTER (widget));
@@ -160,37 +155,28 @@
         table->gui_handlers.destroy = table_destroy_cb;
         table->ui_data = sheet;
 
-        gtk_widget_ref (GTK_WIDGET(sheet));
+        g_object_ref (sheet);
 
         /* config the cell-block styles */
 
         widths = gnc_header_widths_new ();
 
-        if (gnc_lookup_boolean_option("_+Advanced", "Save Window Geometry", TRUE))
-                alist = gnc_lookup_option ("__gui", "reg_column_widths",
-                                           SCM_EOL);
-        else
-                alist = SCM_EOL;
-
-        while (SCM_LISTP (alist) && !SCM_NULLP (alist))
-        {
-                char *name;
-                SCM assoc;
-
-                assoc = SCM_CAR (alist);
-                alist = SCM_CDR (alist);
-
-                name = gh_scm2newstr(SCM_CAR (assoc), NULL);
-                if (!name)
-                        continue;
-
-                gnc_header_widths_set_width (widths, name,
-                                             scm_num2int(SCM_CDR (assoc),
-							 SCM_ARG1,
-							 __FUNCTION__));
-
-                free (name);
-        }
+	if (gnc_gconf_get_bool(GCONF_GENERAL, KEY_SAVE_GEOMETRY, NULL)) {
+		node = gnc_table_layout_get_cells (table->layout);
+		for (; node; node = node->next) {
+			BasicCell *cell = node->data;
+
+			if (cell->expandable)
+				continue;
+
+			/* Remember whether the column is visible */
+			key = g_strdup_printf("%s_width", cell->cell_name);
+			value = gnc_gconf_get_int(GCONF_SECTION, key, NULL);
+			if (value != 0)
+				gnc_header_widths_set_width (widths, cell->cell_name, value);
+			g_free(key);
+		}
+	}
 
         gnucash_sheet_create_styles (sheet);
 
Index: pricecell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/pricecell-gnome.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/register/register-gnome/pricecell-gnome.c -Lsrc/register/register-gnome/pricecell-gnome.c -u -r1.6 -r1.7
--- src/register/register-gnome/pricecell-gnome.c
+++ src/register/register-gnome/pricecell-gnome.c
@@ -48,9 +48,11 @@
     GdkEventKey *event = gui_data;
     char decimal_point;
     struct lconv *lc;
-    GdkWChar *newval;
+    GString *newval_gs;
     gboolean is_return;
     int i;
+    const char *c;
+    gunichar uc;
 
     if (event->type != GDK_KEY_PRESS)
 	return FALSE;
@@ -118,27 +120,38 @@
 
     /* allocate space for newval_ptr : oldval + one letter ( the
        decimal_point ) */
-    newval = g_new (GdkWChar, bcell->value_len + 2);
-
+    newval_gs = g_string_new("");
     /* copy oldval up to the cursor position */
-    for (i = 0; i < *cursor_position; i++)
-        newval[i] = bcell->value_w[i];
+    i = 0;
+    c = bcell->value;
+    while (*c && (i < *cursor_position))
+    {
+        uc = g_utf8_get_char (c);
+        g_string_append_unichar (newval_gs, uc);
+        c = g_utf8_next_char (c);
+        i++;
+    }
 
     /* insert the decimal_point at cursor position */
-    newval[*cursor_position] = decimal_point;
-
-    for (i = *cursor_position + 1; i < bcell->value_len + 1; i++)
-        newval[i] = bcell->value_w[i - 1];
-
-    newval[bcell->value_len + 1] = 0;
+    g_string_append_c (newval_gs, decimal_point);
+    i++;
+    c = g_utf8_next_char (c);
+    
+    /* copy oldval after cursor position */
+    while (*c) 
+    {
+        uc = g_utf8_get_char (c);
+        g_string_append_unichar (newval_gs, uc);
+        c = g_utf8_next_char (c);
+    }
 
     /* update the cursor position */
     (*cursor_position)++;
 
-    gnc_basic_cell_set_wcvalue_internal (bcell, newval);
-
-    g_free (newval);
+    gnc_basic_cell_set_value_internal (bcell, newval_gs->str);
 
+    g_string_free (newval_gs, TRUE);
+    
     cell->need_to_parse = TRUE;
 
     return TRUE;
Index: gnucash-style.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-style.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lsrc/register/register-gnome/gnucash-style.c -Lsrc/register/register-gnome/gnucash-style.c -u -r1.10 -r1.11
--- src/register/register-gnome/gnucash-style.c
+++ src/register/register-gnome/gnucash-style.c
@@ -31,23 +31,13 @@
 #include "gnucash-item-edit.h"
 #include "gnucash-style.h"
 #include "messages.h"
-#include "gnc-engine-util.h"
+#include "gnc-gconf-utils.h"
+#include "gnc-engine.h"
 
 /** GLOBALS *********************************************************/
 /* This static indicates the debugging module that this .o belongs to.  */
-static short module = MOD_GUI;
-
 #define DEFAULT_STYLE_WIDTH 680
 
-GdkFont *gnucash_register_font = NULL;
-GdkFont *gnucash_register_hint_font = NULL;
-
-static char *register_font_name = NULL;
-static char *register_hint_font_name = NULL;
-
-static gboolean use_vertical_lines = TRUE;
-static gboolean use_horizontal_lines = TRUE;
-
 
 static gpointer
 style_get_key (SheetBlockStyle *style)
@@ -160,11 +150,13 @@
 set_dimensions_pass_one (GnucashSheet *sheet, CellBlock *cursor,
                          BlockDimensions *dimensions)
 {
-        GdkFont *font = GNUCASH_GRID(sheet->grid)->normal_font;
+        /* GdkFont *font = GNUCASH_GRID(sheet->grid)->normal_font; */
         CellDimensions *cd;
         int row, col;
+	gint default_height = 0, max_height = -1;
+	PangoLayout *layout;
 
-        g_return_if_fail (font != NULL);
+        /* g_return_if_fail (font != NULL); */
 
         for (row = 0; row < cursor->num_rows; row++)
         {
@@ -177,11 +169,10 @@
                         cd = g_table_index (dimensions->cell_dimensions,
                                             row, col);
 
-                        cd->pixel_height = (font->ascent + font->descent +
-                                            (2 * CELL_VPADDING));
+                        /*cd->pixel_height = (font->ascent + font->descent +
+                                            (2 * CELL_VPADDING));*/
+			/* cd->pixel_height = (2 * CELL_VPADDING); */
 
-                        if (cd->pixel_width > 0)
-                                continue;
 
                         cell = gnc_cellblock_get_cell (cursor, row, col);
                         if (!cell)
@@ -193,22 +184,49 @@
 
                         if (text)
                         {
-                                width = gdk_string_width (font, text);
+				layout = gtk_widget_create_pango_layout (GTK_WIDGET (sheet), text);
+                                /* width = gdk_string_width (font, text); */
+				cd->pixel_height = 0;
+				pango_layout_get_pixel_size (layout, &width, &cd->pixel_height);
+				g_object_unref (layout);
                                 width += 2 * CELL_HPADDING;
                         }
                         else
+			{
                                 width = 0;
+				cd->pixel_height = (2 * CELL_VPADDING);
+			}
+
+			if (default_height == 0)
+				default_height = cd->pixel_height;
+			if (max_height < 0)
+				max_height = cd->pixel_height;
+			else
+				max_height = MAX(max_height, cd->pixel_height);
+
+                        if (cd->pixel_width > 0)
+                                continue;
 
                         if (cell && cell->is_popup)
-                                width += item_edit_get_toggle_offset
+                                width += gnc_item_edit_get_toggle_offset
                                         (cd->pixel_height);
 
                         cd->pixel_width = MAX (cd->pixel_width, width);
                 }
 
                 cd = g_table_index (dimensions->cell_dimensions, row, 0);
-                dimensions->height += cd->pixel_height;
+                dimensions->height += max_height;
         }
+
+        for (row = 0; row < cursor->num_rows; row++)
+        {
+                for (col = 0; col < cursor->num_cols; col++)
+                {
+                        cd = g_table_index (dimensions->cell_dimensions,
+                                            row, col);
+			cd->pixel_height = max_height;
+		}
+	}
 }
 
 
@@ -268,7 +286,7 @@
                 }
         else if (width > default_width && width == sheet->window_width)
         {
-                GdkFont *font = GNUCASH_GRID(sheet->grid)->normal_font;
+                /*GdkFont *font = GNUCASH_GRID(sheet->grid)->normal_font;*/
 
                 for (col = 0; col < num_cols; col++)
                 {
@@ -276,6 +294,7 @@
                         const char *text;
                         int sample_width;
                         int old_width;
+			PangoLayout *layout;
 
                         cell = gnc_cellblock_get_cell (cursor, 0, col);
 
@@ -291,7 +310,10 @@
                         text = cell->sample_text;
                         if (text)
                         {
-                                sample_width = gdk_string_width (font, text);
+				layout = gtk_widget_create_pango_layout (GTK_WIDGET (sheet), text);
+				pango_layout_get_pixel_size (layout, &sample_width, NULL);
+				g_object_unref (layout);
+                                /*sample_width = gdk_string_width (font, text);*/
                                 sample_width += 2 * CELL_HPADDING;
                         }
                         else
@@ -544,15 +566,6 @@
 
 
 void
-gnucash_style_config_register_borders (gboolean use_vertical_lines_in,
-                                       gboolean use_horizontal_lines_in)
-{
-        use_vertical_lines = use_vertical_lines_in;
-        use_horizontal_lines = use_horizontal_lines_in;
-}
-
-
-void
 gnucash_sheet_get_borders (GnucashSheet *sheet, VirtualLocation virt_loc,
                            PhysicalCellBorders *borders)
 {
@@ -562,13 +575,13 @@
         g_return_if_fail (sheet != NULL);
         g_return_if_fail (GNUCASH_IS_SHEET (sheet));
 
-        line_style = use_horizontal_lines ?
+        line_style = sheet->use_horizontal_lines ?
                 CELL_BORDER_LINE_NORMAL : CELL_BORDER_LINE_NONE;
 
         borders->top    = line_style;
         borders->bottom = line_style;
 
-        line_style = use_vertical_lines ?
+        line_style = sheet->use_vertical_lines ?
                 CELL_BORDER_LINE_NORMAL : CELL_BORDER_LINE_NONE;
 
         borders->left  = line_style;
@@ -789,97 +802,6 @@
                 g_warning ("Unbalanced Style ref/unref");
 }
 
-static GdkFont *
-gnucash_font_load (const char *name)
-{
-        GdkFont *font;
-
-        font = gdk_fontset_load (name);
-        if (font) return font;
-
-        return gdk_font_load (name);
-}
-
-static const char *
-gnucash_style_get_default_register_font_name (void)
-{
-        return _("register-default-font:-adobe-helvetica-medium-r-normal--*-120-*-*-*-*-*-*") + 22;
-}
-
-static const char *
-gnucash_style_get_default_register_hint_font_name (void)
-{
-        return _("register-hint-font:-adobe-helvetica-medium-o-normal--*-120-*-*-*-*-*-*") + 19;
-}
-
-void
-gnucash_style_set_register_font_name (const char *name)
-{
-	GdkFont *new_font = NULL;
-
-	if (name != NULL) {
-		new_font = gnucash_font_load (name);
-		if (new_font == NULL) {
-			PWARN("Cannot load font: %s\n", name);
-		}
-	}
-
-	if (new_font == NULL)
-	{
-		name = gnucash_style_get_default_register_font_name ();
-		new_font = gnucash_font_load (name);
-		if (new_font == NULL) {
-			FATAL("Cannot load fallback font: %s\n", name);
-			return;
-		}
-	}
-
-	if (gnucash_register_font != NULL)
-		gdk_font_unref (gnucash_register_font);
-	if (register_font_name != NULL)
-		g_free (register_font_name);
-
-	gnucash_register_font = new_font;
-	gdk_font_ref (gnucash_register_font);
-	register_font_name = g_strdup (name);
-
-	g_assert (gnucash_register_font != NULL);
-}
-
-void
-gnucash_style_set_register_hint_font_name (const char *name)
-{
-	GdkFont *new_font = NULL;
-
-	if (name != NULL) {
-		new_font = gnucash_font_load (name);
-		if (new_font == NULL) {
-			PWARN("Cannot load font: %s\n", name);
-		}
-	}
-
-	if (new_font == NULL)
-	{
-		name = gnucash_style_get_default_register_hint_font_name ();
-		new_font = gnucash_font_load (name);
-		if (new_font == NULL) {
-			FATAL("Cannot load fallback font: %s\n", name);
-			return;
-		}
-	}
-
-	if (gnucash_register_hint_font != NULL)
-		gdk_font_unref (gnucash_register_hint_font);
-	if (register_hint_font_name != NULL)
-		g_free (register_hint_font_name);
-
-	gnucash_register_hint_font = new_font;
-	gdk_font_ref (gnucash_register_hint_font);
-	register_hint_font_name = g_strdup (name);
-
-	g_assert (gnucash_register_hint_font != NULL);
-}
-
 typedef struct
 {
         char *cell_name;
@@ -1025,14 +947,7 @@
 gboolean
 gnucash_style_init (void)
 {
-        if (gnucash_register_font == NULL)
-                gnucash_style_set_register_font_name(NULL);
-
-        if (gnucash_register_hint_font == NULL)
-                gnucash_style_set_register_hint_font_name(NULL);
-
-	return ((gnucash_register_font != NULL) &&
-		(gnucash_register_hint_font != NULL));
+	return TRUE;
 }
 
 
Index: gnucash-grid.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-grid.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/register-gnome/gnucash-grid.c -Lsrc/register/register-gnome/gnucash-grid.c -u -r1.2 -r1.3
--- src/register/register-gnome/gnucash-grid.c
+++ src/register/register-gnome/gnucash-grid.c
@@ -38,8 +38,8 @@
 
 /* Our arguments */
 enum {
-        ARG_0,
-        ARG_SHEET
+        PROP_0,
+        PROP_SHEET
 };
 
 
@@ -115,9 +115,6 @@
         item->y1 = 0;
         item->x2 = INT_MAX/2 -1;
         item->y2 = INT_MAX/2 -1;
-
-        gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent),
-					 item);
 }
 
 
@@ -259,7 +256,7 @@
                 int x1, int y1, int x2, int y2,
                 PhysicalCellBorderLineStyle style);
 
-G_INLINE_FUNC void
+void
 draw_cell_line (GdkDrawable *drawable,
                 GdkGC *gc, GdkColor *bg_color,
                 int x1, int y1, int x2, int y2,
@@ -364,18 +361,28 @@
         Table *table = grid->sheet->table;
         PhysicalCellBorders borders;
         const char *text;
-        GdkFont *font;
+	PangoLayout *layout;
+	PangoContext *context;
+	PangoFontDescription *font;
+	PangoRectangle ink_rect;
         GdkColor *bg_color;
         GdkColor *fg_color;
-        gint x_offset, y_offset;
+/*        gint x_offset, y_offset;*/
         GdkRectangle rect;
         gboolean hatching;
-        guint32 argb;
+        guint32 argb, color_type;
+        int x_offset;
 
         gdk_gc_set_background (grid->gc, &gn_white);
 
-        argb = gnc_table_get_bg_color (table, virt_loc, &hatching);
-        bg_color = gnucash_color_argb_to_gdk (argb);
+	if (grid->sheet->use_theme_colors) {
+		color_type = gnc_table_get_gtkrc_bg_color (table, virt_loc,
+							   &hatching);
+		bg_color = get_gtkrc_color(grid->sheet, color_type);
+	} else {
+		argb = gnc_table_get_bg_color (table, virt_loc, &hatching);
+		bg_color = gnucash_color_argb_to_gdk (argb);
+	}
 
         gdk_gc_set_foreground (grid->gc, bg_color);
         gdk_draw_rectangle (drawable, grid->gc, TRUE,
@@ -448,65 +455,86 @@
 
         text = gnc_table_get_entry (table, virt_loc);
 
-        font = grid->normal_font;
+	layout = gtk_widget_create_pango_layout (GTK_WIDGET (grid->sheet), text);
+	// We don't need word wrap or line wrap
+	pango_layout_set_width (layout, -1);
+        context = pango_layout_get_context (layout);
+	font = pango_font_description_copy (pango_context_get_font_description (context));
 
         argb = gnc_table_get_fg_color (table, virt_loc);
         fg_color = gnucash_color_argb_to_gdk (argb);
 
         gdk_gc_set_foreground (grid->gc, fg_color);
 
+	/* If this is the currently open transaction and
+	   there is no text in this cell */
         if ((table->current_cursor_loc.vcell_loc.virt_row ==
              virt_loc.vcell_loc.virt_row) &&
 	    (!text || strlen(text) == 0)) {
-                font = grid->italic_font;
-                gdk_gc_set_foreground (grid->gc, &gn_light_gray);
                 text = gnc_table_get_label (table, virt_loc);
-        }
+		if ((text == NULL) || (*text == '\0'))
+			goto exit;
+                gdk_gc_set_foreground (grid->gc, &gn_light_gray);
+		pango_layout_set_text (layout, text, strlen (text));
+		pango_font_description_set_style (font, PANGO_STYLE_ITALIC);
+		pango_context_set_font_description (context, font);
+	}
 
-        if ((text == NULL) || (*text == '\0'))
-                return;
+        if ((text == NULL) || (*text == '\0')) {
+                goto exit;
+	}
 
-        y_offset = ((height / 2) +
+        /*y_offset = ((height / 2) +
                     (((font->ascent + font->descent) / 2) - font->descent));
-        y_offset++;
+        y_offset++;*/
+
+	pango_layout_get_pixel_extents(layout,
+				       &ink_rect,
+				       NULL);
+
+        rect.x      = x + CELL_HPADDING;
+        rect.y      = y + CELL_VPADDING;
+        rect.width  = MAX (0, width - (2 * CELL_HPADDING));
+        rect.height = height - 2;
+
+        gdk_gc_set_clip_rectangle (grid->gc, &rect);
+
 
         switch (gnc_table_get_align (table, virt_loc))
         {
                 default:
                 case CELL_ALIGN_LEFT:
-                        x_offset = CELL_HPADDING;
+			x_offset = 0;
                         break;
 
                 case CELL_ALIGN_RIGHT:
-                        x_offset = width - CELL_HPADDING
-                                - gdk_string_measure (font, text);
+			x_offset = width - 2 * CELL_HPADDING - ink_rect.width;
                         break;
 
                 case CELL_ALIGN_CENTER:
-                        if (width < gdk_string_measure (font, text))
-                                x_offset = CELL_HPADDING;
-                        else {
-                                x_offset = width / 2;
-                                x_offset -= gdk_string_measure(font, text) / 2;
-                        }
+			if (ink_rect.width > width - 2 * CELL_HPADDING)
+				x_offset = 0;
+			else
+				x_offset = (width - 2 * CELL_HPADDING - 
+					    ink_rect.width) / 2;
                         break;
-                }
+	}
 
-        rect.x      = x + CELL_HPADDING;
-        rect.y      = y + 1;
-        rect.width  = MAX (0, width - (2 * CELL_HPADDING));
-        rect.height = height - 2;
 
-        gdk_gc_set_clip_rectangle (grid->gc, &rect);
 
-        gdk_draw_string (drawable,
-                         font,
+        gdk_draw_layout (drawable,
                          grid->gc,
-                         x + x_offset,
-                         y + y_offset,
-                         text);
+                         x + CELL_HPADDING + x_offset,
+                         y + 1,
+                         layout);
 
         gdk_gc_set_clip_rectangle (grid->gc, NULL);
+
+ exit:
+	pango_font_description_set_style (font, PANGO_STYLE_NORMAL);
+	pango_context_set_font_description (context, font);
+	pango_font_description_free (font);
+	g_object_unref (layout);
 }
 
 static void
@@ -604,17 +632,6 @@
 
 
 static void
-gnucash_grid_destroy (GtkObject *object)
-{
-	GNUCASH_GRID(object);
-
-        if (GTK_OBJECT_CLASS (gnucash_grid_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS
-		 (gnucash_grid_parent_class)->destroy)(object);
-}
-
-
-static void
 gnucash_grid_init (GnucashGrid *grid)
 {
         GnomeCanvasItem *item = GNOME_CANVAS_ITEM (grid);
@@ -627,75 +644,109 @@
         grid->top_block  = 0;
         grid->top_offset = 0;
         grid->left_offset = 0;
+}
+
+
+static void
+gnucash_grid_set_property (GObject         *object,
+                             guint            prop_id,
+                             const GValue    *value,
+                             GParamSpec      *pspec)
+{
+        GnomeCanvasItem *item;
+        GnucashGrid *grid;
+
+        item = GNOME_CANVAS_ITEM (object);
+        grid = GNUCASH_GRID (object);
 
-        grid->normal_font = gnucash_register_font;
-        grid->italic_font = gnucash_register_hint_font;
+        switch (prop_id){
+                case PROP_SHEET:
+                        grid->sheet = 
+                                GNUCASH_SHEET (g_value_get_object (value));
+                        break;
+                default:
+                        break;
+        }
 }
 
 
 static void
-gnucash_grid_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
+gnucash_grid_get_property (GObject         *object,
+                             guint            prop_id,
+                             GValue          *value,
+                             GParamSpec      *pspec)
 {
         GnomeCanvasItem *item;
         GnucashGrid *grid;
 
-        item = GNOME_CANVAS_ITEM (o);
-        grid = GNUCASH_GRID (o);
+        item = GNOME_CANVAS_ITEM (object);
+        grid = GNUCASH_GRID (object);
 
-        switch (arg_id){
-        case ARG_SHEET:
-                grid->sheet = GTK_VALUE_POINTER (*arg);
-                break;
+        switch (prop_id){
+                case PROP_SHEET:
+                        g_value_set_object (value, grid->sheet);
+                        break;
+                default:
+                        break;
         }
 }
 
 
 static void
-gnucash_grid_class_init (GnucashGridClass *grid_class)
+gnucash_grid_class_init (GnucashGridClass *class)
 {
-        GtkObjectClass  *object_class;
+        GObjectClass  *object_class;
         GnomeCanvasItemClass *item_class;
 
-        gnucash_grid_parent_class =
-		gtk_type_class (gnome_canvas_item_get_type());
+        object_class = G_OBJECT_CLASS (class);
+        item_class = GNOME_CANVAS_ITEM_CLASS (class);
 
-        object_class = (GtkObjectClass *) grid_class;
-        item_class = (GnomeCanvasItemClass *) grid_class;
+        gnucash_grid_parent_class = g_type_class_peek_parent (class);
 
-        gtk_object_add_arg_type ("GnucashGrid::Sheet", GTK_TYPE_POINTER,
-                                 GTK_ARG_WRITABLE, ARG_SHEET);
-
-        object_class->set_arg = gnucash_grid_set_arg;
-        object_class->destroy = gnucash_grid_destroy;
+        /* GObject method overrides */
+        object_class->set_property = gnucash_grid_set_property;
+        object_class->get_property = gnucash_grid_get_property;
 
         /* GnomeCanvasItem method overrides */
         item_class->update      = gnucash_grid_update;
         item_class->realize     = gnucash_grid_realize;
         item_class->unrealize   = gnucash_grid_unrealize;
         item_class->draw        = gnucash_grid_draw;
+        
+        /* properties */
+        g_object_class_install_property 
+                        (object_class,
+                         PROP_SHEET,
+                         g_param_spec_object ("sheet",
+                                              "Sheet Value",
+                                              "Sheet Value",
+                                              GNUCASH_TYPE_SHEET,
+                                              G_PARAM_READWRITE));
 }
 
 
-GtkType
+GType
 gnucash_grid_get_type (void)
 {
-        static GtkType gnucash_grid_type = 0;
+        static GType gnucash_grid_type = 0;
 
         if (!gnucash_grid_type) {
-                GtkTypeInfo gnucash_grid_info = {
-                        "GnucashGrid",
-                        sizeof (GnucashGrid),
+                static const GTypeInfo gnucash_grid_info = {
                         sizeof (GnucashGridClass),
-                        (GtkClassInitFunc) gnucash_grid_class_init,
-                        (GtkObjectInitFunc) gnucash_grid_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+                        (GClassInitFunc) gnucash_grid_class_init,
+			NULL,		/* class_finalize */
+			NULL,		/* class_data */
+                        sizeof (GnucashGrid),
+			0,		/* n_preallocs */
+                        (GInstanceInitFunc) gnucash_grid_init
                 };
 
                 gnucash_grid_type =
-			gtk_type_unique (gnome_canvas_item_get_type (),
-					 &gnucash_grid_info);
+			g_type_register_static (gnome_canvas_item_get_type (),
+						"GnucashGrid",
+						&gnucash_grid_info, 0);
         }
 
         return gnucash_grid_type;
Index: gnucash-item-list.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-item-list.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/register-gnome/gnucash-item-list.c -Lsrc/register/register-gnome/gnucash-item-list.c -u -r1.2 -r1.3
--- src/register/register-gnome/gnucash-item-list.c
+++ src/register/register-gnome/gnucash-item-list.c
@@ -28,14 +28,13 @@
 
 #include <gnome.h>
 
-#include "gnc-engine-util.h"
+#include "gnc-engine.h"
 #include "gnucash-item-list.h"
 #include "gnucash-scrolled-window.h"
 
 
 /* Item list signals */
-enum
-{
+enum {
   SELECT_ITEM,
   CHANGE_ITEM,
   ACTIVATE_ITEM,
@@ -43,117 +42,145 @@
   LAST_SIGNAL
 };
 
-/* Item list arguments */
-enum
-{
-        ARG_0
-};
-
 
 static GnomeCanvasWidgetClass *gnc_item_list_parent_class;
 static guint gnc_item_list_signals[LAST_SIGNAL];
 
-
-void
-gnc_item_list_clear(GNCItemList *item_list)
-{
-	g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
-	g_return_if_fail(item_list->clist != NULL);
-
-	gtk_clist_clear(item_list->clist);
-}
+gboolean _gnc_item_find_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data);
 
 
 void
-gnc_item_list_append(GNCItemList *item_list, char *string)
+gnc_item_list_clear (GncItemList *item_list)
 {
-	char *text[2] = {NULL, NULL};
+	GtkTreeSelection* selection;
 
 	g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
-	g_return_if_fail(item_list->clist != NULL);
-	g_return_if_fail(string != NULL);
+	g_return_if_fail(item_list->list_store != NULL);
 
-	text[0] = string;
+	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (item_list->tree_view));
 
-	gtk_clist_append(item_list->clist, text);
+        g_signal_handlers_block_matched (G_OBJECT (selection), G_SIGNAL_MATCH_DATA,
+					 0, 0, NULL, NULL, item_list);
+	gtk_list_store_clear (item_list->list_store);
+        g_signal_handlers_unblock_matched (G_OBJECT (selection), G_SIGNAL_MATCH_DATA,
+					 0, 0, NULL, NULL, item_list);
 }
 
 
 void
-gnc_item_list_select(GNCItemList *item_list, const char *string)
+gnc_item_list_append (GncItemList *item_list, char *string)
 {
-	gint row = 0;
-	gchar *text;
+	GtkTreeIter iter;
 
-	g_return_if_fail(item_list != NULL);
 	g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
+	g_return_if_fail(item_list->list_store != NULL);
+	g_return_if_fail(string != NULL);
 
-	if (string == NULL) {
-		gtk_clist_unselect_all(item_list->clist);
-		return;
-	}
+	gtk_list_store_append (item_list->list_store, &iter);
+	gtk_list_store_set (item_list->list_store, &iter, 0, string, -1);
+}
 
-	while (gtk_clist_get_text(item_list->clist, row, 0, &text)) {
 
-		if (safe_strcmp(string, text) != 0) {
-			row++;
-			continue;
-		}
-
-                gtk_clist_freeze(item_list->clist);
-                item_list->clist->focus_row = row;
-		gtk_clist_select_row(item_list->clist, row, 0);
-                gtk_clist_thaw(item_list->clist);
+typedef struct _findSelectionData
+{
+        GncItemList *item_list;
+        const char *string_to_find;
+        GtkTreePath *found_path;
+} FindSelectionData;
 
-                gnc_item_list_show_selected(item_list);
+gboolean
+_gnc_item_find_selection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
+{
+        FindSelectionData *to_find = (FindSelectionData*)data;
+        gchar *iterStr;
 
-		return;
-	}
+        gtk_tree_model_get(model, iter, 0, &iterStr, -1);
+        if (safe_strcmp(to_find->string_to_find, iterStr) == 0)
+        {
+                to_find->found_path = gtk_tree_path_copy(path);
+                return TRUE;
+        }
+        return FALSE;
 }
 
-
 void
-gnc_item_list_show_selected(GNCItemList *item_list)
+gnc_item_list_select (GncItemList *item_list, const char *string)
 {
-	GtkVisibility visibility;
-        gint row;
+        GtkTreeSelection *tree_sel = NULL;
+        FindSelectionData *to_find_data;
 
-	g_return_if_fail(item_list != NULL);
-	g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
+        g_return_if_fail(item_list != NULL);
+        g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
+
+        tree_sel = gtk_tree_view_get_selection(item_list->tree_view);
 
-        row = item_list->clist->focus_row;
+        if (string == NULL)
+        {
+                gtk_tree_selection_unselect_all(tree_sel);
+                return;
+        }
+
+        to_find_data = (FindSelectionData*)g_new0(FindSelectionData, 1);
+        to_find_data->item_list = item_list;
+        to_find_data->string_to_find = string;
+
+        gtk_tree_model_foreach(GTK_TREE_MODEL(item_list->list_store),
+                               _gnc_item_find_selection,
+                               to_find_data);
+
+        if (to_find_data->found_path != NULL)
+        {
+                gtk_tree_view_set_cursor(item_list->tree_view, to_find_data->found_path, NULL, FALSE);
+                gtk_tree_path_free(to_find_data->found_path);
 
-        visibility = gtk_clist_row_is_visible(item_list->clist, row);
+                gnc_item_list_show_selected(item_list);
+        }
 
-        if (visibility != GTK_VISIBILITY_FULL)
-                gtk_clist_moveto(item_list->clist, row, 0, 0.5, 0.0);
+        g_free(to_find_data);
 }
 
 
 void
-gnc_item_list_sort(GNCItemList *item_list)
+gnc_item_list_show_selected (GncItemList *item_list)
 {
+        GtkTreeSelection *selection;
+        GtkTreeIter iter;
+        GtkTreePath *path;
+        GtkTreeModel *model;
+
         g_return_if_fail(item_list != NULL);
-	g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
+        g_return_if_fail(IS_GNC_ITEM_LIST(item_list));
 
-        gtk_clist_sort(item_list->clist);
-}
+        selection = gtk_tree_view_get_selection (item_list->tree_view);
+
+        if (gtk_tree_selection_get_selected (selection, &model, &iter))
+        {
+                path = gtk_tree_model_get_path (model, &iter);
 
+                gtk_tree_view_scroll_to_cell (item_list->tree_view, 
+                                              path, NULL, TRUE, 0.5, 0.0); 
+        }
+}
 
 int
-gnc_item_list_autosize(GNCItemList *item_list)
+gnc_item_list_autosize (GncItemList *item_list)
 {
         g_return_val_if_fail(item_list != NULL, 0);
         g_return_val_if_fail(IS_GNC_ITEM_LIST(item_list), 0);
 
-        return gtk_clist_columns_autosize(item_list->clist);
+#if 0
+        return gtk_clist_columns_autosize (item_list->clist);
+#endif
+        return 100;
 }
 
 
 static void
-gnc_item_list_init(GNCItemList *item_list)
+gnc_item_list_init (GncItemList *item_list)
 {
-        item_list->clist = NULL;
+        item_list->tree_view = NULL;
+        item_list->list_store = NULL;
+        item_list->frame = NULL;
 }
 
 
@@ -161,71 +188,75 @@
 gnc_item_list_button_event(GtkWidget *widget, GdkEventButton *event,
 			   gpointer data)
 {
-	/* So the sheet doesn't use it. */
-	gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "button_press_event");
-
-	return TRUE;
-}
+        GncItemList *item_list;
+        GtkTreeIter iter;
+        GtkTreePath *path;
+        GtkTreeModel *model;
+        gchar *string;
 
+        g_return_val_if_fail(IS_GNC_ITEM_LIST (data), FALSE);
 
-static gboolean
-gnc_clist_button_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
-{
-        GtkAdjustment *vadj;
-        gfloat multiplier = 1.0;
-        gfloat v_value;
-
-        vadj = gtk_clist_get_vadjustment(GTK_CLIST(widget));
-        v_value = vadj->value;
-        if (event->state & GDK_SHIFT_MASK)
-                multiplier = 5.0;
+        item_list = GNC_ITEM_LIST (data);
 
-        switch (event->button)
+	switch (event->button)
         {
-                case 4:
-                        v_value -= vadj->step_increment * multiplier;
-                        break;
-                case 5:
-                        v_value += vadj->step_increment * multiplier;
-                        break;
+                case 1:
+                        if(!gtk_tree_view_get_path_at_pos (item_list->tree_view,
+                                                           event->x,
+                                                           event->y,
+                                                           &path,
+                                                           NULL,
+                                                           NULL,
+                                                           NULL))
+                        {
+                                return FALSE;
+                        }
+
+                        gtk_tree_view_set_cursor (item_list->tree_view, path, NULL, FALSE);
+
+                        model = GTK_TREE_MODEL (item_list->list_store);
+                        gtk_tree_model_get_iter (model, &iter, path);
+
+                        gtk_tree_path_free (path);
+
+                        gtk_tree_model_get (model, &iter, 0, &string, -1);
+
+	                g_signal_emit (G_OBJECT (item_list), 
+                                       gnc_item_list_signals[ACTIVATE_ITEM],
+                                       0, 
+                                       string);
+
+                        return TRUE;
                 default:
                         return FALSE;
         }
 
-        v_value = CLAMP(v_value, vadj->lower, vadj->upper - vadj->page_size);
-
-        gtk_adjustment_set_value(vadj, v_value);
-
 	return FALSE;
 }
 
-
 static gboolean
-gnc_item_list_key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
+gnc_item_list_key_event (GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	GNCItemList *item_list = GNC_ITEM_LIST(data);
-        GtkCList *clist;
-        gboolean got_text;
+	GncItemList *item_list = GNC_ITEM_LIST (data);
+        GtkTreeSelection *selection = NULL;
+        GtkTreeIter iter;
+        GtkTreeModel *model;
         gchar *string;
-        gint row;
 
         switch (event->keyval) {
                 case GDK_Return:
-                        clist = item_list->clist;
-                        row = clist->focus_row;
-                        if (row < 0)
-                                return FALSE;
-
-                        got_text = gtk_clist_get_text(clist, row, 0, &string);
-
-                        if (!got_text)
+                        selection = gtk_tree_view_get_selection (item_list->tree_view);
+                        if (!gtk_tree_selection_get_selected (selection, &model, &iter))
                                 return FALSE;
 
-                        gtk_signal_emit(GTK_OBJECT(item_list),
-                                        gnc_item_list_signals[ACTIVATE_ITEM],
-                                        string);
+	                gtk_tree_model_get (model, &iter, 0, &string, -1);
 
+	                g_signal_emit (G_OBJECT (item_list), 
+                                       gnc_item_list_signals[ACTIVATE_ITEM], 
+                                       0, 
+                                       string);
                         return TRUE;
+
 		case GDK_Page_Up:
 		case GDK_Page_Down:
 		case GDK_Up:
@@ -235,68 +266,62 @@
 	}
 
 	/* These go to the sheet */
-	gtk_signal_emit_stop_by_name(GTK_OBJECT(widget), "key_press_event");
+	g_signal_stop_emission_by_name (G_OBJECT (widget), "key_press_event");
 
-	gtk_signal_emit(GTK_OBJECT(item_list),
-			gnc_item_list_signals[KEY_PRESS_EVENT], event);
+	g_signal_emit (G_OBJECT (item_list),
+		       gnc_item_list_signals[KEY_PRESS_EVENT], 0, event);
 
 	return TRUE;
 }
 
 
 static void
-gnc_item_list_class_init(GNCItemListClass *item_list_class)
+gnc_item_list_class_init (GncItemListClass *item_list_class)
 {
-        GtkObjectClass  *object_class;
+        GObjectClass  *object_class = G_OBJECT_CLASS (item_list_class);
 
-        gnc_item_list_parent_class =
-		gtk_type_class (gnome_canvas_widget_get_type ());
+        gnc_item_list_parent_class = g_type_class_peek_parent (item_list_class);
 
-        object_class = GTK_OBJECT_CLASS(item_list_class);
 
 	gnc_item_list_signals[SELECT_ITEM] =
-		gtk_signal_new("select_item",
-			       GTK_RUN_LAST,
-			       object_class->type,
-			       GTK_SIGNAL_OFFSET(GNCItemListClass,
-						 select_item),
-			       gtk_marshal_NONE__POINTER,
-			       GTK_TYPE_NONE, 1,
-			       GTK_TYPE_POINTER);
+		g_signal_new ("select_item",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET(GncItemListClass, select_item),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__POINTER,
+			      G_TYPE_NONE, 1,
+			      G_TYPE_POINTER);
 
 	gnc_item_list_signals[CHANGE_ITEM] =
-		gtk_signal_new("change_item",
-			       GTK_RUN_LAST,
-			       object_class->type,
-			       GTK_SIGNAL_OFFSET(GNCItemListClass,
-						 change_item),
-			       gtk_marshal_NONE__POINTER,
-			       GTK_TYPE_NONE, 1,
-			       GTK_TYPE_POINTER);
+		g_signal_new ("change_item",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET(GncItemListClass, change_item),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__POINTER,
+			      G_TYPE_NONE, 1,
+			      G_TYPE_POINTER);
 
 	gnc_item_list_signals[ACTIVATE_ITEM] =
-		gtk_signal_new("activate_item",
-			       GTK_RUN_LAST,
-			       object_class->type,
-			       GTK_SIGNAL_OFFSET(GNCItemListClass,
-						 activate_item),
-			       gtk_marshal_NONE__POINTER,
-			       GTK_TYPE_NONE, 1,
-			       GTK_TYPE_POINTER);
+		g_signal_new ("activate_item",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET(GncItemListClass, activate_item),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__POINTER,
+			      G_TYPE_NONE, 1,
+			      G_TYPE_POINTER);
 
 	gnc_item_list_signals[KEY_PRESS_EVENT] =
-		gtk_signal_new ("key_press_event",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET(GNCItemListClass,
-						  key_press_event),
-				gtk_marshal_NONE__POINTER,
-				GTK_TYPE_NONE, 1,
-				GTK_TYPE_GDK_EVENT);
-
-	gtk_object_class_add_signals(object_class,
-				     gnc_item_list_signals,
-				     LAST_SIGNAL);
+		g_signal_new ("key_press_event",
+			      G_OBJECT_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET(GncItemListClass, key_press_event),
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__POINTER,
+			      G_TYPE_NONE, 1,
+			      GDK_TYPE_EVENT);
 
         item_list_class->select_item = NULL;
         item_list_class->change_item = NULL;
@@ -305,28 +330,27 @@
 }
 
 
-GtkType
-gnc_item_list_get_type(void)
+GType
+gnc_item_list_get_type (void)
 {
-        static GtkType gnc_item_list_type = 0;
+        static GType gnc_item_list_type = 0;
 
-        if (gnc_item_list_type == 0)
-	{
-                GtkTypeInfo gnc_item_list_info =
-		{
-                        "GNCItemList",
-                        sizeof(GNCItemList),
-                        sizeof(GNCItemListClass),
-                        (GtkClassInitFunc)  gnc_item_list_class_init,
-                        (GtkObjectInitFunc) gnc_item_list_init,
-                        NULL, /* reserved_1 */
-                        NULL, /* reserved_2 */
-                        (GtkClassInitFunc) NULL
+        if (gnc_item_list_type == 0) {
+                static const GTypeInfo gnc_item_list_info = {
+			sizeof(GncItemListClass),
+			NULL,
+			NULL,
+			(GClassInitFunc)  gnc_item_list_class_init,
+			NULL,
+			NULL,
+			sizeof(GncItemList),
+			0,
+			(GInstanceInitFunc) gnc_item_list_init
                 };
 
                 gnc_item_list_type =
-			gtk_type_unique(gnome_canvas_widget_get_type(),
-					&gnc_item_list_info);
+			g_type_register_static (gnome_canvas_widget_get_type(), "GncItemList",
+						&gnc_item_list_info, 0);
         }
 
         return gnc_item_list_type;
@@ -334,35 +358,38 @@
 
 
 static void
-clist_select_row_cb(GtkCList *clist, gint row, gint column,
-		    GdkEventButton *event, gpointer data)
+tree_view_selection_changed (GtkTreeSelection *selection,
+			     gpointer data)
 {
-	GNCItemList *item_list = GNC_ITEM_LIST(data);
-	gboolean got_text;
+	GncItemList *item_list = GNC_ITEM_LIST (data);
+	GtkTreeModel *model;
+	GtkTreeIter iter;
 	char *string;
 
-	got_text = gtk_clist_get_text(clist, row, 0, &string);
+        g_return_if_fail(data);
+        g_return_if_fail(selection);
 
-	if (!got_text)
-		return;
+	if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+                return;
 
-        if (column < 0)
-                gtk_signal_emit(GTK_OBJECT(item_list),
-                                gnc_item_list_signals[CHANGE_ITEM], string);
-        else
-                gtk_signal_emit(GTK_OBJECT(item_list),
-                                gnc_item_list_signals[SELECT_ITEM], string);
-}
+	gtk_tree_model_get (model, &iter, 0, &string, -1);
 
+	g_signal_emit (G_OBJECT (item_list), gnc_item_list_signals[CHANGE_ITEM], 0, string);
+
+	g_free (string);
+}
 
 GnomeCanvasItem *
 gnc_item_list_new(GnomeCanvasGroup *parent)
 {
         GtkWidget *frame;
-	GtkWidget *clist;
+	GtkWidget *tree_view;
         GtkWidget *scrollwin;
+	GtkListStore *list_store;
+	GtkCellRenderer *renderer;
+	GtkTreeViewColumn *column;
         GnomeCanvasItem *item;
-        GNCItemList *item_list;
+        GncItemList *item_list;
 
         frame = gtk_frame_new (NULL);
 
@@ -373,10 +400,24 @@
                                         GTK_POLICY_AUTOMATIC,
                                         GTK_POLICY_AUTOMATIC);
 
-	clist = gtk_clist_new (1);
-        gtk_container_add (GTK_CONTAINER (scrollwin), clist);
-        gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_BROWSE);
+	list_store = gtk_list_store_new (1, G_TYPE_STRING);
+	tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (list_store));
+        gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (list_store),
+                                              0,
+                                              GTK_SORT_ASCENDING);
+ 
+	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (tree_view), FALSE);
+	gtk_tree_selection_set_mode (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)),
+				     GTK_SELECTION_BROWSE);
+
+	renderer = gtk_cell_renderer_text_new ();
+	column = gtk_tree_view_column_new_with_attributes (_("List"),
+							  renderer,
+							  "text", 0,
+							  NULL);
+	gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
 
+	gtk_container_add (GTK_CONTAINER (scrollwin), tree_view);
         gtk_widget_show_all (frame);
 
         item = gnome_canvas_item_new (parent, gnc_item_list_get_type(),
@@ -388,24 +429,18 @@
 
         item_list = GNC_ITEM_LIST (item);
 
-	item_list->clist = GTK_CLIST (clist);
+	item_list->tree_view = GTK_TREE_VIEW (tree_view);
+	item_list->list_store = list_store;
         item_list->frame = frame;
 
-	gtk_signal_connect_after(GTK_OBJECT(frame), "button_press_event",
-				 GTK_SIGNAL_FUNC(gnc_item_list_button_event),
-				 (gpointer) item_list);
-
-	gtk_signal_connect(GTK_OBJECT(clist), "button_press_event",
-                           GTK_SIGNAL_FUNC(gnc_clist_button_event),
-                           (gpointer) item_list);
-
-	gtk_signal_connect(GTK_OBJECT(clist), "key_press_event",
-			   GTK_SIGNAL_FUNC(gnc_item_list_key_event),
-			   (gpointer) item_list);
-
-	gtk_signal_connect(GTK_OBJECT(clist), "select_row",
-			   GTK_SIGNAL_FUNC(clist_select_row_cb),
-			   (gpointer) item_list);
+	g_signal_connect (G_OBJECT(tree_view), "button_press_event",
+				G_CALLBACK (gnc_item_list_button_event), item_list);
+
+	g_signal_connect (G_OBJECT (tree_view), "key_press_event",
+			  G_CALLBACK (gnc_item_list_key_event), item_list);
+
+	g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view))), "changed",
+			  G_CALLBACK (tree_view_selection_changed), item_list);
 
         return item;
 }
Index: gnucash-sheet.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-sheet.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/register/register-gnome/gnucash-sheet.c -Lsrc/register/register-gnome/gnucash-sheet.c -u -r1.19 -r1.20
--- src/register/register-gnome/gnucash-sheet.c
+++ src/register/register-gnome/gnucash-sheet.c
@@ -33,6 +33,7 @@
 #include "gnucash-sheet.h"
 
 #include "dialog-utils.h"
+#include "gnc-gconf-utils.h"
 #include "gnucash-color.h"
 #include "gnucash-grid.h"
 #include "gnucash-cursor.h"
@@ -43,6 +44,11 @@
 #define DEFAULT_REGISTER_HEIGHT 400
 #define DEFAULT_REGISTER_WIDTH  630
 
+
+/* FIXME: at least broken on gtk 2.4.14 */
+/* jsled: and 2.6.8 */
+#define GTK_ALLOWED_SELECTION_WITHIN_INSERT_SIGNAL (GTK_MINOR_VERSION > 6)
+
 static guint gnucash_register_initial_rows = 15;
 
 static void gnucash_sheet_start_editing_at_cursor (GnucashSheet *sheet);
@@ -79,7 +85,7 @@
 G_INLINE_FUNC gboolean
 gnucash_sheet_virt_cell_out_of_bounds (GnucashSheet *sheet,
                                        VirtualCellLocation vcell_loc);
-G_INLINE_FUNC gboolean
+gboolean
 gnucash_sheet_virt_cell_out_of_bounds (GnucashSheet *sheet,
                                        VirtualCellLocation vcell_loc)
 {
@@ -151,10 +157,10 @@
 gnucash_sheet_set_popup (GnucashSheet *sheet, GtkWidget *popup, gpointer data)
 {
         if (popup)
-                gtk_widget_ref (popup);
+                g_object_ref (popup);
 
         if (sheet->popup)
-                gtk_widget_unref (sheet->popup);
+                g_object_unref (sheet->popup);
 
         sheet->popup = popup;
         sheet->popup_data = data;
@@ -168,18 +174,18 @@
                 return;
 
         gnome_canvas_item_hide (GNOME_CANVAS_ITEM (sheet->item_editor));
-        item_edit_hide_popup (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_hide_popup (GNC_ITEM_EDIT(sheet->item_editor));
 }
 
 static void
 gnucash_sheet_stop_editing (GnucashSheet *sheet)
 {
-        if (sheet->insert_signal  > 0)
-                gtk_signal_disconnect (GTK_OBJECT(sheet->entry),
-				       sheet->insert_signal);
-        if (sheet->delete_signal  > 0)
-                gtk_signal_disconnect (GTK_OBJECT(sheet->entry),
-				       sheet->delete_signal);
+        if (sheet->insert_signal != 0)
+                g_signal_handler_disconnect (G_OBJECT(sheet->entry),
+                                             sheet->insert_signal);
+        if (sheet->delete_signal != 0)
+                g_signal_handler_disconnect (G_OBJECT(sheet->entry),
+                                             sheet->delete_signal);
 
         sheet->insert_signal = 0;
         sheet->delete_signal = 0;
@@ -256,8 +262,7 @@
 
                 gtk_editable_set_position (editable, cursor_pos);
 
-                gtk_entry_select_region (GTK_ENTRY(sheet->entry),
-                                         start_sel, end_sel);
+                gtk_editable_select_region (editable, start_sel, end_sel);
         }
 
         gtk_widget_grab_focus (GTK_WIDGET(sheet));
@@ -580,7 +585,7 @@
 }
 
 static void
-gnucash_sheet_destroy (GtkObject *object)
+gnucash_sheet_finalize (GObject *object)
 {
         GnucashSheet *sheet;
 
@@ -594,12 +599,12 @@
         g_hash_table_destroy (sheet->cursor_styles);
         g_hash_table_destroy (sheet->dimensions_hash_table);        
 
-        if (GTK_OBJECT_CLASS (sheet_parent_class)->destroy)
-                (*GTK_OBJECT_CLASS (sheet_parent_class)->destroy)(object);
+        if (G_OBJECT_CLASS (sheet_parent_class)->finalize)
+                (*G_OBJECT_CLASS (sheet_parent_class)->finalize)(object);
 
 	/* This has to come after the parent destroy, so the item edit
 	   destruction can do its disconnects. */
-        gtk_widget_unref (sheet->entry);
+        g_object_unref (sheet->entry);
 }
 
 
@@ -623,7 +628,7 @@
         GnucashSheet *sheet;
         GnomeCanvas  *canvas;
 
-        sheet = gtk_type_new (gnucash_sheet_get_type ());
+        sheet = g_object_new (GNUCASH_TYPE_SHEET, NULL);
         canvas = GNOME_CANVAS (sheet);
 
         sheet->table = table;
@@ -632,8 +637,8 @@
         sheet->vadj = gtk_layout_get_vadjustment (GTK_LAYOUT(canvas));
         sheet->hadj = gtk_layout_get_hadjustment (GTK_LAYOUT(canvas));
 
-        gtk_signal_connect(GTK_OBJECT(sheet->vadj), "value_changed",
-			   GTK_SIGNAL_FUNC(gnucash_sheet_vadjustment_value_changed), sheet);
+        g_signal_connect (G_OBJECT (sheet->vadj), "value_changed",
+                G_CALLBACK (gnucash_sheet_vadjustment_value_changed), sheet);
 
         return sheet;
 }
@@ -641,22 +646,7 @@
 static gint
 compute_optimal_width (GnucashSheet *sheet)
 {
-        SheetBlockStyle *style;
-
-        if (!sheet)
-                return DEFAULT_REGISTER_WIDTH;
-
-        style = gnucash_sheet_get_style_from_cursor (sheet, CURSOR_HEADER);
-        if (!style)
-                return DEFAULT_REGISTER_WIDTH;
-
-	if (sheet->window_width >= 0)
-	  return sheet->window_width;
-
-        if (!style->dimensions)
-                return DEFAULT_REGISTER_WIDTH;
-
-        return style->dimensions->width;
+        return DEFAULT_REGISTER_WIDTH;
 }
 
 
@@ -703,7 +693,6 @@
         GtkEditable *editable;
         Table *table = sheet->table;
         VirtualLocation virt_loc;
-        GdkWChar *new_text_wc;
         int new_text_len;
 
         const char *retval;
@@ -720,52 +709,65 @@
 
         editable = GTK_EDITABLE(sheet->entry);
 
-        cursor_position = editable->current_pos;
-        start_sel = MIN(editable->selection_start_pos,
-                        editable->selection_end_pos);
-        end_sel = MAX(editable->selection_start_pos,
-                      editable->selection_end_pos);
+        cursor_position = gtk_editable_get_position (editable);
+	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
 
-        new_text_len = gnc_mbstowcs (&new_text_wc, new_text);
-        if (new_text_len < 0)
-        {
-                g_warning ("bad text: %s", new_text ? new_text : "(null)");
-                return NULL;
-        }
+        new_text_len = strlen (new_text);
 
         retval = gnc_table_modify_update (table, virt_loc,
-                                          new_text_wc, new_text_len,
-                                          new_text_wc, new_text_len,
+                                          new_text, new_text_len,
+                                          new_text, new_text_len,
                                           &cursor_position,
                                           &start_sel, &end_sel,
                                           NULL);
 
-        g_free (new_text_wc);
 
         if (retval) {
-                item_edit_reset_offset (ITEM_EDIT(sheet->item_editor));
-
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-					  sheet->insert_signal);
-
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-					  sheet->delete_signal);
+                gnc_item_edit_reset_offset (GNC_ITEM_EDIT(sheet->item_editor));
 
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->insert_signal);
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->delete_signal);
+                
                 gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->delete_signal);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-					    sheet->insert_signal);
+                
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->delete_signal);
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->insert_signal);
         }
 
         gtk_editable_set_position (editable, cursor_position);
-        gtk_entry_select_region(GTK_ENTRY(sheet->entry), start_sel, end_sel);
+        gtk_editable_select_region(editable, start_sel, end_sel);
 
 	return retval;
 }
 
+#if !GTK_ALLOWED_SELECTION_WITHIN_INSERT_SIGNAL
+typedef struct {
+	GtkEditable *editable;
+        int start_sel;
+	int end_sel;
+
+} select_info;
+
+/*
+ * This function is needed because gtk_entry_insert_text() sets the
+ * cursor position after emitting the "insert+text" signal.  This
+ * means that the gtk_editable_select_region() call cannot be in the
+ * insert_cb function because it will just be cancelled out after
+ * the function finishes running.
+ */
+static gboolean
+gnucash_sheet_select_data_cb (select_info *info)
+{
+        gtk_editable_select_region (info->editable,
+				    info->start_sel, info->end_sel);
+	g_free(info);
+	return FALSE; /* This is a one shot function */
+}
+#endif
 
 static void
 gnucash_sheet_insert_cb (GtkWidget *widget,
@@ -778,9 +780,8 @@
         Table *table = sheet->table;
         VirtualLocation virt_loc;
 
-        GdkWChar *new_text_w;
-        GdkWChar *old_text_w;
-        GdkWChar *change_text_w;
+        char *change_text;
+        GString *change_text_gs;
 
         int new_text_len;
         int old_text_len;
@@ -789,15 +790,18 @@
         const char *old_text;
         const char *retval;
         char *new_text;
+        GString *new_text_gs;
 
         int start_sel, end_sel;
         int old_position;
         int i;
+        const char *c;
+        gunichar uc;
 
         if (sheet->input_cancelled)
         {
-                gtk_signal_emit_stop_by_name (GTK_OBJECT (sheet->entry),
-                                              "insert_text");
+                g_signal_stop_emission_by_name (G_OBJECT (sheet->entry),
+                                                "insert_text");
                 return;
         }
 
@@ -812,70 +816,54 @@
         if (gnc_table_model_read_only (table->model))
                 return;
 
-        /* insert_text is not NULL-terminated, how annoying */
-        {
-                char *temp;
-
-                temp = g_new (char, insert_text_len + 1);
-                strncpy (temp, insert_text, insert_text_len);
-                temp[insert_text_len] = '\0';
-
-                change_text_w = g_new0 (GdkWChar, insert_text_len + 1);
-                change_text_len = gdk_mbstowcs (change_text_w, temp,
-                                                insert_text_len);
-
-                g_free (temp);
-        }
-
-        if (change_text_len < 0)
-        {
-                g_warning ("bad change text conversion");
-                g_free (change_text_w);
-                return;
-        }
+        change_text_gs = g_string_new_len (insert_text, insert_text_len);
 
         old_text = gtk_entry_get_text (GTK_ENTRY(sheet->entry));
         if (old_text == NULL)
                 old_text = "";
-
-        old_text_len = gnc_mbstowcs (&old_text_w, old_text);
-        if (old_text_len < 0)
-        {
-                g_warning ("bad old text conversion");
-                g_free (change_text_w);
-                return;
-        }
-
+        old_text_len = strlen (old_text);
+ 
         old_position = *position;
 
-        /* we set new_text_w to what the entry contents would be if
+        /* we set new_text_gs to what the entry contents would be if
            the insert was processed */
-        new_text_len = old_text_len + change_text_len;
-        new_text_w = g_new0 (GdkWChar, new_text_len + 1);
-
-        for (i = 0; i < old_position; i++)
-                new_text_w[i] = old_text_w[i];
-
-        for (i = old_position; i < old_position + change_text_len; i++)
-                new_text_w[i] = change_text_w[i - old_position];
-
-        for (i = old_position + change_text_len; i < new_text_len; i++)
-                new_text_w[i] = old_text_w[i - change_text_len];
-
-        new_text_w[new_text_len] = 0;
-
-        new_text = gnc_wcstombs (new_text_w);
-
+        new_text_gs = g_string_new ("");
+        
+        i = 0;
+        c = old_text;
+        //Copy old text up to insert position
+        while (*c && (i < old_position))
+        {
+          uc = g_utf8_get_char (c);
+          g_string_append_unichar (new_text_gs, uc);
+          c = g_utf8_next_char (c);
+          i++;            
+        }
+
+        //Copy inserted text
+        g_string_append (new_text_gs, change_text_gs->str);
+
+        //Copy old text after insert position
+        while (*c)
+        {
+          uc = g_utf8_get_char (c);
+          g_string_append_unichar (new_text_gs, uc);
+          c = g_utf8_next_char (c);            
+        }
+        
+        new_text = new_text_gs->str;
+        new_text_len = new_text_gs->len;
+        
+        change_text = change_text_gs->str;
+        change_text_len = change_text_gs->len;
+        
         editable = GTK_EDITABLE (sheet->entry);
 
-        start_sel = MIN (editable->selection_start_pos,
-                         editable->selection_end_pos);
-        end_sel = MAX (editable->selection_start_pos,
-                       editable->selection_end_pos);
+	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
 
         retval = gnc_table_modify_update (table, virt_loc,
-                                          change_text_w, change_text_len,
-                                          new_text_w, new_text_len,
+                                          change_text, change_text_len,
+                                          new_text, new_text_len,
                                           position, &start_sel, &end_sel,
                                           &sheet->input_cancelled);
 
@@ -883,41 +871,50 @@
             ((strcmp (retval, new_text) != 0) ||
              (*position != old_position)))
         {
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-                                          sheet->insert_signal);
-
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-                                          sheet->delete_signal);
-
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->insert_signal);
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->delete_signal);
+                
                 gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
+                
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->delete_signal);
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->insert_signal);
 
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->delete_signal);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->insert_signal);
-
-                gtk_signal_emit_stop_by_name (GTK_OBJECT(sheet->entry),
-                                              "insert_text");
+                g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
+                                                "insert_text");
         }
         else if (retval == NULL)
         {
                 retval = old_text;
 
                 /* the entry was disallowed, so we stop the insert signal */
-                gtk_signal_emit_stop_by_name (GTK_OBJECT (sheet->entry),
-                                              "insert_text");
+                g_signal_stop_emission_by_name (G_OBJECT (sheet->entry),
+                                                "insert_text");
         }
-
         if (*position < 0)
-                *position = gnc_mbstowcs(NULL, retval);
-
-        gtk_entry_select_region (GTK_ENTRY(sheet->entry), start_sel, end_sel);
+                *position = g_utf8_strlen(retval, -1);
 
-        g_free (change_text_w);
-        g_free (old_text_w);
-        g_free (new_text_w);
-        g_free (new_text);
+#if GTK_ALLOWED_SELECTION_WITHIN_INSERT_SIGNAL
+        gtk_editable_select_region (editable, start_sel, end_sel);
+#else
+        {
+                select_info *info;
+                if (start_sel != end_sel) {
+                        info = g_malloc(sizeof(*info));
+                        info->editable = editable;
+                        info->start_sel = start_sel;
+                        info->end_sel = end_sel;
+                        g_timeout_add(/*ASAP*/ 1,
+                                (GSourceFunc)gnucash_sheet_select_data_cb,
+                                info);
+                }
+        }
+#endif
+        g_string_free (new_text_gs, TRUE);
+        g_string_free (change_text_gs, TRUE);
 }
 
 
@@ -931,18 +928,18 @@
         Table *table = sheet->table;
         VirtualLocation virt_loc;
 
-        GdkWChar *new_text_w;
-        GdkWChar *old_text_w;
         int new_text_len;
-        int old_text_len;
 
         const char *old_text;
         const char *retval;
         char *new_text;
+        GString *new_text_gs;
 
         int cursor_position = start_pos;
         int start_sel, end_sel;
         int i;
+        const char *c;
+        gunichar uc;
 
         if (end_pos <= start_pos)
                 return;
@@ -959,70 +956,68 @@
         if (!old_text)
                 old_text = "";
 
-        old_text_len = gnc_mbstowcs (&old_text_w, old_text);
-        if (old_text_len < 0)
-                return;
-
-        new_text_len = old_text_len - (end_pos - start_pos);
-
-        new_text_w = g_new0 (GdkWChar, new_text_len + 1);
-
-        for (i = 0; i < start_pos; i++)
-                new_text_w[i] = old_text_w[i];
-
-        for (i = end_pos; i < old_text_len; i++)
-                new_text_w[i - (end_pos - start_pos)] = old_text_w[i];
-
-        new_text_w[new_text_len] = 0;
-
-        new_text = gnc_wcstombs (new_text_w);
+        new_text_gs = g_string_new ("");
+        i = 0;
+        c = old_text;
+        while (*c && (i < start_pos)) 
+        {
+          uc = g_utf8_get_char (c);
+          g_string_append_unichar (new_text_gs, uc);
+          c = g_utf8_next_char (c);
+          i++;
+        }
+
+        c = g_utf8_offset_to_pointer (old_text, end_pos);     
+        while (*c)
+        {
+          uc = g_utf8_get_char (c);
+          g_string_append_unichar (new_text_gs, uc);
+          c = g_utf8_next_char (c);
+        }            
 
+        new_text = new_text_gs->str;
+        new_text_len = new_text_gs->len;
+        
         editable = GTK_EDITABLE (sheet->entry);
 
-        start_sel = MIN (editable->selection_start_pos,
-                         editable->selection_end_pos);
-        end_sel = MAX (editable->selection_start_pos,
-                       editable->selection_end_pos);
+	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
 
         retval = gnc_table_modify_update (table, virt_loc,
                                           NULL, 0,
-                                          new_text_w, new_text_len,
+                                          new_text, new_text_len,
                                           &cursor_position,
                                           &start_sel, &end_sel,
                                           &sheet->input_cancelled);
 
         if (retval && (strcmp (retval, new_text) != 0))
         {
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-                                          sheet->insert_signal);
-
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-                                          sheet->delete_signal);
-
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->insert_signal);
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->delete_signal);
+                
                 gtk_entry_set_text (GTK_ENTRY (sheet->entry), retval);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->delete_signal);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->insert_signal);
-
-                gtk_signal_emit_stop_by_name (GTK_OBJECT(sheet->entry),
-                                              "delete_text");
+                
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->delete_signal);
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->insert_signal);
+                
+                g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
+                                                "delete_text");
         }
         else if (retval == NULL)
         {
                 /* the entry was disallowed, so we stop the delete signal */
-                gtk_signal_emit_stop_by_name (GTK_OBJECT(sheet->entry),
-                                              "delete_text");
+                g_signal_stop_emission_by_name (G_OBJECT(sheet->entry),
+                                                "delete_text");
         }
 
         gtk_editable_set_position (editable, cursor_position);
-        gtk_entry_select_region(GTK_ENTRY(sheet->entry), start_sel, end_sel);
+        if (start_sel != end_sel)
+		gtk_editable_select_region(editable, start_sel, end_sel);
 
-        g_free (old_text_w);
-        g_free (new_text_w);
-        g_free (new_text);
+        g_string_free (new_text_gs, TRUE);
 }
 
 
@@ -1046,10 +1041,10 @@
         sheet->window_width  = allocation->width;
 
         gnucash_cursor_configure (GNUCASH_CURSOR (sheet->cursor));
-        gnucash_header_reconfigure (GNUCASH_HEADER(sheet->header_item));
+        gnc_header_reconfigure (GNC_HEADER(sheet->header_item));
         gnucash_sheet_set_scroll_region (sheet);
 
-        item_edit_configure (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_configure (GNC_ITEM_EDIT(sheet->item_editor));
         gnucash_sheet_update_adjustments (sheet);
 }
 
@@ -1062,7 +1057,7 @@
                 (*GTK_WIDGET_CLASS (sheet_parent_class)->focus_in_event)
                         (widget, event);
 
-        item_edit_focus_in (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_focus_in (GNC_ITEM_EDIT(sheet->item_editor));
 
         return FALSE;
 }
@@ -1076,7 +1071,7 @@
                 (*GTK_WIDGET_CLASS (sheet_parent_class)->focus_out_event)
                         (widget, event);
 
-        item_edit_focus_out (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_focus_out (GNC_ITEM_EDIT(sheet->item_editor));
 
         return FALSE;
 }
@@ -1097,7 +1092,7 @@
 
         text = gnc_table_get_entry (sheet->table, virt_loc);
 
-        item_edit_configure (ITEM_EDIT(sheet->item_editor));
+        gnc_item_edit_configure (GNC_ITEM_EDIT(sheet->item_editor));
         gnome_canvas_item_show (GNOME_CANVAS_ITEM (sheet->item_editor));
 
         gtk_entry_set_text (GTK_ENTRY(sheet->entry), text);
@@ -1106,14 +1101,11 @@
 
         /* set up the signals */
         sheet->insert_signal =
-		gtk_signal_connect(GTK_OBJECT(sheet->entry), "insert_text",
-				   GTK_SIGNAL_FUNC(gnucash_sheet_insert_cb),
-                                   sheet);
-
+                g_signal_connect(G_OBJECT(sheet->entry), "insert_text",
+                                 G_CALLBACK(gnucash_sheet_insert_cb), sheet);
         sheet->delete_signal =
-		gtk_signal_connect(GTK_OBJECT(sheet->entry), "delete_text",
-				   GTK_SIGNAL_FUNC(gnucash_sheet_delete_cb),
-				   sheet);
+                g_signal_connect(G_OBJECT(sheet->entry), "delete_text",
+                                 G_CALLBACK(gnucash_sheet_delete_cb), sheet);
 }
 
 static gboolean
@@ -1121,7 +1113,6 @@
 {
         GnucashSheet *sheet;
         VirtualLocation virt_loc;
-        int xoffset, yoffset, x;
 
         g_return_val_if_fail(widget != NULL, TRUE);
         g_return_val_if_fail(GNUCASH_IS_SHEET(widget), TRUE);
@@ -1144,15 +1135,10 @@
         if (!(event->state & GDK_BUTTON1_MASK))
                 return FALSE;
 
-        gnome_canvas_get_scroll_offsets (GNOME_CANVAS(sheet),
-					 &xoffset, &yoffset);
-
-        x = xoffset + event->x;
-
         gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &virt_loc);
 
-        item_edit_set_cursor_pos (ITEM_EDIT(sheet->item_editor),
-                                  virt_loc, x, FALSE, TRUE);
+        gnc_item_edit_set_cursor_pos (GNC_ITEM_EDIT(sheet->item_editor),
+                                  virt_loc, event->x, FALSE, TRUE);
 
         return TRUE;
 }
@@ -1179,53 +1165,60 @@
         gtk_grab_remove (widget);
         sheet->grabbed = FALSE;
 
-        item_edit_set_has_selection(ITEM_EDIT(sheet->item_editor), FALSE);
+        gnc_item_edit_set_has_selection(GNC_ITEM_EDIT(sheet->item_editor), FALSE);
 
-        item_edit_claim_selection(ITEM_EDIT(sheet->item_editor), event->time);
+        gnc_item_edit_claim_selection(GNC_ITEM_EDIT(sheet->item_editor), event->time);
 
         return TRUE;
 }
 
-static void
-gnucash_sheet_scroll_event(GnucashSheet *sheet, GdkEventButton *event)
+static gboolean
+gnucash_scroll_event (GtkWidget *widget, GdkEventScroll *event)
 {
+        GnucashSheet *sheet;
         GtkAdjustment *vadj;
-        gfloat multiplier = 1.0;
         gfloat v_value;
 
+        g_return_val_if_fail(widget != NULL, TRUE);
+        g_return_val_if_fail(GNUCASH_IS_SHEET(widget), TRUE);
+        g_return_val_if_fail(event != NULL, TRUE);
+
+        sheet = GNUCASH_SHEET (widget);
         vadj = sheet->vadj;
         v_value = vadj->value;
-        if (event->state & GDK_SHIFT_MASK)
-                multiplier = sheet->num_visible_blocks / 2;
 
-        switch (event->button)
+        switch (event->direction)
         {
-                case 4:
-                        v_value -= vadj->step_increment * multiplier;
+                case GDK_SCROLL_UP:
+                        v_value -= vadj->step_increment;
                         break;
-                case 5:
-                        v_value += vadj->step_increment * multiplier;
+                case GDK_SCROLL_DOWN:
+                        v_value += vadj->step_increment;
                         break;
                 default:
-                        return;
+                        return FALSE;
         }
 
         v_value = CLAMP(v_value, vadj->lower, vadj->upper - vadj->page_size);
 
         gtk_adjustment_set_value(vadj, v_value);
+
+        return TRUE;
 }
 
 static void
 gnucash_sheet_check_grab (GnucashSheet *sheet)
 {
         GdkModifierType mods;
+	GdkDevice *device;
 
         if (!sheet->grabbed)
                 return;
 
-        gdk_input_window_get_pointer(GTK_WIDGET(sheet)->window,
-                                     GDK_CORE_POINTER, NULL, NULL,
-                                     NULL, NULL, NULL, &mods);
+	device = gdk_device_get_core_pointer ();
+
+	gdk_device_get_state (device, GTK_WIDGET(sheet)->window,
+			      0, &mods);
 
         if (!(mods & GDK_BUTTON1_MASK))
         {
@@ -1238,10 +1231,9 @@
 gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
 {
         GnucashSheet *sheet;
+        GtkEditable *editable;
         VirtualCell *vcell;
-        int xoffset, yoffset;
         gboolean changed_cells;
-        int x, y;
 
         VirtualLocation cur_virt_loc;
         VirtualLocation new_virt_loc;
@@ -1279,30 +1271,22 @@
                 case 2:
                         if (event->type != GDK_BUTTON_PRESS)
                                 return FALSE;
-                        item_edit_paste_primary(ITEM_EDIT(sheet->item_editor),
+                        gnc_item_edit_paste_primary(GNC_ITEM_EDIT(sheet->item_editor),
                                                 event->time);
                         return TRUE;
                 case 3:
                         do_popup = (sheet->popup != NULL);
+			if (!do_popup)
+				return FALSE;
                         break;
-                case 4:
-                case 5:
-                        gnucash_sheet_scroll_event(sheet, event);
-                        return TRUE;
                 default:
                         return FALSE;
         }
 
-        gnome_canvas_get_scroll_offsets (GNOME_CANVAS(sheet),
-					 &xoffset, &yoffset);
-
         gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &cur_virt_loc);
 
-        x = xoffset + event->x;
-        y = yoffset + event->y;
-
 	if (!gnucash_grid_find_loc_by_pixel(GNUCASH_GRID(sheet->grid),
-                                            x, y, &new_virt_loc))
+                                            event->x, event->y, &new_virt_loc))
 		return TRUE;
 
         vcell = gnc_table_get_virtual_cell (table, new_virt_loc.vcell_loc);
@@ -1312,13 +1296,14 @@
         if (virt_loc_equal (new_virt_loc, cur_virt_loc) && button_1 &&
             (event->type == GDK_2BUTTON_PRESS))
         {
-                item_edit_set_cursor_pos (ITEM_EDIT(sheet->item_editor),
-                                          cur_virt_loc, x, FALSE, FALSE);
+                gnc_item_edit_set_cursor_pos (GNC_ITEM_EDIT(sheet->item_editor),
+                                          cur_virt_loc, event->x, FALSE, FALSE);
 
-                gtk_editable_set_position(GTK_EDITABLE(sheet->entry), -1);
-                gtk_editable_select_region(GTK_EDITABLE(sheet->entry), 0, -1);
+		editable = GTK_EDITABLE(sheet->entry);
+                gtk_editable_set_position(editable, -1);
+                gtk_editable_select_region(editable, 0, -1);
 
-                item_edit_claim_selection (ITEM_EDIT(sheet->item_editor),
+                gnc_item_edit_claim_selection (GNC_ITEM_EDIT(sheet->item_editor),
                                            event->time);
 
                 return TRUE;
@@ -1331,22 +1316,22 @@
         {
                 gtk_grab_add(widget);
                 sheet->grabbed = TRUE;
-                item_edit_set_has_selection 
-                        (ITEM_EDIT(sheet->item_editor), TRUE);
+                gnc_item_edit_set_has_selection 
+                        (GNC_ITEM_EDIT(sheet->item_editor), TRUE);
         }
 
         if (virt_loc_equal (new_virt_loc, cur_virt_loc) && sheet->editing)
         {
                 gboolean extend_selection = event->state & GDK_SHIFT_MASK;
 
-                item_edit_set_cursor_pos (ITEM_EDIT(sheet->item_editor),
-                                          cur_virt_loc, x, FALSE,
+                gnc_item_edit_set_cursor_pos (GNC_ITEM_EDIT(sheet->item_editor),
+                                          cur_virt_loc, event->x, FALSE,
                                           extend_selection);
 
                 if (do_popup)
                         gnome_popup_menu_do_popup_modal
                                 (sheet->popup, NULL, NULL, event,
-                                 sheet->popup_data);
+                                 sheet->popup_data, widget);
 
                 return TRUE;
         }
@@ -1370,12 +1355,12 @@
 
         gnucash_cursor_get_virt (GNUCASH_CURSOR(sheet->cursor), &new_virt_loc);
 
-        item_edit_set_cursor_pos (ITEM_EDIT(sheet->item_editor),
-                                  new_virt_loc, x, changed_cells, FALSE);
+        gnc_item_edit_set_cursor_pos (GNC_ITEM_EDIT(sheet->item_editor),
+                                  new_virt_loc, event->x, changed_cells, FALSE);
 
         if (do_popup)
                 gnome_popup_menu_do_popup_modal
-                        (sheet->popup, NULL, NULL, event, sheet->popup_data);
+                        (sheet->popup, NULL, NULL, event, sheet->popup_data, widget);
 
         return TRUE;
 }
@@ -1384,55 +1369,81 @@
 gnucash_register_cut_clipboard (GnucashRegister *reg)
 {
         GnucashSheet *sheet;
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
         g_return_if_fail(reg != NULL);
         g_return_if_fail(GNUCASH_IS_REGISTER(reg));
 
         sheet = GNUCASH_SHEET(reg->sheet);
-        item_edit = ITEM_EDIT(sheet->item_editor);
+        item_edit = GNC_ITEM_EDIT(sheet->item_editor);
 
-        item_edit_cut_clipboard(item_edit, GDK_CURRENT_TIME);
+        gnc_item_edit_cut_clipboard(item_edit, GDK_CURRENT_TIME);
 }
 
 void
 gnucash_register_copy_clipboard (GnucashRegister *reg)
 {
         GnucashSheet *sheet;
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
         g_return_if_fail(reg != NULL);
         g_return_if_fail(GNUCASH_IS_REGISTER(reg));
 
         sheet = GNUCASH_SHEET(reg->sheet);
-        item_edit = ITEM_EDIT(sheet->item_editor);
+        item_edit = GNC_ITEM_EDIT(sheet->item_editor);
 
-        item_edit_copy_clipboard(item_edit, GDK_CURRENT_TIME);
+        gnc_item_edit_copy_clipboard(item_edit, GDK_CURRENT_TIME);
 }
 
 void
 gnucash_register_paste_clipboard (GnucashRegister *reg)
 {
         GnucashSheet *sheet;
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
 
         g_return_if_fail(reg != NULL);
         g_return_if_fail(GNUCASH_IS_REGISTER(reg));
 
         sheet = GNUCASH_SHEET(reg->sheet);
-        item_edit = ITEM_EDIT(sheet->item_editor);
+        item_edit = GNC_ITEM_EDIT(sheet->item_editor);
 
-        item_edit_paste_clipboard(item_edit, GDK_CURRENT_TIME);
+        gnc_item_edit_paste_clipboard(item_edit, GDK_CURRENT_TIME);
+}
+
+static void
+gnucash_sheet_refresh_from_gconf (GnucashSheet *sheet)
+{
+        g_return_if_fail(sheet != NULL);
+        g_return_if_fail(GNUCASH_IS_SHEET(sheet));
+
+	sheet->use_theme_colors = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+						     "use_theme_colors", NULL);
+	sheet->use_horizontal_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+							 "draw_horizontal_lines", NULL);
+	sheet->use_vertical_lines = gnc_gconf_get_bool(GCONF_GENERAL_REGISTER,
+						       "draw_vertical_lines", NULL);
+}
+
+void
+gnucash_register_refresh_from_gconf (GnucashRegister *reg)
+{
+        GnucashSheet *sheet;
+
+        g_return_if_fail(reg != NULL);
+        g_return_if_fail(GNUCASH_IS_REGISTER(reg));
+
+        sheet = GNUCASH_SHEET(reg->sheet);
+	gnucash_sheet_refresh_from_gconf(sheet);
 }
 
 static gboolean
 gnucash_sheet_clipboard_event (GnucashSheet *sheet, GdkEventKey *event)
 {
-        ItemEdit *item_edit;
+        GncItemEdit *item_edit;
         gboolean handled = FALSE;
         guint32 time;
 
-        item_edit = ITEM_EDIT(sheet->item_editor);
+        item_edit = GNC_ITEM_EDIT(sheet->item_editor);
         time = event->time;
 
         switch (event->keyval) {
@@ -1440,7 +1451,7 @@
                 case GDK_c:
                         if (event->state & GDK_CONTROL_MASK)
                         {
-                                item_edit_copy_clipboard(item_edit, time);
+                                gnc_item_edit_copy_clipboard(item_edit, time);
                                 handled = TRUE;
                         }
                         break;
@@ -1448,7 +1459,7 @@
                 case GDK_x:
                         if (event->state & GDK_CONTROL_MASK)
                         {
-                                item_edit_cut_clipboard(item_edit, time);
+                                gnc_item_edit_cut_clipboard(item_edit, time);
                                 handled = TRUE;
                         }
                         break;
@@ -1456,19 +1467,19 @@
                 case GDK_v:
                         if (event->state & GDK_CONTROL_MASK)
                         {
-                                item_edit_paste_clipboard(item_edit, time);
+                                gnc_item_edit_paste_clipboard(item_edit, time);
                                 handled = TRUE;
                         }
                         break;
                 case GDK_Insert:
                         if (event->state & GDK_SHIFT_MASK)
                         {
-                                item_edit_paste_clipboard(item_edit, time);
+                                gnc_item_edit_paste_clipboard(item_edit, time);
                                 handled = TRUE;
                         }
                         else if (event->state & GDK_CONTROL_MASK)
                         {
-                                item_edit_copy_clipboard(item_edit, time);
+                                gnc_item_edit_copy_clipboard(item_edit, time);
                                 handled = TRUE;
                         }
                         break;
@@ -1501,11 +1512,8 @@
 
         editable = GTK_EDITABLE(sheet->entry);
 
-        cursor_position = editable->current_pos;
-        start_sel = MIN(editable->selection_start_pos,
-                        editable->selection_end_pos);
-        end_sel = MAX(editable->selection_start_pos,
-                      editable->selection_end_pos);
+        cursor_position = gtk_editable_get_position (editable);
+	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
 
         new_position = cursor_position;
         new_start = start_sel;
@@ -1521,19 +1529,17 @@
 
         if (new_text != NULL)
         {
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-					  sheet->insert_signal);
-
-                gtk_signal_handler_block (GTK_OBJECT (sheet->entry),
-					  sheet->delete_signal);
-
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->insert_signal);
+                g_signal_handler_block (G_OBJECT (sheet->entry),
+                                        sheet->delete_signal);
+                
                 gtk_entry_set_text (GTK_ENTRY (sheet->entry), new_text);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-                                            sheet->delete_signal);
-
-                gtk_signal_handler_unblock (GTK_OBJECT (sheet->entry),
-					    sheet->insert_signal);
+                
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->delete_signal);
+                g_signal_handler_unblock (G_OBJECT (sheet->entry),
+                                          sheet->insert_signal);
 
                 changed = TRUE;
         }
@@ -1546,13 +1552,12 @@
 
         if ((new_start != start_sel) || (new_end != end_sel))
         {
-                gtk_entry_select_region(GTK_ENTRY(sheet->entry),
-                                        new_start, new_end);
+                gtk_editable_select_region(editable, new_start, new_end);
                 changed = TRUE;
         }
 
         if (changed)
-                item_edit_redraw(ITEM_EDIT(sheet->item_editor));
+                gnc_item_edit_redraw(GNC_ITEM_EDIT(sheet->item_editor));
 
 	return result;
 }
@@ -1643,13 +1648,13 @@
 		case GDK_Down:
                         if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
                         {
-                                ItemEdit *item_edit;
+                                GncItemEdit *item_edit;
 
-                                item_edit = ITEM_EDIT (sheet->item_editor);
+                                item_edit = GNC_ITEM_EDIT (sheet->item_editor);
 
                                 if (gnc_table_confirm_change (table,
                                                               cur_virt_loc))
-                                        item_edit_show_popup (item_edit);
+                                        gnc_item_edit_show_popup (item_edit);
 
                                 return TRUE;
                         }
@@ -1705,15 +1710,12 @@
 
                 editable = GTK_EDITABLE(sheet->entry);
 
-                current_pos = editable->current_pos;
+                current_pos = gtk_editable_get_position (editable);
 
                 extend_selection = event->state & GDK_SHIFT_MASK;
                 if (extend_selection && set_selection)
                 {
-                        start_sel = MIN(editable->selection_start_pos,
-                                        editable->selection_end_pos);
-                        end_sel = MAX(editable->selection_start_pos,
-                                      editable->selection_end_pos);
+			gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
                 }
                 else
                 {
@@ -1727,7 +1729,7 @@
 
                 sheet->input_cancelled = FALSE;
 
-                new_pos = editable->current_pos;
+                new_pos = gtk_editable_get_position (editable);
 
                 if (extend_selection && set_selection)
                 {
@@ -1742,9 +1744,8 @@
                                 end_sel = new_pos;
                 }
 
-                if (set_selection)
-                        gtk_entry_select_region(GTK_ENTRY(sheet->entry),
-                                                start_sel, end_sel);
+                if (set_selection && (start_sel != end_sel))
+                        gtk_editable_select_region(editable, start_sel, end_sel);
 
                 return result;
         }
@@ -1945,7 +1946,7 @@
         int width;
         SheetBlock *block;
         SheetBlockStyle *style;
-        GdkFont *font;
+	PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (sheet), "");
 
         g_return_val_if_fail (virt_col >= 0, 0);
         g_return_val_if_fail (virt_col < sheet->num_virt_cols, 0);
@@ -1973,17 +1974,16 @@
                                 if (virt_row == 0) {
                                         text = gnc_table_get_label
                                                 (sheet->table, virt_loc);
-                                        font = gnucash_register_font;
                                 }
                                 else {
                                         text = gnc_table_get_entry
                                                 (sheet->table, virt_loc);
-
-                                        font = GNUCASH_GRID(sheet->grid)->normal_font;
                                 }
 
-                                width = (gdk_string_measure (font, text) +
-                                         2 * CELL_HPADDING);
+				pango_layout_set_text (layout, text, strlen (text));
+				pango_layout_get_pixel_size (layout, &width, NULL);
+
+                                width += 2 * CELL_HPADDING;
 
                                 max = MAX (max, width);
                         }
@@ -2004,7 +2004,7 @@
 
         widget = GTK_WIDGET(sheet);
 
-        if (!sheet->header_item || !GNUCASH_HEADER(sheet->header_item)->style)
+        if (!sheet->header_item || !GNC_HEADER(sheet->header_item)->style)
                 return;
 
         gnome_canvas_get_scroll_region (GNOME_CANVAS(sheet),
@@ -2109,8 +2109,6 @@
 
         table = sheet->table;
 
-        gtk_layout_freeze (GTK_LAYOUT(sheet));
-
         gnucash_sheet_stop_editing (sheet);
 
         gnucash_sheet_resize (sheet);
@@ -2133,9 +2131,9 @@
                                      vcell->cellblock->num_rows);
                 }
 
-        gnucash_header_set_header_rows (GNUCASH_HEADER (sheet->header_item),
+        gnc_header_set_header_rows (GNC_HEADER (sheet->header_item),
                                         num_header_phys_rows);
-        gnucash_header_reconfigure (GNUCASH_HEADER(sheet->header_item));
+        gnc_header_reconfigure (GNC_HEADER(sheet->header_item));
 
         gnucash_sheet_recompute_block_offsets (sheet);
 
@@ -2154,7 +2152,6 @@
 
         gnucash_sheet_cursor_set_from_table (sheet, do_scroll);
         gnucash_sheet_activate_cursor_cell (sheet, TRUE);
-        gtk_layout_thaw (GTK_LAYOUT(sheet));        
 }
 
 static gboolean
@@ -2168,7 +2165,7 @@
 
         sheet = GNUCASH_SHEET(widget);
 
-        return item_edit_selection_clear(ITEM_EDIT(sheet->item_editor), event);
+        return gnc_item_edit_selection_clear(GNC_ITEM_EDIT(sheet->item_editor), event);
 }
 
 static void
@@ -2184,7 +2181,7 @@
 
         sheet = GNUCASH_SHEET(widget);
 
-        item_edit_selection_get(ITEM_EDIT(sheet->item_editor),
+        gnc_item_edit_selection_get(GNC_ITEM_EDIT(sheet->item_editor),
                                 selection_data, info, time);
 }
 
@@ -2200,25 +2197,134 @@
 
         sheet = GNUCASH_SHEET(widget);
 
-        item_edit_selection_received(ITEM_EDIT(sheet->item_editor),
+        gnc_item_edit_selection_received(GNC_ITEM_EDIT(sheet->item_editor),
                                      selection_data, time);
 }
 
 static void
+gnucash_sheet_realize_entry (GnucashSheet *sheet, GtkWidget *entry)
+{
+	gtk_widget_realize (entry);
+}
+
+/*************************************************************/
+
+/* This code is one big hack to use gtkrc to set cell colors in a
+ * register.  Because the cells are just boxes drawn on a gnome
+ * canvas, there's no way to specify the individual cells in a gtkrc
+ * file.  This code creates four hidden GtkEntry widgets and names
+ * them so that they *can* be specified in gtkrc.  It then looks up
+ * the colors specified on these hidden widgets and uses it for the
+ * cells drawn on the canvas.  This code should all go away whenever
+ * the register is rewritten.
+ */
+
+/** Map a cell type to a gtkrc specified color. */
+GdkColor *
+get_gtkrc_color (GnucashSheet *sheet,
+		 RegisterColor field_type)
+{
+	GtkWidget *widget = NULL;
+	GtkStyle *style;
+	GdkColor *white;
+	GdkColor *color = NULL;
+
+	white = gnucash_color_argb_to_gdk (0xFFFFFF);
+	switch (field_type) {
+	  default:
+		return white;
+
+	  case COLOR_HEADER:
+		widget = sheet->header_color;
+		break;
+
+	  case COLOR_PRIMARY:
+	  case COLOR_PRIMARY_ACTIVE:
+		widget = sheet->primary_color;
+		break;
+
+	  case COLOR_SECONDARY:
+	  case COLOR_SECONDARY_ACTIVE:
+		widget = sheet->secondary_color;
+		break;
+
+	  case COLOR_SPLIT:
+	  case COLOR_SPLIT_ACTIVE:	
+		widget = sheet->split_color;
+		break;
+	}
+
+	style = gtk_widget_get_style(widget);
+	if (!style)
+		return white;
+
+	switch (field_type) {
+	  default:
+		return white;
+
+	  case COLOR_HEADER:
+	  case COLOR_PRIMARY:
+	  case COLOR_SECONDARY:
+	  case COLOR_SPLIT:
+		color = &style->base[GTK_STATE_NORMAL];
+		break;
+
+	  case COLOR_PRIMARY_ACTIVE:
+	  case COLOR_SECONDARY_ACTIVE:
+	  case COLOR_SPLIT_ACTIVE:	
+		color = &style->base[GTK_STATE_SELECTED];
+		break;
+	}
+
+        gnucash_color_alloc_gdk(color);
+	return color;
+}
+
+/** Create the entries used for nameing register colors in gtkrc. */
+static void
+gnucash_sheet_create_color_hack(GnucashSheet *sheet)
+{
+	sheet->header_color    = gtk_entry_new();
+	sheet->primary_color   = gtk_entry_new();
+	sheet->secondary_color = gtk_entry_new();
+	sheet->split_color     = gtk_entry_new();
+
+	gtk_widget_set_name(sheet->header_color,    "header_color");
+	gtk_widget_set_name(sheet->primary_color,   "primary_color");
+	gtk_widget_set_name(sheet->secondary_color, "secondary_color");
+	gtk_widget_set_name(sheet->split_color,     "split_color");
+
+	g_signal_connect_after(sheet, "realize",
+			       G_CALLBACK(gnucash_sheet_realize_entry),
+			       sheet->header_color);
+	g_signal_connect_after(sheet, "realize",
+			       G_CALLBACK(gnucash_sheet_realize_entry),
+			       sheet->primary_color);
+	g_signal_connect_after(sheet, "realize",
+			       G_CALLBACK(gnucash_sheet_realize_entry),
+			       sheet->secondary_color);
+	g_signal_connect_after(sheet, "realize",
+			       G_CALLBACK(gnucash_sheet_realize_entry),
+			       sheet->split_color);
+}
+
+/*************************************************************/
+
+static void
 gnucash_sheet_class_init (GnucashSheetClass *class)
 {
-        GtkObjectClass *object_class;
+        GObjectClass *gobject_class;
         GtkWidgetClass *widget_class;
         GnomeCanvasClass *canvas_class;
 
-        object_class = (GtkObjectClass *) class;
-        widget_class = (GtkWidgetClass *) class;
-        canvas_class = (GnomeCanvasClass *) class;
+        gobject_class = G_OBJECT_CLASS (class);
+        widget_class = GTK_WIDGET_CLASS (class);
+        canvas_class = GNOME_CANVAS_CLASS (class);
 
-        sheet_parent_class = gtk_type_class (gnome_canvas_get_type ());
+        sheet_parent_class = g_type_class_peek_parent (class);
 
         /* Method override */
-        object_class->destroy = gnucash_sheet_destroy;
+        gobject_class->finalize = gnucash_sheet_finalize;
 
         widget_class->realize = gnucash_sheet_realize;
 
@@ -2232,6 +2338,7 @@
         widget_class->button_press_event = gnucash_button_press_event;
         widget_class->button_release_event = gnucash_button_release_event;
         widget_class->motion_notify_event = gnucash_motion_event;
+        widget_class->scroll_event = gnucash_scroll_event;
 
         widget_class->selection_clear_event = gnucash_sheet_selection_clear;
         widget_class->selection_received = gnucash_sheet_selection_received;
@@ -2275,32 +2382,33 @@
 }
 
 
-GtkType
+GType
 gnucash_sheet_get_type (void)
 {
-        static GtkType gnucash_sheet_type = 0;
+        static GType gnucash_sheet_type = 0;
 
         if (!gnucash_sheet_type){
-                GtkTypeInfo gnucash_sheet_info = {
-                        "GnucashSheet",
-                        sizeof (GnucashSheet),
+                static const GTypeInfo gnucash_sheet_info = {
                         sizeof (GnucashSheetClass),
-                        (GtkClassInitFunc) gnucash_sheet_class_init,
-                        (GtkObjectInitFunc) gnucash_sheet_init,
-                        NULL, /* reserved 1 */
-                        NULL, /* reserved 2 */
-                        (GtkClassInitFunc) NULL
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+                        (GClassInitFunc) gnucash_sheet_class_init,
+			NULL,		/* class_finalize */
+			NULL,		/* class_data */
+                        sizeof (GnucashSheet),
+			0,		/* n_preallocs */
+                        (GInstanceInitFunc) gnucash_sheet_init
                 };
 
                 gnucash_sheet_type =
-			gtk_type_unique (gnome_canvas_get_type (),
-					 &gnucash_sheet_info);
+			g_type_register_static (gnome_canvas_get_type (),
+						"GnucashSheet",
+						&gnucash_sheet_info, 0);
         }
 
         return gnucash_sheet_type;
 }
 
-
 GtkWidget *
 gnucash_sheet_new (Table *table)
 {
@@ -2320,7 +2428,7 @@
         /* The grid */
         item = gnome_canvas_item_new (sheet_group,
                                       gnucash_grid_get_type (),
-                                      "GnucashGrid::Sheet", sheet,
+                                      "sheet", sheet,
                                       NULL);
         sheet->grid = item;
 
@@ -2331,20 +2439,32 @@
         /* The cursor */
         sheet->cursor = gnucash_cursor_new (sheet_group);
         gnome_canvas_item_set (sheet->cursor,
-                               "GnucashCursor::sheet", sheet,
-                               "GnucashCursor::grid", sheet->grid,
+                               "sheet", sheet,
+                               "grid", sheet->grid,
                                NULL);
 
         /* The entry widget */
         sheet->entry = gtk_entry_new ();
-        gtk_widget_ref(sheet->entry);
+        g_object_ref(sheet->entry);
         gtk_object_sink(GTK_OBJECT(sheet->entry));
+	/*gtk_layout_put (GTK_LAYOUT (sheet), sheet->entry, 0, 0);*/
 
         /* set up the editor */
-        sheet->item_editor = item_edit_new(sheet_group, sheet, sheet->entry);
+        sheet->item_editor = gnc_item_edit_new(sheet_group, sheet, sheet->entry);
 
         gnome_canvas_item_hide (GNOME_CANVAS_ITEM(sheet->item_editor));
 
+	/* The GtkEntry must be realized in order to send events to
+	 * it.  We don't want to show it on the screen, but can't
+	 * realize it until after the window and all its parent
+	 * widgets have been realized. Thus this callback. */
+	g_signal_connect_after(sheet, "realize",
+			       G_CALLBACK(gnucash_sheet_realize_entry),
+			       sheet->entry);
+
+	gnucash_sheet_refresh_from_gconf(sheet);
+	gnucash_sheet_create_color_hack(sheet);
+
         return GTK_WIDGET(sheet);
 }
 
@@ -2352,45 +2472,45 @@
 static void
 gnucash_register_class_init (GnucashRegisterClass *class)
 {
-        GtkObjectClass *object_class;
+	GObjectClass *gobject_class;
         GtkWidgetClass *widget_class;
         GtkTableClass *table_class;
 
-        object_class = (GtkObjectClass *) class;
+	gobject_class = G_OBJECT_CLASS (class);
         widget_class = (GtkWidgetClass *) class;
         table_class = (GtkTableClass *) class;
 
-        register_parent_class = gtk_type_class (gtk_table_get_type ());
+        register_parent_class = g_type_class_peek_parent (class);
 
         register_signals[ACTIVATE_CURSOR] =
-                gtk_signal_new("activate_cursor",
-                               GTK_RUN_LAST,
-                               object_class->type,
-                               GTK_SIGNAL_OFFSET(GnucashRegisterClass,
-                                                 activate_cursor),
-                               gtk_marshal_NONE__NONE,
-                               GTK_TYPE_NONE, 0);
+                g_signal_new("activate_cursor",
+			     G_TYPE_FROM_CLASS(gobject_class),
+			     G_SIGNAL_RUN_LAST,
+			     G_STRUCT_OFFSET(GnucashRegisterClass,
+					     activate_cursor),
+			     NULL, NULL,
+			     gtk_marshal_NONE__NONE,
+			     G_TYPE_NONE, 0);
 
         register_signals[REDRAW_ALL] =
-                gtk_signal_new("redraw_all",
-                               GTK_RUN_LAST,
-                               object_class->type,
-                               GTK_SIGNAL_OFFSET(GnucashRegisterClass,
-                                                 redraw_all),
-                               gtk_marshal_NONE__NONE,
-                               GTK_TYPE_NONE, 0);
+                g_signal_new("redraw_all",
+			     G_TYPE_FROM_CLASS(gobject_class),
+			     G_SIGNAL_RUN_LAST,
+			     G_STRUCT_OFFSET(GnucashRegisterClass,
+					     redraw_all),
+			     NULL, NULL,
+			     gtk_marshal_NONE__NONE,
+			     G_TYPE_NONE, 0);
 
         register_signals[REDRAW_HELP] =
-                gtk_signal_new("redraw_help",
-                               GTK_RUN_LAST,
-                               object_class->type,
-                               GTK_SIGNAL_OFFSET(GnucashRegisterClass,
-                                                 redraw_help),
-                               gtk_marshal_NONE__NONE,
-                               GTK_TYPE_NONE, 0);
-
-        gtk_object_class_add_signals(object_class, register_signals,
-                                     LAST_SIGNAL);
+                g_signal_new("redraw_help",
+			     G_TYPE_FROM_CLASS(gobject_class),
+			     G_SIGNAL_RUN_LAST,
+			     G_STRUCT_OFFSET(GnucashRegisterClass,
+					     redraw_help),
+			     NULL, NULL,
+			     gtk_marshal_NONE__NONE,
+			     G_TYPE_NONE, 0);
 
         class->activate_cursor = NULL;
         class->redraw_all = NULL;
@@ -2411,26 +2531,28 @@
 }
 
 
-GtkType
+GType
 gnucash_register_get_type (void)
 {
-        static GtkType gnucash_register_type = 0;
+        static GType gnucash_register_type = 0;
 
         if (!gnucash_register_type) {
-                GtkTypeInfo gnucash_register_info = {
-                        "GnucashRegister",
-                        sizeof (GnucashRegister),
+                static const GTypeInfo gnucash_register_info = {
                         sizeof (GnucashRegisterClass),
-                        (GtkClassInitFunc) gnucash_register_class_init,
-                        (GtkObjectInitFunc) gnucash_register_init,
-                        NULL, /* reserved 1 */
-                        NULL, /* reserved 2 */
-                        (GtkClassInitFunc) NULL
+			NULL,		/* base_init */
+			NULL,		/* base_finalize */
+                        (GClassInitFunc) gnucash_register_class_init,
+			NULL,		/* class_finalize */
+			NULL,		/* class_data */
+                        sizeof (GnucashRegister),
+			0,		/* n_preallocs */
+                        (GInstanceInitFunc) gnucash_register_init,
                 };
 
-                gnucash_register_type = gtk_type_unique
+                gnucash_register_type = g_type_register_static
 			(gtk_table_get_type (),
-			 &gnucash_register_info);
+			 "GnucashRegister",
+			 &gnucash_register_info, 0);
         }
 
         return gnucash_register_type;
@@ -2459,15 +2581,16 @@
         GtkWidget *widget;
         GtkWidget *sheet;
         GtkWidget *scrollbar;
+	GtkWidget *box;
 
-        reg = gtk_type_new(gnucash_register_get_type ());
+        reg = g_object_new (GNUCASH_TYPE_REGISTER, NULL);
         widget = GTK_WIDGET(reg);
 
         sheet = gnucash_sheet_new (table);
         reg->sheet = sheet;
         GNUCASH_SHEET(sheet)->reg = widget;
 
-        header_canvas = gnucash_header_new (GNUCASH_SHEET(sheet));
+        header_canvas = gnc_header_new (GNUCASH_SHEET(sheet));
         reg->header_canvas = header_canvas;
 
         gtk_table_attach (GTK_TABLE(widget), header_canvas,
@@ -2475,16 +2598,26 @@
                           GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                           GTK_FILL,
                           0, 0);
+        gtk_widget_show(header_canvas);
         
         gtk_table_attach (GTK_TABLE(widget), sheet,
                           0, 1, 1, 2,
                           GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                           GTK_FILL | GTK_EXPAND | GTK_SHRINK,
                           0, 0);
+        gtk_widget_show(sheet);
+
+        gtk_table_attach (GTK_TABLE(widget), GNUCASH_SHEET(sheet)->entry,
+                          0, 1, 2, 3,
+                          GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+                          GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+                          0, 0);
+        gtk_widget_hide(GNUCASH_SHEET(sheet)->entry);
+	gtk_widget_set_no_show_all(GNUCASH_SHEET(sheet)->entry, TRUE);
 
         scrollbar = gtk_vscrollbar_new(GNUCASH_SHEET(sheet)->vadj);
         gtk_table_attach (GTK_TABLE(widget), GTK_WIDGET(scrollbar),
-                          1, 2, 0, 2,
+                          1, 2, 0, 3,
                           GTK_FILL,
                           GTK_EXPAND | GTK_SHRINK | GTK_FILL,
                           0, 0);
@@ -2493,13 +2626,34 @@
         
         scrollbar = gtk_hscrollbar_new(GNUCASH_SHEET(sheet)->hadj);
         gtk_table_attach (GTK_TABLE(widget), GTK_WIDGET(scrollbar),
-                          0, 1, 2, 3,
+                          0, 1, 3, 4,
                           GTK_EXPAND | GTK_SHRINK | GTK_FILL,
                           GTK_FILL,
                           0, 0);
         reg->hscrollbar = scrollbar;
         gtk_widget_show(scrollbar);
 
+	/* The gtkrc color helper widgets need to be part of a window
+	 * hierarchy so they can be realized. Stick them in a box
+	 * underneath the register, but don't show the box to the
+	 * user. */
+	box = gtk_hbox_new(FALSE, 0);
+	gtk_widget_set_no_show_all(GTK_WIDGET(box), TRUE);
+	gtk_box_pack_start_defaults(GTK_BOX(box),
+				    GNUCASH_SHEET(sheet)->header_color);
+	gtk_box_pack_start_defaults(GTK_BOX(box),
+				    GNUCASH_SHEET(sheet)->primary_color);
+	gtk_box_pack_start_defaults(GTK_BOX(box),
+				    GNUCASH_SHEET(sheet)->secondary_color);
+	gtk_box_pack_start_defaults(GTK_BOX(box),
+				    GNUCASH_SHEET(sheet)->split_color);
+
+        gtk_table_attach (GTK_TABLE(widget), box,
+                          0, 1, 4, 5,
+                          GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+                          GTK_FILL | GTK_EXPAND | GTK_SHRINK,
+                          0, 0);
+
         return widget;
 }
 
Index: datecell-gnome.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/datecell-gnome.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/register/register-gnome/datecell-gnome.c -Lsrc/register/register-gnome/datecell-gnome.c -u -r1.13 -r1.14
--- src/register/register-gnome/datecell-gnome.c
+++ src/register/register-gnome/datecell-gnome.c
@@ -32,7 +32,6 @@
 
 #include "config.h"
 
-#include <ctype.h>
 #include <gnome.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -52,7 +51,7 @@
 typedef struct _PopBox
 {
   GnucashSheet  *sheet;
-  ItemEdit      *item_edit;
+  GncItemEdit      *item_edit;
   GNCDatePicker *date_picker;
 
   gboolean signals_connected; /* date picker signals connected? */
@@ -72,9 +71,9 @@
 static void gnc_date_cell_gui_destroy (BasicCell *bcell);
 static void gnc_date_cell_destroy (BasicCell *bcell);
 static void gnc_date_cell_modify_verify (BasicCell *_cell,
-                                         const GdkWChar *change,
+                                         const char *change,
                                          int change_len,
-                                         const GdkWChar *newval,
+                                         const char *newval,
                                          int newval_len,
                                          int *cursor_position,
                                          int *start_selection,
@@ -99,7 +98,7 @@
   if (!parsed) return;
   if (!datestr) return;
 
-  scanDate (datestr, &day, &month, &year);
+  qof_scan_date (datestr, &day, &month, &year);
 
   parsed->tm_mday = day;
   parsed->tm_mon  = month - 1;
@@ -116,7 +115,7 @@
 {
   PopBox *box = cell->cell.gui_private;
 
-  printDate (buff,
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
              box->date.tm_mday,
              box->date.tm_mon + 1,
              box->date.tm_year+1900);
@@ -183,13 +182,13 @@
 
   gtk_calendar_get_date (gdp->calendar, &year, &month, &day);
 
-  printDate (buffer, day, month + 1, year);
+  qof_print_date_dmy_buff (buffer, MAX_DATE_LENGTH, day, month + 1, year);
 
   box->in_date_select = TRUE;
   gnucash_sheet_modify_current_cell (box->sheet, buffer);
   box->in_date_select = FALSE;
 
-  item_edit_hide_popup (box->item_edit);
+  gnc_item_edit_hide_popup (box->item_edit);
   box->calendar_popped = FALSE;
 }
 
@@ -203,7 +202,7 @@
 
   gtk_calendar_get_date (gdp->calendar, &year, &month, &day);
 
-  printDate (buffer, day, month + 1, year);
+  qof_print_date_dmy_buff (buffer, MAX_DATE_LENGTH, day, month + 1, year);
 
   box->in_date_select = TRUE;
   gnucash_sheet_modify_current_cell (box->sheet, buffer);
@@ -219,7 +218,7 @@
   switch(event->keyval)
   {
     case GDK_Escape:
-      item_edit_hide_popup (box->item_edit);
+      gnc_item_edit_hide_popup (box->item_edit);
       box->calendar_popped = FALSE;
       break;
 
@@ -237,9 +236,6 @@
   if (!box->signals_connected)
     return;
 
-  if (GTK_OBJECT_DESTROYED (GTK_OBJECT (box->date_picker)))
-    return;
-
   gtk_signal_disconnect_by_data (GTK_OBJECT (box->date_picker), cell);
 
   box->signals_connected = FALSE;
@@ -253,9 +249,6 @@
   if (box->signals_connected)
     return;
 
-  if (GTK_OBJECT_DESTROYED (GTK_OBJECT (box->date_picker)))
-    return;
-
   gtk_signal_connect (GTK_OBJECT(box->date_picker), "date_selected",
                       GTK_SIGNAL_FUNC(date_selected_cb), cell);
 
@@ -301,7 +294,7 @@
     if (box != NULL && box->date_picker != NULL)
     {
       date_picker_disconnect_signals (cell);
-      gtk_object_unref (GTK_OBJECT (box->date_picker));
+      g_object_unref (box->date_picker);
       box->date_picker = NULL;
     }
 
@@ -346,7 +339,7 @@
   box->date.tm_mon  = dada.tm_mon;
   box->date.tm_year = dada.tm_year;
 
-  printDate (buff, dada.tm_mday, dada.tm_mon + 1, dada.tm_year + 1900);
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH, dada.tm_mday, dada.tm_mon + 1, dada.tm_year + 1900);
 
   gnc_basic_cell_set_value_internal (&cell->cell, buff);
 
@@ -368,7 +361,7 @@
   stm = localtime (&secs);
   box->date = *stm;
 
-  printDate (buff,
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
              box->date.tm_mday, 
              box->date.tm_mon + 1, 
              box->date.tm_year + 1900);
@@ -397,7 +390,7 @@
 
   gnc_parse_date (&(box->date), cell->cell.value);
 
-  printDate (buff,
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
              box->date.tm_mday, 
              box->date.tm_mon + 1,
              box->date.tm_year + 1900);
@@ -430,7 +423,7 @@
   if (!gnc_handle_date_accelerator (event, &(box->date), bcell->value))
     return FALSE;
 
-  printDate (buff,
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
              box->date.tm_mday,
              box->date.tm_mon + 1,
              box->date.tm_year + 1900);
@@ -455,9 +448,9 @@
 
 static void
 gnc_date_cell_modify_verify (BasicCell *_cell,
-                             const GdkWChar *change,
+                             const char *change,
                              int change_len,
-                             const GdkWChar *newval,
+                             const char *newval,
                              int newval_len,
                              int *cursor_position,
                              int *start_selection,
@@ -469,9 +462,7 @@
 
   if (box->in_date_select)
   {
-    char *newval_mb = gnc_wcstombs (newval);
-    gnc_basic_cell_set_value (_cell, newval_mb);
-    g_free (newval_mb);
+    gnc_basic_cell_set_value (_cell, newval);
     return;
   }
 
@@ -482,26 +473,40 @@
     accept = TRUE;
   else
   {
-    int i, count = 0;
+    int count = 0;
     unsigned char separator = dateSeparator ();
     gboolean ok = TRUE;
-
-    for (i = 0; i < change_len; i++)
+    const gchar *c;
+    gunichar uc;
+    
+    /* accept only numbers or a date separator. Note that the
+     * separator of '-' (for DATE_FORMAT_ISO) takes precedence
+     * over the accelerator below! */      
+    c = change;
+    while (*c)
     {
-      /* accept only numbers or a date separator. Note that the
-       * separator of '-' (for DATE_FORMAT_ISO) takes precedence
-       * over the accelerator below! */
-      if (!isdigit (change[i]) && (separator != change[i]))
+      uc = g_utf8_get_char (c);
+        
+      if (!g_unichar_isdigit (uc) && (separator != uc))
         ok = FALSE;
 
-      if (separator == change[i])
+      if (separator == uc)
         count++;
-    }
-
-    for (i = 0; i < _cell->value_len; i++)
-      if (separator == _cell->value_w[i])
+      
+      c = g_utf8_next_char (c);
+    }      
+    
+    c = _cell->value;
+    while (*c)
+    {
+      uc = g_utf8_get_char (c);
+        
+      if (separator == uc)
         count++;
 
+      c = g_utf8_next_char (c);
+    }
+     
     if (2 < count)
       ok = FALSE;
 
@@ -512,11 +517,9 @@
   /* keep a copy of the new value */
   if (accept)
   {
-    char *newval_mb = gnc_wcstombs (newval);
 
-    gnc_basic_cell_set_wcvalue_internal (&cell->cell, newval);
-    gnc_parse_date (&(box->date), newval_mb);
-    g_free (newval_mb);
+    gnc_basic_cell_set_value_internal (&cell->cell, newval);
+    gnc_parse_date (&(box->date), newval);
 
     if (!box->date_picker)
       return;
@@ -535,15 +538,15 @@
 {
   GnucashSheet *sheet = data;
   GnomeCanvasItem *item = sheet->item_editor;
-  ItemEdit *item_edit = ITEM_EDIT (item);
+  GncItemEdit *item_edit = GNC_ITEM_EDIT (item);
   DateCell *cell = (DateCell *) bcell;
   PopBox *box = cell->cell.gui_private;
 
   /* initialize gui-specific, private data */
   box->sheet = sheet;
   box->item_edit = item_edit;
-  box->date_picker = item_edit_new_date_picker (box->item_edit);
-  gtk_object_ref (GTK_OBJECT(box->date_picker));
+  box->date_picker = gnc_item_edit_new_date_picker (box->item_edit);
+  g_object_ref (box->date_picker);
   gtk_object_sink (GTK_OBJECT(box->date_picker));
 
   /* to mark cell as realized, remove the realize method */
@@ -560,7 +563,7 @@
 
   date_picker_disconnect_signals ((DateCell *) bcell);
 
-  item_edit_set_popup (box->item_edit, NULL, NULL,
+  gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
                        NULL, NULL, NULL, NULL, NULL);
 
   box->calendar_popped = FALSE;
@@ -599,7 +602,7 @@
   DateCell *cell = (DateCell *) bcell;
   PopBox *box = bcell->gui_private;
 
-  item_edit_set_popup (box->item_edit, GNOME_CANVAS_ITEM (box->date_picker),
+  gnc_item_edit_set_popup (box->item_edit, GNOME_CANVAS_ITEM (box->date_picker),
                        get_popup_height, NULL, popup_set_focus,
                        NULL, NULL, NULL);
 
@@ -626,7 +629,7 @@
 
   date_picker_disconnect_signals ((DateCell *) bcell);
 
-  item_edit_set_popup (box->item_edit, NULL, NULL,
+  gnc_item_edit_set_popup (box->item_edit, NULL, NULL,
                        NULL, NULL, NULL, NULL, NULL);
 
   box->calendar_popped = FALSE;
@@ -659,7 +662,7 @@
 
   gnc_parse_date (&(box->date), str);
 
-  printDate (buff,
+  qof_print_date_dmy_buff (buff, MAX_DATE_LENGTH,
              box->date.tm_mday, 
              box->date.tm_mon + 1, 
              box->date.tm_year + 1900);
Index: gnucash-date-picker.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-date-picker.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/register/register-gnome/gnucash-date-picker.c -Lsrc/register/register-gnome/gnucash-date-picker.c -u -r1.3 -r1.4
--- src/register/register-gnome/gnucash-date-picker.c
+++ src/register/register-gnome/gnucash-date-picker.c
@@ -132,7 +132,7 @@
   gnc_date_picker_signals[DATE_SELECTED] =
     gtk_signal_new("date_selected",
                    GTK_RUN_LAST,
-                   object_class->type,
+                   GTK_CLASS_TYPE(object_class),
                    GTK_SIGNAL_OFFSET(GNCDatePickerClass,
                                      date_selected),
                    gtk_signal_default_marshaller,
@@ -141,7 +141,7 @@
   gnc_date_picker_signals[DATE_PICKED] =
     gtk_signal_new("date_picked",
                    GTK_RUN_LAST,
-                   object_class->type,
+                   GTK_CLASS_TYPE(object_class),
                    GTK_SIGNAL_OFFSET(GNCDatePickerClass,
                                      date_picked),
                    gtk_signal_default_marshaller,
@@ -150,16 +150,12 @@
   gnc_date_picker_signals[KEY_PRESS_EVENT] =
     gtk_signal_new ("key_press_event",
                     GTK_RUN_LAST,
-                    object_class->type,
+                    GTK_CLASS_TYPE(object_class),
                     GTK_SIGNAL_OFFSET(GNCDatePickerClass,
                                       key_press_event),
                     gtk_marshal_NONE__POINTER,
                     GTK_TYPE_NONE, 1,
-                    GTK_TYPE_GDK_EVENT);
-
-  gtk_object_class_add_signals (object_class,
-                                gnc_date_picker_signals,
-                                LAST_SIGNAL);
+                    GDK_TYPE_EVENT);
 
   date_picker_class->date_selected = NULL;
   date_picker_class->date_picked = NULL;
@@ -231,7 +227,6 @@
                                   "x", -10000.0,
                                   "y", -10000.0,
                                   NULL);
-    gtk_widget_realize( hbox );
     gtk_widget_show_all( hbox );
 
     gtk_widget_size_request (calendar, &requisition);
Index: gnucash-grid.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-grid.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/register/register-gnome/gnucash-grid.h -Lsrc/register/register-gnome/gnucash-grid.h -u -r1.1 -r1.2
--- src/register/register-gnome/gnucash-grid.h
+++ src/register/register-gnome/gnucash-grid.h
@@ -28,9 +28,9 @@
 
 
 #define GNUCASH_TYPE_GRID     (gnucash_grid_get_type ())
-#define GNUCASH_GRID(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_GRID, GnucashGrid))
-#define GNUCASH_GRID_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_GRID))
-#define GNUCASH_IS_GRID(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_GRID))
+#define GNUCASH_GRID(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_GRID, GnucashGrid))
+#define GNUCASH_GRID_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_GRID, GnucashGridClass))
+#define GNUCASH_IS_GRID(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_GRID))
 
 
 typedef struct {
@@ -53,9 +53,6 @@
         GdkColor   background;
         GdkColor   grid_color;
         GdkColor   default_color;
-
-        GdkFont *normal_font;
-        GdkFont *italic_font;
 } GnucashGrid;
 
 
@@ -64,7 +61,7 @@
 } GnucashGridClass;
 
 
-GtkType    gnucash_grid_get_type (void);
+GType      gnucash_grid_get_type (void);
 GtkWidget *gnucash_grid_new 	 (GnucashSheet *sheet);
 
 gboolean   gnucash_grid_find_loc_by_pixel (GnucashGrid *grid, gint x, gint y,
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -Lsrc/register/register-gnome/Makefile.am -Lsrc/register/register-gnome/Makefile.am -u -r1.16 -r1.17
--- src/register/register-gnome/Makefile.am
+++ src/register/register-gnome/Makefile.am
@@ -2,15 +2,16 @@
 
 pkglib_LTLIBRARIES = libgncmod-register-gnome.la
 
-libgncmod_register_gnome_la_LDFLAGS = -module 
 libgncmod_register_gnome_la_LIBADD = \
   ${top_builddir}/src/register/register-core/libgncmod-register-core.la \
+  ${top_builddir}/src/core-utils/libcore-utils.la \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${top_builddir}/src/engine/libgncmod-engine.la \
   ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
   ${top_builddir}/src/gnome-utils/libgncmod-gnome-utils.la \
   ${GLIB_LIBS} \
-  ${GNOMEUI_LIBS}
+  ${QOF_LIBS} \
+  ${GNOME_LIBS}
 
 libgncmod_register_gnome_la_SOURCES = \
   gncmod-register-gnome.c \
@@ -52,6 +53,7 @@
 
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/core-utils \
   -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
   -I${top_srcdir}/src/app-utils \
@@ -62,4 +64,5 @@
   ${GLADE_CFLAGS} \
   ${GLIB_CFLAGS} \
   ${GTK_XIM_FLAGS} \
-  ${GNOME_INCLUDEDIR}
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS}
Index: gnucash-header.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-header.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/register/register-gnome/gnucash-header.h -Lsrc/register/register-gnome/gnucash-header.h -u -r1.3 -r1.4
--- src/register/register-gnome/gnucash-header.h
+++ src/register/register-gnome/gnucash-header.h
@@ -24,12 +24,12 @@
 #include <gnome.h>
 
 
-#define GNUCASH_TYPE_HEADER     (gnucash_header_get_type ())
-#define GNUCASH_HEADER(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_HEADER, GnucashHeader))
-#define GNUCASH_HEADER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_HEADER))
-#define GNUCASH_IS_HEADER(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_HEADER))
+#define GNC_TYPE_HEADER     (gnc_header_get_type ())
+#define GNC_HEADER(o)       (G_TYPE_CHECK_INSTANCE_CAST((o), GNC_TYPE_HEADER, GncHeader))
+#define GNC_HEADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNC_TYPE_HEADER, GncHeaderClass))
+#define GNC_IS_HEADER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNC_TYPE_HEADER))
 
-GtkType    gnucash_header_get_type (void);
+GType    gnc_header_get_type (void);
 
 typedef struct {
         GnomeCanvasItem canvas_item;
@@ -54,18 +54,18 @@
         GdkGC *gc;
         GdkCursor *normal_cursor;
         GdkCursor *resize_cursor;
-} GnucashHeader;
+} GncHeader;
 
 
 typedef struct {
         GnomeCanvasItemClass parent_class;
-} GnucashHeaderClass;
+} GncHeaderClass;
 
 
-GtkWidget *gnucash_header_new (GnucashSheet *sheet);
-void gnucash_header_reconfigure (GnucashHeader *header);
+GtkWidget *gnc_header_new (GnucashSheet *sheet);
+void gnc_header_reconfigure (GncHeader *header);
 
-void gnucash_header_set_header_rows (GnucashHeader *header,
+void gnc_header_set_header_rows (GncHeader *header,
                                      int num_phys_rows);
 
 #endif /* GNUCASH_HEADER_H */
Index: gnucash-style.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-style.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -Lsrc/register/register-gnome/gnucash-style.h -Lsrc/register/register-gnome/gnucash-style.h -u -r1.6 -r1.7
--- src/register/register-gnome/gnucash-style.h
+++ src/register/register-gnome/gnucash-style.h
@@ -68,9 +68,6 @@
 
 void gnucash_sheet_style_init(void);
 
-void gnucash_style_set_register_font_name(const char *name);
-void gnucash_style_set_register_hint_font_name(const char *name);
-
 gint gnucash_style_col_is_resizable (SheetBlockStyle *style, int col);
 
 CellDimensions * gnucash_style_get_cell_dimensions (SheetBlockStyle *style,
@@ -111,8 +108,6 @@
 void gnucash_style_ref   (SheetBlockStyle *style);
 void gnucash_style_unref (SheetBlockStyle *style);
 
-void gnucash_style_config_register_borders (gboolean use_vertical_lines,
-                                            gboolean use_horizontal_lines);
 void gnucash_sheet_get_borders (GnucashSheet *sheet, VirtualLocation virt_loc,
                                 PhysicalCellBorders *borders);
 
@@ -131,10 +126,6 @@
 void gnucash_sheet_set_header_widths (GnucashSheet *sheet,
                                       GNCHeaderWidths widths);
 
-
-extern GdkFont *gnucash_register_font;
-extern GdkFont *gnucash_register_hint_font;
-
 #endif
 
 
Index: gnucash-sheet.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-sheet.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/register/register-gnome/gnucash-sheet.h -Lsrc/register/register-gnome/gnucash-sheet.h -u -r1.8 -r1.9
--- src/register/register-gnome/gnucash-sheet.h
+++ src/register/register-gnome/gnucash-sheet.h
@@ -23,6 +23,8 @@
 
 #include <gnome.h>
 
+#include "split-register-model.h"
+
 #include "table-allgui.h"
 
 #define CELL_VPADDING 3
@@ -30,15 +32,15 @@
 
 
 #define GNUCASH_TYPE_REGISTER     (gnucash_register_get_type ())
-#define GNUCASH_REGISTER(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_REGISTER, GnucashRegister))
-#define GNUCASH_REGISTER_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_REGISTER))
-#define GNUCASH_IS_REGISTER(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_REGISTER))
+#define GNUCASH_REGISTER(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_REGISTER, GnucashRegister))
+#define GNUCASH_REGISTER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_REGISTER))
+#define GNUCASH_IS_REGISTER(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_REGISTER))
 
 
 #define GNUCASH_TYPE_SHEET     (gnucash_sheet_get_type ())
-#define GNUCASH_SHEET(obj)     (GTK_CHECK_CAST((obj), GNUCASH_TYPE_SHEET, GnucashSheet))
-#define GNUCASH_SHEET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_SHEET))
-#define GNUCASH_IS_SHEET(o)    (GTK_CHECK_TYPE((o), GNUCASH_TYPE_SHEET))
+#define GNUCASH_SHEET(obj)     (G_TYPE_CHECK_INSTANCE_CAST((obj), GNUCASH_TYPE_SHEET, GnucashSheet))
+#define GNUCASH_SHEET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GNUCASH_TYPE_SHEET))
+#define GNUCASH_IS_SHEET(o)    (G_TYPE_CHECK_INSTANCE_TYPE((o), GNUCASH_TYPE_SHEET))
 
 
 typedef struct _SheetBlockStyle SheetBlockStyle;
@@ -85,6 +87,14 @@
         GnomeCanvasItem *item_editor;
         GtkWidget *entry;   
 
+        gboolean   use_theme_colors;
+        gboolean   use_horizontal_lines;
+        gboolean   use_vertical_lines;
+        GtkWidget *header_color;   
+        GtkWidget *primary_color;   
+        GtkWidget *secondary_color;   
+        GtkWidget *split_color;   
+
         gboolean input_cancelled;
 
         gint top_block;  /* maybe not fully visible */
@@ -127,14 +137,14 @@
 } GnucashRegister;
 
 
-GtkType    gnucash_sheet_get_type (void);
+GType      gnucash_sheet_get_type (void);
 GtkWidget *gnucash_sheet_new (Table *table);
 
 void gnucash_sheet_table_load (GnucashSheet *sheet, gboolean do_scroll);
 
 void gnucash_sheet_recompute_block_offsets (GnucashSheet *sheet);
 
-GtkType gnucash_register_get_type (void);
+GType gnucash_register_get_type (void);
 
 /* this already has scrollbars attached */
 GtkWidget *gnucash_register_new (Table *table);
@@ -202,7 +212,7 @@
 void gnucash_register_cut_clipboard (GnucashRegister *reg);
 void gnucash_register_copy_clipboard (GnucashRegister *reg);
 void gnucash_register_paste_clipboard (GnucashRegister *reg);
-
+void gnucash_register_refresh_from_gconf (GnucashRegister *reg);
 
 typedef struct
 {
@@ -219,6 +229,8 @@
         void (*redraw_help)     (GnucashRegister *reg);
 } GnucashRegisterClass;
 
+GdkColor *get_gtkrc_color (GnucashSheet *sheet, RegisterColor field_type);
+
 #endif
 
 
Index: gnucash-color.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/gnucash-color.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/register/register-gnome/gnucash-color.c -Lsrc/register/register-gnome/gnucash-color.c -u -r1.2 -r1.3
--- src/register/register-gnome/gnucash-color.c
+++ src/register/register-gnome/gnucash-color.c
@@ -43,7 +43,6 @@
 #include "gnucash-color.h"
 
 static int color_inited;
-static GdkColorContext *gnucash_color_context;
 
 /* Public Colors */
 GdkColor gn_white, gn_black, gn_light_gray;
@@ -73,40 +72,47 @@
 gulong
 gnucash_color_alloc (gushort red, gushort green, gushort blue)
 {
-        int failed;
-
+	GdkColormap *colormap = gtk_widget_get_default_colormap ();
+	GdkColor *c;
+	
         if (!color_inited)
                 gnucash_color_init ();
 
-        return gdk_color_context_get_pixel (gnucash_color_context,
-                                            red, green, blue, &failed);
+	c = g_new0 (GdkColor, 1);
+	c->red = red;
+	c->green = green;
+	c->blue = blue;
+
+        g_return_val_if_fail (gdk_colormap_alloc_color (colormap, c, FALSE, TRUE), 0);
+
+	return c->pixel;
 }
 
 
 void
 gnucash_color_alloc_gdk (GdkColor *c)
 {
-        int failed;
+	GdkColormap *colormap = gtk_widget_get_default_colormap ();
 
         g_return_if_fail (c != NULL);
 
-        c->pixel = gdk_color_context_get_pixel (gnucash_color_context, c->red,
-						c->green, c->blue, &failed);
+        g_assert (gdk_colormap_alloc_color (colormap, c,
+					    FALSE, TRUE));
 }
 
 
 void
 gnucash_color_alloc_name (const char *name, GdkColor *c)
 {
-        int failed;
+	GdkColormap *colormap = gtk_widget_get_default_colormap ();
 
         g_return_if_fail (name != NULL);
         g_return_if_fail (c != NULL);
 
         gdk_color_parse (name, c);
         c->pixel = 0;
-        c->pixel = gdk_color_context_get_pixel (gnucash_color_context, c->red,
-						c->green, c->blue, &failed);
+        g_assert (gdk_colormap_alloc_color (colormap, c,
+					    FALSE, TRUE));
 }
 
 
@@ -135,9 +141,7 @@
         color->green = argb & 0xff00;
         color->blue = (argb & 0xff) << 8;
 
-        color->pixel = gnucash_color_alloc(color->red,
-                                           color->green,
-                                           color->blue);
+        gnucash_color_alloc_gdk(color);
 
         g_hash_table_insert (color_hash_table, newkey, color);
 
@@ -150,11 +154,6 @@
 {
         GdkColormap *colormap = gtk_widget_get_default_colormap ();
 
-        /* Initialize the color context */
-        gnucash_color_context =
-                gdk_color_context_new (gtk_widget_get_default_visual (),
-                                       colormap);
-
         /* Allocate the default colors */
         gdk_color_white (colormap, &gn_white);
         gdk_color_black (colormap, &gn_black);
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/register/register-gnome/test/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/register/register-gnome/test/Makefile.am -Lsrc/register/register-gnome/test/Makefile.am -u -r1.7 -r1.8
--- src/register/register-gnome/test/Makefile.am
+++ src/register/register-gnome/test/Makefile.am
@@ -12,7 +12,10 @@
   test-link-module
 
 test_link_module_SOURCES = test-link-module.c
-test_link_module_LDADD = ../libgncmod-register-gnome.la 
+test_link_module_LDADD = \
+  ${top_builddir}/src/engine/libgncmod-engine.la \
+  ${top_builddir}/src/app-utils/libgncmod-app-utils.la \
+  ../libgncmod-register-gnome.la 
 
 #EXTRA_DIST = test-load-module
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lsrc/report/Makefile.am -Lsrc/report/Makefile.am -u -r1.2 -r1.3
--- src/report/Makefile.am
+++ src/report/Makefile.am
@@ -2,11 +2,11 @@
   report-system \
   standard-reports \
   utility-reports \
-  locale-specific \
-  stylesheets
+  locale-specific
 
 GUI_SUBDIRS = \
-  report-gnome
+  report-gnome \
+  stylesheets
 
 if GNUCASH_ENABLE_GUI
 SUBDIRS = $(NONGUI_SUBDIRS) $(GUI_SUBDIRS)
Index: gncmod-locale-reports-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/gncmod-locale-reports-us.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -Lsrc/report/locale-specific/us/gncmod-locale-reports-us.c -u -r1.12 -r1.13
--- src/report/locale-specific/us/gncmod-locale-reports-us.c
+++ src/report/locale-specific/us/gncmod-locale-reports-us.c
@@ -8,7 +8,6 @@
 #include "config.h"
 #include <stdio.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 #include <glib.h>
 #include <locale.h>
 #include <string.h>
@@ -86,7 +85,7 @@
   }
 
   /* Load the module scheme code */
-  if(gh_eval_str(report_locale) 
+  if(scm_c_eval_string(report_locale) 
      == SCM_BOOL_F) {
     return FALSE;
   }
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/Makefile.am,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/report/locale-specific/us/Makefile.am -Lsrc/report/locale-specific/us/Makefile.am -u -r1.15 -r1.16
--- src/report/locale-specific/us/Makefile.am
+++ src/report/locale-specific/us/Makefile.am
@@ -5,7 +5,6 @@
 libgncmod_locale_reports_us_la_SOURCES = \
   gncmod-locale-reports-us.c 
 
-libgncmod_locale_reports_us_la_LDFLAGS = -module
 libgncmod_locale_reports_us_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${GUILE_LIBS} \
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/locale-specific/us/test/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -Lsrc/report/locale-specific/us/test/Makefile.am -Lsrc/report/locale-specific/us/test/Makefile.am -u -r1.17 -r1.18
--- src/report/locale-specific/us/test/Makefile.am
+++ src/report/locale-specific/us/test/Makefile.am
@@ -5,7 +5,6 @@
   --gnc-module-dir ${top_builddir}/src/engine \
   --gnc-module-dir ${top_builddir}/src/calculation \
   --gnc-module-dir ${top_builddir}/src/app-utils \
-  --gnc-module-dir ${top_builddir}/src/app-file \
   --gnc-module-dir ${top_builddir}/src/tax/us \
   --gnc-module-dir ${top_builddir}/src/report/report-system \
   --gnc-module-dir ${top_builddir}/src/report/locale-specific/us \
Index: report-utilities.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/report-utilities.scm,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/report/report-system/report-utilities.scm -Lsrc/report/report-system/report-utilities.scm -u -r1.22 -r1.23
--- src/report/report-system/report-utilities.scm
+++ src/report/report-system/report-utilities.scm
@@ -336,15 +336,16 @@
 
 ;; A commodity collector. This is intended to handle multiple
 ;; currencies' amounts. The amounts are accumulated via 'add, the
-;; result can be fetched via 'format.  Used to work with strings as
-;; currencies and doubles as values, but now it uses <gnc:commodity*>
-;; as commodity and <gnc:numeric> as value. 
-;; Old Example: (define a (make-commodity-collector)) ... 
-;; (a 'add 'USD 12) ...  (a 'format (lambda(x y)(list x y)) #f) 
-;; used to give you something like 
-;; ((USD 123.4) (DEM 12.21) (FRF -23.32))
-;; But now USD is a <gnc:commodity*> and 123.4 a <gnc:numeric>, so
-;; there is no simple example anymore.
+;; result can be fetched via 'format.  This used to work with strings
+;; as currencies and doubles as values, but now it uses
+;; <gnc:commodity*> as commodity and <gnc:numeric> as value.
+;;
+;; Old Example: (define a (make-commodity-collector)) ...  (a 'add 'USD
+;; 12) ...  (a 'format (lambda(x y)(list x y)) #f) used to give you
+;; something like ((USD 123.4) (DEM 12.21) (FRF -23.32))
+;;
+;; New Example: But now USD is a <gnc:commodity*> and 123.4 a
+;; <gnc:numeric>, so there is no simple example anymore.
 ;;
 ;; The functions:
 ;;   'add <commodity> <amount>: Add the given amount to the 
@@ -456,9 +457,15 @@
 	('getmonetary (getmonetary commodity amount))
 	('list commoditylist) ; this one is only for internal use
 	(else (gnc:warn "bad commodity-collector action: " action))))))
+
+
 ;; Bah. Let's get back to normal data types -- this procedure thingy
 ;; from above makes every code almost unreadable. First step: replace
 ;; all 'action function calls by the normal functions below.
+
+;; CAS: ugh.  Having two usages is even *more* confusing, so let's
+;; please settle on one or the other.  What's Step 2?  How 'bout
+;; documenting the new functions?
 (define (gnc:commodity-collector-add collector commodity amount)
   (collector 'add commodity amount))
 (define (gnc:commodity-collector-merge collector other-collector)
@@ -669,24 +676,24 @@
     (gnc:transaction-get-void-status trans)))
 
 (define (gnc:report-starting report-name)
-  (gnc:mdi-show-progress (sprintf #f
-				  (_ "Building '%s' report ...")
-				  (gnc:gettext report-name))
-			 0))
+  (gnc:window-show-progress (sprintf #f
+				     (_ "Building '%s' report ...")
+				     (gnc:gettext report-name))
+			    0))
 
 (define (gnc:report-render-starting report-name)
-  (gnc:mdi-show-progress (sprintf #f
-				  (_ "Rendering '%s' report ...")
-				  (if (string-null? report-name)
-				      (gnc:gettext "Untitled")
-				      (gnc:gettext report-name)))
-			 0))
+  (gnc:window-show-progress (sprintf #f
+				     (_ "Rendering '%s' report ...")
+				     (if (string-null? report-name)
+					 (gnc:gettext "Untitled")
+					 (gnc:gettext report-name)))
+			    0))
 
 (define (gnc:report-percent-done percent)
-  (gnc:mdi-show-progress #f percent))
+  (gnc:window-show-progress #f percent))
 
 (define (gnc:report-finished)
-  (gnc:mdi-show-progress #f -1))
+  (gnc:window-show-progress #f -1))
 
 ;; function to count the total number of splits to be iterated
 (define (gnc:accounts-count-splits accounts)
Index: html-style-sheet.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-style-sheet.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-system/html-style-sheet.scm -Lsrc/report/report-system/html-style-sheet.scm -u -r1.1 -r1.2
--- src/report/report-system/html-style-sheet.scm
+++ src/report/report-system/html-style-sheet.scm
@@ -127,8 +127,8 @@
 
 (define (gnc:save-style-sheet-options) 
   (let ((port (false-if-exception
-               (open gnc:current-config-auto
-                     (logior O_WRONLY O_CREAT O_APPEND)))))
+               (open gnc:current-saved-stylesheets
+                     (logior O_WRONLY O_CREAT O_TRUNC)))))
     (if (not port)
         (gnc:warn (_ "Can't save style sheet"))
         (begin
Index: report.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/report.scm,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/report/report-system/report.scm -Lsrc/report/report-system/report.scm -u -r1.14 -r1.15
--- src/report/report-system/report.scm
+++ src/report/report-system/report.scm
@@ -26,8 +26,8 @@
 ;; to generate the reports menu whenever a new window opens and to
 ;; figure out what to do when a report needs to be generated.
 ;;
-;; The key is the string naming the report and the value is the 
-;; report definition structure.
+;; The key is the string naming the report (the report "type") and the
+;; value is the report definition structure.
 (define *gnc:_report-templates_* (make-hash-table 23))
 
 ;; this is a hash of 'report ID' to instantiated report.  the 
@@ -36,7 +36,7 @@
 (define *gnc:_report-next-serial_* 0)
 
 ;; Define those strings here to make changes easier and avoid typos.
-(define gnc:menuname-reports (N_ "_Reports"))
+(define gnc:menuname-reports "Reports")
 (define gnc:menuname-asset-liability (N_ "_Assets & Liabilities"))
 (define gnc:menuname-income-expense (N_ "_Income & Expense"))
 (define gnc:menuname-taxes (N_ "_Taxes"))
@@ -47,6 +47,7 @@
 (define gnc:pagename-display (N_ "Display"))
 (define gnc:optname-reportname (N_ "Report name"))
 
+;; A <report-template> represents one of the available report types.
 (define <report-template>
   (make-record-type "<report-template>"
                     ;; The data items in a report record
@@ -55,6 +56,7 @@
                               renderer in-menu? menu-path menu-name
                               menu-tip export-types export-thunk)))
 
+;; if args is supplied, it is a list of field names and values
 (define (gnc:define-report . args)
   ;; For now the version is ignored, but in the future it'll let us
   ;; change behaviors without breaking older reports.
@@ -173,6 +175,7 @@
           (gnc:register-option options names)
           options))))
 
+;; A <report> represents an instantiation of a particular report type.
 (define <report>
   (make-record-type "<report>"
                     '(type id options dirty? needs-save? editor-widget ctext)))
@@ -221,12 +224,15 @@
 (define gnc:report-set-editor-widget!
   (record-modifier <report> 'editor-widget))
 
+;; ctext is for caching the rendered html
 (define gnc:report-ctext 
   (record-accessor <report> 'ctext))
 
 (define gnc:report-set-ctext!
   (record-modifier <report> 'ctext))
 
+;; gnc:make-report instantiates a report from a report-template.
+;; The actual report is stored away in a hash-table -- only the id is returned.
 (define (gnc:make-report template-name . rest)
   (let ((r ((record-constructor <report>) 
             template-name ;; type
@@ -254,7 +260,7 @@
            (if cb
                (cb r))))
        options))
-    
+
     (hash-set! *gnc:_reports_* (gnc:report-id r) r)
     id))
 
@@ -272,6 +278,8 @@
         (gnc:report-template-new-options template)
         #f)))
 
+;; A convenience wrapper to get the report-template's export types from
+;; an instantiated report.
 (define (gnc:report-export-types report)
   (let ((template (hash-ref *gnc:_report-templates_* 
                             (gnc:report-type report))))
@@ -279,6 +287,8 @@
         (gnc:report-template-export-types template)
         #f)))
 
+;; A convenience wrapper to get the report-template's export thunk from
+;; an instantiated report.
 (define (gnc:report-export-thunk report)
   (let ((template (hash-ref *gnc:_report-templates_* 
                             (gnc:report-type report))))
@@ -326,13 +336,14 @@
 
 (define (gnc:report-remove-by-id id)
   (let ((r (hash-ref *gnc:_reports_* id)))
-    (for-each 
-     (lambda (child)
-       (gnc:report-remove-by-id child))
-     (gnc:report-children r))
+    ;; 2005.10.02, jsled: gnc:report-children doesn't appear defined anywhere?
+    ;; (for-each 
+     ;; (lambda (child)
+     ;;   (gnc:report-remove-by-id child))
+     ;; (gnc:report-children r))
     (hash-remove! *gnc:_reports_* id)))
-
-(define (gnc:find-report id) 
+ 
+(define (gnc:find-report id)
   (hash-ref *gnc:_reports_* id))
 
 (define (gnc:find-report-template report-type) 
@@ -392,30 +403,37 @@
 	     (open-file conf-file-name "a"))
     (force-output)))
 
+;; gets the renderer from the report template;
+;; gets the stylesheet from the report;
+;; renders the html doc and caches the resulting string;
+;; returns the html string.
 (define (gnc:report-render-html report headers?)
   (if (and (not (gnc:report-dirty? report))
            (gnc:report-ctext report))
       ;; if there's clean cached text, return it 
-      (begin 
-        (gnc:report-ctext report))
+      ;;(begin
+      (gnc:report-ctext report)
+      ;;  )
       
       ;; otherwise, rerun the report 
       (let ((template (hash-ref *gnc:_report-templates_* 
                                 (gnc:report-type report)))
 	    (doc #f))
         (set! doc (if template
-            (let* ((renderer (gnc:report-template-renderer template))
-                   (stylesheet (gnc:report-stylesheet report))
-                   (doc (renderer report))
-                   (html #f))
-              (gnc:html-document-set-style-sheet! doc stylesheet)
-              (set! html (gnc:html-document-render doc headers?))
-              (gnc:report-set-ctext! report html)
-              (gnc:report-set-dirty?! report #f)              
-              html)
-            #f))
-	doc)))
+                      (let* ((renderer (gnc:report-template-renderer template))
+                             (stylesheet (gnc:report-stylesheet report))
+                             (doc (renderer report))
+                             (html #f))
+                        (gnc:html-document-set-style-sheet! doc stylesheet)
+                        (set! html (gnc:html-document-render doc headers?))
+                        (gnc:report-set-ctext! report html) ;; cache the html
+                        (gnc:report-set-dirty?! report #f)  ;; mark it clean
+                        html)
+                      #f))
+	doc))) ;; YUK! inner doc is html-doc object; outer doc is a string.
 
+;; looks up the report by id and renders it with gnc:report-render-html
+;; marks the cursor busy during rendering; returns the html
 (define (gnc:report-run id)
   (let ((report (gnc:find-report id))
 	(start-time (gettimeofday))
@@ -434,6 +452,8 @@
     (gnc:unset-busy-cursor #f)
     html))
 
+
+;; "thunk" should take the report-type and the report template record
 (define (gnc:report-templates-for-each thunk)
   (hash-for-each (lambda (name template) (thunk name template))
                  *gnc:_report-templates_*))
Index: html-barchart.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-barchart.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-system/html-barchart.scm -Lsrc/report/report-system/html-barchart.scm -u -r1.1 -r1.2
--- src/report/report-system/html-barchart.scm
+++ src/report/report-system/html-barchart.scm
@@ -21,7 +21,6 @@
 ;; Boston, MA  02111-1307,  USA       gnu at gnu.org
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-
 (define <html-barchart>
   (make-record-type "<html-barchart>"
                     '(width 
@@ -37,9 +36,11 @@
                       row-labels-rotated?
 		      stacked?
                       data
-		      button-1-bar-urls button-2-bar-urls 
+		      button-1-bar-urls
+                      button-2-bar-urls 
 		      button-3-bar-urls
-		      button-1-legend-urls button-2-legend-urls 
+		      button-1-legend-urls
+                      button-2-legend-urls 
 		      button-3-legend-urls)))
 
 (define gnc:html-barchart? 
Index: gnc-report.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/gnc-report.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/report/report-system/gnc-report.c -Lsrc/report/report-system/gnc-report.c -u -r1.3 -r1.4
--- src/report/report-system/gnc-report.c
+++ src/report/report-system/gnc-report.c
@@ -27,14 +27,13 @@
 #include <libguile.h>
 #include <stdio.h>
 #include <string.h>
-#include "guile-mappings.h"
 
 #include "gnc-report.h"
 
 gboolean
 gnc_run_report (int report_id, char ** data)
 {
-  char *free_data;
+  const gchar *free_data;
   SCM run_report;
   SCM scm_text;
 
@@ -47,9 +46,8 @@
   if (!SCM_STRINGP (scm_text))
     return FALSE;
 
-  free_data = gh_scm2newstr (scm_text, NULL);
+  free_data = SCM_STRING_CHARS (scm_text);
   *data = g_strdup (free_data);
-  if (free_data) free (free_data);
 
   return TRUE;
 }
@@ -71,3 +69,20 @@
 
   return gnc_run_report (report_id, data);
 }
+
+gchar*
+gnc_report_name( SCM report )
+{
+  SCM    get_name = scm_c_eval_string("gnc:report-name");
+  SCM    value;
+  
+  if (report == SCM_BOOL_F)
+    return NULL;
+
+  value = scm_call_1(get_name, report);
+  if (!SCM_STRINGP(value))
+    return NULL;
+
+  return g_strdup(SCM_STRING_CHARS(value));
+}
+
Index: html-piechart.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-piechart.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-system/html-piechart.scm -Lsrc/report/report-system/html-piechart.scm -u -r1.1 -r1.2
--- src/report/report-system/html-piechart.scm
+++ src/report/report-system/html-piechart.scm
@@ -23,11 +23,19 @@
 
 (define <html-piechart>
   (make-record-type "<html-piechart>"
-                    '(width height title subtitle data colors labels
-                            button-1-slice-urls button-2-slice-urls 
-                            button-3-slice-urls
-                            button-1-legend-urls button-2-legend-urls 
-                            button-3-legend-urls)))
+                    '(width
+                      height
+                      title
+                      subtitle
+                      data
+                      colors
+                      labels
+                      button-1-slice-urls
+                      button-2-slice-urls 
+                      button-3-slice-urls
+                      button-1-legend-urls
+                      button-2-legend-urls 
+                      button-3-legend-urls)))
 
 
 (define gnc:html-piechart? 
Index: html-scatter.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-scatter.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-system/html-scatter.scm -Lsrc/report/report-system/html-scatter.scm -u -r1.1 -r1.2
--- src/report/report-system/html-scatter.scm
+++ src/report/report-system/html-scatter.scm
@@ -26,24 +26,27 @@
 
 (define <html-scatter>
   (make-record-type "<html-scatter>"
-                    '(width height title subtitle 
-			    x-axis-label y-axis-label
-
-			    ;; a list of x-y-value lists.
-			    data 
-			    ;; Valid marker names are: 
-			    ;; "none", "circle", "diamond", "cross", "x",
-			    ;; "square", "asterisk", "filled circle",
-			    ;; "filled square", "filled diamond"
-			    ;; The full list can be found in
-			    ;; guppi3/src/libguppiplot/guppi-marker.c in
-			    ;; guppi_marker_info_array[]
-			    marker
-			    ;; The color of the marker. Should be a rgba
-			    ;; value as a hex string, as returned by
-			    ;; gnc:color-option->hex-string
-			    markercolor 
-			    )))
+                    '(width
+                      height
+                      title
+                      subtitle 
+                      x-axis-label
+                      y-axis-label
+                      ;; a list of x-y-value lists.
+                      data 
+                      ;; Valid marker names are: 
+                      ;; "none", "circle", "diamond", "cross", "x",
+                      ;; "square", "asterisk", "filled circle",
+                      ;; "filled square", "filled diamond"
+                      ;; The full list can be found in
+                      ;; guppi3/src/libguppiplot/guppi-marker.c in
+                      ;; guppi_marker_info_array[]
+                      marker
+                      ;; The color of the marker. Should be a rgba
+                      ;; value as a hex string, as returned by
+                      ;; gnc:color-option->hex-string
+                      markercolor 
+                      )))
 
 (define gnc:html-scatter? 
   (record-predicate <html-scatter>))
Index: commodity-utilities.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/commodity-utilities.scm,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lsrc/report/report-system/commodity-utilities.scm -Lsrc/report/report-system/commodity-utilities.scm -u -r1.14 -r1.15
--- src/report/report-system/commodity-utilities.scm
+++ src/report/report-system/commodity-utilities.scm
@@ -657,13 +657,17 @@
 ;; and the domestic currency are the same, return the foreign 
 ;; amount unchanged, otherwise return 0
 
+;; WARNING: many uses of exchange functions assume that the function
+;; will return a valid <gnc:monetary>.  However, this function returns
+;; #f if the commodities don't match.  Therefore, if you use this
+;; function in a mixed commodity context, stuff will probably crash.
 (define (gnc:exchange-if-same foreign domestic)
   (if (gnc:commodity-equiv? (gnc:gnc-monetary-commodity foreign) domestic)
       foreign
       #f))
 
 ;; This one returns the ready-to-use function for calculation of the
-;; exchange rates. The returned function takes a <gnc-monetary> and
+;; exchange rates.  The returned function takes a <gnc-monetary> and
 ;; the <gnc:commodity*> domestic-commodity, exchanges the amount into
 ;; the domestic currency and returns a <gnc-monetary>.
 (define (gnc:make-exchange-function exchange-alist)
@@ -866,29 +870,45 @@
 
 ;; Adds all different commodities in the commodity-collector <foreign>
 ;; by using the exchange rates of <exchange-fn> to calculate the
-;; exchange rates to the commodity <domestic>. Returns a
-;; <gnc-monetary> with the domestic commodity and its corresponding
-;; balance. If the foreign balance is #f, it returns #f.
+;; exchange rates to the commodity <domestic>.
+;;
+;; CAS: Previously, the exchange-fn was not optional -- we would crash
+;; if it was invalid.  I've changed this so that when exchange-fn is
+;; #f, #f is returned.  Since #f is already returned when foreign is
+;; #f, and since any previous dependance on some behavior for the case
+;; where exchange-fn was #f would've crashed, I think this change is
+;; safe.
+;;
+;; Returns a <gnc-monetary> with the domestic commodity and its
+;; corresponding balance. If the foreign balance is #f, it returns #f.
 (define (gnc:sum-collector-commodity foreign domestic exchange-fn)
-  (if foreign
-      (let ((balance (gnc:make-commodity-collector)))
-	(foreign
-	 'format 
-	 (lambda (curr val) 
-	   (if (gnc:commodity-equiv? domestic curr)
-	       (balance 'add domestic val)
-	       (balance 'add domestic 
-			(gnc:gnc-monetary-amount 
-			 (exchange-fn (gnc:make-gnc-monetary curr val) 
-				      domestic)))))
-	 #f)
-	(balance 'getmonetary domestic #f))
-      #f))
+  (cond ((and foreign exchange-fn)
+         (let ((balance (gnc:make-commodity-collector)))
+           (foreign
+            'format
+            (lambda (curr val)
+              (if (gnc:commodity-equiv? domestic curr)
+                  (balance 'add domestic val)
+                  (balance 'add domestic
+                           (gnc:gnc-monetary-amount
+                            ;; BUG?: this bombs if the exchange-fn
+                            ;; returns #f instead of an actual
+                            ;; <gnc:monetary>.  Better to just return #f.
+                            (exchange-fn (gnc:make-gnc-monetary curr val)
+                                         domestic))
+                           )
+                  )
+              )
+            #f)
+           (balance 'getmonetary domestic #f)))
+        (else #f)
+        )
+  )
 
 ;; As above, but adds only the commodities of other stocks and
-;; mutual-funds. Returns a commodity-collector which (still) may have
-;; several different commodities in it -- if there have been different
-;; *currencies*, not only stocks.
+;; mutual-funds. Returns a commodity-collector, (not a <gnc:monetary>)
+;; which (still) may have several different commodities in it -- if
+;; there have been different *currencies*, not only stocks.
 (define (gnc:sum-collector-stocks foreign domestic exchange-fn)
   (if foreign
       (let ((balance (gnc:make-commodity-collector)))
Index: html-table.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-table.scm,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lsrc/report/report-system/html-table.scm -Lsrc/report/report-system/html-table.scm -u -r1.3 -r1.4
--- src/report/report-system/html-table.scm
+++ src/report/report-system/html-table.scm
@@ -418,6 +418,8 @@
 	 )
     ))
 
+;; if the 4th arg is a cell, overwrite the existing cell,
+;; otherwise, append all remaining objects to the existing cell
 (define (gnc:html-table-set-cell! table row col . objects)
   (let ((rowdata #f)
 	(row-loc #f)
@@ -562,12 +564,15 @@
 ;; It would be nice to have table row/col/cell accessor functions in here.
 ;; It would also be nice to have table juxtaposition functions, too.
 ;; i.e., (gnc:html-table-nth-row table n)
+;;  [ CAS: how is that different from gnc:html-table-get-row ? ]
+
 ;;       (gnc:html-table-append-table-horizontal table add-table)
 ;; (An old merge-table used to exist inside balance-sheet.scm/GnuCash 1.8.9.)
 ;; Feel free to contribute! :-)
 ;; 
 
 ;; This function was moved here from balance-sheet.scm.
+;; This function "stacks" the two tables vertically.
 (define (gnc:html-table-merge t1 t2)
   (begin 
     (gnc:html-table-set-data! t1
Index: report-system.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/report-system.scm,v
retrieving revision 1.26
retrieving revision 1.27
diff -Lsrc/report/report-system/report-system.scm -Lsrc/report/report-system/report-system.scm -u -r1.26 -r1.27
--- src/report/report-system/report-system.scm
+++ src/report/report-system/report-system.scm
@@ -89,6 +89,7 @@
 (export gnc:first-html-build-acct-table)
 (export gnc:html-make-exchangerates)
 (export gnc:html-make-no-account-warning)
+(export gnc:html-make-generic-options-warning)
 (export gnc:html-make-empty-data-warning)
 
 ;; report.scm
@@ -435,7 +436,7 @@
 (export gnc:account-code-less-p)
 (export gnc:account-name-less-p)
 (export gnc:account-path-less-p)
-(export gnc:identity)
+;;(export gnc:identity)
 (export gnc:html-table-add-labeled-amount-line!)
 (export gnc:html-table-add-account-balances)
 (export gnc:second-html-build-acct-table)
Index: html-acct-table.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-acct-table.scm,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/report-system/html-acct-table.scm -Lsrc/report/report-system/html-acct-table.scm -u -r1.4 -r1.5
--- src/report/report-system/html-acct-table.scm
+++ src/report/report-system/html-acct-table.scm
@@ -40,7 +40,28 @@
 ;; 
 ;;               add-accounts            add-account-balances
 ;;  account-list ------------> html-acct-table ----------> html-table
-;; 
+;;
+;;    Figure Key:
+;;
+;;       account-list: a list of accounts as would be returned from
+;;       looking up the value of a report option added with
+;;       gnc:options-add-account-selection!
+;;
+;;       add-accounts: any method that adds the account list to the
+;;       html-acct-table.  For example, this could be accomplished
+;;       with gnc:make-html-acct-table/env/acct or
+;;       gnc:html-acct-table-add-accounts!
+;;
+;;       html-acct-table: the utility object described in this file
+;;
+;;       add-account-balances: any function that maps the internal
+;;       data of the html-acct-table object into a html-table.  For
+;;       example, one such function is
+;;       gnc:html-table-add-account-balances.
+;;
+;;       html-table: an <html-table> scheme object representing an
+;;       HTML table block.  See html-table.scm.
+;;
 ;; This utility object was written because of some shortcomings
 ;; inherent in how the gnc:html-build-acct-table function was
 ;; designed.  Ultimately, the intent is to replace
@@ -63,20 +84,26 @@
 ;; The list of accounts which are to be placed in the
 ;; gnc:html-acct-table object can be controled with the
 ;; gnc:make-html-acct-table/accts, gnc:make-html-acct-table/env/accts,
-;; and gnc:html-table-add-accts! functions.  
+;; and gnc:html-table-add-accts!  functions.  But you should only use
+;; one of these methods to add accounts.
 ;; 
-;; The gnc:html-acct-table parameters, set with
-;; gnc:make-html-acct-table/env and gnc:make-html-acct-table/accts/env
-;; and fetched with gnc:html-acct-table-env; accept the following
-;; parameters:
+;; The gnc:html-acct-table parameters should be set BEFORE adding the
+;; account list.  They can be set with gnc:make-html-acct-table/env
+;; or gnc:make-html-acct-table/accts/env and fetched with
+;; gnc:html-acct-table-env; accept the following parameters:
 ;; 
-;;     display-tree-depth: integer 'unlimited 'all #f
+;;     display-tree-depth: integer 'unlimited ['all] #f
 ;; 
 ;;         the number of levels of accounts to display
 ;;         'unlimited, 'all, and #f impose no depth limit.
-;;         the default is 'all.
+;;         the default is 'all.  [CAS: ISTM, the default is actually #f,
+;;         and this case bombs at (< logi-depth depth-limit) anytime the
+;;         limit behavior is not 'flatten.  BUG?   Also, setting this
+;;         parameter to a large integer value has the strange side-effect
+;;         of pushing the balances column far right, even when the account
+;;         tree is relatively shallow.]
 ;; 
-;;     depth-limit-behavior: 'summarize 'flatten 'truncate
+;;     depth-limit-behavior: ['summarize] 'flatten 'truncate
 ;; 
 ;;         when the display tree reaches its depth limit, this option
 ;;         tells gnc:html-acct-table what to do.  'summarize tells it
@@ -117,22 +144,51 @@
 ;;         ocurr. note: i do not know if GnuCash, right now, supports
 ;;         transactions in the future. so be prepared for the
 ;;         possibility that this may match transactions which haven't
-;;         ocurred, yet.
+;;         ocurred, yet. [CAS: I don't think end-date of #f works.
+;;         It bombs.]
 ;; 
 ;;     report-commodity: commodity
 ;; 
 ;;         the commodity into which to convert any balances containing
 ;;         foreign currencies.  the balance will be converted using
-;;         the exchange function exchange-fn. the defalut is the
-;;         currency returned by (gnc:default-report-currency).
+;;         the exchange function exchange-fn. the default is the
+;;         currency returned by (gnc:default-report-currency).  [CAS:
+;;         what if I don't want the report to have a
+;;         "report-commodity"?  Say e.g. I want to show each account
+;;         balance in its native commodity?  I can see the benefit of
+;;         individual reports that have a report-commodity using
+;;         gnc:default-report-currency to set the default value for a
+;;         report-commodity option.  But, with the default sucked in
+;;         here, in what is supposed to be a more general api, means
+;;         reports can't specify NO report-commodity. ]
+;;
+;; CAS: Hypothetical design modification: Instead of specifying a
+;; single report commodity and exchange-fn for the whole acct-table,
+;; what if we were allowed to specify a *price-source* and an
+;; *optional* report-commodity.  Then, if the no report commodity is
+;; specified, then we can generate the exchange-fn on a per-account
+;; basis, using gnc:case-exchange-fn and the account's native
+;; commodity and the given price-source.  Otherwise (i.e. if there IS
+;; a report-commodity specified), we can use *that* commodity for each
+;; account's exchange-fn.
 ;;
 ;;     exchange-fn: commodity_exchange_function
 ;; 
 ;;         the commodity exchange function (you know, that weighted
 ;;         average, most recent, nearest in time fun stuff) used to
 ;;         convert balances which are not exclusively in the report
-;;         commodity into the report commodity.
-;; 
+;;         commodity into the report commodity.  [CAS: Right now,
+;;         exchange-fn is not optional.  If your accounts have
+;;         different commodities and you don't specify a valid
+;;         exchange function then simply adding the accounts to the
+;;         html-acct-table object will crash, even if you never want
+;;         to display any values at all.  This is bad.  UPDATE: As a
+;;         short-term fix, I've made this parameter optional.  If no
+;;         exchange-fn is given, you can at least add the accounts to
+;;         the html-acct-table object without crashing.  Just don't
+;;         count on meaningful report-comm-{account|recursive}-bal
+;;         values (they'll also be #f).]
+;;
 ;;     column-header: html-table-header-cell #f #t
 ;; 
 ;;          the table column header cell (TH tag) with which to head
@@ -268,7 +324,7 @@
 ;;         in the effective account tree.  this is the depth the
 ;;         account tree when ignoring unselected parent accounts.
 ;;         note that this may differ from account-depth when a
-;;         selected account has a deselected ancestor.
+;;         selected account has an unselected ancestor.
 ;; 
 ;;     display-depth: integer
 ;; 
@@ -284,7 +340,8 @@
 ;; 
 ;;         the depth at which the account in the current row resides
 ;;         in the indented display tree. also account-depth plus
-;;         indent.
+;;         indent.  CAS: I think *display-depth* plus indent would
+;;         make more sense.  Then it's like an absolute column index.
 ;; 
 ;;     logical-cols: integer
 ;; 
@@ -329,6 +386,9 @@
 ;;         including all balances in any *selected* subaccounts.  this
 ;;         is for convenience.
 ;; 
+;; CAS: I think these next two are wrong because they are really of
+;; type gnc:monetary, not commodity-collectors.
+;;
 ;;     report-comm-account-bal: commodity-collector
 ;; 
 ;;         the balance of the account in the current row, exclusive of
@@ -529,7 +589,7 @@
 	 (depth-limit (let ((lim (get-val env 'display-tree-depth)))
 			(if (or (equal? lim 'unlimited)
 				(equal? lim 'all))
-			    #f
+			    #f ;; BUG?  other code expects integer here
 			    lim)))
 	 (limit-behavior (or (get-val env 'depth-limit-behavior) 'summarize))
 	 (indent (or (get-val env 'initial-indent) 0))
@@ -540,8 +600,11 @@
 		       (cons 'absolute (cons (current-time) 0))))
 	 (report-commodity (or (get-val env 'report-commodity)
 			       (gnc:default-report-currency)))
+         ;; BUG: other code expects a real function here, maybe
+         ;; someone was thinking price-source?
 	 (exchange-fn (or (get-val env 'exchange-fn)
-			  'weighted-average))
+                          #f))
+         ;;'weighted-average))
 	 (column-header (let ((cell (get-val env 'column-header)))
 			  (if (equal? cell #t)
 			      (gnc:make-html-table-cell "Account name")
@@ -577,6 +640,7 @@
     (define (traverse-accounts! accts acct-depth logi-depth)
       
       (define (use-acct? acct)
+        ;; BUG?  when depth-limit is not integer but boolean?
 	(and (or (equal? limit-behavior 'flatten) (< logi-depth depth-limit))
 	     (member acct accounts)
 	     )
@@ -618,6 +682,7 @@
 		     (post-closing-bal 'minusmerge adjusting-amt #f)
 		     post-closing-bal)
 		   )
+              ;; error if we get here.
 	      )
 	  )
 	)
@@ -640,6 +705,7 @@
 		   (my-get-balance-nosub a start-date end-date)))
 	    (gnc:account-get-children account)))
 	  this-collector))
+
       
       (let ((disp-depth
 	     (if (integer? depth-limit)
@@ -649,8 +715,7 @@
 	
 	(for-each
 	 (lambda (acct)
-	   (let* ((subaccts
-		   (gnc:account-get-immediate-subaccounts acct))
+	   (let* ((subaccts (gnc:account-get-immediate-subaccounts acct))
 		  ;; assign output parameters
 		  (account acct)
 		  (account-name (gnc:account-get-name acct))
@@ -670,13 +735,15 @@
 		  (account-guid (gnc:account-get-guid acct))
 		  (account-description (gnc:account-get-description acct))
 		  (account-notes (gnc:account-get-notes acct))
+                  ;; These next two are commodity-collectors.
 		  (account-bal (my-get-balance-nosub
 				acct start-date end-date))
-		  (recursive-bal
-		   (my-get-balance acct start-date end-date))
+		  (recursive-bal (my-get-balance
+                                  acct start-date end-date))
+                  ;; These next two are of type <gnc:monetary>, right?
 		  (report-comm-account-bal
-		   (gnc:sum-collector-commodity
-		    account-bal report-commodity exchange-fn))
+                   (gnc:sum-collector-commodity
+                    account-bal report-commodity exchange-fn))
 		  (report-comm-recursive-bal
 		   (gnc:sum-collector-commodity
 		    recursive-bal report-commodity exchange-fn))
@@ -737,6 +804,7 @@
 		   (add-row row-env)
 		   )
 		 )
+             ;; Recurse:
 	     ;; Dive into an account even if it isnt selected!
 	     (traverse-accounts! subaccts
 				 (+ acct-depth 1)
@@ -744,6 +812,8 @@
 				     (+ logi-depth 1)
 				     logi-depth)
 				 )
+
+             ;; after the return from recursion: subtotals
 	     (or (not (use-acct? acct))
 		 (not subtotal-mode)
 		 ;; ditto that remark concerning zero recursive-bal...
@@ -773,12 +843,16 @@
 		   (add-row row-env)
 		   )
 		 )
-	     ))
-	 (if less-p
+	     )) ;; end of (lambda (acct) ...)
+	 ;; lambda is applied to each item in the (sorted) account list
+         (if less-p
 	     (sort accts less-p)
 	     accts)
-	 ))
-      )
+	 ) ;; end of for-each
+        )
+      ) ;; end of definition of traverse-accounts!
+
+    ;;(display (list "END-DATE: " end-date))
     
     ;; do it
     (traverse-accounts! toplvl-accts 0 0)
@@ -809,6 +883,7 @@
 		    (logical-cols (if depth-limit
 				      (min
 				       (+ logi-depth-reached 1)
+                                       ;; BUG?  when depth-limit is not integer?
 				       depth-limit)
 				      (+ logi-depth-reached 1)))
 		    (colspan (- label-cols display-depth))
@@ -899,7 +974,8 @@
 (define (gnc:html-acct-table-remove-last-row! acct-table)
   (gnc:html-table-remove-last-row! (gnc:_html-acct-table-matrix_ acct-table)))
 
-(define (gnc:identity i) i)
+;; don't think we need this.
+;;(define (gnc:identity i) i)
 
 (define (gnc:html-acct-table-render acct-table doc)
   ;; this will be used if we ever decide to let the utility object
@@ -916,17 +992,27 @@
 ;; use: "text-cell" "total-label-cell" "number-cell"
 ;; "total-number-cell".  Row styles include "normal-row",
 ;; "alternate-row", "primary-subheading", "secondary-subheading", and
-;; "grand-total". there really should also be a "first-number-cell"
+;; "grand-total".
+;; There really should also be a "first-number-cell"
 ;; and "last-number-cell" to put currency symbols and underlines,
 ;; respectively, on the numbers.
 
+;; Note: arguably, this procedure belongs in html-table.scm instead of here.
 (define (gnc:html-table-add-labeled-amount-line!
-	 html-table table-width row-markup total-rule?
-	 label label-depth label-colspan label-markup
-	 amount amount-depth amount-colspan amount-markup)
-  ;; function to add a label and/or amount (which we'll call a "line")
-  ;; to a gnc:html-table. all depths are zero-indexed.
-  ;; if total-rule?, an <hr> is placed in the cell previous to label
+         ;; function to add a label and/or amount (which we'll call a "line")
+         ;; to the end of a gnc:html-table. all depths are zero-indexed.
+	 html-table
+         table-width       ;; if #f defaults to (amount-depth + amount-colspan)
+         row-markup        ;; optional
+         total-rule?       ;; Place an <hr> in the cell previous to label?
+	 label             ;; the actual label text
+         label-depth       ;; defaults to zero
+         label-colspan     ;; defaults to one
+         label-markup      ;; optional
+	 amount            ;; a <gnc:monetary> or #f
+         amount-depth      ;; defaults to (label-depth + label-colspan)
+         amount-colspan    ;; defaults to one
+         amount-markup)    ;; optional
   (let* ((lbl-depth (or label-depth 0))
 	 (lbl-colspan (if gnc:colspans-are-working-right
 			  (or label-colspan 1)
@@ -938,33 +1024,35 @@
 	 (tbl-width (or table-width (+ amt-depth amt-colspan)))
 	 (row
 	  (append
-	   (gnc:html-make-empty-cells lbl-depth)
+	   (gnc:html-make-empty-cells lbl-depth)  ;; padding before label
 	   (list
-	    (if label-markup
+	    (if label-markup                      ;; the actual label
 		(gnc:make-html-table-cell/size/markup
 		 1 lbl-colspan label-markup label)
 		(gnc:make-html-table-cell/size
 		 1 lbl-colspan label))
 	    )
-	   (gnc:html-make-empty-cells
-		(+ (- amt-depth (+ lbl-depth lbl-colspan))
-		   (if total-rule? -1 0)
-		   ))
-	   (if total-rule?
+	   (gnc:html-make-empty-cells             ;; padding after label
+            (+ (- amt-depth (+ lbl-depth lbl-colspan))
+               (if total-rule? -1 0)
+               )
+            )
+	   (if total-rule?                        ;; include <hr>?
 	       (list (gnc:make-html-table-cell
 		      (gnc:make-html-text (gnc:html-markup-hr))))
 	       (list)
 	       )
 	   (list
-	    (if amount-markup
+	    (if amount-markup                     ;; the amount
 		(gnc:make-html-table-cell/size/markup
 		 1 amt-colspan amount-markup amount)
 		(gnc:make-html-table-cell/size
 		 1 amt-colspan amount))
 	    )
-	   (gnc:html-make-empty-cells
-	    (- table-width (+ amt-depth amt-colspan)))
-	   ))
+	   (gnc:html-make-empty-cells             ;; padding out to full width
+	    (- tbl-width (+ amt-depth amt-colspan)))
+	   )
+          ) ;; end of row
 	 )
     (if row-markup
 	(gnc:html-table-append-row/markup! html-table row-markup row)
@@ -1000,18 +1088,22 @@
 
 ;; 
 ;; This function adds all the lines from a gnc:html-acct-table to a
-;; gnc:html-table in "labeled amount" form.
+;; gnc:html-table in "labeled amount" form.  IOW, it uses
+;; gnc:html-table-add-labeled-amount-line!
 ;; 
-;; The resulting gnc:html-table is similar to what
+;; The returned gnc:html-table is similar to what
 ;; gnc:html-build-acct-table used to (and still should) produce.
 ;; 
 ;; this function accepts the following additional parameters:
 ;; parent-account-balance-mode: 'immediate-bal 'recursive-bal ['omit-bal/#f]
 ;; zero-balance-display-mode: ['show-balance] 'omit-balance
 ;; multicommodity-mode: [#f] 'table/#t
-;; rule-mode: #t [#f]
+;; rule-mode: #t [#f]  (not meant to affect subtotal rules)
 ;; 
-(define (gnc:html-table-add-account-balances html-table acct-table params)
+(define (gnc:html-table-add-account-balances
+         html-table  ;; can be #f to create a new table
+         acct-table
+         params)
   (let* ((num-rows (gnc:html-acct-table-num-rows acct-table))
 	 (rownum 0)
 	 (html-table (or html-table (gnc:make-html-table)))
@@ -1065,8 +1157,8 @@
 		       )
 		   )
 		  (comm-amt
-		   ;; this will be the immediate/recursize commodity
-		   ;; balance or #f
+		   ;; this will be the immediate/recursive commodity
+		   ;; balance (a commodity collector) or #f.
 		   (get-val env
 			    (car (or (assoc-ref
 				      '((immediate-bal account-bal)
@@ -1085,12 +1177,15 @@
 		  (native-comm?
 		   (lambda (amt)
 		     (gnc:uniform-commodity? amt report-commodity)))
+                  ;; amount is either a <gnc:monetary> or #f
 		  (amount (and comm-amt
 			       (if (and (equal? zero-mode 'omit-balance)
-				    (gnc:commodity-collector-allzero? comm-amt)
-				    )
+                                        (gnc:commodity-collector-allzero?
+                                         comm-amt)
+                                        )
 				   #f
-				   ;; otherwise
+				   ;; else:
+                                   ;; this let* block evals to a <gnc:monetary>
 				   (let*
 				       ((amt (gnc:make-commodity-collector)))
 				     (if reverse-balance
@@ -1102,38 +1197,58 @@
 					       report-commodity
 					       exchange-fn)
 					      )
-					 (if (and (equal?
-						   multicommodity-mode 'table)
-						  (equal?
-						   row-type 'account-row)
-						  )
-					     (gnc:commodity-table
-					      amt
-					      report-commodity 
-					      exchange-fn)
-					     (gnc:sum-collector-commodity
-					      amt
-					      report-commodity
-					      exchange-fn)
-					     )
+					 ((if (and (equal?
+                                                    multicommodity-mode 'table)
+                                                   (equal?
+                                                    row-type 'account-row)
+                                                   )
+                                              gnc:commodity-table
+                                              gnc:sum-collector-commodity
+                                              )
+                                          amt
+                                          report-commodity
+                                          exchange-fn
+                                          )  ;; factored from below
+; 					 (if (and (equal?
+; 						   multicommodity-mode 'table)
+; 						  (equal?
+; 						   row-type 'account-row)
+; 						  )
+; 					     (gnc:commodity-table
+; 					      amt
+; 					      report-commodity
+; 					      exchange-fn)
+; 					     (gnc:sum-collector-commodity
+; 					      amt
+; 					      report-commodity
+; 					      exchange-fn)
+; 					     )
+
 					 )
-				     )
-				   )
+				     ) ;; end of let*
+				   ) ;; end of if
 			       ))
 		  (indented-depth (get-val env 'indented-depth))
 		  (account-colspan (get-val env 'account-colspan))
 		  )
+
+             ;; for each row do:
+
 	     (gnc:html-table-add-labeled-amount-line!
 	      html-table
-	      (+ account-cols logical-cols)
-	      #f rule-mode
-	      label indented-depth account-colspan #f ;"label-cell"
+	      (+ account-cols logical-cols) ;; table-width
+	      #f                            ;; row-markup
+              rule-mode
+	      label
+              indented-depth
+              account-colspan               ;; label-colspan
+              #f                            ;; label-markup
 	      amount
 	      (+ account-cols (- 0 1)
 		 (- logical-cols display-depth)
 		 ;; account for 'immediate-bal parents displaying children
 		 ;; NOTE: before you go mucking with this, BE ABSOLUTELY
-		 ;; SURE you know what youre doing... i spent A LOT of
+		 ;; SURE you know what you're doing... i spent A LOT of
 		 ;; time trying to make sure this is right. i know, in
 		 ;; some reports, the output might look incorrect. but,
 		 ;; if you think long and hard about it, i think you'll
@@ -1144,15 +1259,19 @@
 			  1 0)
 		    )
 		 (if (equal? subtotal-mode 'canonically-tabbed) 1 0)
-		 )
-	      1 "number-cell")
-	     (set! rownum (+ rownum 1))
+		 )                          ;; amount-depth
+	      1                             ;; amount-colspan
+              "number-cell"                 ;; amount-markup
+              )
+
+	     (set! rownum (+ rownum 1)) ;; increment rownum
 	     )
-	   )
+	   ) ;; end of while
     html-table
     )
   )
 
+
 (define (gnc:second-html-build-acct-table
          start-date end-date
          tree-depth show-subaccts? accounts
Index: gnc-report.h
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/gnc-report.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/report-system/gnc-report.h -Lsrc/report/report-system/gnc-report.h -u -r1.1 -r1.2
--- src/report/report-system/gnc-report.h
+++ src/report/report-system/gnc-report.h
@@ -27,4 +27,11 @@
 gboolean gnc_run_report (int report_id, char ** data);
 gboolean gnc_run_report_id_string (const char * id_string, char **data);
 
+/**
+ * @param report The SCM version of the report.
+ * @return a caller-owned copy of the name of the report, or NULL if report
+ * is invalid.
+ **/
+gchar* gnc_report_name( SCM report );
+
 #endif
Index: html-document.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-document.scm,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/report-system/html-document.scm -Lsrc/report/report-system/html-document.scm -u -r1.4 -r1.5
--- src/report/report-system/html-document.scm
+++ src/report/report-system/html-document.scm
@@ -106,6 +106,8 @@
     (do-list tree)
     retval))
 
+;; first optional argument is "headers?"
+;; returns the html document as a string, I think.
 (define (gnc:html-document-render doc . rest) 
   (let ((stylesheet (gnc:html-document-style-sheet doc))
         (headers? (if (null? rest) #f (if (car rest) #t #f))))
Index: gncmod-report-system.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/gncmod-report-system.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/report-system/gncmod-report-system.c -Lsrc/report/report-system/gncmod-report-system.c -u -r1.5 -r1.6
--- src/report/report-system/gncmod-report-system.c
+++ src/report/report-system/gncmod-report-system.c
@@ -9,7 +9,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
Index: html-utilities.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/html-utilities.scm,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/report/report-system/html-utilities.scm -Lsrc/report/report-system/html-utilities.scm -u -r1.11 -r1.12
--- src/report/report-system/html-utilities.scm
+++ src/report/report-system/html-utilities.scm
@@ -784,6 +784,34 @@
     
     table))
 
+
+;; TODO: How 'bout factoring the "Edit report options" stuff out of
+;; these 3 functions?
+
+(define (gnc:html-make-generic-options-warning
+	 report-title-string report-id)
+  (let ((p (gnc:make-html-text)))
+    (gnc:html-text-append!
+     p
+     (gnc:html-markup-h2 (string-append
+			  report-title-string
+			  ":"))
+     (gnc:html-markup-h2 (_ ""))
+     (gnc:html-markup-p
+      (_ "This report requires you to specify certain report options.")))
+    (if report-id
+	(gnc:html-text-append!
+	 p
+	 (gnc:html-markup-p
+	  (gnc:html-markup-anchor
+	   (gnc:html-build-url gnc:url-type-options
+			       (string-append "report-id="
+					      (sprintf #f "%a" report-id))
+			       #f)
+	   (_ "Edit report options")))))
+    p))
+
+
 (define (gnc:html-make-no-account-warning
 	 report-title-string report-id)
   (let ((p (gnc:make-html-text)))
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-system/Makefile.am,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/report/report-system/Makefile.am -Lsrc/report/report-system/Makefile.am -u -r1.13 -r1.14
--- src/report/report-system/Makefile.am
+++ src/report/report-system/Makefile.am
@@ -10,7 +10,6 @@
 gncinclude_HEADERS = \
   gnc-report.h
 
-libgncmod_report_system_la_LDFLAGS = -module
 libgncmod_report_system_la_LIBADD = \
   ${top_builddir}/src/gnc-module/libgncmodule.la \
   ${GUILE_LIBS} \
Index: print-check.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/printing/print-check.scm,v
retrieving revision 1.15
retrieving revision 1.16
diff -Lsrc/scm/printing/print-check.scm -Lsrc/scm/printing/print-check.scm -u -r1.15 -r1.16
--- src/scm/printing/print-check.scm
+++ src/scm/printing/print-check.scm
@@ -97,16 +97,19 @@
     ))
 
 (define (gnc:print-check format-info payee amount date memo)
-    (let* ((int-part (inexact->exact (truncate amount)))
-           (frac-part (inexact->exact 
+  (let* ((int-part (inexact->exact (truncate amount)))
+	 (frac-part (inexact->exact 
                      (truncate 
                       (+ (/ .5 100) (* 100 (- amount int-part))))))
-           (ps (gnc:print-session-create #t))
-           (format #f)
-           (offset #f)
-           (date-string "")
-           (payee-stub-text "")
-           (memo-stub-text ""))
+	 (ps (gnc:print-session-create #t))
+	 (format #f)
+	 (offset #f)
+	 (date-string "")
+	 (payee-stub-text "")
+	 (memo-stub-text ""))
+
+    (if (not (null? ps))
+     (begin
       (if (not (eq? (print-check-format:format format-info) 'custom))
           (begin 
             (set! format (assq (print-check-format:format format-info) 
@@ -202,6 +205,5 @@
                                   (+ offset (caddr amountstub-pos)))
              (gnc:print-session-text ps (printable-value amount 100)))))
 
-      (gnc:print-session-done ps #t)
-      (gnc:print-session-print ps)))
+      (gnc:print-session-done ps)))))
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/tax/us/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -Lsrc/tax/us/Makefile.am -Lsrc/tax/us/Makefile.am -u -r1.11 -r1.12
--- src/tax/us/Makefile.am
+++ src/tax/us/Makefile.am
@@ -5,7 +5,6 @@
 libgncmod_tax_us_la_SOURCES = \
   gncmod-tax-us.c 
 
-libgncmod_tax_us_la_LDFLAGS = -module
 libgncmod_tax_us_la_LIBADD = \
  ${GUILE_LIBS} \
  ${GLIB_LIBS}
Index: gncmod-tax-us.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/tax/us/gncmod-tax-us.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/tax/us/gncmod-tax-us.c -Lsrc/tax/us/gncmod-tax-us.c -u -r1.7 -r1.8
--- src/tax/us/gncmod-tax-us.c
+++ src/tax/us/gncmod-tax-us.c
@@ -14,7 +14,6 @@
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
-#include "guile-mappings.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_tax_us_LTX_gnc_module_system_interface = 0;
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/report-gnome/test/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/report-gnome/test/Makefile.am -Lsrc/report/report-gnome/test/Makefile.am -u -r1.4 -r1.5
--- src/report/report-gnome/test/Makefile.am
+++ src/report/report-gnome/test/Makefile.am
@@ -9,7 +9,6 @@
   --gnc-module-dir ${top_builddir}/src/engine \
   --gnc-module-dir ${top_builddir}/src/calculation \
   --gnc-module-dir ${top_builddir}/src/app-utils \
-  --gnc-module-dir ${top_builddir}/src/app-file \
   --gnc-module-dir ${top_builddir}/src/gnome \
   --gnc-module-dir ${top_builddir}/src/gnome-utils \
   --gnc-module-dir ${top_builddir}/src/report/report-system \
Index: register.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/register.scm,v
retrieving revision 1.13
retrieving revision 1.14
diff -Lsrc/report/standard-reports/register.scm -Lsrc/report/standard-reports/register.scm -u -r1.13 -r1.14
--- src/report/standard-reports/register.scm
+++ src/report/standard-reports/register.scm
@@ -579,12 +579,12 @@
            (gnc:make-html-text
             (gnc:html-markup-br)
             ;;(gnc:option-value
-            ;; (gnc:lookup-global-option "User Info" "User Name"))
+            ;; (gnc:gconf-get-string "user_info" "name"))
 	    "User Name"
             (gnc:html-markup-br)
             (string-expand
              ;;(gnc:option-value
-	     ;; (gnc:lookup-global-option "User Info" "User Address"))
+	     ;; (gnc:gconf-get-string "user_info" "address"))
 	     "User Address"
              #\newline
              "<br>")
Index: transaction.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/transaction.scm,v
retrieving revision 1.21
retrieving revision 1.22
diff -Lsrc/report/standard-reports/transaction.scm -Lsrc/report/standard-reports/transaction.scm -u -r1.21 -r1.22
--- src/report/standard-reports/transaction.scm
+++ src/report/standard-reports/transaction.scm
@@ -81,19 +81,29 @@
   (= (gnc:split-compare-other-account-codes a b) 0))
 
 (define (timepair-same-year tp-a tp-b)
-  (= (tm:year (gnc:timepair->date tp-a))
-     (tm:year (gnc:timepair->date tp-b))))
+  (= (gnc:timepair-get-year tp-a)
+     (gnc:timepair-get-year tp-b)))
+
+(define (timepair-same-quarter tp-a tp-b)
+  (and (timepair-same-year tp-a tp-b) 
+       (= (gnc:timepair-get-quarter tp-a)
+          (gnc:timepair-get-quarter tp-b))))
 
 (define (timepair-same-month tp-a tp-b)
   (and (timepair-same-year tp-a tp-b) 
-       (= (tm:mon (gnc:timepair->date tp-a))
-          (tm:mon (gnc:timepair->date tp-b)))))
+       (= (gnc:timepair-get-month tp-a)
+          (gnc:timepair-get-month tp-b))))
 
 (define (split-same-month-p a b)
   (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
         (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
     (timepair-same-month tp-a tp-b)))
 
+(define (split-same-quarter-p a b)
+  (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
+        (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
+    (timepair-same-quarter tp-a tp-b)))
+
 (define (split-same-year-p a b)
   (let ((tp-a (gnc:transaction-get-date-posted (gnc:split-get-parent a)))
         (tp-b (gnc:transaction-get-date-posted (gnc:split-get-parent b))))
@@ -158,15 +168,24 @@
                         table width subheading-style)))
 
 (define (render-month-subheading split table width subheading-style column-vector)
-  (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
-                                 (gnc:split-get-parent split)))))
-    (add-subheading-row (strftime "%B %Y" tm)
-                        table width subheading-style)))
+  (add-subheading-row (gnc:date-get-month-year-string
+                      (gnc:timepair->date 
+                       (gnc:transaction-get-date-posted
+                        (gnc:split-get-parent split))))
+                     table width subheading-style))
+
+(define (render-quarter-subheading split table width subheading-style column-vector)
+  (add-subheading-row (gnc:date-get-quarter-year-string 
+                      (gnc:timepair->date 
+                       (gnc:transaction-get-date-posted
+                        (gnc:split-get-parent split))))
+                     table width subheading-style))
 
 (define (render-year-subheading split table width subheading-style column-vector)
-  (add-subheading-row (strftime "%Y" (gnc:timepair->date
-                                      (gnc:transaction-get-date-posted
-                                       (gnc:split-get-parent split))))
+  (add-subheading-row (gnc:date-get-year-string 
+                      (gnc:timepair->date 
+                       (gnc:transaction-get-date-posted
+                        (gnc:split-get-parent split))))
                       table width subheading-style))
 
 
@@ -227,10 +246,18 @@
   (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
                                  (gnc:split-get-parent split)))))
     (add-subtotal-row table width 
-                      (total-string (strftime "%B %Y" tm))
+                      (total-string (gnc:date-get-month-year-string tm))
                       total-collector subtotal-style export?)))
 
 
+(define (render-quarter-subtotal
+         table width split total-collector subtotal-style column-vector export?)
+  (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
+                                 (gnc:split-get-parent split)))))
+    (add-subtotal-row table width 
+                      (total-string (gnc:date-get-quarter-year-string tm))
+                     total-collector subtotal-style export?)))
+
 (define (render-year-subtotal
          table width split total-collector subtotal-style column-vector export?)
   (let ((tm (gnc:timepair->date (gnc:transaction-get-date-posted
@@ -645,6 +672,7 @@
           (vector 'none (N_ "None") (N_ "None"))
           ;;(vector 'weekly (N_ "Weekly") (N_ "Weekly"))
           (vector 'monthly (N_ "Monthly") (N_ "Monthly"))
+          (vector 'quarterly (N_ "Quarterly") (N_ "Quarterly"))
           (vector 'yearly (N_ "Yearly") (N_ "Yearly")))))
     
     ;; primary sorting criterion
@@ -1105,6 +1133,8 @@
      (cons 'none (vector #f #f #f))
      (cons 'monthly (vector split-same-month-p render-month-subheading 
                             render-month-subtotal))
+     (cons 'quarterly (vector split-same-quarter-p render-quarter-subheading 
+                            render-quarter-subtotal))
      (cons 'yearly (vector split-same-year-p render-year-subheading
                            render-year-subtotal))))
 
Index: income-statement.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/income-statement.scm,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lsrc/report/standard-reports/income-statement.scm -Lsrc/report/standard-reports/income-statement.scm -u -r1.1 -r1.2
--- src/report/standard-reports/income-statement.scm
+++ src/report/standard-reports/income-statement.scm
@@ -537,7 +537,7 @@
 		   (balance
 		    (or (and (gnc:uniform-commodity? pos-bal report-commodity)
 			     bal)
-			(and show-fucr?
+			(and show-fcur?
 			     (gnc:commodity-table
 			      pos-bal report-commodity exchange-fn))
 			bal
Index: equity-statement.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/equity-statement.scm,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/report/standard-reports/equity-statement.scm -Lsrc/report/standard-reports/equity-statement.scm -u -r1.4 -r1.5
--- src/report/standard-reports/equity-statement.scm
+++ src/report/standard-reports/equity-statement.scm
@@ -416,7 +416,7 @@
 		   (balance
 		    (or (and (gnc:uniform-commodity? pos-bal report-commodity)
 			     bal)
-			(and show-fucr?
+			(and show-fcur?
 			     (gnc:commodity-table
 			      pos-bal report-commodity exchange-fn))
 			bal
Index: standard-reports.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/standard-reports.scm,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/report/standard-reports/standard-reports.scm -Lsrc/report/standard-reports/standard-reports.scm -u -r1.20 -r1.21
--- src/report/standard-reports/standard-reports.scm
+++ src/report/standard-reports/standard-reports.scm
@@ -75,6 +75,7 @@
 (use-modules (gnucash report general-journal))
 (use-modules (gnucash report general-ledger))
 (use-modules (gnucash report cash-flow))
+(use-modules (gnucash report budget))
 (use-modules (gnucash report category-barchart))
 (use-modules (gnucash report daily-reports))
 (use-modules (gnucash report net-barchart))
Index: gncmod-standard-reports.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/gncmod-standard-reports.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/standard-reports/gncmod-standard-reports.c -Lsrc/report/standard-reports/gncmod-standard-reports.c -u -r1.5 -r1.6
--- src/report/standard-reports/gncmod-standard-reports.c
+++ src/report/standard-reports/gncmod-standard-reports.c
@@ -9,7 +9,6 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/standard-reports/Makefile.am,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lsrc/report/standard-reports/Makefile.am -Lsrc/report/standard-reports/Makefile.am -u -r1.19 -r1.20
--- src/report/standard-reports/Makefile.am
+++ src/report/standard-reports/Makefile.am
@@ -5,8 +5,6 @@
 libgncmod_standard_reports_la_SOURCES = \
   gncmod-standard-reports.c 
 
-libgncmod_standard_reports_la_LDFLAGS = -module
-
 AM_CFLAGS = \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
@@ -28,6 +26,7 @@
    average-balance.scm \
    balance-sheet.scm \
    cash-flow.scm \
+   budget.scm \
    category-barchart.scm \
    daily-reports.scm \
    equity-statement.scm \
Index: gncmod-stylesheets.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/stylesheets/gncmod-stylesheets.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lsrc/report/stylesheets/gncmod-stylesheets.c -Lsrc/report/stylesheets/gncmod-stylesheets.c -u -r1.5 -r1.6
--- src/report/stylesheets/gncmod-stylesheets.c
+++ src/report/stylesheets/gncmod-stylesheets.c
@@ -9,10 +9,10 @@
 #include <stdio.h>
 #include <glib.h>
 #include <libguile.h>
-#include "guile-mappings.h"
 
 #include "gnc-module.h"
 #include "gnc-module-api.h"
+#include "gnc-plugin-stylesheets.h"
 
 /* version of the gnc module system interface we require */
 int libgncmod_stylesheets_LTX_gnc_module_system_interface = 0;
@@ -52,6 +52,9 @@
     return FALSE;
   }
   
+  /* Add menu items with C callbacks */
+  gnc_plugin_stylesheets_create_plugin();
+  
   return TRUE;
 }
 
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/report/stylesheets/Makefile.am,v
retrieving revision 1.8
retrieving revision 1.9
diff -Lsrc/report/stylesheets/Makefile.am -Lsrc/report/stylesheets/Makefile.am -u -r1.8 -r1.9
--- src/report/stylesheets/Makefile.am
+++ src/report/stylesheets/Makefile.am
@@ -3,14 +3,29 @@
 pkglib_LTLIBRARIES = libgncmod-stylesheets.la
 
 libgncmod_stylesheets_la_SOURCES = \
+  gnc-plugin-stylesheets.c \
   gncmod-stylesheets.c 
 
+noinst_HEADERS = \
+  gnc-plugin-stylesheets.h
+
 libgncmod_stylesheets_la_LDFLAGS=-module
 
+libgncmod_stylesheets_la_LIBADD = \
+  ${QOF_LIBS} \
+  ${top_builddir}/src/report/report-system/libgncmod-report-system.la
+
 AM_CFLAGS = \
   -I${top_srcdir}/src \
+  -I${top_srcdir}/src/engine \
   -I${top_srcdir}/src/gnc-module \
-  ${GUILE_INCS} ${GLIB_CFLAGS}
+  -I${top_srcdir}/src/gnome \
+  -I${top_srcdir}/src/gnome-utils \
+  -I${top_srcdir}/src/report/report-gnome \
+  ${GUILE_INCS} \
+  ${GLIB_CFLAGS} \
+  ${QOF_CFLAGS} \
+  ${GNOME_CFLAGS}
 
 .scm-links:
 	rm -f gnucash report
@@ -27,6 +42,10 @@
   stylesheet-fancy.scm \
   stylesheet-easy.scm
 
+uidir = $(GNC_UI_DIR)
+dist_ui_DATA = \
+	gnc-plugin-stylesheets-ui.xml
+
 EXTRA_DIST = ${gncscmmod_DATA}
 
 CLEANFILES = gnucash report .scm-links
Index: startup-design.txt
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/startup-design.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lsrc/scm/startup-design.txt -Lsrc/scm/startup-design.txt -u -r1.4 -r1.5
--- src/scm/startup-design.txt
+++ src/scm/startup-design.txt
@@ -1,27 +1,23 @@
-The startup process looks like this right now:
+/** \page schemestart Scheme startup process
 
-  * gnucash is a hybrid /bin/sh and guile script which first execs
+\section current The startup process looks like this right now:
+
+- gnucash is a hybrid /bin/sh and guile script which first execs
     gnucash-env on itself to set up the proper environment and then
     run the rest of the code in the gnucash file as a guile script.
-
-  * from the gnucash script itself, the (gnucash bootstrap) is loaded,
+- from the gnucash script itself, the (gnucash bootstrap) is loaded,
     and then control transfers to the scheme function, main.
-
-  * the current module is set to (gnucash bootstrap) -- this is a hack
+- the current module is set to (gnucash bootstrap) -- this is a hack
     and should change later.
-
-  * gnc:main is called to finish starting up the application.
-
-  * parse the command line
-
-  * load the system config if we haven't already (there's a
-    command-line option to load the file earlier,
-    --load-system-config)
-
-  * load the user's ~/gnucash/config.user if it exists, otherwise
+- gnc:main is called to finish starting up the application.
+- parse the command line
+- load the system config if we haven't already (there's a
+    command-line option to load the file earlier, --load-system-config)
+- load the user's ~/gnucash/config.user if it exists, otherwise
     load the user's ~/gnucash/config.auto if it exists.
 
 config.auto is where we'll eventually spit out UI selected prefs.
 
+*/
 ----- %< -------------------------------------------- >% ------
 Rob Browning <rlb at cs.utexas.edu> PGP=E80E0D04F521A094 532B97F5D64E3930
Index: main.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main.scm,v
retrieving revision 1.129
retrieving revision 1.130
diff -Lsrc/scm/main.scm -Lsrc/scm/main.scm -u -r1.129 -r1.130
--- src/scm/main.scm
+++ src/scm/main.scm
@@ -20,7 +20,7 @@
 (use-modules (ice-9 slib))
 
 (use-modules (g-wrap gw-wct))
-
+(use-modules (g-wrapped gw-core-utils))
 (use-modules (g-wrapped gw-gnc))
 
 ;; Load the srfis (eventually, we should see where these are needed
@@ -55,6 +55,7 @@
 (export gnc:find-localized-file)
 (export gnc:main)
 (export gnc:safe-strcmp) ;; only used by aging.scm atm...
+(export gnc:reload-module)
 
 (re-export hash-fold)
 (re-export string-split)
@@ -63,6 +64,7 @@
 (export gnc:make-home-dir)
 (export gnc:current-config-auto)
 (export gnc:current-saved-reports)
+(export gnc:current-saved-stylesheets)
 
 ;; from command-line.scm
 (export gnc:*config-path*)
@@ -79,16 +81,12 @@
 (export gnc:make-new-acct-tree-window)  
 (export gnc:free-acct-tree-window)
 (export gnc:main-window-save-state)
+(export gnc:main-window-properties-cb)
 
 ;; from printing/print-check.scm
 (export make-print-check-format)
 (export gnc:print-check)
 
-;; from tip-of-the-day.scm
-(export gnc:get-current-tip)
-(export gnc:increment-tip-number)
-(export gnc:decrement-tip-number)
-
 ;; Get the Makefile.am/configure.in generated variables.
 (load-from-path "build-config.scm")
 
@@ -108,7 +106,8 @@
 ;; to print out various 'development version' strings throughout the code.
 ;; #t == development version, #f == stable version
 ;;
-;; NOTE: You still need to comment out the message in tip-list.scm by hand!
+;; NOTE: You still need to comment out the message in
+;; tip_of_the_day.list.in by hand!
 ;;
 (define gnc:*is-development-version?* #t)
 
@@ -170,6 +169,11 @@
         (b -1)
         (else 0)))))
 
+(define (gnc:reload-module name)
+  (let ((m (current-module)))
+    (load-from-path name)
+    (set-current-module m)))
+
 (if (not (defined? 'hash-fold))
     (define (hash-fold proc init table)
       (for-each 
@@ -358,7 +362,7 @@
      (_ "Report bugs and other problems to gnucash-devel at gnucash.org.\n")
      (_ "You can also lookup and file bug reports at http://bugzilla.gnome.org\n")
      (_ "The last stable version was ") "GnuCash 1.8.12" "\n"
-     (_ "The next stable version will be ") "GnuCash 1.10 or 2.0"
+     (_ "The next stable version will be ") "GnuCash 2.0"
      "\n\n"))))
 
 (define (gnc:startup-pass-1)
@@ -423,7 +427,6 @@
     ;; Hopefully we can gradually make them autoloading.
     (load-module "gnucash/engine" 0 #f)
 
-    (load-module "gnucash/app-file" 0 #f)
     (load-module "gnucash/register/ledger-core" 0 #f)
     (load-module "gnucash/register/register-core" 0 #f)
     (load-module "gnucash/register/register-gnome" 0 #f)
@@ -445,7 +448,6 @@
     ;; they're "well behaved" (these should probably be in modules
     ;; eventually)
     (load-from-path "main-window.scm")  ;; depends on app-utils (N_, etc.)...
-    (load-from-path "tip-of-the-day.scm") ;; depends on app-utils (config-var...)
     (load-from-path "printing/print-check.scm") ;; depends on simple-obj...
     ;; +jsled - 2002.07.08
     (load-from-path "fin.scm")
@@ -456,28 +458,8 @@
       (if (list? sources)
 	  (gnc:quote-source-set-fq-installed sources)))
 
-    (gnc:update-splash-screen (_ "Loading tip-of-the-day..."))
-    (gnc:initialize-tip-of-the-day)
-
     (set-current-module original-module))
 
-  (gnc:hook-add-dangler gnc:*book-opened-hook*
-                        (lambda (session)
-                          (if ((gnc:option-getter
-                                (gnc:lookup-global-option
-                                 "Scheduled Transactions"
-                                 "Run on GnuCash start" )))
-                              (gnc:sx-since-last-run-wrapper
-			       (gnc:session-get-url session)))))
-
-  (gnc:hook-add-dangler gnc:*new-book-hook*
-                        (lambda ()
-                          (let ((option (gnc:lookup-global-option
-                                         "General"
-                                         "No account list setup on new file")))
-                            (if (and option (not (gnc:option-value option)))
-                                (gnc:ui-hierarchy-druid)))))
-
   ;; Load the system configs
   (gnc:update-splash-screen (_ "Loading configs..."))
   (if (not (gnc:load-system-config-if-needed))
@@ -486,28 +468,16 @@
   ;; Load the user configs
   (gnc:load-user-config-if-needed)
 
-  ;; Clear the change flags caused by loading the configs
-  (gnc:global-options-clear-changes)
-
   (gnc:report-menu-setup)
 
-  ;; add the menu option to edit style sheets 
-  (gnc:add-extension
-   (gnc:make-menu-item 
-    (N_ "_Style Sheets...")
-    (N_ "Edit report style sheets.")
-    (list gnc:window-name-main "_Edit" "_Preferences...")
-    (lambda ()
-      (gnc:style-sheet-dialog-open))))
-
   ;; the Welcome to GnuCash "extravaganza" report
   (gnc:add-extension 
    (gnc:make-menu-item 
     (N_ "Welcome Sample Report")
     (N_ "Welcome-to-GnuCash report screen")
-    (list gnc:window-name-main gnc:menuname-reports gnc:menuname-utility "")
-    (lambda ()
-      (gnc:main-window-open-report (gnc:make-welcome-report) #f))))
+    (list gnc:menuname-reports gnc:menuname-utility "")
+    (lambda (window)
+      (gnc:main-window-open-report (gnc:make-welcome-report) window))))
 
   (gnc:hook-run-danglers gnc:*startup-hook*)
 
@@ -586,7 +556,7 @@
 	  (gnc:update-splash-screen (_ "Loading data..."))
 	  (and (not (gnc:file-open-file file))
 	       (gnc:hook-run-danglers gnc:*book-opened-hook* #f)))
-        (gnc:hook-run-danglers gnc:*book-opened-hook* #f))))
+        (and (gnc:hook-run-danglers gnc:*book-opened-hook* #f)))))
 
 (define (gnc:main)
 
@@ -630,23 +600,26 @@
       ;; We're not in batch mode; we can go ahead and do the normal thing.
       (begin
         (gnc:hook-add-dangler gnc:*ui-shutdown-hook* gnc:gui-finish)
-        (set! gnc:*command-line-remaining*
-              (gnc:gui-init gnc:*command-line-remaining*))
-        (if (and
-             (not (gnc:account-file-to-load))
-             (not (string? (gnc:history-get-last)))
-             (gnc:option-value
-              (gnc:lookup-global-option "__new_user" "first_startup")))
-            (begin
-	      (gnc:destroy-splash-screen)
-	      (gnc:new-user-dialog))
-            (begin
-	      (gnc:load-account-file)
-	      (gnc:destroy-splash-screen)))
-	(gnc:hook-run-danglers gnc:*ui-post-startup-hook*)
-        (gnc:start-ui-event-loop)
-        (gnc:hook-remove-dangler gnc:*ui-shutdown-hook* gnc:gui-finish))
-
+        (let* ((init-window-cons-rest (gnc:gui-init gnc:*command-line-remaining*))
+               (main-window (car init-window-cons-rest)))
+          (set! gnc:*command-line-remaining* (cdr init-window-cons-rest))
+          (if (and
+               (not (gnc:account-file-to-load))
+               (not (string? (gnc:history-get-last)))
+	       (gnc:gconf-get-bool "dialogs/new_user" "first_startup"))
+              (begin
+                (gnc:destroy-splash-screen)
+                (gnc:new-user-dialog))
+              (begin
+                (gnc:destroy-splash-screen)
+                (gnc:main-window-set-progressbar-window main-window)
+                (gnc:load-account-file)
+                ))
+          ;; no matter how or what we loaded, ensure the main-window title is valid...
+          (gnc:hook-run-danglers gnc:*ui-post-startup-hook*)
+          (gnc:start-ui-event-loop)
+          (gnc:hook-remove-dangler gnc:*ui-shutdown-hook* gnc:gui-finish)))
+        
       ;; else: we're in batch mode.  Just do what the user said on the
       ;; command line
       (map handle-batch-mode-item (reverse gnc:*batch-mode-things-to-do*)))
Index: main-window.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/main-window.scm,v
retrieving revision 1.29
retrieving revision 1.30
diff -Lsrc/scm/main-window.scm -Lsrc/scm/main-window.scm -u -r1.29 -r1.30
--- src/scm/main-window.scm
+++ src/scm/main-window.scm
@@ -71,30 +71,6 @@
 	    (list->vector (list 'payable   (N_ "Accounts Payable") ""))
 	    (list->vector (list 'receivable (N_ "Accounts Receivable") "")))))
 
-    (add-option
-     (gnc:make-list-option
-      (N_ "Account Tree") (N_ "Account fields to display")
-      "c" ""
-      (list 'description 'total)
-      (list (list->vector (list 'type           (N_ "Type") ""))
-            (list->vector (list 'code           (N_ "Code") ""))
-            (list->vector (list 'description    (N_ "Description") ""))
-            (list->vector (list 'notes          (N_ "Notes") ""))
-            (list->vector (list 'commodity      (N_ "Commodity") ""))
-            (list->vector (list 'balance        (N_ "Balance") ""))
-            (list->vector (list 'balance_report (N_ "Balance in Report Currency") ""))
-            (list->vector (list 'present        (N_ "Present Balance") ""))
-            (list->vector (list 'present_report (N_ "Present Balance in Report Currency") ""))
-            (list->vector (list 'cleared        (N_ "Cleared Balance") ""))
-            (list->vector (list 'cleared_report (N_ "Cleared Balance in Report Currency") ""))
-            (list->vector (list 'reconciled        (N_ "Reconciled Balance") ""))
-            (list->vector (list 'reconciled_report (N_ "Reconciled Balance in Report Currency") ""))
-            (list->vector (list 'future_min        (N_ "Future Minimum Balance") ""))
-            (list->vector (list 'future_min_report (N_ "Future Minimum Balance in Report Currency") ""))
-            (list->vector (list 'total          (N_ "Total") ""))
-            (list->vector (list 'total_report   (N_ "Total in Report Currency") ""))
-            (list->vector (list 'tax-info       (N_ "Tax Info") "")))))
-
     options))
 
 (define (gnc:make-new-acct-tree-window)  
@@ -142,7 +118,7 @@
 
     (if (not save-file?) (gnc:warn (_ "Can't save window state")))
 
-    (if (and save-file? conf-file-name (gnc:mdi-has-apps?))
+    (if (and save-file? conf-file-name)
         (let ((book-path (build-path (getenv "HOME") ".gnucash" "books" 
                                      conf-file-name)))
           (with-output-to-port (open-output-file book-path)
@@ -150,8 +126,7 @@
               (hash-fold 
                (lambda (k v p)
                  (if (gnc:report-needs-save? v)
-                     (display 
-                      (gnc:report-generate-restore-forms v))))
+                     (display (gnc:report-generate-restore-forms v))))
                #t *gnc:_reports_*)
 
               (hash-fold 
@@ -160,24 +135,24 @@
                #t gnc:*acct-tree-options*)
 
               (force-output)))
-          (gnc:mdi-save (gnc:mdi-get-current) book-url)))))
+	  ))))
 
 (define (gnc:main-window-book-close-handler session)
-    (gnc:main-window-save-state session)
+  (gnc:main-window-save-state session)
 
-    (let ((dead-reports '()))
-      ;; get a list of the reports we'll be needing to nuke     
-      (hash-fold 
-       (lambda (k v p)
-         (set! dead-reports (cons k dead-reports)) #t) #t *gnc:_reports_*)
-
-      ;; actually remove them (if they're being displayed, the
-      ;; window's reference will keep the report alive until the
-      ;; window is destroyed, but find-report will fail)
-      (for-each 
-       (lambda (dr) 
-         (hash-remove! *gnc:_reports_* dr))
-       dead-reports)))
+  (let ((dead-reports '()))
+    ;; get a list of the reports we'll be needing to nuke     
+    (hash-fold 
+     (lambda (k v p)
+       (set! dead-reports (cons k dead-reports)) #t) #t *gnc:_reports_*)
+
+    ;; actually remove them (if they're being displayed, the
+    ;; window's reference will keep the report alive until the
+    ;; window is destroyed, but find-report will fail)
+    (for-each 
+     (lambda (dr)
+       (hash-remove! *gnc:_reports_* dr))
+     dead-reports)))
 
 (define (gnc:main-window-book-open-handler session)
   (define (try-load file-suffix)
@@ -194,25 +169,26 @@
 	 (dead-reports '()))
     (if conf-file-name 
         (try-load conf-file-name))
-    (gnc:mdi-restore (gnc:mdi-get-current) book-url)))
+    (gnc:new-account-tree #f)
+
+    ;; the reports have only been created at this point; create their ui component.
+    (hash-fold (lambda (key val prior-result)
+                (gnc:main-window-open-report (gnc:report-id val)
+                                             #f ;; =window: #f/null => open in first window
+                                             ))
+               #t *gnc:_reports_*)
+    ))
 
-(define (gnc:main-window-ui-startup-handler)
-  (gnc:add-extension
-    (gnc:make-menu-item (N_ "Properties")
-			(N_ "View and edit the properties of this file.")
-			(list "Main" "_File" "_Print")
-			(lambda ()
-			  (let* ((book (gnc:get-current-book))
-				 (slots (gnc:book-get-slots book)))
+(define (gnc:main-window-properties-cb)
+  (let* ((book (gnc:get-current-book))
+	 (slots (gnc:book-get-slots book)))
 
-			    (define (changed_cb)
-			      (gnc:book-kvp-changed book))
+    (define (changed_cb)
+      (gnc:book-kvp-changed book))
 			    
-			    (gnc:kvp-option-dialog gnc:id-book
-						   slots (_ "Book Options")
-						   changed_cb)))))
-  (gnc:add-extension (gnc:make-separator (list "Main" "_File" "_Print")))
-)
+    (gnc:kvp-option-dialog gnc:id-book
+			   slots (_ "Book Options")
+			   changed_cb)))
 
 (gnc:hook-remove-dangler gnc:*book-opened-hook* 
                          gnc:main-window-book-open-handler)
@@ -223,8 +199,3 @@
                          gnc:main-window-book-close-handler)
 (gnc:hook-add-dangler gnc:*book-closed-hook* 
                       gnc:main-window-book-close-handler)
-
-(gnc:hook-remove-dangler gnc:*ui-startup-hook* 
-                         gnc:main-window-ui-startup-handler)
-(gnc:hook-add-dangler gnc:*ui-startup-hook* 
-                      gnc:main-window-ui-startup-handler)
--- src/scm/tip-list.scm
+++ /dev/null
@@ -1,99 +0,0 @@
-(
- (N_ "Warning!! This is a DEVELOPMENT version of GnuCash.
-It probably has lots of bugs and unstable features!
-If you are looking for a stable personal finance application,
-you should use the latest release of GnuCash 1.8.")
-
- (N_ "The GnuCash online manual has lots of helpful information.  
-If you are upgrading from earlier versions of GnuCash, the section
-\"What's new in GnuCash 1.8\" is particularly interesting. You can
-access the manual under the Help menu.")
-
- (N_ "You can easily import your existing financial data from Quicken,
-MS Money or other programs that export QIF files or OFX files.  In the
-File menu, click on the sub-menu Import and click on QIF or OFX file,
-respectively. Then, follow the instructions provided.")
-
- (N_ "If you are familiar with other financial programs such as Quicken,
-note that GnuCash uses accounts instead of categories to track
-income and expenses.  For more information on income and expense
-accounts, please see the GnuCash online manual.")
-
- (N_ "Create new accounts by clicking the New button in the main window
-tool bar.  This will bring up a dialog box where you can enter
-account details.  For more information on choosing an account type
-or setting up a chart of accounts, please see the GnuCash online
-manual.")
-
- (N_ "Click the right mouse button in the main window to bring up the
-account menu options. Within each register, clicking the right
-mouse button brings up the transaction menu options.")
-
- (N_ "To enter multiple-split transactions such as a paycheck with
-multiple deductions, click the Split button in the tool bar.
-Alternatively, in the View -> Style menu, you can choose the register
-style Auto-Split Ledger or Transaction Journal.")
-
- (N_ "As you enter amounts in the register, you can use the GnuCash
-calculator to add, subtract, multiply and divide .  Simply type
-the first value, then select '+', '-','*', or '/'.  Type the
-second value and press Enter to record the calculated amount.")
-
- (N_ "Quick-fill makes it easy to enter common transactions.  When you
-type the first letter(s) of a common transaction description,
-GnuCash will automatically complete the remainder of the
-transaction as it was last entered.")
-
- (N_ "Type the first letter(s) of an existing account name in the
-Transfer register column, and GnuCash will complete the name from
-your list of accounts. For subaccounts, type the first letter(s)
-of the parent account, followed by ':' and the first letter(s) of
-the subaccount (e.g. A:C for Assets:Cash.)")
-
- (N_ "Want to see all your subaccount transactions in one register?
-From the main menu, highlight the parent account and select
-Accounts -> Open Subaccounts from the menu.")
-
- (N_ "When entering dates, you can type '+' or '-' to increment or
-decrement the selected date. You can use '+' and '-' to increment and
-decrement check numbers as well.")
-
- (N_ "In the reconcile window, you can press the spacebar to mark
-transactions as reconciled.  You can also press Tab and Shift-Tab to
-move between deposits and withdrawals.")
-
-;; FIXME:
-;; (N_ "You should back up your files regularly.  Just copy
-;;your GnuCash data file to a floppy or other backup device.")
-
-;; FIXME: Mention the new multi-currency dialog here, when such a
-;; transaction is going to be edited.
- (N_ "To transfer funds between accounts with different currencies,
-click on the Transfer button in the register toolbar, select the
-accounts, and the Currency Transfer options for entering the exchange
-rate or the other currency's amount will be available.")
-
- (N_ "You can pack multiple reports into a single window, 
-providing all the financial information you want at a glance.
-To do so, use the Sample & Custom -> \"Custom Multicolumn Report\" 
-report.")
-
- (N_ "GnuCash can act as a simple web browser!  To display
-a web page as a report, use the Sample & Custom -> 
-\"Custom Web Report\" report.")
-
- (N_ "Style Sheets affect how reports are displayed.  Choose
-a style sheet for your report as a report option, and use
-the Edit -> Style Sheets menu to customize style sheets.")
-
- (N_ "The GnuCash developers are easy to contact.  As well
-as several mailing lists, you can chat to them live on IRC!
-Join them on #gnucash at irc.gnome.org")
-
- (N_ "There is a theory that if ever anyone discovers what
-the Universe is for and why it is here, it will instantly
-disappear and be replaced with something even more bizarre and
-inexplicable.
-There is another theory that this has already happened.
-Douglas Adams, \"The Restaurant at the End of the Universe\"")
-)
Index: path.scm
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/path.scm,v
retrieving revision 1.20
retrieving revision 1.21
diff -Lsrc/scm/path.scm -Lsrc/scm/path.scm -u -r1.20 -r1.21
--- src/scm/path.scm
+++ src/scm/path.scm
@@ -40,10 +40,13 @@
     (gnc:make-dir home-dir)))
 
 (define gnc:current-config-auto
-  (build-path (getenv "HOME") ".gnucash" "config-1.9.auto"))
+  (build-path (getenv "HOME") ".gnucash" "config-2.0.auto"))
 
 (define gnc:current-saved-reports
-  (build-path (getenv "HOME") ".gnucash" "saved-reports-1.9"))
+  (build-path (getenv "HOME") ".gnucash" "saved-reports-2.0"))
+
+(define gnc:current-saved-stylesheets
+  (build-path (getenv "HOME") ".gnucash" "stylesheets-2.0"))
 
 (define gnc:load-user-config-if-needed
   (let ((user-config-loaded? #f))
@@ -74,13 +77,16 @@
 		    ;; Don't continue adding to this list. When 2.0
 		    ;; rolls around bump the 1.4 (unnumbered) files
 		    ;; off the list.
-                    '("config-1.9.user" "config-1.8.user"
+                    '("config-2.0.user" "config-1.8.user"
 		      "config-1.6.user" "config.user"
-                      "config-1.9.auto" "config-1.8.auto"
+                      "config-2.0.auto" "config-1.8.auto"
 		      "config-1.6.auto" "config.auto"))
 	    (gnc:debug "loading saved reports")
 	    (or-map try-load-no-set
-		    '("saved-reports-1.9" "saved-reports-1.8"))
+		    '("saved-reports-2.0" "saved-reports-1.8"))
+	    (gnc:debug "loading stylesheets")
+	    (or-map try-load-no-set
+		    '("stylesheets-2.0"))
 	    )))))
 
 ;; the system config should probably be loaded from some directory
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/scm/Makefile.am,v
retrieving revision 1.39
retrieving revision 1.40
diff -Lsrc/scm/Makefile.am -Lsrc/scm/Makefile.am -u -r1.39 -r1.40
--- src/scm/Makefile.am
+++ src/scm/Makefile.am
@@ -15,8 +15,6 @@
   main-window.scm \
   path.scm \
   substring-search.scm \
-  tip-list.scm \
-  tip-of-the-day.scm \
   xml-generator.scm
 
 gncscm_DATA = ${gnc_regular_scm_files}
--- src/scm/tip-of-the-day.scm
+++ /dev/null
@@ -1,105 +0,0 @@
-;; tip-of-the-day.scm -*-scheme-*-
-;;
-;; This program is free software; you can redistribute it and/or    
-;; modify it under the terms of the GNU General Public License as   
-;; published by the Free Software Foundation; either version 2 of   
-;; the License, or (at your option) any later version.              
-;;                                                                  
-;; This program is distributed in the hope that it will be useful,  
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of   
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    
-;; GNU General Public License for more details.                     
-;;                                                                  
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, contact:
-;;
-;; Free Software Foundation           Voice:  +1-617-542-5942
-;; 59 Temple Place - Suite 330        Fax:    +1-617-542-2652
-;; Boston, MA  02111-1307,  USA       gnu at gnu.org
-
-;; Scheme functions for supporting tooltips
-;; Written by Robert Merkel <rgmerk at mira.net>
-
-;; Tips should be written as a list of lists of string.  Each list of strings 
-;; represents one tip
-
-(define (non-negative-integer? value)
-  (and (integer? value) (>= value 0)))
-
-(define gnc:*number-of-tips* 
-  (gnc:make-config-var
-   "Total number of tips"
-   (lambda(var value) (if (non-negative-integer? value) (list value) #f))
-   =
-   0))
-
-(define gnc:*tip-file* #f)
-
-(define gnc:*tip-list* '())
-
-(define (gnc:read-tips)
-  (let ((in-port
-         (open-input-file
-          (%search-load-path (gnc:config-var-value-get gnc:*tip-file*)))))
-    (set! gnc:*tip-list* (read in-port))
-    (set! gnc:*tip-list*
-          (map (lambda (pair) (cadr pair)) gnc:*tip-list*))
-    (if (not (= (length gnc:*tip-list*) (gnc:current-tip-number)))
-        (begin
-          (gnc:config-var-value-set! gnc:*number-of-tips* #t
-                                     (length gnc:*tip-list*))
-          (if (<= (gnc:config-var-value-get gnc:*number-of-tips*)
-                  (gnc:current-tip-number))
-              (gnc:reset-tip-number))))
-    (close-port in-port)
-    #f))
-
-(define (gnc:current-tip-number)
-  (let ((num (gnc:option-value
-              (gnc:lookup-global-option "__tips" "current_tip_number"))))
-    (if (<= (gnc:config-var-value-get gnc:*number-of-tips*) num)
-        (gnc:reset-tip-number))
-    (gnc:option-value (gnc:lookup-global-option "__tips" "current_tip_number"))))
-
-(define (gnc:get-current-tip)
-  (_ (list-ref gnc:*tip-list* (gnc:current-tip-number))))
-
-(define (gnc:reset-tip-number)
-  (let ((opt (gnc:lookup-global-option "__tips" "current_tip_number")))
-    (gnc:option-set-value opt 0)))
-
-(define (gnc:increment-tip-number)
-  (let ((new-value (+ (gnc:current-tip-number) 1))
-        (opt (gnc:lookup-global-option "__tips" "current_tip_number")))
-    (if (< new-value (gnc:config-var-value-get gnc:*number-of-tips*))
-	(gnc:option-set-value opt new-value)
-	(gnc:option-set-value opt 0))))
-
-(define (gnc:decrement-tip-number)
-  (let ((new-value (- (gnc:current-tip-number) 1))
-        (opt (gnc:lookup-global-option "__tips" "current_tip_number")))
-    (if (< new-value 0)
-	(gnc:option-set-value opt (- (gnc:config-var-value-get
-                                      gnc:*number-of-tips*) 1))
-	(gnc:option-set-value opt new-value))))
-
-(define (gnc:tip-of-the-day-startup-func)
-  (let ((tip-opt (gnc:lookup-global-option "General"
-                                           "Display \"Tip of the Day\"")))
-    (if (gnc:option-value tip-opt)
-        (gnc:ui-totd-dialog-create-and-run))))
-
-(define (gnc:initialize-tip-of-the-day)
-  (set! gnc:*tip-file*
-        (gnc:make-config-var
-         "Tip file"
-         (lambda (var value) (if (string? value) (list value) #f))
-         string=?
-         "tip-list.scm"))
-
-  (gnc:register-configuration-option
-   (gnc:make-internal-option "__tips" "current_tip_number" 0))
-  
-  (gnc:read-tips)
-  
-  (gnc:hook-add-dangler gnc:*ui-startup-hook*  gnc:tip-of-the-day-startup-func))
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/test-core/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -Lsrc/test-core/Makefile.am -Lsrc/test-core/Makefile.am -u -r1.7 -r1.8
--- src/test-core/Makefile.am
+++ src/test-core/Makefile.am
@@ -11,4 +11,5 @@
 AM_CFLAGS = \
   -I${top_srcdir}/src \
   -I${top_srcdir}/src/gnc-module \
-  ${GLIB_CFLAGS}
+  ${GLIB_CFLAGS} \
+  ${GUILE_INCS}


More information about the gnucash-changes mailing list